From 7b669622a64fade5cc0f8adffd489b5f0af97c5b Mon Sep 17 00:00:00 2001 From: Ben Irvin Date: Wed, 3 Apr 2024 11:56:00 +0200 Subject: [PATCH] chore: move cli-tests to tests/cli --- .gitignore | 2 ++ docs/docs/guides/e2e/00-setup.md | 10 +--------- jest.config.cli.js | 2 +- package.json | 6 +++--- {cli-tests => tests/cli}/README.md | 0 {cli-tests => tests/cli}/app-template/README.md | 0 {cli-tests => tests/cli}/app-template/package.json | 0 {cli-tests => tests/cli}/app-template/template.json | 0 .../cli}/app-template/template/src/api/.gitkeep | 0 .../api/category/content-types/category/schema.json | 0 .../src/api/category/controllers/category.js | 0 .../template/src/api/category/routes/category.js | 0 .../template/src/api/category/services/category.js | 0 .../api/complex/content-types/complex/schema.json | 0 .../template/src/api/complex/controllers/complex.js | 0 .../template/src/api/complex/routes/complex.js | 0 .../template/src/api/complex/services/complex.js | 0 .../template/src/api/config/controllers/config.js | 0 .../template/src/api/config/routes/config.js | 0 .../template/src/api/config/services/config.js | 0 .../content-types/single-type-localized/schema.json | 0 .../controllers/single-type-localized.js | 0 .../routes/single-type-localized.js | 0 .../services/single-type-localized.js | 0 .../content-types/single-type-non-local/schema.json | 0 .../controllers/single-type-non-local.js | 0 .../routes/single-type-non-local.js | 0 .../services/single-type-non-local.js | 0 .../single-type-unpublished/schema.json | 0 .../controllers/single-type-unpublished.js | 0 .../routes/single-type-unpublished.js | 0 .../services/single-type-unpublished.js | 0 .../component-category/component-two.json | 0 .../components/component-category/component.json | 0 .../cli}/app-template/template/src/constants.js | 0 .../cli}/app-template/template/src/index.js | 0 {cli-tests => tests/cli}/constants.js | 0 {cli-tests => tests/cli}/data/README.md | 0 {cli-tests => tests/cli}/data/complex.tar.gz | Bin {cli-tests => tests/cli}/scripts/dts-export.js | 0 {cli-tests => tests/cli}/scripts/dts-import.js | 0 {cli-tests => tests/cli}/scripts/rate-limit.js | 0 {cli-tests => tests/cli}/tests/strapi/config.js | 0 .../tests/strapi/data-transfer/export.test.cli.js | 0 .../tests/strapi/data-transfer/import.test.cli.js | 0 .../cli}/tests/strapi/version/version.test.cli.js | 0 {cli-tests => tests/cli}/utils/fs.js | 0 {cli-tests => tests/cli}/utils/index.js | 0 {cli-tests => tests/cli}/utils/test-app.js | 0 .../tests/content-releases/releases-page.spec.ts | 8 +++----- tests/e2e/tests/transfer/tokens.spec.ts | 6 +++--- tests/scripts/run-cli-tests.js | 4 ++-- tests/scripts/run-e2e-tests.js | 2 +- 53 files changed, 16 insertions(+), 24 deletions(-) rename {cli-tests => tests/cli}/README.md (100%) rename {cli-tests => tests/cli}/app-template/README.md (100%) rename {cli-tests => tests/cli}/app-template/package.json (100%) rename {cli-tests => tests/cli}/app-template/template.json (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/.gitkeep (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/category/content-types/category/schema.json (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/category/controllers/category.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/category/routes/category.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/category/services/category.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/complex/content-types/complex/schema.json (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/complex/controllers/complex.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/complex/routes/complex.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/complex/services/complex.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/config/controllers/config.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/config/routes/config.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/config/services/config.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/single-type-localized/content-types/single-type-localized/schema.json (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/single-type-localized/controllers/single-type-localized.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/single-type-localized/routes/single-type-localized.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/single-type-localized/services/single-type-localized.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/single-type-non-local/content-types/single-type-non-local/schema.json (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/single-type-non-local/controllers/single-type-non-local.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/single-type-non-local/routes/single-type-non-local.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/single-type-non-local/services/single-type-non-local.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/single-type-unpublished/content-types/single-type-unpublished/schema.json (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/single-type-unpublished/controllers/single-type-unpublished.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/single-type-unpublished/routes/single-type-unpublished.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/api/single-type-unpublished/services/single-type-unpublished.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/components/component-category/component-two.json (100%) rename {cli-tests => tests/cli}/app-template/template/src/components/component-category/component.json (100%) rename {cli-tests => tests/cli}/app-template/template/src/constants.js (100%) rename {cli-tests => tests/cli}/app-template/template/src/index.js (100%) rename {cli-tests => tests/cli}/constants.js (100%) rename {cli-tests => tests/cli}/data/README.md (100%) rename {cli-tests => tests/cli}/data/complex.tar.gz (100%) rename {cli-tests => tests/cli}/scripts/dts-export.js (100%) rename {cli-tests => tests/cli}/scripts/dts-import.js (100%) rename {cli-tests => tests/cli}/scripts/rate-limit.js (100%) rename {cli-tests => tests/cli}/tests/strapi/config.js (100%) rename {cli-tests => tests/cli}/tests/strapi/data-transfer/export.test.cli.js (100%) rename {cli-tests => tests/cli}/tests/strapi/data-transfer/import.test.cli.js (100%) rename {cli-tests => tests/cli}/tests/strapi/version/version.test.cli.js (100%) rename {cli-tests => tests/cli}/utils/fs.js (100%) rename {cli-tests => tests/cli}/utils/index.js (100%) rename {cli-tests => tests/cli}/utils/test-app.js (100%) diff --git a/.gitignore b/.gitignore index 9d05a6dc47..6d3c4ed999 100644 --- a/.gitignore +++ b/.gitignore @@ -147,6 +147,8 @@ playwright-report test-results !tests/e2e/data/*.tar tests/e2e/.env +!tests/cli/data/*.tar.gz +tests/cli/.env ############################ # Strapi diff --git a/docs/docs/guides/e2e/00-setup.md b/docs/docs/guides/e2e/00-setup.md index aba8f64872..75eb9780b4 100644 --- a/docs/docs/guides/e2e/00-setup.md +++ b/docs/docs/guides/e2e/00-setup.md @@ -75,7 +75,7 @@ The test-app you create uses a [template](https://docs.strapi.io/developer-docs/ If you add anything to the template, be sure to add this information to [the docs](/testing/e2e/app-template). -## Running tests with environment variables +## Running tests with environment variables (needed to run EE tests) To set specific environment variables for your tests, a `.env` file can be created in the root of the e2e folder. This is useful if you need to run tests with a Strapi license or set future flags. @@ -89,14 +89,6 @@ Playwright enables reliable end-to-end testing for modern web apps. It's cross b For more information check out their [docs](https://playwright.dev/docs/intro). If you're struggling with their APIs, then check out their specific [API documentation](https://playwright.dev/docs/api/class-playwright). -## Running tests with environment variables - -To set specific environment variables for your tests, a `.env` file can be created in the root of the e2e folder. This is useful if you need to run tests with a Strapi license or set future flags. - -## Running tests with future flags - -If you are writing tests for an unstable future feature you will need to add `app-template/config/features.js`. Currently the app template generation does not take the config folder into consideration. However, the run-e2e-tests script will apply the features config to the generated app. See the documentation for [features.js](https://docs.strapi.io/dev-docs/configurations/features#enabling-a-future-flag) - ## What makes a good end to end test? This is the million dollar question. E2E tests typically test complete user flows that touch numerous points of the application it's testing, we're not interested in what happens during a process, only the user perspective and end results. Consider writing them with your story hat on. E.g. "As a user I want to create a new entity, publish that entity, and then be able to retrieve its data from the content API". diff --git a/jest.config.cli.js b/jest.config.cli.js index f64237e72f..cf6e3b83bb 100644 --- a/jest.config.cli.js +++ b/jest.config.cli.js @@ -4,7 +4,7 @@ module.exports = { displayName: 'CLI tests', testMatch: ['**/?(*.)+(spec|test).cli.(js|ts)'], testEnvironment: 'node', - setupFilesAfterEnv: ['/../../../test/setup/jest-cli.setup.js'], + setupFilesAfterEnv: ['/../../../../tests/setup/jest-cli.setup.js'], coveragePathIgnorePatterns: [ '/dist/', '/node_modules/', diff --git a/package.json b/package.json index fcad6c0963..01ea292773 100644 --- a/package.json +++ b/package.json @@ -49,9 +49,9 @@ "setup": "yarn && yarn clean && yarn build --skip-nx-cache", "test:api": "node tests/scripts/run-api-tests.js", "test:clean": "rimraf ./coverage", - "test:cli": "node test/scripts/run-cli-tests.js", - "test:cli:clean": "node test/scripts/run-cli-tests.js clean", - "test:cli:debug": "node test/scripts/run-cli-tests.js --debug", + "test:cli": "node tests/scripts/run-cli-tests.js", + "test:cli:clean": "node tests/scripts/run-cli-tests.js clean", + "test:cli:debug": "node tests/scripts/run-cli-tests.js --debug", "test:e2e": "node tests/scripts/run-e2e-tests.js", "test:e2e:clean": "node tests/scripts/run-e2e-tests.js clean", "test:e2e:debug": "node tests/scripts/run-e2e-tests.js --debug", diff --git a/cli-tests/README.md b/tests/cli/README.md similarity index 100% rename from cli-tests/README.md rename to tests/cli/README.md diff --git a/cli-tests/app-template/README.md b/tests/cli/app-template/README.md similarity index 100% rename from cli-tests/app-template/README.md rename to tests/cli/app-template/README.md diff --git a/cli-tests/app-template/package.json b/tests/cli/app-template/package.json similarity index 100% rename from cli-tests/app-template/package.json rename to tests/cli/app-template/package.json diff --git a/cli-tests/app-template/template.json b/tests/cli/app-template/template.json similarity index 100% rename from cli-tests/app-template/template.json rename to tests/cli/app-template/template.json diff --git a/cli-tests/app-template/template/src/api/.gitkeep b/tests/cli/app-template/template/src/api/.gitkeep similarity index 100% rename from cli-tests/app-template/template/src/api/.gitkeep rename to tests/cli/app-template/template/src/api/.gitkeep diff --git a/cli-tests/app-template/template/src/api/category/content-types/category/schema.json b/tests/cli/app-template/template/src/api/category/content-types/category/schema.json similarity index 100% rename from cli-tests/app-template/template/src/api/category/content-types/category/schema.json rename to tests/cli/app-template/template/src/api/category/content-types/category/schema.json diff --git a/cli-tests/app-template/template/src/api/category/controllers/category.js b/tests/cli/app-template/template/src/api/category/controllers/category.js similarity index 100% rename from cli-tests/app-template/template/src/api/category/controllers/category.js rename to tests/cli/app-template/template/src/api/category/controllers/category.js diff --git a/cli-tests/app-template/template/src/api/category/routes/category.js b/tests/cli/app-template/template/src/api/category/routes/category.js similarity index 100% rename from cli-tests/app-template/template/src/api/category/routes/category.js rename to tests/cli/app-template/template/src/api/category/routes/category.js diff --git a/cli-tests/app-template/template/src/api/category/services/category.js b/tests/cli/app-template/template/src/api/category/services/category.js similarity index 100% rename from cli-tests/app-template/template/src/api/category/services/category.js rename to tests/cli/app-template/template/src/api/category/services/category.js diff --git a/cli-tests/app-template/template/src/api/complex/content-types/complex/schema.json b/tests/cli/app-template/template/src/api/complex/content-types/complex/schema.json similarity index 100% rename from cli-tests/app-template/template/src/api/complex/content-types/complex/schema.json rename to tests/cli/app-template/template/src/api/complex/content-types/complex/schema.json diff --git a/cli-tests/app-template/template/src/api/complex/controllers/complex.js b/tests/cli/app-template/template/src/api/complex/controllers/complex.js similarity index 100% rename from cli-tests/app-template/template/src/api/complex/controllers/complex.js rename to tests/cli/app-template/template/src/api/complex/controllers/complex.js diff --git a/cli-tests/app-template/template/src/api/complex/routes/complex.js b/tests/cli/app-template/template/src/api/complex/routes/complex.js similarity index 100% rename from cli-tests/app-template/template/src/api/complex/routes/complex.js rename to tests/cli/app-template/template/src/api/complex/routes/complex.js diff --git a/cli-tests/app-template/template/src/api/complex/services/complex.js b/tests/cli/app-template/template/src/api/complex/services/complex.js similarity index 100% rename from cli-tests/app-template/template/src/api/complex/services/complex.js rename to tests/cli/app-template/template/src/api/complex/services/complex.js diff --git a/cli-tests/app-template/template/src/api/config/controllers/config.js b/tests/cli/app-template/template/src/api/config/controllers/config.js similarity index 100% rename from cli-tests/app-template/template/src/api/config/controllers/config.js rename to tests/cli/app-template/template/src/api/config/controllers/config.js diff --git a/cli-tests/app-template/template/src/api/config/routes/config.js b/tests/cli/app-template/template/src/api/config/routes/config.js similarity index 100% rename from cli-tests/app-template/template/src/api/config/routes/config.js rename to tests/cli/app-template/template/src/api/config/routes/config.js diff --git a/cli-tests/app-template/template/src/api/config/services/config.js b/tests/cli/app-template/template/src/api/config/services/config.js similarity index 100% rename from cli-tests/app-template/template/src/api/config/services/config.js rename to tests/cli/app-template/template/src/api/config/services/config.js diff --git a/cli-tests/app-template/template/src/api/single-type-localized/content-types/single-type-localized/schema.json b/tests/cli/app-template/template/src/api/single-type-localized/content-types/single-type-localized/schema.json similarity index 100% rename from cli-tests/app-template/template/src/api/single-type-localized/content-types/single-type-localized/schema.json rename to tests/cli/app-template/template/src/api/single-type-localized/content-types/single-type-localized/schema.json diff --git a/cli-tests/app-template/template/src/api/single-type-localized/controllers/single-type-localized.js b/tests/cli/app-template/template/src/api/single-type-localized/controllers/single-type-localized.js similarity index 100% rename from cli-tests/app-template/template/src/api/single-type-localized/controllers/single-type-localized.js rename to tests/cli/app-template/template/src/api/single-type-localized/controllers/single-type-localized.js diff --git a/cli-tests/app-template/template/src/api/single-type-localized/routes/single-type-localized.js b/tests/cli/app-template/template/src/api/single-type-localized/routes/single-type-localized.js similarity index 100% rename from cli-tests/app-template/template/src/api/single-type-localized/routes/single-type-localized.js rename to tests/cli/app-template/template/src/api/single-type-localized/routes/single-type-localized.js diff --git a/cli-tests/app-template/template/src/api/single-type-localized/services/single-type-localized.js b/tests/cli/app-template/template/src/api/single-type-localized/services/single-type-localized.js similarity index 100% rename from cli-tests/app-template/template/src/api/single-type-localized/services/single-type-localized.js rename to tests/cli/app-template/template/src/api/single-type-localized/services/single-type-localized.js diff --git a/cli-tests/app-template/template/src/api/single-type-non-local/content-types/single-type-non-local/schema.json b/tests/cli/app-template/template/src/api/single-type-non-local/content-types/single-type-non-local/schema.json similarity index 100% rename from cli-tests/app-template/template/src/api/single-type-non-local/content-types/single-type-non-local/schema.json rename to tests/cli/app-template/template/src/api/single-type-non-local/content-types/single-type-non-local/schema.json diff --git a/cli-tests/app-template/template/src/api/single-type-non-local/controllers/single-type-non-local.js b/tests/cli/app-template/template/src/api/single-type-non-local/controllers/single-type-non-local.js similarity index 100% rename from cli-tests/app-template/template/src/api/single-type-non-local/controllers/single-type-non-local.js rename to tests/cli/app-template/template/src/api/single-type-non-local/controllers/single-type-non-local.js diff --git a/cli-tests/app-template/template/src/api/single-type-non-local/routes/single-type-non-local.js b/tests/cli/app-template/template/src/api/single-type-non-local/routes/single-type-non-local.js similarity index 100% rename from cli-tests/app-template/template/src/api/single-type-non-local/routes/single-type-non-local.js rename to tests/cli/app-template/template/src/api/single-type-non-local/routes/single-type-non-local.js diff --git a/cli-tests/app-template/template/src/api/single-type-non-local/services/single-type-non-local.js b/tests/cli/app-template/template/src/api/single-type-non-local/services/single-type-non-local.js similarity index 100% rename from cli-tests/app-template/template/src/api/single-type-non-local/services/single-type-non-local.js rename to tests/cli/app-template/template/src/api/single-type-non-local/services/single-type-non-local.js diff --git a/cli-tests/app-template/template/src/api/single-type-unpublished/content-types/single-type-unpublished/schema.json b/tests/cli/app-template/template/src/api/single-type-unpublished/content-types/single-type-unpublished/schema.json similarity index 100% rename from cli-tests/app-template/template/src/api/single-type-unpublished/content-types/single-type-unpublished/schema.json rename to tests/cli/app-template/template/src/api/single-type-unpublished/content-types/single-type-unpublished/schema.json diff --git a/cli-tests/app-template/template/src/api/single-type-unpublished/controllers/single-type-unpublished.js b/tests/cli/app-template/template/src/api/single-type-unpublished/controllers/single-type-unpublished.js similarity index 100% rename from cli-tests/app-template/template/src/api/single-type-unpublished/controllers/single-type-unpublished.js rename to tests/cli/app-template/template/src/api/single-type-unpublished/controllers/single-type-unpublished.js diff --git a/cli-tests/app-template/template/src/api/single-type-unpublished/routes/single-type-unpublished.js b/tests/cli/app-template/template/src/api/single-type-unpublished/routes/single-type-unpublished.js similarity index 100% rename from cli-tests/app-template/template/src/api/single-type-unpublished/routes/single-type-unpublished.js rename to tests/cli/app-template/template/src/api/single-type-unpublished/routes/single-type-unpublished.js diff --git a/cli-tests/app-template/template/src/api/single-type-unpublished/services/single-type-unpublished.js b/tests/cli/app-template/template/src/api/single-type-unpublished/services/single-type-unpublished.js similarity index 100% rename from cli-tests/app-template/template/src/api/single-type-unpublished/services/single-type-unpublished.js rename to tests/cli/app-template/template/src/api/single-type-unpublished/services/single-type-unpublished.js diff --git a/cli-tests/app-template/template/src/components/component-category/component-two.json b/tests/cli/app-template/template/src/components/component-category/component-two.json similarity index 100% rename from cli-tests/app-template/template/src/components/component-category/component-two.json rename to tests/cli/app-template/template/src/components/component-category/component-two.json diff --git a/cli-tests/app-template/template/src/components/component-category/component.json b/tests/cli/app-template/template/src/components/component-category/component.json similarity index 100% rename from cli-tests/app-template/template/src/components/component-category/component.json rename to tests/cli/app-template/template/src/components/component-category/component.json diff --git a/cli-tests/app-template/template/src/constants.js b/tests/cli/app-template/template/src/constants.js similarity index 100% rename from cli-tests/app-template/template/src/constants.js rename to tests/cli/app-template/template/src/constants.js diff --git a/cli-tests/app-template/template/src/index.js b/tests/cli/app-template/template/src/index.js similarity index 100% rename from cli-tests/app-template/template/src/index.js rename to tests/cli/app-template/template/src/index.js diff --git a/cli-tests/constants.js b/tests/cli/constants.js similarity index 100% rename from cli-tests/constants.js rename to tests/cli/constants.js diff --git a/cli-tests/data/README.md b/tests/cli/data/README.md similarity index 100% rename from cli-tests/data/README.md rename to tests/cli/data/README.md diff --git a/cli-tests/data/complex.tar.gz b/tests/cli/data/complex.tar.gz similarity index 100% rename from cli-tests/data/complex.tar.gz rename to tests/cli/data/complex.tar.gz diff --git a/cli-tests/scripts/dts-export.js b/tests/cli/scripts/dts-export.js similarity index 100% rename from cli-tests/scripts/dts-export.js rename to tests/cli/scripts/dts-export.js diff --git a/cli-tests/scripts/dts-import.js b/tests/cli/scripts/dts-import.js similarity index 100% rename from cli-tests/scripts/dts-import.js rename to tests/cli/scripts/dts-import.js diff --git a/cli-tests/scripts/rate-limit.js b/tests/cli/scripts/rate-limit.js similarity index 100% rename from cli-tests/scripts/rate-limit.js rename to tests/cli/scripts/rate-limit.js diff --git a/cli-tests/tests/strapi/config.js b/tests/cli/tests/strapi/config.js similarity index 100% rename from cli-tests/tests/strapi/config.js rename to tests/cli/tests/strapi/config.js diff --git a/cli-tests/tests/strapi/data-transfer/export.test.cli.js b/tests/cli/tests/strapi/data-transfer/export.test.cli.js similarity index 100% rename from cli-tests/tests/strapi/data-transfer/export.test.cli.js rename to tests/cli/tests/strapi/data-transfer/export.test.cli.js diff --git a/cli-tests/tests/strapi/data-transfer/import.test.cli.js b/tests/cli/tests/strapi/data-transfer/import.test.cli.js similarity index 100% rename from cli-tests/tests/strapi/data-transfer/import.test.cli.js rename to tests/cli/tests/strapi/data-transfer/import.test.cli.js diff --git a/cli-tests/tests/strapi/version/version.test.cli.js b/tests/cli/tests/strapi/version/version.test.cli.js similarity index 100% rename from cli-tests/tests/strapi/version/version.test.cli.js rename to tests/cli/tests/strapi/version/version.test.cli.js diff --git a/cli-tests/utils/fs.js b/tests/cli/utils/fs.js similarity index 100% rename from cli-tests/utils/fs.js rename to tests/cli/utils/fs.js diff --git a/cli-tests/utils/index.js b/tests/cli/utils/index.js similarity index 100% rename from cli-tests/utils/index.js rename to tests/cli/utils/index.js diff --git a/cli-tests/utils/test-app.js b/tests/cli/utils/test-app.js similarity index 100% rename from cli-tests/utils/test-app.js rename to tests/cli/utils/test-app.js diff --git a/tests/e2e/tests/content-releases/releases-page.spec.ts b/tests/e2e/tests/content-releases/releases-page.spec.ts index a7373887c6..745a249fc9 100644 --- a/tests/e2e/tests/content-releases/releases-page.spec.ts +++ b/tests/e2e/tests/content-releases/releases-page.spec.ts @@ -1,5 +1,5 @@ import { test, expect } from '@playwright/test'; -import { describeOnCondition } from '../../utils/shared'; +import { describeOnCondition, navToHeader } from '../../utils/shared'; import { resetDatabaseAndImportDataFromPath } from '../../scripts/dts-import'; import { login } from '../../utils/login'; @@ -92,11 +92,9 @@ describeOnCondition(edition === 'EE')('Releases page', () => { await expect(page.getByRole('link', { name: `${newReleaseName}` })).toBeVisible(); }); - test('A user should be able to perform bulk release on entries', async ({ page }) => { - await page.getByRole('link', { name: 'Content Manager' }).click(); + test.skip('A user should be able to perform bulk release on entries', async ({ page }) => { + await navToHeader(page, ['Content Manager', 'Article'], 'Article'); - await expect(page).toHaveTitle('Content Manager'); - await expect(page.getByRole('heading', { name: 'Article' })).toBeVisible(); const publishedItems = page.getByRole('gridcell', { name: 'published' }); expect(publishedItems).toHaveCount(2); const checkbox = page.getByRole('checkbox', { name: 'Select all entries' }); diff --git a/tests/e2e/tests/transfer/tokens.spec.ts b/tests/e2e/tests/transfer/tokens.spec.ts index 6cdf13ffdd..d0b6acc164 100644 --- a/tests/e2e/tests/transfer/tokens.spec.ts +++ b/tests/e2e/tests/transfer/tokens.spec.ts @@ -1,7 +1,7 @@ import { test, expect } from '@playwright/test'; -import { login } from '../../../utils/login'; -import { resetDatabaseAndImportDataFromPath } from '../../../scripts/dts-import'; -import { navToHeader } from '../../../utils/shared'; +import { login } from '../../utils/login'; +import { resetDatabaseAndImportDataFromPath } from '../../scripts/dts-import'; +import { navToHeader } from '../../utils/shared'; const createTransferToken = async (page, tokenName, duration, type) => { await navToHeader( diff --git a/tests/scripts/run-cli-tests.js b/tests/scripts/run-cli-tests.js index 62ea2aee9f..e536a23e37 100644 --- a/tests/scripts/run-cli-tests.js +++ b/tests/scripts/run-cli-tests.js @@ -10,7 +10,7 @@ const { cleanTestApp, generateTestApp } = require('../helpers/test-app'); const cwd = path.resolve(__dirname, '../..'); const testAppDirectory = path.join(cwd, 'test-apps', 'cli'); -const testRoot = path.join(cwd, 'cli-tests'); +const testRoot = path.join(cwd, 'tests', 'cli'); const testsDir = path.join(testRoot, 'tests'); const templateDir = path.join(testRoot, 'app-template'); @@ -222,7 +222,7 @@ yargs 'jest', [ '--config', - '../../../jest.config.cli.js', + '../../../../jest.config.cli.js', '--rootDir', domainDir, '--color', diff --git a/tests/scripts/run-e2e-tests.js b/tests/scripts/run-e2e-tests.js index e0a7f2ba39..ae895b4089 100644 --- a/tests/scripts/run-e2e-tests.js +++ b/tests/scripts/run-e2e-tests.js @@ -62,7 +62,7 @@ yargs * This lets us pass any other arguments to playwright * e.g. the name of a specific test or the project we want to run */ - 'unknown-options-as-args': true, + 'unknown-options-as-args': false, }) .command({ command: '*',