From 0892abad0bea09e8f61eeb6cb05d14ba116310d0 Mon Sep 17 00:00:00 2001 From: OJ Kwon <1210596+kwonoj@users.noreply.github.com> Date: Thu, 7 Sep 2023 15:44:05 -0700 Subject: [PATCH] refactor(tests): move with-tailwind to e2e --- .../basic-tailwind/index.test.ts} | 17 ++++++++--------- .../basic-tailwind}/pages/_app.js | 0 .../basic-tailwind}/pages/index.js | 0 .../basic-tailwind}/postcss.config.js | 0 .../basic-tailwind}/styles/global.css | 0 .../basic-tailwind}/tailwind.config.js | 0 .../css-fixtures/with-tailwindcss/package.json | 7 ------- 7 files changed, 8 insertions(+), 16 deletions(-) rename test/{integration/css/test/basic-tailwind.test.js => e2e/basic-tailwind/index.test.ts} (72%) rename test/{integration/css-fixtures/with-tailwindcss => e2e/basic-tailwind}/pages/_app.js (100%) rename test/{integration/css-fixtures/with-tailwindcss => e2e/basic-tailwind}/pages/index.js (100%) rename test/{integration/css-fixtures/with-tailwindcss => e2e/basic-tailwind}/postcss.config.js (100%) rename test/{integration/css-fixtures/with-tailwindcss => e2e/basic-tailwind}/styles/global.css (100%) rename test/{integration/css-fixtures/with-tailwindcss => e2e/basic-tailwind}/tailwind.config.js (100%) delete mode 100644 test/integration/css-fixtures/with-tailwindcss/package.json diff --git a/test/integration/css/test/basic-tailwind.test.js b/test/e2e/basic-tailwind/index.test.ts similarity index 72% rename from test/integration/css/test/basic-tailwind.test.js rename to test/e2e/basic-tailwind/index.test.ts index 8ff9b477d2952..4a7b3a6c04afc 100644 --- a/test/integration/css/test/basic-tailwind.test.js +++ b/test/e2e/basic-tailwind/index.test.ts @@ -2,22 +2,21 @@ import { createNext, FileRef } from 'e2e-utils' import webdriver from 'next-webdriver' import { join } from 'path' - -const fixturesDir = join(__dirname, '../..', 'css-fixtures') +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', () => { - const appDir = join(fixturesDir, 'with-tailwindcss') - - let next + let next: NextInstance beforeAll(async () => { next = await createNext({ files: { - pages: new FileRef(join(appDir, 'pages')), - styles: new FileRef(join(appDir, 'styles')), - 'postcss.config.js': new FileRef(join(appDir, 'postcss.config.js')), - 'tailwind.config.js': new FileRef(join(appDir, 'tailwind.config.js')), + 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', diff --git a/test/integration/css-fixtures/with-tailwindcss/pages/_app.js b/test/e2e/basic-tailwind/pages/_app.js similarity index 100% rename from test/integration/css-fixtures/with-tailwindcss/pages/_app.js rename to test/e2e/basic-tailwind/pages/_app.js diff --git a/test/integration/css-fixtures/with-tailwindcss/pages/index.js b/test/e2e/basic-tailwind/pages/index.js similarity index 100% rename from test/integration/css-fixtures/with-tailwindcss/pages/index.js rename to test/e2e/basic-tailwind/pages/index.js diff --git a/test/integration/css-fixtures/with-tailwindcss/postcss.config.js b/test/e2e/basic-tailwind/postcss.config.js similarity index 100% rename from test/integration/css-fixtures/with-tailwindcss/postcss.config.js rename to test/e2e/basic-tailwind/postcss.config.js diff --git a/test/integration/css-fixtures/with-tailwindcss/styles/global.css b/test/e2e/basic-tailwind/styles/global.css similarity index 100% rename from test/integration/css-fixtures/with-tailwindcss/styles/global.css rename to test/e2e/basic-tailwind/styles/global.css diff --git a/test/integration/css-fixtures/with-tailwindcss/tailwind.config.js b/test/e2e/basic-tailwind/tailwind.config.js similarity index 100% rename from test/integration/css-fixtures/with-tailwindcss/tailwind.config.js rename to test/e2e/basic-tailwind/tailwind.config.js diff --git a/test/integration/css-fixtures/with-tailwindcss/package.json b/test/integration/css-fixtures/with-tailwindcss/package.json deleted file mode 100644 index 50375a78eb20b..0000000000000 --- a/test/integration/css-fixtures/with-tailwindcss/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "postcss": { - "plugins": { - "tailwindcss": {} - } - } -}