revert: move back test files

This commit is contained in:
Ben Irvin
2025-11-18 15:15:03 +01:00
parent a722518caf
commit 2f1e80a196
123 changed files with 790 additions and 772 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ module.exports = {
displayName: 'CLI tests',
testMatch: ['**/?(*.)+(spec|test).cli.(js|ts)'],
testEnvironment: 'node',
setupFilesAfterEnv: ['<rootDir>/../../../../../tests/setup/jest-cli.setup.js'],
setupFilesAfterEnv: ['<rootDir>/../../../../tests/setup/jest-cli.setup.js'],
coveragePathIgnorePatterns: [
'<rootDir>/dist/',
'<rootDir>/node_modules/',
+2 -2
View File
@@ -42,7 +42,7 @@ const createConfig = ({ port, testDir, appDir, reportFileName }) => ({
timeout: getEnvNum(process.env.PLAYWRIGHT_TIMEOUT, 90 * 1000),
/* Global setup to set localStorage for all tests */
globalSetup: require.resolve('./tests/e2e/browser/utils/global-setup.ts'),
globalSetup: require.resolve('./tests/utils/global-setup.ts'),
expect: {
/**
@@ -96,7 +96,7 @@ const createConfig = ({ port, testDir, appDir, reportFileName }) => ({
: 'off',
/* Use the storage state with localStorage set globally */
storageState: './tests/e2e/browser/playwright-storage-state.json',
storageState: './tests/e2e/playwright-storage-state.json',
},
/* Configure projects for major browsers */
+8
View File
@@ -0,0 +1,8 @@
'use strict';
// Re-export from shared constants
const sharedConstants = require('../e2e/constants');
module.exports = {
CUSTOM_TRANSFER_TOKEN_ACCESS_KEY: sharedConstants.CUSTOM_TRANSFER_TOKEN_ACCESS_KEY,
};
Binary file not shown.
@@ -2,7 +2,7 @@
const coffee = require('coffee');
const utils = require('../../../utils');
const utils = require('../../../../utils');
describe('export', () => {
let appPath;
@@ -2,7 +2,7 @@
const coffee = require('coffee');
const utils = require('../../../utils');
const utils = require('../../../../utils');
describe('import', () => {
let appPath;
@@ -2,7 +2,7 @@
const coffee = require('coffee');
const utils = require('../../../utils');
const utils = require('../../../../utils');
describe('content-types:list', () => {
let appPath;
@@ -2,7 +2,7 @@
const coffee = require('coffee');
const utils = require('../../../utils');
const utils = require('../../../../utils');
describe('controllers:list', () => {
let appPath;
@@ -2,7 +2,7 @@
const coffee = require('coffee');
const utils = require('../../../utils');
const utils = require('../../../../utils');
describe('hooks:list', () => {
let appPath;
@@ -2,7 +2,7 @@
const coffee = require('coffee');
const utils = require('../../../utils');
const utils = require('../../../../utils');
describe('middlewares:list', () => {
let appPath;
@@ -2,7 +2,7 @@
const coffee = require('coffee');
const utils = require('../../../utils');
const utils = require('../../../../utils');
describe('policies:list', () => {
let appPath;
@@ -2,7 +2,7 @@
const coffee = require('coffee');
const utils = require('../../../utils');
const utils = require('../../../../utils');
describe('routes:list', () => {
let appPath;
@@ -2,7 +2,7 @@
const coffee = require('coffee');
const utils = require('../../../utils');
const utils = require('../../../../utils');
describe('services:list', () => {
let appPath;
@@ -4,7 +4,7 @@ const coffee = require('coffee');
const semver = require('semver');
const assert = require('assert');
const utils = require('../../../utils');
const utils = require('../../../../utils');
describe('--version', () => {
let appPath;
@@ -4,7 +4,7 @@ const coffee = require('coffee');
const semver = require('semver');
const assert = require('assert');
const utils = require('../../../utils');
const utils = require('../../../../utils');
describe('--version', () => {
let appPath;
+8
View File
@@ -0,0 +1,8 @@
'use strict';
module.exports = {
fs: require('../../utils/fs'),
seed: require('../../utils/scripts/dts-import'),
instances: require('../../utils/test-app'),
helpers: require('../../utils/helpers'),
};
-7
View File
@@ -1,7 +0,0 @@
'use strict';
const { CUSTOM_TRANSFER_TOKEN_ACCESS_KEY } = require('../app-template/src/constants');
module.exports = {
CUSTOM_TRANSFER_TOKEN_ACCESS_KEY,
};
-87
View File
@@ -1,87 +0,0 @@
'use strict';
const {
strapi: {
providers: { createLocalStrapiSourceProvider },
},
file: {
providers: { createLocalFileDestinationProvider },
},
engine: { createTransferEngine },
} = require('@strapi/data-transfer');
const { createStrapi, compileStrapi } = require('@strapi/strapi');
const path = require('path');
/**
* Export the data from a strapi project.
* This script should be run as `node <path-to>/dts-export.js [exportFilePath]` from the
* root directory of a strapi project e.g. `/examples/kitchensink`.
*/
const createDataset = async () => {
let args = process.argv.slice(2);
if (args.length !== 1) {
console.error('Please provide the dataset path name as a parameter.');
process.exit(1);
}
const datasetPath = path.resolve(args[0]);
const strapi = await createStrapiInstance();
const source = createSourceProvider(strapi);
const destination = createDestinationProvider(datasetPath);
const engine = createTransferEngine(source, destination, {
versionStrategy: 'ignore',
schemaStrategy: 'ignore',
});
engine.diagnostics.onDiagnostic(console.log);
try {
const results = await engine.transfer();
const { destination, engine: engineResults } = results;
const relativeArchivePath = path.relative(process.cwd(), destination.file.path);
console.log(`Dataset exported to: ${relativeArchivePath}`);
console.log('The export contains:');
console.log(` - ${engineResults.schemas?.count ?? 0} schemas`);
console.log(` - ${engineResults.entities?.count ?? 0} entities`);
console.log(` - ${engineResults.links?.count ?? 0} links`);
console.log(` - ${engineResults.assets?.count ?? 0} assets`);
console.log(` - ${engineResults.configuration?.count ?? 0} configs`);
process.exit(0);
} catch (e) {
console.error('Export process failed.');
console.error(e);
process.exit(1);
}
};
const createSourceProvider = (strapi) =>
createLocalStrapiSourceProvider({
async getStrapi() {
return strapi;
},
});
const createDestinationProvider = (datasetPath) => {
return createLocalFileDestinationProvider({
file: { path: datasetPath },
encryption: { enabled: false },
compression: { enabled: true },
});
};
const createStrapiInstance = async (logLevel = 'error') => {
const appContext = await compileStrapi();
const app = createStrapi(appContext);
app.log.level = logLevel;
return app.load();
};
createDataset().finally();
-54
View File
@@ -1,54 +0,0 @@
const { resolve } = require('path');
const { CUSTOM_TRANSFER_TOKEN_ACCESS_KEY } = require('../constants');
const {
file: {
providers: { createLocalFileSourceProvider },
},
strapi: {
providers: { createRemoteStrapiDestinationProvider },
},
engine: { createTransferEngine },
} = require('@strapi/data-transfer');
/**
* Reset the DB and import data from a DTS dataset
* This is meant to be used directly from a CLI test
*/
const resetDatabaseAndImportDataFromPath = async (filePath) => {
const source = createSourceProvider(filePath);
const destination = createDestinationProvider();
const engine = createTransferEngine(source, destination, {
versionStrategy: 'ignore',
schemaStrategy: 'ignore',
});
engine.diagnostics.onDiagnostic(console.log);
try {
await engine.transfer();
} catch (e) {
console.error('Import process failed.');
console.error(e);
process.exit(1);
}
};
const createSourceProvider = (filePath) =>
createLocalFileSourceProvider({
file: { path: resolve(filePath) },
encryption: { enabled: false },
compression: { enabled: true },
});
const createDestinationProvider = () => {
// TODO: When possible, use the local strapi destination provider instead
// For this we need to wait to have access to a Strapi instance
return createRemoteStrapiDestinationProvider({
url: new URL(`http://127.0.0.1:${process.env.PORT ?? 1337}/admin`),
auth: { type: 'token', token: CUSTOM_TRANSFER_TOKEN_ACCESS_KEY },
strategy: 'restore',
});
};
module.exports = { resetDatabaseAndImportDataFromPath };
-6
View File
@@ -1,6 +0,0 @@
export async function toggleRateLimiting(page, enabled = true) {
await page.request.fetch('/api/config/ratelimit/enable', {
method: 'POST',
data: { value: enabled },
});
}
-8
View File
@@ -1,8 +0,0 @@
'use strict';
module.exports = {
fs: require('./fs'),
seed: require('../scripts/dts-import'),
instances: require('./test-app'),
helpers: require('./helpers'),
};
@@ -1,4 +1,4 @@
export const { CUSTOM_TRANSFER_TOKEN_ACCESS_KEY } = require('../app-template/src/constants');
export const { CUSTOM_TRANSFER_TOKEN_ACCESS_KEY } = require('./app-template/src/constants');
// NOTE: anything included here needs to be included in all test datasets exports
export const ALLOWED_CONTENT_TYPES = [
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,7 @@
import { test, expect } from '@playwright/test';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../utils/login';
import { TITLE_LOGIN, TITLE_HOME } from '../../constants';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { login } from '../../../utils/login';
import { TITLE_LOGIN, TITLE_HOME } from '../../e2e/constants';
test.describe('Legacy Admin Token Migration', () => {
test.beforeEach(async ({ page, context }) => {
@@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test';
import { navToHeader } from '../../utils/shared';
import { sharedSetup } from '../../utils/setup';
import { navToHeader } from '../../../utils/shared';
import { sharedSetup } from '../../../utils/setup';
const createAPIToken = async (page, tokenName, duration, type) => {
await navToHeader(page, ['Settings', 'API Tokens', 'Create new API Token'], 'Create API Token');
@@ -1,8 +1,8 @@
import { test, expect } from '@playwright/test';
import { sharedSetup } from '../../utils/setup';
import { STRAPI_GUIDED_TOUR_CONFIG, setGuidedTourLocalStorage } from '../../utils/global-setup';
import { clickAndWait, describeOnCondition } from '../../utils/shared';
import { waitForRestart } from '../../utils/restart';
import { sharedSetup } from '../../../utils/setup';
import { STRAPI_GUIDED_TOUR_CONFIG, setGuidedTourLocalStorage } from '../../../utils/global-setup';
import { clickAndWait, describeOnCondition } from '../../../utils/shared';
import { waitForRestart } from '../../../utils/restart';
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
@@ -1,7 +1,7 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { clickAndWait } from '../../utils/shared';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { clickAndWait } from '../../../utils/shared';
test.describe('Homepage Widget Customization', () => {
test.beforeEach(async ({ page }) => {
@@ -1,9 +1,9 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { clickAndWait, navToHeader } from '../../utils/shared';
import { waitForRestart } from '../../utils/restart';
import { EDITOR_EMAIL_ADDRESS, EDITOR_PASSWORD } from '../../constants';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { clickAndWait, navToHeader } from '../../../utils/shared';
import { waitForRestart } from '../../../utils/restart';
import { EDITOR_EMAIL_ADDRESS, EDITOR_PASSWORD } from '../../e2e/constants';
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
@@ -1,8 +1,8 @@
import { test, expect } from '@playwright/test';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { toggleRateLimiting } from '../../utils/rate-limit';
import { ADMIN_EMAIL_ADDRESS, ADMIN_PASSWORD, TITLE_HOME, TITLE_LOGIN } from '../../constants';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { toggleRateLimiting } from '../../../utils/rate-limit';
import { ADMIN_EMAIL_ADDRESS, ADMIN_PASSWORD, TITLE_HOME, TITLE_LOGIN } from '../../e2e/constants';
import { login } from '../../../utils/login';
test.describe('Login', () => {
test.beforeEach(async ({ page, context }) => {
@@ -1,7 +1,7 @@
import { test, expect } from '@playwright/test';
// eslint-disable-next-line import/extensions
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { login } from '../../../utils/login';
test.describe('Log Out', () => {
test.beforeEach(async ({ page }) => {
@@ -1,8 +1,8 @@
import { test, expect } from '@playwright/test';
import { ADMIN_EMAIL_ADDRESS, TITLE_HOME } from '../../constants';
import { ADMIN_EMAIL_ADDRESS, TITLE_HOME } from '../../e2e/constants';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { fillValidSignUpForm } from '../../utils/signup';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { fillValidSignUpForm } from '../../../utils/signup';
test.describe('Sign Up', () => {
test.beforeEach(async ({ page }) => {
@@ -1,7 +1,7 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { navToHeader } from '../../utils/shared';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { navToHeader } from '../../../utils/shared';
const createTransferToken = async (page, tokenName, duration, type) => {
await navToHeader(page, ['Settings', 'Transfer Tokens'], 'Transfer Tokens');
@@ -1,7 +1,7 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { navToHeader } from '../../utils/shared';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { navToHeader } from '../../../utils/shared';
const EDIT_URL = /\/admin\/content-manager\/single-types\/api::homepage.homepage(\?.*)?/;
@@ -1,7 +1,7 @@
import { expect, test } from '@playwright/test';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../utils/login';
import { clickAndWait, findAndClose, navToHeader } from '../../utils/shared';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { login } from '../../../utils/login';
import { clickAndWait, findAndClose, navToHeader } from '../../../utils/shared';
test.describe('Bulk actions', () => {
test.beforeEach(async ({ page }) => {
@@ -1,7 +1,7 @@
import { expect, test } from '@playwright/test';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../utils/login';
import { findAndClose, navToHeader } from '../../utils/shared';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { login } from '../../../utils/login';
import { findAndClose, navToHeader } from '../../../utils/shared';
const EDIT_URL_AUTHOR =
/\/admin\/content-manager\/collection-types\/api::author.author\/[^/]+(\?.*)?/;
@@ -5,10 +5,10 @@ import {
findAndClose,
isElementBefore,
navToHeader,
} from '../../utils/shared';
import { createContent, FieldValue, verifyFields } from '../../utils/content-creation';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../utils/login';
} from '../../../utils/shared';
import { createContent, FieldValue, verifyFields } from '../../../utils/content-creation';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { login } from '../../../utils/login';
test.describe('Adding content', () => {
test.beforeEach(async ({ page }) => {
@@ -1,8 +1,8 @@
import { test, expect } from '@playwright/test';
import { clickAndWait } from '../../utils/shared';
import { createContent } from '../../utils/content-creation';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../utils/login';
import { clickAndWait } from '../../../utils/shared';
import { createContent } from '../../../utils/content-creation';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { login } from '../../../utils/login';
// Helper to get date in MM/DD/YYYY format consistently
function toMMDDYYYY(date: Date) {
@@ -1,11 +1,11 @@
import { test, expect } from '@playwright/test';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../utils/login';
import { navToHeader, clickAndWait } from '../../utils/shared';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { login } from '../../../utils/login';
import { navToHeader, clickAndWait } from '../../../utils/shared';
import {
addAttributesToContentType,
removeAttributeFromComponent,
} from '../../utils/content-types';
} from '../../../utils/content-types';
test.describe('Decimal field hint with min/max values', () => {
test.beforeEach(async ({ page }) => {
@@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { clickAndWait, findAndClose, navToHeader } from '../../../utils/shared';
import { EDITOR_EMAIL_ADDRESS, EDITOR_PASSWORD } from '../../../constants';
import { EDITOR_EMAIL_ADDRESS, EDITOR_PASSWORD } from '../../../e2e/constants';
test.describe('Edit View', () => {
test.beforeEach(async ({ page }) => {
@@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { clickAndWait, findAndClose, navToHeader } from '../../../utils/shared';
import { EDITOR_EMAIL_ADDRESS, EDITOR_PASSWORD } from '../../../constants';
import { EDITOR_EMAIL_ADDRESS, EDITOR_PASSWORD } from '../../../e2e/constants';
test.describe('Edit View', () => {
test.beforeEach(async ({ page }) => {
@@ -1,8 +1,13 @@
import { test, expect, Page } from '@playwright/test';
import { clickAndWait, describeOnCondition, findAndClose, navToHeader } from '../../utils/shared';
import { resetFiles } from '../../utils/file-reset';
import { waitForRestart } from '../../utils/restart';
import { sharedSetup } from '../../utils/setup';
import {
clickAndWait,
describeOnCondition,
findAndClose,
navToHeader,
} from '../../../utils/shared';
import { resetFiles } from '../../../utils/file-reset';
import { waitForRestart } from '../../../utils/restart';
import { sharedSetup } from '../../../utils/setup';
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
@@ -1,7 +1,7 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { clickAndWait, findAndClose, navToHeader } from '../../utils/shared';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { clickAndWait, findAndClose, navToHeader } from '../../../utils/shared';
test.describe('Homepage - Content Manager Widgets', () => {
test.beforeEach(async ({ page }) => {
@@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
test.describe('List View', () => {
test.beforeEach(async ({ page }) => {
@@ -1,8 +1,8 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { clickAndWait, describeOnCondition, findAndClose } from '../../utils/shared';
import { resetFiles } from '../../utils/file-reset';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { clickAndWait, describeOnCondition, findAndClose } from '../../../utils/shared';
import { resetFiles } from '../../../utils/file-reset';
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
@@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { clickAndWait } from '../../../utils/shared';
import { AUTHOR_EMAIL_ADDRESS, AUTHOR_PASSWORD } from '../../../constants';
import { AUTHOR_EMAIL_ADDRESS, AUTHOR_PASSWORD } from '../../../e2e/constants';
test.describe('Relations on the fly - Create a Relation', () => {
test.beforeEach(async ({ page }) => {
@@ -1,7 +1,7 @@
import { test, expect, Page } from '@playwright/test';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { findAndClose, clickAndWait } from '../../utils/shared';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { findAndClose, clickAndWait } from '../../../utils/shared';
type Field = {
name: string;
@@ -1,8 +1,13 @@
import { test, expect } from '@playwright/test';
import { clickAndWait, describeOnCondition, findAndClose, navToHeader } from '../../utils/shared';
import { waitForRestart } from '../../utils/restart';
import { resetFiles } from '../../utils/file-reset';
import { sharedSetup } from '../../utils/setup';
import {
clickAndWait,
describeOnCondition,
findAndClose,
navToHeader,
} from '../../../utils/shared';
import { waitForRestart } from '../../../utils/restart';
import { resetFiles } from '../../../utils/file-reset';
import { sharedSetup } from '../../../utils/setup';
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
@@ -1,7 +1,12 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { clickAndWait, describeOnCondition, findAndClose, navToHeader } from '../../utils/shared';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import {
clickAndWait,
describeOnCondition,
findAndClose,
navToHeader,
} from '../../../utils/shared';
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
@@ -1,8 +1,8 @@
import { test, expect, type Page } from '@playwright/test';
import { clickAndWait, describeOnCondition, navToHeader } from '../../utils/shared';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../utils/login';
import { findAndClose } from '../../utils/shared';
import { clickAndWait, describeOnCondition, navToHeader } from '../../../utils/shared';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { login } from '../../../utils/login';
import { findAndClose } from '../../../utils/shared';
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
const releaseName = 'Trent Crimm: The Independent';
@@ -1,8 +1,13 @@
import { test, expect } from '@playwright/test';
import { clickAndWait, describeOnCondition, findAndClose, navToHeader } from '../../utils/shared';
import { waitForRestart } from '../../utils/restart';
import { resetFiles } from '../../utils/file-reset';
import { sharedSetup } from '../../utils/setup';
import {
clickAndWait,
describeOnCondition,
findAndClose,
navToHeader,
} from '../../../utils/shared';
import { waitForRestart } from '../../../utils/restart';
import { resetFiles } from '../../../utils/file-reset';
import { sharedSetup } from '../../../utils/setup';
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
@@ -1,7 +1,7 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { navToHeader } from '../../utils/shared';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../../utils/login';
import { navToHeader } from '../../../utils/shared';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
test.describe('Edit View CTB', () => {
test.beforeEach(async ({ page }) => {
@@ -1,7 +1,7 @@
import { test, expect } from '@playwright/test';
import { sharedSetup } from '../../utils/setup';
import { STRAPI_GUIDED_TOUR_CONFIG, setGuidedTourLocalStorage } from '../../utils/global-setup';
import { clickAndWait, describeOnCondition } from '../../utils/shared';
import { sharedSetup } from '../../../utils/setup';
import { STRAPI_GUIDED_TOUR_CONFIG, setGuidedTourLocalStorage } from '../../../utils/global-setup';
import { clickAndWait, describeOnCondition } from '../../../utils/shared';
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
@@ -1,8 +1,8 @@
import { test, expect } from '@playwright/test';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../utils/login';
import { findAndClose, navToHeader } from '../../utils/shared';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { login } from '../../../utils/login';
import { findAndClose, navToHeader } from '../../../utils/shared';
test.describe('Bulk locale actions', () => {
test.describe.configure({ timeout: 500000 });
@@ -1,10 +1,10 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { clickAndWait, findAndClose, navToHeader } from '../../utils/shared';
import { waitForRestart } from '../../utils/restart';
import { resetFiles } from '../../utils/file-reset';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../../utils/login';
import { clickAndWait, findAndClose, navToHeader } from '../../../utils/shared';
import { waitForRestart } from '../../../utils/restart';
import { resetFiles } from '../../../utils/file-reset';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
test.describe('Create and Edit Operations', () => {
test.describe.configure({ timeout: 500000 });
@@ -1,10 +1,15 @@
import { test, expect } from '@playwright/test';
import { EDITOR_EMAIL_ADDRESS, EDITOR_PASSWORD } from '../../constants';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../utils/login';
import { clickAndWait, describeOnCondition, findAndClose, navToHeader } from '../../utils/shared';
import { waitForRestart } from '../../utils/restart';
import { EDITOR_EMAIL_ADDRESS, EDITOR_PASSWORD } from '../../e2e/constants';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { login } from '../../../utils/login';
import {
clickAndWait,
describeOnCondition,
findAndClose,
navToHeader,
} from '../../../utils/shared';
import { waitForRestart } from '../../../utils/restart';
interface ValidationType {
field: string;
@@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { login } from '../../../utils/login';
test.describe('List view', () => {
test.beforeEach(async ({ page }) => {
@@ -1,10 +1,10 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { navToHeader } from '../../utils/shared';
import { findAndClose } from '../../utils/shared';
import { resetFiles } from '../../utils/file-reset';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../../utils/login';
import { navToHeader } from '../../../utils/shared';
import { findAndClose } from '../../../utils/shared';
import { resetFiles } from '../../../utils/file-reset';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
test.describe('Locale Isolation', () => {
test.describe.configure({ timeout: 500000 });
@@ -1,11 +1,11 @@
import { test, expect } from '@playwright/test';
import { EDITOR_EMAIL_ADDRESS, EDITOR_PASSWORD } from '../../constants';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../utils/login';
import { clickAndWait, findAndClose, navToHeader } from '../../utils/shared';
import { waitForRestart } from '../../utils/restart';
import { resetFiles } from '../../utils/file-reset';
import { EDITOR_EMAIL_ADDRESS, EDITOR_PASSWORD } from '../../e2e/constants';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { login } from '../../../utils/login';
import { clickAndWait, findAndClose, navToHeader } from '../../../utils/shared';
import { waitForRestart } from '../../../utils/restart';
import { resetFiles } from '../../../utils/file-reset';
test.describe('Locale Permissions', () => {
test.describe.configure({ timeout: 500000 });
@@ -1,8 +1,8 @@
import { test, expect } from '@playwright/test';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../utils/login';
import { prunePermissions } from '../../scripts/endpoints';
import { findAndClose, navToHeader } from '../../utils/shared';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { login } from '../../../utils/login';
import { prunePermissions } from '../../../scripts/endpoints';
import { findAndClose, navToHeader } from '../../../utils/shared';
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
@@ -1,7 +1,7 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { clickAndWait, describeOnCondition, findAndClose } from '../../utils/shared';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { clickAndWait, describeOnCondition, findAndClose } from '../../../utils/shared';
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
@@ -1,7 +1,12 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { clickAndWait, describeOnCondition, findAndClose, navToHeader } from '../../utils/shared';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import {
clickAndWait,
describeOnCondition,
findAndClose,
navToHeader,
} from '../../../utils/shared';
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
@@ -1,7 +1,12 @@
import { test, expect } from '@playwright/test';
import { login } from '../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { clickAndWait, describeOnCondition, findAndClose, navToHeader } from '../../utils/shared';
import { login } from '../../../utils/login';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import {
clickAndWait,
describeOnCondition,
findAndClose,
navToHeader,
} from '../../../utils/shared';
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
@@ -1,8 +1,8 @@
import { test, expect } from '@playwright/test';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../utils/login';
import { clickAndWait, navToHeader } from '../../utils/shared';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
import { login } from '../../../utils/login';
import { clickAndWait, navToHeader } from '../../../utils/shared';
function createSearchTest(testFunction, description, searchTerm) {
testFunction(description, async ({ page }) => {
@@ -1,7 +1,7 @@
import { test, expect, type Page } from '@playwright/test';
import { sharedSetup } from '../../../../utils/setup';
import { navToHeader, clickAndWait } from '../../../../utils/shared';
import { sharedSetup } from '../../../utils/setup';
import { navToHeader, clickAndWait } from '../../../utils/shared';
// Constants for the created role
const TARGET_USER = { firstName: 'Editor', lastName: 'Testing' };
@@ -1,7 +1,7 @@
import { test, expect, type Page } from '@playwright/test';
import { sharedSetup } from '../../../../utils/setup';
import { navToHeader, clickAndWait } from '../../../../utils/shared';
import { sharedSetup } from '../../../utils/setup';
import { navToHeader, clickAndWait } from '../../../utils/shared';
// Constants for the created role
const NEW_ROLE = { name: 'Publisher', description: 'Role with publishing capabilities' };
@@ -1,7 +1,7 @@
import { test, expect } from '@playwright/test';
import { sharedSetup } from '../../../../utils/setup';
import { navToHeader, clickAndWait } from '../../../../utils/shared';
import { sharedSetup } from '../../../utils/setup';
import { navToHeader, clickAndWait } from '../../../utils/shared';
test.describe('RBAC - Delete Roles', () => {
// Runs before each test
@@ -1,7 +1,7 @@
import { test, expect, type Page } from '@playwright/test';
import { sharedSetup } from '../../../../utils/setup';
import { navToHeader, clickAndWait } from '../../../../utils/shared';
import { sharedSetup } from '../../../utils/setup';
import { navToHeader, clickAndWait } from '../../../utils/shared';
// Constants for the edited role
const EDITED_ROLE = { name: 'Contractor', description: 'Role with contractor capabilities' };
@@ -1,7 +1,7 @@
import { test, expect } from '@playwright/test';
import { sharedSetup } from '../../../../utils/setup';
import { navToHeader, clickAndWait } from '../../../../utils/shared';
import { sharedSetup } from '../../../utils/setup';
import { navToHeader, clickAndWait } from '../../../utils/shared';
test.describe('RBAC - See Roles', () => {
// Runs before each test
@@ -1,7 +1,7 @@
import { test, expect, type Page, type Locator } from '@playwright/test';
import { sharedSetup } from '../../../../utils/setup';
import { navToHeader, clickAndWait } from '../../../../utils/shared';
import { sharedSetup } from '../../../utils/setup';
import { navToHeader, clickAndWait } from '../../../utils/shared';
// Constants for the scenario
const OLD_ROLE = { name: 'Editor' };
@@ -1,8 +1,8 @@
import { test } from '@playwright/test';
import { login } from '../../utils/login';
import { describeOnCondition, navToHeader } from '../../utils/shared';
import { resetDatabaseAndImportDataFromPath } from '../../utils/dts-import';
import { login } from '../../../utils/login';
import { describeOnCondition, navToHeader } from '../../../utils/shared';
import { resetDatabaseAndImportDataFromPath } from '../../../utils/dts-import';
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';

Some files were not shown because too many files have changed in this diff Show More