diff --git a/.github/filters.yaml b/.github/filters.yaml index a320cb6c57b..c18a128e6cc 100644 --- a/.github/filters.yaml +++ b/.github/filters.yaml @@ -6,7 +6,7 @@ backend: - 'packages/**/strapi-server.js' - 'packages/{utils,generators,cli,providers}/**' - 'packages/core/*/{lib,bin,ee}/**' - - 'api-tests/**' + - 'tests/api/**' frontend: - '.github/actions/yarn-nm-install/*.yml' - '.github/workflows/**' diff --git a/.gitignore b/.gitignore index b5ac6c9ffcb..9d05a6dc471 100644 --- a/.gitignore +++ b/.gitignore @@ -145,8 +145,8 @@ front-workspace.code-workspace ############################ playwright-report test-results -!e2e/data/*.tar -e2e/.env +!tests/e2e/data/*.tar +tests/e2e/.env ############################ # Strapi diff --git a/jest-preset.unit.js b/jest-preset.unit.js index 59216f1479d..6a912d45c5e 100644 --- a/jest-preset.unit.js +++ b/jest-preset.unit.js @@ -1,7 +1,7 @@ 'use strict'; module.exports = { - setupFilesAfterEnv: [__dirname + '/test/setup/unit.setup.js'], + setupFilesAfterEnv: [__dirname + '/tests/setup/unit.setup.js'], modulePathIgnorePatterns: ['.cache', 'dist'], testPathIgnorePatterns: ['.testdata.js', '.test.utils.js', '.d.ts'], testMatch: ['**/__tests__/**/*.{js,ts,jsx,tsx}'], diff --git a/jest.config.api.js b/jest.config.api.js index 3e8a4e21f94..49d438a4dee 100644 --- a/jest.config.api.js +++ b/jest.config.api.js @@ -4,7 +4,7 @@ module.exports = { displayName: 'API integration tests', testMatch: ['**/?(*.)+(spec|test).api.(js|ts)'], testEnvironment: 'node', - setupFilesAfterEnv: ['/test/setup/jest-api.setup.js'], + setupFilesAfterEnv: ['/tests/setup/jest-api.setup.js'], coveragePathIgnorePatterns: [ '/dist/', '/node_modules/', diff --git a/package.json b/package.json index 6f2da05c8a9..e9792c9f123 100644 --- a/package.json +++ b/package.json @@ -47,11 +47,11 @@ "prettier:other": "prettier --cache --cache-strategy content \"**/*.{md,mdx,css,scss,yaml,yml}\"", "prettier:write": "prettier --write \"**/*.{js,ts,jsx,tsx,json,md,mdx,css,scss,yaml,yml}\"", "setup": "yarn && yarn clean && yarn build --skip-nx-cache", - "test:api": "node test/scripts/run-api-tests.js", + "test:api": "node tests/scripts/run-api-tests.js", "test:clean": "rimraf ./coverage", - "test:e2e": "node test/scripts/run-e2e-tests.js", - "test:e2e:clean": "node test/scripts/run-e2e-tests.js clean", - "test:e2e:debug": "node test/scripts/run-e2e-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", "test:front": "cross-env IS_EE=true jest --config jest.config.front.js", "test:front:all": "cross-env IS_EE=true nx run-many --target=test:front --nx-ignore-cycles", "test:front:all:ce": "cross-env IS_EE=false nx run-many --target=test:front:ce --nx-ignore-cycles", @@ -60,8 +60,8 @@ "test:front:update:ce": "yarn test:front:ce -u", "test:front:watch": "cross-env IS_EE=true run test:front --watch", "test:front:watch:ce": "cross-env IS_EE=false run test:front --watch", - "test:generate-app": "yarn build:ts && node test/scripts/generate-test-app.js", - "test:generate-app:no-build": "node test/scripts/generate-test-app.js", + "test:generate-app": "yarn build:ts && node tests/scripts/generate-test-app.js", + "test:generate-app:no-build": "node tests/scripts/generate-test-app.js", "test:ts": "yarn test:ts:packages && yarn test:ts:front && yarn test:ts:back", "test:ts:back": "nx run-many --target=test:ts:back --nx-ignore-cycles", "test:ts:front": "nx run-many --target=test:ts:front --nx-ignore-cycles", diff --git a/packages/core/admin/server/src/controllers/__tests__/api-token.test.ts b/packages/core/admin/server/src/controllers/__tests__/api-token.test.ts index 7e3ed389e23..750793b4166 100644 --- a/packages/core/admin/server/src/controllers/__tests__/api-token.test.ts +++ b/packages/core/admin/server/src/controllers/__tests__/api-token.test.ts @@ -2,7 +2,7 @@ import { errors } from '@strapi/utils'; import { omit } from 'lodash/fp'; // @ts-expect-error - types are not generated for this file // eslint-disable-next-line import/no-relative-packages -import createContext from '../../../../../../../test/helpers/create-context'; +import createContext from '../../../../../../../tests/helpers/create-context'; import constants from '../../services/constants'; import apiTokenController from '../api-token'; diff --git a/packages/core/admin/server/src/controllers/__tests__/content-api.test.ts b/packages/core/admin/server/src/controllers/__tests__/content-api.test.ts index c56343eed42..803b24cd1a8 100644 --- a/packages/core/admin/server/src/controllers/__tests__/content-api.test.ts +++ b/packages/core/admin/server/src/controllers/__tests__/content-api.test.ts @@ -1,6 +1,6 @@ // @ts-expect-error - types are not generated for this file // eslint-disable-next-line import/no-relative-packages -import createContext from '../../../../../../../test/helpers/create-context'; +import createContext from '../../../../../../../tests/helpers/create-context'; import contentApiController from '../content-api'; describe('Content API permissions', () => { diff --git a/packages/core/admin/server/src/controllers/__tests__/permission.test.ts b/packages/core/admin/server/src/controllers/__tests__/permission.test.ts index 63d72c08f70..12be3918ef9 100644 --- a/packages/core/admin/server/src/controllers/__tests__/permission.test.ts +++ b/packages/core/admin/server/src/controllers/__tests__/permission.test.ts @@ -1,6 +1,6 @@ // @ts-expect-error - types are not generated for this file // eslint-disable-next-line import/no-relative-packages -import createContext from '../../../../../../../test/helpers/create-context'; +import createContext from '../../../../../../../tests/helpers/create-context'; import permissionController from '../permission'; describe('Permission Controller', () => { diff --git a/packages/core/admin/server/src/controllers/__tests__/role.test.ts b/packages/core/admin/server/src/controllers/__tests__/role.test.ts index 9c3dcc2aa75..d4f12f38695 100644 --- a/packages/core/admin/server/src/controllers/__tests__/role.test.ts +++ b/packages/core/admin/server/src/controllers/__tests__/role.test.ts @@ -1,7 +1,7 @@ import { errors } from '@strapi/utils'; // @ts-expect-error - types are not generated for this file // eslint-disable-next-line import/no-relative-packages -import createContext from '../../../../../../../test/helpers/create-context'; +import createContext from '../../../../../../../tests/helpers/create-context'; import roleController from '../role'; describe('Role controller', () => { diff --git a/packages/core/admin/server/src/controllers/__tests__/transfer/token.test.ts b/packages/core/admin/server/src/controllers/__tests__/transfer/token.test.ts index 784f436ced0..d1b68ad8289 100644 --- a/packages/core/admin/server/src/controllers/__tests__/transfer/token.test.ts +++ b/packages/core/admin/server/src/controllers/__tests__/transfer/token.test.ts @@ -2,7 +2,7 @@ import { errors } from '@strapi/utils'; import { omit } from 'lodash/fp'; // @ts-expect-error - types are not generated for this file // eslint-disable-next-line import/no-relative-packages -import createContext from '../../../../../../../../test/helpers/create-context'; +import createContext from '../../../../../../../../tests/helpers/create-context'; import constants from '../../../services/constants'; import transferTokenController from '../../transfer/token'; diff --git a/packages/core/admin/server/src/controllers/__tests__/user.test.ts b/packages/core/admin/server/src/controllers/__tests__/user.test.ts index 363fcb0c9db..cecb5e49b63 100644 --- a/packages/core/admin/server/src/controllers/__tests__/user.test.ts +++ b/packages/core/admin/server/src/controllers/__tests__/user.test.ts @@ -1,7 +1,7 @@ import { errors } from '@strapi/utils'; // @ts-expect-error - types are not generated for this file // eslint-disable-next-line import/no-relative-packages -import createContext from '../../../../../../../test/helpers/create-context'; +import createContext from '../../../../../../../tests/helpers/create-context'; import userController from '../user'; describe('User Controller', () => { diff --git a/packages/core/admin/server/src/strategies/__tests__/admin.test.ts b/packages/core/admin/server/src/strategies/__tests__/admin.test.ts index f1094e9cce7..4f33a4db342 100644 --- a/packages/core/admin/server/src/strategies/__tests__/admin.test.ts +++ b/packages/core/admin/server/src/strategies/__tests__/admin.test.ts @@ -1,6 +1,6 @@ /* eslint-disable import/no-relative-packages */ // @ts-expect-error - test purposes -import createContext from '../../../../../../../test/helpers/create-context'; +import createContext from '../../../../../../../tests/helpers/create-context'; import adminAuthStrategy from '../admin'; describe('Admin Auth Strategy', () => { diff --git a/packages/core/admin/server/src/strategies/__tests__/api-token.test.ts b/packages/core/admin/server/src/strategies/__tests__/api-token.test.ts index 887702c0401..2e5c8413c9d 100644 --- a/packages/core/admin/server/src/strategies/__tests__/api-token.test.ts +++ b/packages/core/admin/server/src/strategies/__tests__/api-token.test.ts @@ -1,7 +1,7 @@ /* eslint-disable import/no-relative-packages */ import { errors } from '@strapi/utils'; // @ts-expect-error - test purposes -import createContext from '../../../../../../../test/helpers/create-context'; +import createContext from '../../../../../../../tests/helpers/create-context'; import apiTokenStrategy from '../api-token'; describe('API Token Auth Strategy', () => { diff --git a/packages/core/content-manager/server/src/controllers/__tests__/content-types.test.ts b/packages/core/content-manager/server/src/controllers/__tests__/content-types.test.ts index c010a14c095..40cac639861 100644 --- a/packages/core/content-manager/server/src/controllers/__tests__/content-types.test.ts +++ b/packages/core/content-manager/server/src/controllers/__tests__/content-types.test.ts @@ -1,6 +1,6 @@ // @ts-expect-error - types are not generated for this file // eslint-disable-next-line import/no-relative-packages -import createContext from '../../../../../../../test/helpers/create-context'; +import createContext from '../../../../../../../tests/helpers/create-context'; import contentTypes from '../content-types'; describe('Content Types', () => { diff --git a/packages/core/content-manager/server/src/controllers/__tests__/relations.test.ts b/packages/core/content-manager/server/src/controllers/__tests__/relations.test.ts index c75a13f4eff..11e1024cc84 100644 --- a/packages/core/content-manager/server/src/controllers/__tests__/relations.test.ts +++ b/packages/core/content-manager/server/src/controllers/__tests__/relations.test.ts @@ -1,6 +1,6 @@ // @ts-expect-error - types are not generated for this file // eslint-disable-next-line import/no-relative-packages -import createContext from '../../../../../../../test/helpers/create-context'; +import createContext from '../../../../../../../tests/helpers/create-context'; import relations from '../relations'; const contentTypes = { diff --git a/packages/core/content-manager/server/src/controllers/__tests__/single-types.test.ts b/packages/core/content-manager/server/src/controllers/__tests__/single-types.test.ts index 02e57a2f16b..54b81a986ff 100644 --- a/packages/core/content-manager/server/src/controllers/__tests__/single-types.test.ts +++ b/packages/core/content-manager/server/src/controllers/__tests__/single-types.test.ts @@ -1,6 +1,6 @@ // @ts-expect-error - types are not generated for this file // eslint-disable-next-line import/no-relative-packages -import createContext from '../../../../../../../test/helpers/create-context'; +import createContext from '../../../../../../../tests/helpers/create-context'; import singleTypes from '../single-types'; import populateBuilder from '../../services/populate-builder'; diff --git a/packages/core/strapi/src/services/metrics/__tests__/admin-user-hash.test.ts b/packages/core/strapi/src/services/metrics/__tests__/admin-user-hash.test.ts index 72fc49eead3..3371283eb35 100644 --- a/packages/core/strapi/src/services/metrics/__tests__/admin-user-hash.test.ts +++ b/packages/core/strapi/src/services/metrics/__tests__/admin-user-hash.test.ts @@ -1,6 +1,7 @@ import crypto from 'crypto'; +// eslint-disable-next-line import/no-relative-packages +import createContext from '../../../../../../../tests/helpers/create-context'; import { generateAdminUserHash } from '../admin-user-hash'; -import createContext from '../../../../../../../test/helpers/create-context'; describe('user email hash', () => { test('should create a hash from admin user email', () => { diff --git a/api-tests/core/admin/admin-api-token-crud.test.api.ts b/tests/api/core/admin/admin-api-token-crud.test.api.ts similarity index 99% rename from api-tests/core/admin/admin-api-token-crud.test.api.ts rename to tests/api/core/admin/admin-api-token-crud.test.api.ts index 1f4edc13ac0..c02ab285889 100644 --- a/api-tests/core/admin/admin-api-token-crud.test.api.ts +++ b/tests/api/core/admin/admin-api-token-crud.test.api.ts @@ -3,7 +3,7 @@ import { omit } from 'lodash'; import { createStrapiInstance } from 'api-tests/strapi'; import { createAuthRequest } from 'api-tests/request'; -import constants from '../../../packages/core/admin/server/src/services/constants'; +import constants from '../../../../packages/core/admin/server/src/services/constants'; describe('Admin API Token v2 CRUD (api)', () => { let rq; diff --git a/api-tests/core/admin/admin-auth.test.api.js b/tests/api/core/admin/admin-auth.test.api.js similarity index 100% rename from api-tests/core/admin/admin-auth.test.api.js rename to tests/api/core/admin/admin-auth.test.api.js diff --git a/api-tests/core/admin/admin-authenticated-user.test.api.js b/tests/api/core/admin/admin-authenticated-user.test.api.js similarity index 100% rename from api-tests/core/admin/admin-authenticated-user.test.api.js rename to tests/api/core/admin/admin-authenticated-user.test.api.js diff --git a/api-tests/core/admin/admin-permission.test.api.js b/tests/api/core/admin/admin-permission.test.api.js similarity index 100% rename from api-tests/core/admin/admin-permission.test.api.js rename to tests/api/core/admin/admin-permission.test.api.js diff --git a/api-tests/core/admin/admin-permissions-conditions.test.api.js b/tests/api/core/admin/admin-permissions-conditions.test.api.js similarity index 100% rename from api-tests/core/admin/admin-permissions-conditions.test.api.js rename to tests/api/core/admin/admin-permissions-conditions.test.api.js diff --git a/api-tests/core/admin/admin-permissions-custom-conditions.test.api.js b/tests/api/core/admin/admin-permissions-custom-conditions.test.api.js similarity index 100% rename from api-tests/core/admin/admin-permissions-custom-conditions.test.api.js rename to tests/api/core/admin/admin-permissions-custom-conditions.test.api.js diff --git a/api-tests/core/admin/admin-project-settings.test.api.js b/tests/api/core/admin/admin-project-settings.test.api.js similarity index 100% rename from api-tests/core/admin/admin-project-settings.test.api.js rename to tests/api/core/admin/admin-project-settings.test.api.js diff --git a/api-tests/core/admin/admin-role.test.api.js b/tests/api/core/admin/admin-role.test.api.js similarity index 100% rename from api-tests/core/admin/admin-role.test.api.js rename to tests/api/core/admin/admin-role.test.api.js diff --git a/api-tests/core/admin/admin-transfer-token-crud.test.api.ts b/tests/api/core/admin/admin-transfer-token-crud.test.api.ts similarity index 99% rename from api-tests/core/admin/admin-transfer-token-crud.test.api.ts rename to tests/api/core/admin/admin-transfer-token-crud.test.api.ts index 5b40caf7725..3a01d79f1b5 100644 --- a/api-tests/core/admin/admin-transfer-token-crud.test.api.ts +++ b/tests/api/core/admin/admin-transfer-token-crud.test.api.ts @@ -1,7 +1,7 @@ import { omit } from 'lodash'; import { createStrapiInstance } from 'api-tests/strapi'; import { createAuthRequest } from 'api-tests/request'; -import constants from '../../../packages/core/admin/server/src/services/constants'; +import constants from '../../../../packages/core/admin/server/src/services/constants'; describe('Admin Transfer Token CRUD (api)', () => { let rq; diff --git a/api-tests/core/admin/admin-user.test.api.js b/tests/api/core/admin/admin-user.test.api.js similarity index 100% rename from api-tests/core/admin/admin-user.test.api.js rename to tests/api/core/admin/admin-user.test.api.js diff --git a/api-tests/core/admin/ee/provider-login.test.api.js b/tests/api/core/admin/ee/provider-login.test.api.js similarity index 100% rename from api-tests/core/admin/ee/provider-login.test.api.js rename to tests/api/core/admin/ee/provider-login.test.api.js diff --git a/api-tests/core/admin/ee/provider-options.test.api.js b/tests/api/core/admin/ee/provider-options.test.api.js similarity index 100% rename from api-tests/core/admin/ee/provider-options.test.api.js rename to tests/api/core/admin/ee/provider-options.test.api.js diff --git a/api-tests/core/admin/ee/review-workflows-content-types.test.api.ts b/tests/api/core/admin/ee/review-workflows-content-types.test.api.ts similarity index 99% rename from api-tests/core/admin/ee/review-workflows-content-types.test.api.ts rename to tests/api/core/admin/ee/review-workflows-content-types.test.api.ts index c4502656da3..d42d18493a3 100644 --- a/api-tests/core/admin/ee/review-workflows-content-types.test.api.ts +++ b/tests/api/core/admin/ee/review-workflows-content-types.test.api.ts @@ -8,7 +8,7 @@ import { describeOnCondition } from 'api-tests/utils'; import { WORKFLOW_MODEL_UID, ENTITY_STAGE_ATTRIBUTE, -} from '../../../../packages/core/admin/ee/server/src/constants/workflows'; +} from '../../../../../packages/core/admin/ee/server/src/constants/workflows'; const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE'; diff --git a/api-tests/core/admin/ee/review-workflows-stage-permissions.test.api.ts b/tests/api/core/admin/ee/review-workflows-stage-permissions.test.api.ts similarity index 100% rename from api-tests/core/admin/ee/review-workflows-stage-permissions.test.api.ts rename to tests/api/core/admin/ee/review-workflows-stage-permissions.test.api.ts diff --git a/api-tests/core/admin/ee/review-workflows.test.api.ts b/tests/api/core/admin/ee/review-workflows.test.api.ts similarity index 99% rename from api-tests/core/admin/ee/review-workflows.test.api.ts rename to tests/api/core/admin/ee/review-workflows.test.api.ts index a3fff209ed3..ed19b8b45a6 100644 --- a/api-tests/core/admin/ee/review-workflows.test.api.ts +++ b/tests/api/core/admin/ee/review-workflows.test.api.ts @@ -13,7 +13,7 @@ import { WORKFLOW_MODEL_UID, ENTITY_STAGE_ATTRIBUTE, ENTITY_ASSIGNEE_ATTRIBUTE, -} from '../../../../packages/core/admin/ee/server/src/constants/workflows'; +} from '../../../../../packages/core/admin/ee/server/src/constants/workflows'; const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE'; diff --git a/api-tests/core/admin/utils/logo.png b/tests/api/core/admin/utils/logo.png similarity index 100% rename from api-tests/core/admin/utils/logo.png rename to tests/api/core/admin/utils/logo.png diff --git a/api-tests/core/content-manager/api/basic-compo-repeatable.test.api.js b/tests/api/core/content-manager/api/basic-compo-repeatable.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/basic-compo-repeatable.test.api.js rename to tests/api/core/content-manager/api/basic-compo-repeatable.test.api.js diff --git a/api-tests/core/content-manager/api/basic-compo.test.api.js b/tests/api/core/content-manager/api/basic-compo.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/basic-compo.test.api.js rename to tests/api/core/content-manager/api/basic-compo.test.api.js diff --git a/api-tests/core/content-manager/api/basic-dp-compo-repeatable.test.api.js b/tests/api/core/content-manager/api/basic-dp-compo-repeatable.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/basic-dp-compo-repeatable.test.api.js rename to tests/api/core/content-manager/api/basic-dp-compo-repeatable.test.api.js diff --git a/api-tests/core/content-manager/api/basic-dp-compo.test.api.js b/tests/api/core/content-manager/api/basic-dp-compo.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/basic-dp-compo.test.api.js rename to tests/api/core/content-manager/api/basic-dp-compo.test.api.js diff --git a/api-tests/core/content-manager/api/basic-dp-dz.test.api.js b/tests/api/core/content-manager/api/basic-dp-dz.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/basic-dp-dz.test.api.js rename to tests/api/core/content-manager/api/basic-dp-dz.test.api.js diff --git a/api-tests/core/content-manager/api/basic-dp.test.api.js b/tests/api/core/content-manager/api/basic-dp.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/basic-dp.test.api.js rename to tests/api/core/content-manager/api/basic-dp.test.api.js diff --git a/api-tests/core/content-manager/api/basic-dz.test.api.js b/tests/api/core/content-manager/api/basic-dz.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/basic-dz.test.api.js rename to tests/api/core/content-manager/api/basic-dz.test.api.js diff --git a/api-tests/core/content-manager/api/basic-relations.test.api.js b/tests/api/core/content-manager/api/basic-relations.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/basic-relations.test.api.js rename to tests/api/core/content-manager/api/basic-relations.test.api.js diff --git a/api-tests/core/content-manager/api/basic.test.api.js b/tests/api/core/content-manager/api/basic.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/basic.test.api.js rename to tests/api/core/content-manager/api/basic.test.api.js diff --git a/api-tests/core/content-manager/api/number-of-draft-relations.test.api.js b/tests/api/core/content-manager/api/number-of-draft-relations.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/number-of-draft-relations.test.api.js rename to tests/api/core/content-manager/api/number-of-draft-relations.test.api.js diff --git a/api-tests/core/content-manager/api/populate-dz.test.api.js b/tests/api/core/content-manager/api/populate-dz.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/populate-dz.test.api.js rename to tests/api/core/content-manager/api/populate-dz.test.api.js diff --git a/api-tests/core/content-manager/api/relations-cross-entity-ordering.test.api.js b/tests/api/core/content-manager/api/relations-cross-entity-ordering.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/relations-cross-entity-ordering.test.api.js rename to tests/api/core/content-manager/api/relations-cross-entity-ordering.test.api.js diff --git a/api-tests/core/content-manager/api/relations-permissions.test.api.js b/tests/api/core/content-manager/api/relations-permissions.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/relations-permissions.test.api.js rename to tests/api/core/content-manager/api/relations-permissions.test.api.js diff --git a/api-tests/core/content-manager/api/relations.test.api.js b/tests/api/core/content-manager/api/relations.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/relations.test.api.js rename to tests/api/core/content-manager/api/relations.test.api.js diff --git a/api-tests/core/content-manager/api/x-to-many-rf-preview.test.api.js b/tests/api/core/content-manager/api/x-to-many-rf-preview.test.api.js similarity index 100% rename from api-tests/core/content-manager/api/x-to-many-rf-preview.test.api.js rename to tests/api/core/content-manager/api/x-to-many-rf-preview.test.api.js diff --git a/api-tests/core/content-manager/components/repeatable-not-required-min-max.test.api.js b/tests/api/core/content-manager/components/repeatable-not-required-min-max.test.api.js similarity index 100% rename from api-tests/core/content-manager/components/repeatable-not-required-min-max.test.api.js rename to tests/api/core/content-manager/components/repeatable-not-required-min-max.test.api.js diff --git a/api-tests/core/content-manager/components/repeatable-not-required.test.api.js b/tests/api/core/content-manager/components/repeatable-not-required.test.api.js similarity index 100% rename from api-tests/core/content-manager/components/repeatable-not-required.test.api.js rename to tests/api/core/content-manager/components/repeatable-not-required.test.api.js diff --git a/api-tests/core/content-manager/components/repeatable-required-min-max.test.api.js b/tests/api/core/content-manager/components/repeatable-required-min-max.test.api.js similarity index 100% rename from api-tests/core/content-manager/components/repeatable-required-min-max.test.api.js rename to tests/api/core/content-manager/components/repeatable-required-min-max.test.api.js diff --git a/api-tests/core/content-manager/components/repeatable-required.test.api.js b/tests/api/core/content-manager/components/repeatable-required.test.api.js similarity index 100% rename from api-tests/core/content-manager/components/repeatable-required.test.api.js rename to tests/api/core/content-manager/components/repeatable-required.test.api.js diff --git a/api-tests/core/content-manager/components/single-not-required.test.api.js b/tests/api/core/content-manager/components/single-not-required.test.api.js similarity index 100% rename from api-tests/core/content-manager/components/single-not-required.test.api.js rename to tests/api/core/content-manager/components/single-not-required.test.api.js diff --git a/api-tests/core/content-manager/components/single-required.test.api.js b/tests/api/core/content-manager/components/single-required.test.api.js similarity index 100% rename from api-tests/core/content-manager/components/single-required.test.api.js rename to tests/api/core/content-manager/components/single-required.test.api.js diff --git a/api-tests/core/content-manager/content-manager/configuration.test.api.js b/tests/api/core/content-manager/content-manager/configuration.test.api.js similarity index 100% rename from api-tests/core/content-manager/content-manager/configuration.test.api.js rename to tests/api/core/content-manager/content-manager/configuration.test.api.js diff --git a/api-tests/core/content-manager/content-manager/content-types.test.api.js b/tests/api/core/content-manager/content-manager/content-types.test.api.js similarity index 100% rename from api-tests/core/content-manager/content-manager/content-types.test.api.js rename to tests/api/core/content-manager/content-manager/content-types.test.api.js diff --git a/api-tests/core/content-manager/content-manager/uid.test.api.js b/tests/api/core/content-manager/content-manager/uid.test.api.js similarity index 100% rename from api-tests/core/content-manager/content-manager/uid.test.api.js rename to tests/api/core/content-manager/content-manager/uid.test.api.js diff --git a/api-tests/core/content-manager/dynamiczones/rec.jpg b/tests/api/core/content-manager/dynamiczones/rec.jpg similarity index 100% rename from api-tests/core/content-manager/dynamiczones/rec.jpg rename to tests/api/core/content-manager/dynamiczones/rec.jpg diff --git a/api-tests/core/content-manager/dynamiczones/simple.test.api.js b/tests/api/core/content-manager/dynamiczones/simple.test.api.js similarity index 100% rename from api-tests/core/content-manager/dynamiczones/simple.test.api.js rename to tests/api/core/content-manager/dynamiczones/simple.test.api.js diff --git a/api-tests/core/content-manager/dynamiczones/with-media.test.api.js b/tests/api/core/content-manager/dynamiczones/with-media.test.api.js similarity index 100% rename from api-tests/core/content-manager/dynamiczones/with-media.test.api.js rename to tests/api/core/content-manager/dynamiczones/with-media.test.api.js diff --git a/api-tests/core/content-manager/fields/biginteger.test.api.js b/tests/api/core/content-manager/fields/biginteger.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/biginteger.test.api.js rename to tests/api/core/content-manager/fields/biginteger.test.api.js diff --git a/api-tests/core/content-manager/fields/boolean.test.api.js b/tests/api/core/content-manager/fields/boolean.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/boolean.test.api.js rename to tests/api/core/content-manager/fields/boolean.test.api.js diff --git a/api-tests/core/content-manager/fields/date.test.api.js b/tests/api/core/content-manager/fields/date.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/date.test.api.js rename to tests/api/core/content-manager/fields/date.test.api.js diff --git a/api-tests/core/content-manager/fields/datetime.test.api.js b/tests/api/core/content-manager/fields/datetime.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/datetime.test.api.js rename to tests/api/core/content-manager/fields/datetime.test.api.js diff --git a/api-tests/core/content-manager/fields/decimal.test.api.js b/tests/api/core/content-manager/fields/decimal.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/decimal.test.api.js rename to tests/api/core/content-manager/fields/decimal.test.api.js diff --git a/api-tests/core/content-manager/fields/email.test.api.js b/tests/api/core/content-manager/fields/email.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/email.test.api.js rename to tests/api/core/content-manager/fields/email.test.api.js diff --git a/api-tests/core/content-manager/fields/enumeration.test.api.js b/tests/api/core/content-manager/fields/enumeration.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/enumeration.test.api.js rename to tests/api/core/content-manager/fields/enumeration.test.api.js diff --git a/api-tests/core/content-manager/fields/float.test.api.js b/tests/api/core/content-manager/fields/float.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/float.test.api.js rename to tests/api/core/content-manager/fields/float.test.api.js diff --git a/api-tests/core/content-manager/fields/integer.test.api.js b/tests/api/core/content-manager/fields/integer.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/integer.test.api.js rename to tests/api/core/content-manager/fields/integer.test.api.js diff --git a/api-tests/core/content-manager/fields/json.test.api.js b/tests/api/core/content-manager/fields/json.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/json.test.api.js rename to tests/api/core/content-manager/fields/json.test.api.js diff --git a/api-tests/core/content-manager/fields/non-visible.test.api.js b/tests/api/core/content-manager/fields/non-visible.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/non-visible.test.api.js rename to tests/api/core/content-manager/fields/non-visible.test.api.js diff --git a/api-tests/core/content-manager/fields/password.test.api.js b/tests/api/core/content-manager/fields/password.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/password.test.api.js rename to tests/api/core/content-manager/fields/password.test.api.js diff --git a/api-tests/core/content-manager/fields/richtext.test.api.js b/tests/api/core/content-manager/fields/richtext.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/richtext.test.api.js rename to tests/api/core/content-manager/fields/richtext.test.api.js diff --git a/api-tests/core/content-manager/fields/string.test.api.js b/tests/api/core/content-manager/fields/string.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/string.test.api.js rename to tests/api/core/content-manager/fields/string.test.api.js diff --git a/api-tests/core/content-manager/fields/text.test.api.js b/tests/api/core/content-manager/fields/text.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/text.test.api.js rename to tests/api/core/content-manager/fields/text.test.api.js diff --git a/api-tests/core/content-manager/fields/time.test.api.js b/tests/api/core/content-manager/fields/time.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/time.test.api.js rename to tests/api/core/content-manager/fields/time.test.api.js diff --git a/api-tests/core/content-manager/fields/uid.test.api.js b/tests/api/core/content-manager/fields/uid.test.api.js similarity index 100% rename from api-tests/core/content-manager/fields/uid.test.api.js rename to tests/api/core/content-manager/fields/uid.test.api.js diff --git a/api-tests/core/content-manager/find-available-relations.test.api.js b/tests/api/core/content-manager/find-available-relations.test.api.js similarity index 100% rename from api-tests/core/content-manager/find-available-relations.test.api.js rename to tests/api/core/content-manager/find-available-relations.test.api.js diff --git a/api-tests/core/content-manager/find-existing-relations.test.api.js b/tests/api/core/content-manager/find-existing-relations.test.api.js similarity index 100% rename from api-tests/core/content-manager/find-existing-relations.test.api.js rename to tests/api/core/content-manager/find-existing-relations.test.api.js diff --git a/api-tests/core/content-manager/index.test.api.js b/tests/api/core/content-manager/index.test.api.js similarity index 100% rename from api-tests/core/content-manager/index.test.api.js rename to tests/api/core/content-manager/index.test.api.js diff --git a/api-tests/core/content-manager/search.test.api.js b/tests/api/core/content-manager/search.test.api.js similarity index 100% rename from api-tests/core/content-manager/search.test.api.js rename to tests/api/core/content-manager/search.test.api.js diff --git a/api-tests/core/content-manager/single-type.test.api.js b/tests/api/core/content-manager/single-type.test.api.js similarity index 100% rename from api-tests/core/content-manager/single-type.test.api.js rename to tests/api/core/content-manager/single-type.test.api.js diff --git a/api-tests/core/content-type-builder/__snapshots__/collection-type.test.api.js.snap b/tests/api/core/content-type-builder/__snapshots__/collection-type.test.api.js.snap similarity index 100% rename from api-tests/core/content-type-builder/__snapshots__/collection-type.test.api.js.snap rename to tests/api/core/content-type-builder/__snapshots__/collection-type.test.api.js.snap diff --git a/api-tests/core/content-type-builder/__snapshots__/single-type.test.api.js.snap b/tests/api/core/content-type-builder/__snapshots__/single-type.test.api.js.snap similarity index 100% rename from api-tests/core/content-type-builder/__snapshots__/single-type.test.api.js.snap rename to tests/api/core/content-type-builder/__snapshots__/single-type.test.api.js.snap diff --git a/api-tests/core/content-type-builder/collection-type.test.api.js b/tests/api/core/content-type-builder/collection-type.test.api.js similarity index 100% rename from api-tests/core/content-type-builder/collection-type.test.api.js rename to tests/api/core/content-type-builder/collection-type.test.api.js diff --git a/api-tests/core/content-type-builder/components.test.api.js b/tests/api/core/content-type-builder/components.test.api.js similarity index 100% rename from api-tests/core/content-type-builder/components.test.api.js rename to tests/api/core/content-type-builder/components.test.api.js diff --git a/api-tests/core/content-type-builder/single-type.test.api.js b/tests/api/core/content-type-builder/single-type.test.api.js similarity index 100% rename from api-tests/core/content-type-builder/single-type.test.api.js rename to tests/api/core/content-type-builder/single-type.test.api.js diff --git a/api-tests/core/database/db.test.api.js b/tests/api/core/database/db.test.api.js similarity index 100% rename from api-tests/core/database/db.test.api.js rename to tests/api/core/database/db.test.api.js diff --git a/api-tests/core/database/knex-utils.test.api.js b/tests/api/core/database/knex-utils.test.api.js similarity index 100% rename from api-tests/core/database/knex-utils.test.api.js rename to tests/api/core/database/knex-utils.test.api.js diff --git a/api-tests/core/database/transactions.test.api.js b/tests/api/core/database/transactions.test.api.js similarity index 100% rename from api-tests/core/database/transactions.test.api.js rename to tests/api/core/database/transactions.test.api.js diff --git a/api-tests/core/strapi/api/basic-compo-repeatable.test.api.js b/tests/api/core/strapi/api/basic-compo-repeatable.test.api.js similarity index 100% rename from api-tests/core/strapi/api/basic-compo-repeatable.test.api.js rename to tests/api/core/strapi/api/basic-compo-repeatable.test.api.js diff --git a/api-tests/core/strapi/api/basic-compo.test.api.js b/tests/api/core/strapi/api/basic-compo.test.api.js similarity index 100% rename from api-tests/core/strapi/api/basic-compo.test.api.js rename to tests/api/core/strapi/api/basic-compo.test.api.js diff --git a/api-tests/core/strapi/api/basic-dp-compo-repeatable.test.api.js b/tests/api/core/strapi/api/basic-dp-compo-repeatable.test.api.js similarity index 100% rename from api-tests/core/strapi/api/basic-dp-compo-repeatable.test.api.js rename to tests/api/core/strapi/api/basic-dp-compo-repeatable.test.api.js diff --git a/api-tests/core/strapi/api/basic-dp-compo.test.api.js b/tests/api/core/strapi/api/basic-dp-compo.test.api.js similarity index 100% rename from api-tests/core/strapi/api/basic-dp-compo.test.api.js rename to tests/api/core/strapi/api/basic-dp-compo.test.api.js diff --git a/api-tests/core/strapi/api/basic-dp.test.api.js b/tests/api/core/strapi/api/basic-dp.test.api.js similarity index 100% rename from api-tests/core/strapi/api/basic-dp.test.api.js rename to tests/api/core/strapi/api/basic-dp.test.api.js diff --git a/api-tests/core/strapi/api/basic-dz.test.api.js b/tests/api/core/strapi/api/basic-dz.test.api.js similarity index 100% rename from api-tests/core/strapi/api/basic-dz.test.api.js rename to tests/api/core/strapi/api/basic-dz.test.api.js diff --git a/api-tests/core/strapi/api/basic.test.api.js b/tests/api/core/strapi/api/basic.test.api.js similarity index 100% rename from api-tests/core/strapi/api/basic.test.api.js rename to tests/api/core/strapi/api/basic.test.api.js diff --git a/api-tests/core/strapi/api/fields/fields.test.api.js b/tests/api/core/strapi/api/fields/fields.test.api.js similarity index 100% rename from api-tests/core/strapi/api/fields/fields.test.api.js rename to tests/api/core/strapi/api/fields/fields.test.api.js diff --git a/api-tests/core/strapi/api/pagination/pagination.test.api.js b/tests/api/core/strapi/api/pagination/pagination.test.api.js similarity index 100% rename from api-tests/core/strapi/api/pagination/pagination.test.api.js rename to tests/api/core/strapi/api/pagination/pagination.test.api.js diff --git a/api-tests/core/strapi/api/populate/filtering/index.test.api.js b/tests/api/core/strapi/api/populate/filtering/index.test.api.js similarity index 100% rename from api-tests/core/strapi/api/populate/filtering/index.test.api.js rename to tests/api/core/strapi/api/populate/filtering/index.test.api.js diff --git a/api-tests/core/strapi/api/populate/rec.jpg b/tests/api/core/strapi/api/populate/rec.jpg similarity index 100% rename from api-tests/core/strapi/api/populate/rec.jpg rename to tests/api/core/strapi/api/populate/rec.jpg diff --git a/api-tests/core/strapi/api/populate/sanitize.test.api.js b/tests/api/core/strapi/api/populate/sanitize.test.api.js similarity index 100% rename from api-tests/core/strapi/api/populate/sanitize.test.api.js rename to tests/api/core/strapi/api/populate/sanitize.test.api.js diff --git a/api-tests/core/strapi/api/relations.test.api.js b/tests/api/core/strapi/api/relations.test.api.js similarity index 100% rename from api-tests/core/strapi/api/relations.test.api.js rename to tests/api/core/strapi/api/relations.test.api.js diff --git a/api-tests/core/strapi/api/validate-body.test.api.js b/tests/api/core/strapi/api/validate-body.test.api.js similarity index 100% rename from api-tests/core/strapi/api/validate-body.test.api.js rename to tests/api/core/strapi/api/validate-body.test.api.js diff --git a/api-tests/core/strapi/api/validate-query/resources/fixtures/document.js b/tests/api/core/strapi/api/validate-query/resources/fixtures/document.js similarity index 100% rename from api-tests/core/strapi/api/validate-query/resources/fixtures/document.js rename to tests/api/core/strapi/api/validate-query/resources/fixtures/document.js diff --git a/api-tests/core/strapi/api/validate-query/resources/fixtures/index.js b/tests/api/core/strapi/api/validate-query/resources/fixtures/index.js similarity index 100% rename from api-tests/core/strapi/api/validate-query/resources/fixtures/index.js rename to tests/api/core/strapi/api/validate-query/resources/fixtures/index.js diff --git a/api-tests/core/strapi/api/validate-query/resources/fixtures/relation.js b/tests/api/core/strapi/api/validate-query/resources/fixtures/relation.js similarity index 100% rename from api-tests/core/strapi/api/validate-query/resources/fixtures/relation.js rename to tests/api/core/strapi/api/validate-query/resources/fixtures/relation.js diff --git a/api-tests/core/strapi/api/validate-query/resources/index.js b/tests/api/core/strapi/api/validate-query/resources/index.js similarity index 100% rename from api-tests/core/strapi/api/validate-query/resources/index.js rename to tests/api/core/strapi/api/validate-query/resources/index.js diff --git a/api-tests/core/strapi/api/validate-query/resources/schemas/component-a.js b/tests/api/core/strapi/api/validate-query/resources/schemas/component-a.js similarity index 100% rename from api-tests/core/strapi/api/validate-query/resources/schemas/component-a.js rename to tests/api/core/strapi/api/validate-query/resources/schemas/component-a.js diff --git a/api-tests/core/strapi/api/validate-query/resources/schemas/component-b.js b/tests/api/core/strapi/api/validate-query/resources/schemas/component-b.js similarity index 100% rename from api-tests/core/strapi/api/validate-query/resources/schemas/component-b.js rename to tests/api/core/strapi/api/validate-query/resources/schemas/component-b.js diff --git a/api-tests/core/strapi/api/validate-query/resources/schemas/document.js b/tests/api/core/strapi/api/validate-query/resources/schemas/document.js similarity index 100% rename from api-tests/core/strapi/api/validate-query/resources/schemas/document.js rename to tests/api/core/strapi/api/validate-query/resources/schemas/document.js diff --git a/api-tests/core/strapi/api/validate-query/resources/schemas/index.js b/tests/api/core/strapi/api/validate-query/resources/schemas/index.js similarity index 100% rename from api-tests/core/strapi/api/validate-query/resources/schemas/index.js rename to tests/api/core/strapi/api/validate-query/resources/schemas/index.js diff --git a/api-tests/core/strapi/api/validate-query/resources/schemas/relation.js b/tests/api/core/strapi/api/validate-query/resources/schemas/relation.js similarity index 100% rename from api-tests/core/strapi/api/validate-query/resources/schemas/relation.js rename to tests/api/core/strapi/api/validate-query/resources/schemas/relation.js diff --git a/api-tests/core/strapi/api/validate-query/validate-query.test.api.js b/tests/api/core/strapi/api/validate-query/validate-query.test.api.js similarity index 100% rename from api-tests/core/strapi/api/validate-query/validate-query.test.api.js rename to tests/api/core/strapi/api/validate-query/validate-query.test.api.js diff --git a/api-tests/core/strapi/components/repeatable-not-required-min-max.test.api.js b/tests/api/core/strapi/components/repeatable-not-required-min-max.test.api.js similarity index 100% rename from api-tests/core/strapi/components/repeatable-not-required-min-max.test.api.js rename to tests/api/core/strapi/components/repeatable-not-required-min-max.test.api.js diff --git a/api-tests/core/strapi/components/repeatable-not-required.test.api.js b/tests/api/core/strapi/components/repeatable-not-required.test.api.js similarity index 100% rename from api-tests/core/strapi/components/repeatable-not-required.test.api.js rename to tests/api/core/strapi/components/repeatable-not-required.test.api.js diff --git a/api-tests/core/strapi/components/repeatable-order.test.api.js b/tests/api/core/strapi/components/repeatable-order.test.api.js similarity index 100% rename from api-tests/core/strapi/components/repeatable-order.test.api.js rename to tests/api/core/strapi/components/repeatable-order.test.api.js diff --git a/api-tests/core/strapi/components/repeatable-required-min-max.test.api.js b/tests/api/core/strapi/components/repeatable-required-min-max.test.api.js similarity index 100% rename from api-tests/core/strapi/components/repeatable-required-min-max.test.api.js rename to tests/api/core/strapi/components/repeatable-required-min-max.test.api.js diff --git a/api-tests/core/strapi/components/repeatable-required.test.api.js b/tests/api/core/strapi/components/repeatable-required.test.api.js similarity index 100% rename from api-tests/core/strapi/components/repeatable-required.test.api.js rename to tests/api/core/strapi/components/repeatable-required.test.api.js diff --git a/api-tests/core/strapi/components/single-not-required.test.api.js b/tests/api/core/strapi/components/single-not-required.test.api.js similarity index 100% rename from api-tests/core/strapi/components/single-not-required.test.api.js rename to tests/api/core/strapi/components/single-not-required.test.api.js diff --git a/api-tests/core/strapi/components/single-required.test.api.js b/tests/api/core/strapi/components/single-required.test.api.js similarity index 100% rename from api-tests/core/strapi/components/single-required.test.api.js rename to tests/api/core/strapi/components/single-required.test.api.js diff --git a/api-tests/core/strapi/deep-filtering.test.api.js b/tests/api/core/strapi/deep-filtering.test.api.js similarity index 100% rename from api-tests/core/strapi/deep-filtering.test.api.js rename to tests/api/core/strapi/deep-filtering.test.api.js diff --git a/api-tests/core/strapi/dynamiczones/rec.jpg b/tests/api/core/strapi/dynamiczones/rec.jpg similarity index 100% rename from api-tests/core/strapi/dynamiczones/rec.jpg rename to tests/api/core/strapi/dynamiczones/rec.jpg diff --git a/api-tests/core/strapi/dynamiczones/simple.test.api.js b/tests/api/core/strapi/dynamiczones/simple.test.api.js similarity index 100% rename from api-tests/core/strapi/dynamiczones/simple.test.api.js rename to tests/api/core/strapi/dynamiczones/simple.test.api.js diff --git a/api-tests/core/strapi/dynamiczones/with-media.test.api.js b/tests/api/core/strapi/dynamiczones/with-media.test.api.js similarity index 100% rename from api-tests/core/strapi/dynamiczones/with-media.test.api.js rename to tests/api/core/strapi/dynamiczones/with-media.test.api.js diff --git a/api-tests/core/strapi/endpoint.test.api.js b/tests/api/core/strapi/endpoint.test.api.js similarity index 100% rename from api-tests/core/strapi/endpoint.test.api.js rename to tests/api/core/strapi/endpoint.test.api.js diff --git a/api-tests/core/strapi/filtering.test.api.js b/tests/api/core/strapi/filtering.test.api.js similarity index 100% rename from api-tests/core/strapi/filtering.test.api.js rename to tests/api/core/strapi/filtering.test.api.js diff --git a/api-tests/core/strapi/lifecycles/before-delete.test.api.js b/tests/api/core/strapi/lifecycles/before-delete.test.api.js similarity index 100% rename from api-tests/core/strapi/lifecycles/before-delete.test.api.js rename to tests/api/core/strapi/lifecycles/before-delete.test.api.js diff --git a/api-tests/core/strapi/migrations/migration-draft-publish.test.api.js b/tests/api/core/strapi/migrations/migration-draft-publish.test.api.js similarity index 100% rename from api-tests/core/strapi/migrations/migration-draft-publish.test.api.js rename to tests/api/core/strapi/migrations/migration-draft-publish.test.api.js diff --git a/api-tests/core/strapi/migrations/migration-required-attribute.test.api.js b/tests/api/core/strapi/migrations/migration-required-attribute.test.api.js similarity index 100% rename from api-tests/core/strapi/migrations/migration-required-attribute.test.api.js rename to tests/api/core/strapi/migrations/migration-required-attribute.test.api.js diff --git a/api-tests/core/strapi/migrations/migration-unique-attribute.test.api.js b/tests/api/core/strapi/migrations/migration-unique-attribute.test.api.js similarity index 100% rename from api-tests/core/strapi/migrations/migration-unique-attribute.test.api.js rename to tests/api/core/strapi/migrations/migration-unique-attribute.test.api.js diff --git a/api-tests/core/strapi/publication-state.test.api.js b/tests/api/core/strapi/publication-state.test.api.js similarity index 100% rename from api-tests/core/strapi/publication-state.test.api.js rename to tests/api/core/strapi/publication-state.test.api.js diff --git a/api-tests/core/strapi/search.test.api.js b/tests/api/core/strapi/search.test.api.js similarity index 100% rename from api-tests/core/strapi/search.test.api.js rename to tests/api/core/strapi/search.test.api.js diff --git a/api-tests/core/strapi/single-type.test.api.js b/tests/api/core/strapi/single-type.test.api.js similarity index 100% rename from api-tests/core/strapi/single-type.test.api.js rename to tests/api/core/strapi/single-type.test.api.js diff --git a/api-tests/core/strapi/validation/private-params.test.api.js b/tests/api/core/strapi/validation/private-params.test.api.js similarity index 100% rename from api-tests/core/strapi/validation/private-params.test.api.js rename to tests/api/core/strapi/validation/private-params.test.api.js diff --git a/api-tests/core/upload/admin/configure-view.test.api.js b/tests/api/core/upload/admin/configure-view.test.api.js similarity index 97% rename from api-tests/core/upload/admin/configure-view.test.api.js rename to tests/api/core/upload/admin/configure-view.test.api.js index 134682067e6..e5df5ee32dd 100644 --- a/api-tests/core/upload/admin/configure-view.test.api.js +++ b/tests/api/core/upload/admin/configure-view.test.api.js @@ -6,7 +6,7 @@ const { createStrapiInstance } = require('api-tests/strapi'); const { createAuthRequest } = require('api-tests/request'); const { createUtils } = require('api-tests/utils'); -const { ALLOWED_SORT_STRINGS } = require('../../../../packages/core/upload/server/constants'); +const { ALLOWED_SORT_STRINGS } = require('../../../../../packages/core/upload/server/constants'); const builder = createTestBuilder(); let strapi; diff --git a/api-tests/core/upload/admin/file-folder.test.api.js b/tests/api/core/upload/admin/file-folder.test.api.js similarity index 100% rename from api-tests/core/upload/admin/file-folder.test.api.js rename to tests/api/core/upload/admin/file-folder.test.api.js diff --git a/api-tests/core/upload/admin/file-image.test.api.js b/tests/api/core/upload/admin/file-image.test.api.js similarity index 100% rename from api-tests/core/upload/admin/file-image.test.api.js rename to tests/api/core/upload/admin/file-image.test.api.js diff --git a/api-tests/core/upload/admin/file-size-limit.test.api.js b/tests/api/core/upload/admin/file-size-limit.test.api.js similarity index 90% rename from api-tests/core/upload/admin/file-size-limit.test.api.js rename to tests/api/core/upload/admin/file-size-limit.test.api.js index fa56526dd00..1c5cce9916d 100644 --- a/api-tests/core/upload/admin/file-size-limit.test.api.js +++ b/tests/api/core/upload/admin/file-size-limit.test.api.js @@ -4,8 +4,8 @@ const fs = require('fs'); const path = require('path'); const _ = require('lodash/fp'); -jest.mock('../../../../packages/core/upload/server/config', () => { - const config = jest.requireActual('../../../../packages/core/upload/server/config'); +jest.mock('../../../../../packages/core/upload/server/config', () => { + const config = jest.requireActual('../../../../../packages/core/upload/server/config'); return _.set('default.sizeLimit', 1000, config); // 1kb }); diff --git a/api-tests/core/upload/admin/file.test.api.js b/tests/api/core/upload/admin/file.test.api.js similarity index 100% rename from api-tests/core/upload/admin/file.test.api.js rename to tests/api/core/upload/admin/file.test.api.js diff --git a/api-tests/core/upload/admin/folder-file.test.api.js b/tests/api/core/upload/admin/folder-file.test.api.js similarity index 100% rename from api-tests/core/upload/admin/folder-file.test.api.js rename to tests/api/core/upload/admin/folder-file.test.api.js diff --git a/api-tests/core/upload/admin/folder-structure.test.api.js b/tests/api/core/upload/admin/folder-structure.test.api.js similarity index 100% rename from api-tests/core/upload/admin/folder-structure.test.api.js rename to tests/api/core/upload/admin/folder-structure.test.api.js diff --git a/api-tests/core/upload/admin/folder.test.api.js b/tests/api/core/upload/admin/folder.test.api.js similarity index 100% rename from api-tests/core/upload/admin/folder.test.api.js rename to tests/api/core/upload/admin/folder.test.api.js diff --git a/api-tests/core/upload/admin/image-dimension.test.api.js b/tests/api/core/upload/admin/image-dimension.test.api.js similarity index 100% rename from api-tests/core/upload/admin/image-dimension.test.api.js rename to tests/api/core/upload/admin/image-dimension.test.api.js diff --git a/api-tests/core/upload/admin/private-file-signing.test.api.js b/tests/api/core/upload/admin/private-file-signing.test.api.js similarity index 100% rename from api-tests/core/upload/admin/private-file-signing.test.api.js rename to tests/api/core/upload/admin/private-file-signing.test.api.js diff --git a/api-tests/core/upload/admin/settings.test.api.js b/tests/api/core/upload/admin/settings.test.api.js similarity index 100% rename from api-tests/core/upload/admin/settings.test.api.js rename to tests/api/core/upload/admin/settings.test.api.js diff --git a/api-tests/core/upload/content-api/graphql-upload-automatic-folder.test.api.js b/tests/api/core/upload/content-api/graphql-upload-automatic-folder.test.api.js similarity index 100% rename from api-tests/core/upload/content-api/graphql-upload-automatic-folder.test.api.js rename to tests/api/core/upload/content-api/graphql-upload-automatic-folder.test.api.js diff --git a/api-tests/core/upload/content-api/graphql-upload.test.api.js b/tests/api/core/upload/content-api/graphql-upload.test.api.js similarity index 100% rename from api-tests/core/upload/content-api/graphql-upload.test.api.js rename to tests/api/core/upload/content-api/graphql-upload.test.api.js diff --git a/api-tests/core/upload/content-api/private-file-signing.test.api.js b/tests/api/core/upload/content-api/private-file-signing.test.api.js similarity index 100% rename from api-tests/core/upload/content-api/private-file-signing.test.api.js rename to tests/api/core/upload/content-api/private-file-signing.test.api.js diff --git a/api-tests/core/upload/content-api/upload-automatic-folder.test.api.js b/tests/api/core/upload/content-api/upload-automatic-folder.test.api.js similarity index 100% rename from api-tests/core/upload/content-api/upload-automatic-folder.test.api.js rename to tests/api/core/upload/content-api/upload-automatic-folder.test.api.js diff --git a/api-tests/core/upload/content-api/upload.test.api.js b/tests/api/core/upload/content-api/upload.test.api.js similarity index 100% rename from api-tests/core/upload/content-api/upload.test.api.js rename to tests/api/core/upload/content-api/upload.test.api.js diff --git a/api-tests/core/upload/utils/rec.jpg b/tests/api/core/upload/utils/rec.jpg similarity index 100% rename from api-tests/core/upload/utils/rec.jpg rename to tests/api/core/upload/utils/rec.jpg diff --git a/api-tests/core/upload/utils/rec.pdf b/tests/api/core/upload/utils/rec.pdf similarity index 100% rename from api-tests/core/upload/utils/rec.pdf rename to tests/api/core/upload/utils/rec.pdf diff --git a/api-tests/core/upload/utils/strapi.gif b/tests/api/core/upload/utils/strapi.gif similarity index 100% rename from api-tests/core/upload/utils/strapi.gif rename to tests/api/core/upload/utils/strapi.gif diff --git a/api-tests/core/upload/utils/strapi.jpg b/tests/api/core/upload/utils/strapi.jpg similarity index 100% rename from api-tests/core/upload/utils/strapi.jpg rename to tests/api/core/upload/utils/strapi.jpg diff --git a/api-tests/core/upload/utils/strapi.png b/tests/api/core/upload/utils/strapi.png similarity index 100% rename from api-tests/core/upload/utils/strapi.png rename to tests/api/core/upload/utils/strapi.png diff --git a/api-tests/core/upload/utils/strapi.svg b/tests/api/core/upload/utils/strapi.svg similarity index 100% rename from api-tests/core/upload/utils/strapi.svg rename to tests/api/core/upload/utils/strapi.svg diff --git a/api-tests/core/upload/utils/strapi.tiff b/tests/api/core/upload/utils/strapi.tiff similarity index 100% rename from api-tests/core/upload/utils/strapi.tiff rename to tests/api/core/upload/utils/strapi.tiff diff --git a/api-tests/core/upload/utils/strapi.webp b/tests/api/core/upload/utils/strapi.webp similarity index 100% rename from api-tests/core/upload/utils/strapi.webp rename to tests/api/core/upload/utils/strapi.webp diff --git a/api-tests/core/upload/utils/thumbnail_target.png b/tests/api/core/upload/utils/thumbnail_target.png similarity index 100% rename from api-tests/core/upload/utils/thumbnail_target.png rename to tests/api/core/upload/utils/thumbnail_target.png diff --git a/api-tests/plugins/graphql/components.test.api.js b/tests/api/plugins/graphql/components.test.api.js similarity index 100% rename from api-tests/plugins/graphql/components.test.api.js rename to tests/api/plugins/graphql/components.test.api.js diff --git a/api-tests/plugins/graphql/crud.test.api.js b/tests/api/plugins/graphql/crud.test.api.js similarity index 100% rename from api-tests/plugins/graphql/crud.test.api.js rename to tests/api/plugins/graphql/crud.test.api.js diff --git a/api-tests/plugins/graphql/dp-relations.test.api.js b/tests/api/plugins/graphql/dp-relations.test.api.js similarity index 100% rename from api-tests/plugins/graphql/dp-relations.test.api.js rename to tests/api/plugins/graphql/dp-relations.test.api.js diff --git a/api-tests/plugins/graphql/fields/date.test.api.js b/tests/api/plugins/graphql/fields/date.test.api.js similarity index 100% rename from api-tests/plugins/graphql/fields/date.test.api.js rename to tests/api/plugins/graphql/fields/date.test.api.js diff --git a/api-tests/plugins/graphql/fields/datetime.test.api.js b/tests/api/plugins/graphql/fields/datetime.test.api.js similarity index 100% rename from api-tests/plugins/graphql/fields/datetime.test.api.js rename to tests/api/plugins/graphql/fields/datetime.test.api.js diff --git a/api-tests/plugins/graphql/relations.test.api.js b/tests/api/plugins/graphql/relations.test.api.js similarity index 100% rename from api-tests/plugins/graphql/relations.test.api.js rename to tests/api/plugins/graphql/relations.test.api.js diff --git a/api-tests/plugins/graphql/single-type.test.api.js b/tests/api/plugins/graphql/single-type.test.api.js similarity index 100% rename from api-tests/plugins/graphql/single-type.test.api.js rename to tests/api/plugins/graphql/single-type.test.api.js diff --git a/api-tests/plugins/graphql/utils.test.api.js b/tests/api/plugins/graphql/utils.test.api.js similarity index 100% rename from api-tests/plugins/graphql/utils.test.api.js rename to tests/api/plugins/graphql/utils.test.api.js diff --git a/api-tests/plugins/i18n/content-api/content-api.test.api.js b/tests/api/plugins/i18n/content-api/content-api.test.api.js similarity index 100% rename from api-tests/plugins/i18n/content-api/content-api.test.api.js rename to tests/api/plugins/i18n/content-api/content-api.test.api.js diff --git a/api-tests/plugins/i18n/content-api/content-types.test.api.js b/tests/api/plugins/i18n/content-api/content-types.test.api.js similarity index 100% rename from api-tests/plugins/i18n/content-api/content-types.test.api.js rename to tests/api/plugins/i18n/content-api/content-types.test.api.js diff --git a/api-tests/plugins/i18n/content-manager/crud.test.api.js b/tests/api/plugins/i18n/content-manager/crud.test.api.js similarity index 100% rename from api-tests/plugins/i18n/content-manager/crud.test.api.js rename to tests/api/plugins/i18n/content-manager/crud.test.api.js diff --git a/api-tests/plugins/i18n/content-manager/find-available-relations.test.api.js b/tests/api/plugins/i18n/content-manager/find-available-relations.test.api.js similarity index 100% rename from api-tests/plugins/i18n/content-manager/find-available-relations.test.api.js rename to tests/api/plugins/i18n/content-manager/find-available-relations.test.api.js diff --git a/api-tests/plugins/i18n/content-manager/find-existing-relations.test.api.js b/tests/api/plugins/i18n/content-manager/find-existing-relations.test.api.js similarity index 100% rename from api-tests/plugins/i18n/content-manager/find-existing-relations.test.api.js rename to tests/api/plugins/i18n/content-manager/find-existing-relations.test.api.js diff --git a/api-tests/plugins/i18n/graphql.test.api.js b/tests/api/plugins/i18n/graphql.test.api.js similarity index 100% rename from api-tests/plugins/i18n/graphql.test.api.js rename to tests/api/plugins/i18n/graphql.test.api.js diff --git a/api-tests/plugins/i18n/locales.test.api.js b/tests/api/plugins/i18n/locales.test.api.js similarity index 100% rename from api-tests/plugins/i18n/locales.test.api.js rename to tests/api/plugins/i18n/locales.test.api.js diff --git a/api-tests/plugins/users-permissions/admin/roles-api.test.api.js b/tests/api/plugins/users-permissions/admin/roles-api.test.api.js similarity index 100% rename from api-tests/plugins/users-permissions/admin/roles-api.test.api.js rename to tests/api/plugins/users-permissions/admin/roles-api.test.api.js diff --git a/api-tests/plugins/users-permissions/content-api/auth.test.api.js b/tests/api/plugins/users-permissions/content-api/auth.test.api.js similarity index 100% rename from api-tests/plugins/users-permissions/content-api/auth.test.api.js rename to tests/api/plugins/users-permissions/content-api/auth.test.api.js diff --git a/api-tests/plugins/users-permissions/content-api/users-api.test.api.js b/tests/api/plugins/users-permissions/content-api/users-api.test.api.js similarity index 100% rename from api-tests/plugins/users-permissions/content-api/users-api.test.api.js rename to tests/api/plugins/users-permissions/content-api/users-api.test.api.js diff --git a/api-tests/plugins/users-permissions/graphql.test.api.js b/tests/api/plugins/users-permissions/graphql.test.api.js similarity index 100% rename from api-tests/plugins/users-permissions/graphql.test.api.js rename to tests/api/plugins/users-permissions/graphql.test.api.js diff --git a/api-tests/plugins/users-permissions/users-graphql.test.api.js b/tests/api/plugins/users-permissions/users-graphql.test.api.js similarity index 100% rename from api-tests/plugins/users-permissions/users-graphql.test.api.js rename to tests/api/plugins/users-permissions/users-graphql.test.api.js diff --git a/api-tests/plugins/users-permissions/utils.js b/tests/api/plugins/users-permissions/utils.js similarity index 100% rename from api-tests/plugins/users-permissions/utils.js rename to tests/api/plugins/users-permissions/utils.js diff --git a/e2e/README.md b/tests/e2e/README.md similarity index 100% rename from e2e/README.md rename to tests/e2e/README.md diff --git a/e2e/app-template/README.md b/tests/e2e/app-template/README.md similarity index 100% rename from e2e/app-template/README.md rename to tests/e2e/app-template/README.md diff --git a/e2e/app-template/config/features.js b/tests/e2e/app-template/config/features.js similarity index 100% rename from e2e/app-template/config/features.js rename to tests/e2e/app-template/config/features.js diff --git a/e2e/app-template/package.json b/tests/e2e/app-template/package.json similarity index 100% rename from e2e/app-template/package.json rename to tests/e2e/app-template/package.json diff --git a/e2e/app-template/template.json b/tests/e2e/app-template/template.json similarity index 100% rename from e2e/app-template/template.json rename to tests/e2e/app-template/template.json diff --git a/e2e/app-template/template/src/api/.gitkeep b/tests/e2e/app-template/template/src/api/.gitkeep similarity index 100% rename from e2e/app-template/template/src/api/.gitkeep rename to tests/e2e/app-template/template/src/api/.gitkeep diff --git a/e2e/app-template/template/src/api/article/content-types/article/schema.json b/tests/e2e/app-template/template/src/api/article/content-types/article/schema.json similarity index 100% rename from e2e/app-template/template/src/api/article/content-types/article/schema.json rename to tests/e2e/app-template/template/src/api/article/content-types/article/schema.json diff --git a/e2e/app-template/template/src/api/article/controllers/article.js b/tests/e2e/app-template/template/src/api/article/controllers/article.js similarity index 100% rename from e2e/app-template/template/src/api/article/controllers/article.js rename to tests/e2e/app-template/template/src/api/article/controllers/article.js diff --git a/e2e/app-template/template/src/api/article/documentation/1.0.0/article.json b/tests/e2e/app-template/template/src/api/article/documentation/1.0.0/article.json similarity index 100% rename from e2e/app-template/template/src/api/article/documentation/1.0.0/article.json rename to tests/e2e/app-template/template/src/api/article/documentation/1.0.0/article.json diff --git a/e2e/app-template/template/src/api/article/routes/article.js b/tests/e2e/app-template/template/src/api/article/routes/article.js similarity index 100% rename from e2e/app-template/template/src/api/article/routes/article.js rename to tests/e2e/app-template/template/src/api/article/routes/article.js diff --git a/e2e/app-template/template/src/api/article/services/article.js b/tests/e2e/app-template/template/src/api/article/services/article.js similarity index 100% rename from e2e/app-template/template/src/api/article/services/article.js rename to tests/e2e/app-template/template/src/api/article/services/article.js diff --git a/e2e/app-template/template/src/api/author/content-types/author/schema.json b/tests/e2e/app-template/template/src/api/author/content-types/author/schema.json similarity index 100% rename from e2e/app-template/template/src/api/author/content-types/author/schema.json rename to tests/e2e/app-template/template/src/api/author/content-types/author/schema.json diff --git a/e2e/app-template/template/src/api/author/controllers/author.js b/tests/e2e/app-template/template/src/api/author/controllers/author.js similarity index 100% rename from e2e/app-template/template/src/api/author/controllers/author.js rename to tests/e2e/app-template/template/src/api/author/controllers/author.js diff --git a/e2e/app-template/template/src/api/author/documentation/1.0.0/author.json b/tests/e2e/app-template/template/src/api/author/documentation/1.0.0/author.json similarity index 100% rename from e2e/app-template/template/src/api/author/documentation/1.0.0/author.json rename to tests/e2e/app-template/template/src/api/author/documentation/1.0.0/author.json diff --git a/e2e/app-template/template/src/api/author/routes/author.js b/tests/e2e/app-template/template/src/api/author/routes/author.js similarity index 100% rename from e2e/app-template/template/src/api/author/routes/author.js rename to tests/e2e/app-template/template/src/api/author/routes/author.js diff --git a/e2e/app-template/template/src/api/author/services/author.js b/tests/e2e/app-template/template/src/api/author/services/author.js similarity index 100% rename from e2e/app-template/template/src/api/author/services/author.js rename to tests/e2e/app-template/template/src/api/author/services/author.js diff --git a/e2e/app-template/template/src/api/config/controllers/config.js b/tests/e2e/app-template/template/src/api/config/controllers/config.js similarity index 100% rename from e2e/app-template/template/src/api/config/controllers/config.js rename to tests/e2e/app-template/template/src/api/config/controllers/config.js diff --git a/e2e/app-template/template/src/api/config/routes/config.js b/tests/e2e/app-template/template/src/api/config/routes/config.js similarity index 100% rename from e2e/app-template/template/src/api/config/routes/config.js rename to tests/e2e/app-template/template/src/api/config/routes/config.js diff --git a/e2e/app-template/template/src/api/config/services/config.js b/tests/e2e/app-template/template/src/api/config/services/config.js similarity index 100% rename from e2e/app-template/template/src/api/config/services/config.js rename to tests/e2e/app-template/template/src/api/config/services/config.js diff --git a/e2e/app-template/template/src/api/database/content-types/database/schema.json b/tests/e2e/app-template/template/src/api/database/content-types/database/schema.json similarity index 100% rename from e2e/app-template/template/src/api/database/content-types/database/schema.json rename to tests/e2e/app-template/template/src/api/database/content-types/database/schema.json diff --git a/e2e/app-template/template/src/api/database/controllers/database.js b/tests/e2e/app-template/template/src/api/database/controllers/database.js similarity index 100% rename from e2e/app-template/template/src/api/database/controllers/database.js rename to tests/e2e/app-template/template/src/api/database/controllers/database.js diff --git a/e2e/app-template/template/src/api/database/routes/database.js b/tests/e2e/app-template/template/src/api/database/routes/database.js similarity index 100% rename from e2e/app-template/template/src/api/database/routes/database.js rename to tests/e2e/app-template/template/src/api/database/routes/database.js diff --git a/e2e/app-template/template/src/api/database/services/database.js b/tests/e2e/app-template/template/src/api/database/services/database.js similarity index 100% rename from e2e/app-template/template/src/api/database/services/database.js rename to tests/e2e/app-template/template/src/api/database/services/database.js diff --git a/e2e/app-template/template/src/api/homepage/content-types/homepage/schema.json b/tests/e2e/app-template/template/src/api/homepage/content-types/homepage/schema.json similarity index 100% rename from e2e/app-template/template/src/api/homepage/content-types/homepage/schema.json rename to tests/e2e/app-template/template/src/api/homepage/content-types/homepage/schema.json diff --git a/e2e/app-template/template/src/api/homepage/controllers/homepage.js b/tests/e2e/app-template/template/src/api/homepage/controllers/homepage.js similarity index 100% rename from e2e/app-template/template/src/api/homepage/controllers/homepage.js rename to tests/e2e/app-template/template/src/api/homepage/controllers/homepage.js diff --git a/e2e/app-template/template/src/api/homepage/documentation/1.0.0/homepage.json b/tests/e2e/app-template/template/src/api/homepage/documentation/1.0.0/homepage.json similarity index 100% rename from e2e/app-template/template/src/api/homepage/documentation/1.0.0/homepage.json rename to tests/e2e/app-template/template/src/api/homepage/documentation/1.0.0/homepage.json diff --git a/e2e/app-template/template/src/api/homepage/routes/homepage.js b/tests/e2e/app-template/template/src/api/homepage/routes/homepage.js similarity index 100% rename from e2e/app-template/template/src/api/homepage/routes/homepage.js rename to tests/e2e/app-template/template/src/api/homepage/routes/homepage.js diff --git a/e2e/app-template/template/src/api/homepage/services/homepage.js b/tests/e2e/app-template/template/src/api/homepage/services/homepage.js similarity index 100% rename from e2e/app-template/template/src/api/homepage/services/homepage.js rename to tests/e2e/app-template/template/src/api/homepage/services/homepage.js diff --git a/e2e/app-template/template/src/api/shop/content-types/shop/schema.json b/tests/e2e/app-template/template/src/api/shop/content-types/shop/schema.json similarity index 100% rename from e2e/app-template/template/src/api/shop/content-types/shop/schema.json rename to tests/e2e/app-template/template/src/api/shop/content-types/shop/schema.json diff --git a/e2e/app-template/template/src/api/shop/controllers/shop.js b/tests/e2e/app-template/template/src/api/shop/controllers/shop.js similarity index 100% rename from e2e/app-template/template/src/api/shop/controllers/shop.js rename to tests/e2e/app-template/template/src/api/shop/controllers/shop.js diff --git a/e2e/app-template/template/src/api/shop/documentation/1.0.0/shop.json b/tests/e2e/app-template/template/src/api/shop/documentation/1.0.0/shop.json similarity index 100% rename from e2e/app-template/template/src/api/shop/documentation/1.0.0/shop.json rename to tests/e2e/app-template/template/src/api/shop/documentation/1.0.0/shop.json diff --git a/e2e/app-template/template/src/api/shop/routes/shop.js b/tests/e2e/app-template/template/src/api/shop/routes/shop.js similarity index 100% rename from e2e/app-template/template/src/api/shop/routes/shop.js rename to tests/e2e/app-template/template/src/api/shop/routes/shop.js diff --git a/e2e/app-template/template/src/api/shop/services/shop.js b/tests/e2e/app-template/template/src/api/shop/services/shop.js similarity index 100% rename from e2e/app-template/template/src/api/shop/services/shop.js rename to tests/e2e/app-template/template/src/api/shop/services/shop.js diff --git a/e2e/app-template/template/src/api/upcoming-match/content-types/upcoming-match/schema.json b/tests/e2e/app-template/template/src/api/upcoming-match/content-types/upcoming-match/schema.json similarity index 100% rename from e2e/app-template/template/src/api/upcoming-match/content-types/upcoming-match/schema.json rename to tests/e2e/app-template/template/src/api/upcoming-match/content-types/upcoming-match/schema.json diff --git a/e2e/app-template/template/src/api/upcoming-match/controllers/upcoming-match.js b/tests/e2e/app-template/template/src/api/upcoming-match/controllers/upcoming-match.js similarity index 100% rename from e2e/app-template/template/src/api/upcoming-match/controllers/upcoming-match.js rename to tests/e2e/app-template/template/src/api/upcoming-match/controllers/upcoming-match.js diff --git a/e2e/app-template/template/src/api/upcoming-match/documentation/1.0.0/upcoming-match.json b/tests/e2e/app-template/template/src/api/upcoming-match/documentation/1.0.0/upcoming-match.json similarity index 100% rename from e2e/app-template/template/src/api/upcoming-match/documentation/1.0.0/upcoming-match.json rename to tests/e2e/app-template/template/src/api/upcoming-match/documentation/1.0.0/upcoming-match.json diff --git a/e2e/app-template/template/src/api/upcoming-match/routes/upcoming-match.js b/tests/e2e/app-template/template/src/api/upcoming-match/routes/upcoming-match.js similarity index 100% rename from e2e/app-template/template/src/api/upcoming-match/routes/upcoming-match.js rename to tests/e2e/app-template/template/src/api/upcoming-match/routes/upcoming-match.js diff --git a/e2e/app-template/template/src/api/upcoming-match/services/upcoming-match.js b/tests/e2e/app-template/template/src/api/upcoming-match/services/upcoming-match.js similarity index 100% rename from e2e/app-template/template/src/api/upcoming-match/services/upcoming-match.js rename to tests/e2e/app-template/template/src/api/upcoming-match/services/upcoming-match.js diff --git a/e2e/app-template/template/src/components/meta/seo.json b/tests/e2e/app-template/template/src/components/meta/seo.json similarity index 100% rename from e2e/app-template/template/src/components/meta/seo.json rename to tests/e2e/app-template/template/src/components/meta/seo.json diff --git a/e2e/app-template/template/src/components/page-blocks/content-and-image.json b/tests/e2e/app-template/template/src/components/page-blocks/content-and-image.json similarity index 100% rename from e2e/app-template/template/src/components/page-blocks/content-and-image.json rename to tests/e2e/app-template/template/src/components/page-blocks/content-and-image.json diff --git a/e2e/app-template/template/src/components/page-blocks/hero-image.json b/tests/e2e/app-template/template/src/components/page-blocks/hero-image.json similarity index 100% rename from e2e/app-template/template/src/components/page-blocks/hero-image.json rename to tests/e2e/app-template/template/src/components/page-blocks/hero-image.json diff --git a/e2e/app-template/template/src/components/product/variations.json b/tests/e2e/app-template/template/src/components/product/variations.json similarity index 100% rename from e2e/app-template/template/src/components/product/variations.json rename to tests/e2e/app-template/template/src/components/product/variations.json diff --git a/e2e/app-template/template/src/constants.js b/tests/e2e/app-template/template/src/constants.js similarity index 100% rename from e2e/app-template/template/src/constants.js rename to tests/e2e/app-template/template/src/constants.js diff --git a/e2e/app-template/template/src/create-transfer-token.js b/tests/e2e/app-template/template/src/create-transfer-token.js similarity index 100% rename from e2e/app-template/template/src/create-transfer-token.js rename to tests/e2e/app-template/template/src/create-transfer-token.js diff --git a/e2e/app-template/template/src/index.js b/tests/e2e/app-template/template/src/index.js similarity index 100% rename from e2e/app-template/template/src/index.js rename to tests/e2e/app-template/template/src/index.js diff --git a/e2e/constants.js b/tests/e2e/constants.js similarity index 100% rename from e2e/constants.js rename to tests/e2e/constants.js diff --git a/e2e/data/with-admin.tar b/tests/e2e/data/with-admin.tar similarity index 100% rename from e2e/data/with-admin.tar rename to tests/e2e/data/with-admin.tar diff --git a/e2e/data/without-admin.tar b/tests/e2e/data/without-admin.tar similarity index 100% rename from e2e/data/without-admin.tar rename to tests/e2e/data/without-admin.tar diff --git a/e2e/scripts/dts-export.js b/tests/e2e/scripts/dts-export.js similarity index 100% rename from e2e/scripts/dts-export.js rename to tests/e2e/scripts/dts-export.js diff --git a/e2e/scripts/dts-import.js b/tests/e2e/scripts/dts-import.js similarity index 94% rename from e2e/scripts/dts-import.js rename to tests/e2e/scripts/dts-import.js index 66e923a8287..991a77f334a 100644 --- a/e2e/scripts/dts-import.js +++ b/tests/e2e/scripts/dts-import.js @@ -1,4 +1,4 @@ -import { resolve } from 'path'; +import { resolve, join } from 'path'; import { ALLOWED_CONTENT_TYPES, CUSTOM_TRANSFER_TOKEN_ACCESS_KEY } from '../constants'; const { @@ -17,7 +17,8 @@ const { * see: https://docs.strapi.io/developer-docs/latest/developer-resources/data-management.html * @param {String} filePath the path to a DTS backup */ -export const resetDatabaseAndImportDataFromPath = async (filePath) => { +export const resetDatabaseAndImportDataFromPath = async (file) => { + const filePath = join('./tests/e2e/data/', file); const source = createSourceProvider(filePath); const destination = createDestinationProvider(); diff --git a/e2e/scripts/rate-limit.js b/tests/e2e/scripts/rate-limit.js similarity index 100% rename from e2e/scripts/rate-limit.js rename to tests/e2e/scripts/rate-limit.js diff --git a/e2e/tests/admin/login.spec.js b/tests/e2e/tests/admin/login.spec.js similarity index 98% rename from e2e/tests/admin/login.spec.js rename to tests/e2e/tests/admin/login.spec.js index ca3a61843ff..1f604203be2 100644 --- a/e2e/tests/admin/login.spec.js +++ b/tests/e2e/tests/admin/login.spec.js @@ -6,7 +6,7 @@ import { login } from '../../utils/login'; test.describe('Login', () => { test.beforeEach(async ({ page }) => { - await resetDatabaseAndImportDataFromPath('./e2e/data/with-admin.tar'); + await resetDatabaseAndImportDataFromPath('with-admin.tar'); await page.goto('/admin'); }); diff --git a/e2e/tests/admin/logout.spec.js b/tests/e2e/tests/admin/logout.spec.js similarity index 88% rename from e2e/tests/admin/logout.spec.js rename to tests/e2e/tests/admin/logout.spec.js index cabecc990b0..135dc48acbf 100644 --- a/e2e/tests/admin/logout.spec.js +++ b/tests/e2e/tests/admin/logout.spec.js @@ -5,7 +5,7 @@ import { login } from '../../utils/login'; test.describe('Log Out', () => { test.beforeEach(async ({ page }) => { - await resetDatabaseAndImportDataFromPath('./e2e/data/with-admin.tar'); + await resetDatabaseAndImportDataFromPath('with-admin.tar'); await page.goto('/admin'); await login({ page }); }); diff --git a/e2e/tests/admin/signup.spec.js b/tests/e2e/tests/admin/signup.spec.js similarity index 97% rename from e2e/tests/admin/signup.spec.js rename to tests/e2e/tests/admin/signup.spec.js index a8e23632707..1bce106f4e8 100644 --- a/e2e/tests/admin/signup.spec.js +++ b/tests/e2e/tests/admin/signup.spec.js @@ -25,7 +25,7 @@ export const fillValidSignUpForm = async ({ page }) => { test.describe('Sign Up', () => { test.beforeEach(async ({ page }) => { - await resetDatabaseAndImportDataFromPath('./e2e/data/without-admin.tar'); + await resetDatabaseAndImportDataFromPath('without-admin.tar'); await page.goto('/admin'); await fillValidSignUpForm({ page }); }); diff --git a/e2e/tests/admin/transfer/tokens.spec.ts b/tests/e2e/tests/admin/transfer/tokens.spec.ts similarity index 94% rename from e2e/tests/admin/transfer/tokens.spec.ts rename to tests/e2e/tests/admin/transfer/tokens.spec.ts index 0fdc05e241b..6cdf13ffddf 100644 --- a/e2e/tests/admin/transfer/tokens.spec.ts +++ b/tests/e2e/tests/admin/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, delay } from '../../../utils/shared'; +import { navToHeader } from '../../../utils/shared'; const createTransferToken = async (page, tokenName, duration, type) => { await navToHeader( @@ -27,7 +27,7 @@ const createTransferToken = async (page, tokenName, duration, type) => { test.describe('Transfer Tokens', () => { test.beforeEach(async ({ page }) => { - await resetDatabaseAndImportDataFromPath('./e2e/data/with-admin.tar'); + await resetDatabaseAndImportDataFromPath('with-admin.tar'); await page.goto('/admin'); await login({ page }); }); diff --git a/e2e/tests/content-manager/editview.spec.ts b/tests/e2e/tests/content-manager/editview.spec.ts similarity index 98% rename from e2e/tests/content-manager/editview.spec.ts rename to tests/e2e/tests/content-manager/editview.spec.ts index b5ee283ec58..90b81aa304c 100644 --- a/e2e/tests/content-manager/editview.spec.ts +++ b/tests/e2e/tests/content-manager/editview.spec.ts @@ -5,7 +5,7 @@ import { findAndClose } from '../../utils/shared'; test.describe('Edit View', () => { test.beforeEach(async ({ page }) => { - await resetDatabaseAndImportDataFromPath('./e2e/data/with-admin.tar'); + await resetDatabaseAndImportDataFromPath('with-admin.tar'); await page.goto('/admin'); await login({ page }); }); diff --git a/e2e/tests/content-manager/listview.spec.ts b/tests/e2e/tests/content-manager/listview.spec.ts similarity index 98% rename from e2e/tests/content-manager/listview.spec.ts rename to tests/e2e/tests/content-manager/listview.spec.ts index de97cb9e680..6b3a02a593c 100644 --- a/e2e/tests/content-manager/listview.spec.ts +++ b/tests/e2e/tests/content-manager/listview.spec.ts @@ -7,7 +7,7 @@ import { resetDatabaseAndImportDataFromPath } from '../../scripts/dts-import'; test.describe('List View', () => { test.beforeEach(async ({ page }) => { - await resetDatabaseAndImportDataFromPath('./e2e/data/with-admin.tar'); + await resetDatabaseAndImportDataFromPath('with-admin.tar'); await page.goto('/admin'); await login({ page }); }); diff --git a/e2e/tests/content-releases/release-details-page.spec.ts b/tests/e2e/tests/content-releases/release-details-page.spec.ts similarity index 98% rename from e2e/tests/content-releases/release-details-page.spec.ts rename to tests/e2e/tests/content-releases/release-details-page.spec.ts index ebe297fc73f..9ad99d99a9a 100644 --- a/e2e/tests/content-releases/release-details-page.spec.ts +++ b/tests/e2e/tests/content-releases/release-details-page.spec.ts @@ -29,7 +29,7 @@ const addEntryToRelease = async ({ page, releaseName }: { page: Page; releaseNam describeOnCondition(edition === 'EE')('Release page', () => { test.beforeEach(async ({ page }) => { - await resetDatabaseAndImportDataFromPath('./e2e/data/with-admin.tar'); + await resetDatabaseAndImportDataFromPath('with-admin.tar'); await page.goto('/admin'); await login({ page }); diff --git a/e2e/tests/content-releases/releases-page.spec.ts b/tests/e2e/tests/content-releases/releases-page.spec.ts similarity index 98% rename from e2e/tests/content-releases/releases-page.spec.ts rename to tests/e2e/tests/content-releases/releases-page.spec.ts index b52393349d3..a7373887c63 100644 --- a/e2e/tests/content-releases/releases-page.spec.ts +++ b/tests/e2e/tests/content-releases/releases-page.spec.ts @@ -7,7 +7,7 @@ const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE'; describeOnCondition(edition === 'EE')('Releases page', () => { test.beforeEach(async ({ page }) => { - await resetDatabaseAndImportDataFromPath('./e2e/data/with-admin.tar'); + await resetDatabaseAndImportDataFromPath('with-admin.tar'); await page.goto('/admin'); await login({ page }); }); diff --git a/e2e/tests/content-type-builder/ctb-edit-view.spec.ts b/tests/e2e/tests/content-type-builder/ctb-edit-view.spec.ts similarity index 94% rename from e2e/tests/content-type-builder/ctb-edit-view.spec.ts rename to tests/e2e/tests/content-type-builder/ctb-edit-view.spec.ts index b8585f6b3c6..281ba939ef4 100644 --- a/e2e/tests/content-type-builder/ctb-edit-view.spec.ts +++ b/tests/e2e/tests/content-type-builder/ctb-edit-view.spec.ts @@ -5,7 +5,7 @@ import { resetDatabaseAndImportDataFromPath } from '../../scripts/dts-import'; test.describe('Edit View CTB', () => { test.beforeEach(async ({ page }) => { - await resetDatabaseAndImportDataFromPath('./e2e/data/with-admin.tar'); + await resetDatabaseAndImportDataFromPath('with-admin.tar'); await page.goto('/admin'); await login({ page }); }); diff --git a/e2e/utils/login.ts b/tests/e2e/utils/login.ts similarity index 100% rename from e2e/utils/login.ts rename to tests/e2e/utils/login.ts diff --git a/e2e/utils/shared.ts b/tests/e2e/utils/shared.ts similarity index 100% rename from e2e/utils/shared.ts rename to tests/e2e/utils/shared.ts diff --git a/test/helpers/create-context.js b/tests/helpers/create-context.js similarity index 100% rename from test/helpers/create-context.js rename to tests/helpers/create-context.js diff --git a/test/helpers/test-app.js b/tests/helpers/test-app.js similarity index 97% rename from test/helpers/test-app.js rename to tests/helpers/test-app.js index c7ef88b45b9..5c1c2dbd650 100644 --- a/test/helpers/test-app.js +++ b/tests/helpers/test-app.js @@ -4,7 +4,7 @@ const path = require('path'); const fs = require('fs'); const rimraf = require('rimraf'); const execa = require('execa'); -const generateNew = require('../../packages/generators/app/dist/generate-new'); +const generateNew = require('@strapi/generate-new/dist/generate-new'); /** * Deletes a test app diff --git a/test/scripts/generate-test-app.js b/tests/scripts/generate-test-app.js similarity index 100% rename from test/scripts/generate-test-app.js rename to tests/scripts/generate-test-app.js diff --git a/test/scripts/run-api-tests.js b/tests/scripts/run-api-tests.js similarity index 100% rename from test/scripts/run-api-tests.js rename to tests/scripts/run-api-tests.js diff --git a/test/scripts/run-e2e-tests.js b/tests/scripts/run-e2e-tests.js similarity index 96% rename from test/scripts/run-e2e-tests.js rename to tests/scripts/run-e2e-tests.js index 656e5e8c9e5..2890c8efefd 100644 --- a/test/scripts/run-e2e-tests.js +++ b/tests/scripts/run-e2e-tests.js @@ -12,7 +12,8 @@ const { createConfig } = require('../../playwright.base.config'); const cwd = path.resolve(__dirname, '../..'); const testAppDirectory = path.join(cwd, 'test-apps', 'e2e'); -const testRoot = path.join(cwd, 'e2e'); +const testRoot = path.join(cwd, 'tests', 'e2e'); +const testDomainRoot = path.join(testRoot, 'tests'); const templateDir = path.join(testRoot, 'app-template'); const pathExists = async (path) => { @@ -67,7 +68,7 @@ yargs command: '*', description: 'run the E2E test suite', builder: async (yarg) => { - const domains = await fs.readdir(path.join(cwd, 'e2e', 'tests')); + const domains = await fs.readdir(testDomainRoot); yarg.option('concurrency', { alias: 'c', @@ -154,7 +155,7 @@ yargs }, useNullAsDefault: true, }, - template: path.join(cwd, 'e2e', 'app-template'), + template: path.join(testRoot, 'app-template'), link: true, }); @@ -200,7 +201,7 @@ yargs ); const config = createConfig({ - testDir: path.join(cwd, 'e2e', 'tests', domain), + testDir: path.join(testDomainRoot, domain), port, appDir: testAppPath, }); diff --git a/test/scripts/run-test-app.js b/tests/scripts/run-test-app.js similarity index 100% rename from test/scripts/run-test-app.js rename to tests/scripts/run-test-app.js diff --git a/test/setup/jest-api.setup.js b/tests/setup/jest-api.setup.js similarity index 100% rename from test/setup/jest-api.setup.js rename to tests/setup/jest-api.setup.js diff --git a/test/setup/unit.setup.js b/tests/setup/unit.setup.js similarity index 100% rename from test/setup/unit.setup.js rename to tests/setup/unit.setup.js