diff --git a/test/development/basic/tailwind-jit.test.ts b/test/development/basic/tailwind-jit.test.ts index 1852ba9d73628..8b8c0bbd5d02d 100644 --- a/test/development/basic/tailwind-jit.test.ts +++ b/test/development/basic/tailwind-jit.test.ts @@ -2,7 +2,13 @@ import { join } from 'path' import webdriver from 'next-webdriver' import { createNext, FileRef } from 'e2e-utils' import { NextInstance } from 'test/lib/next-modes/base' -import { check } from 'next-test-utils' +import { check, shouldRunTurboDevTest } from 'next-test-utils' + +// [TODO]: It is unclear why turbopack takes longer to run this test +// remove once it's fixed +if (shouldRunTurboDevTest()) { + jest.setTimeout(1000 * 60 * 5) +} describe('TailwindCSS JIT', () => { let next: NextInstance diff --git a/test/e2e/basic-tailwind/index.test.ts b/test/e2e/basic-tailwind/index.test.ts deleted file mode 100644 index 4a7b3a6c04afc..0000000000000 --- a/test/e2e/basic-tailwind/index.test.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* eslint-env jest */ -import { createNext, FileRef } from 'e2e-utils' -import webdriver from 'next-webdriver' -import { join } from 'path' -import type { NextInstance } from 'test/lib/next-modes/base' - -//[NOTE]: This test is migrated from next-dev integration tests for turbopack, -//Extracted into a single test file so we can put this in blocking tests for turbopack (turbopack-tests-manifests.js) -describe('Render css with tailwind', () => { - let next: NextInstance - beforeAll(async () => { - next = await createNext({ - files: { - pages: new FileRef(join(__dirname, 'pages')), - styles: new FileRef(join(__dirname, 'styles')), - 'postcss.config.js': new FileRef(join(__dirname, 'postcss.config.js')), - 'tailwind.config.js': new FileRef( - join(__dirname, 'tailwind.config.js') - ), - }, - dependencies: { - postcss: '^8.4.29', - tailwindcss: '^3.3.3', - autoprefixer: '^10.4.13', - }, - }) - }) - - afterAll(() => next?.destroy()) - - it('should apply global styles', async () => { - let browser - try { - browser = await webdriver(next.url, '/') - - const alignItems = await browser.eval( - `window.getComputedStyle(document.querySelector('footer')).alignItems` - ) - expect(alignItems).toMatchInlineSnapshot(`"center"`) - } finally { - if (browser) { - await browser.close() - } - } - }) -}) diff --git a/test/e2e/basic-tailwind/pages/_app.js b/test/e2e/basic-tailwind/pages/_app.js deleted file mode 100644 index 0bd950249faeb..0000000000000 --- a/test/e2e/basic-tailwind/pages/_app.js +++ /dev/null @@ -1,5 +0,0 @@ -import '../styles/global.css' - -export default function MyApp({ Component, pageProps }) { - return -} diff --git a/test/e2e/basic-tailwind/pages/index.js b/test/e2e/basic-tailwind/pages/index.js deleted file mode 100644 index 5311664264b65..0000000000000 --- a/test/e2e/basic-tailwind/pages/index.js +++ /dev/null @@ -1,16 +0,0 @@ -export default function Home() { - return ( -
- -
- ) -} diff --git a/test/e2e/basic-tailwind/postcss.config.js b/test/e2e/basic-tailwind/postcss.config.js deleted file mode 100644 index 33ad091d26d8a..0000000000000 --- a/test/e2e/basic-tailwind/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} diff --git a/test/e2e/basic-tailwind/styles/global.css b/test/e2e/basic-tailwind/styles/global.css deleted file mode 100644 index b5c61c956711f..0000000000000 --- a/test/e2e/basic-tailwind/styles/global.css +++ /dev/null @@ -1,3 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; diff --git a/test/e2e/basic-tailwind/tailwind.config.js b/test/e2e/basic-tailwind/tailwind.config.js deleted file mode 100644 index 95b7c46ff8ab9..0000000000000 --- a/test/e2e/basic-tailwind/tailwind.config.js +++ /dev/null @@ -1,12 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - './pages/**/*.{js,ts,jsx,tsx}', - './components/**/*.{js,ts,jsx,tsx}', - './app/**/*.{js,ts,jsx,tsx}', - ], - theme: { - extend: {}, - }, - plugins: [], -}