Renamed e2e tests to acceptance tests in Admin X (#18439)

ref https://www.notion.so/AdminX-testing-plan-99b2dab27e794fc893767ccd01c84a63?d=26612fc2b9d84e65bbb269fa3bc5079e&pvs=4#f0089cd4d9f24e93bd7f8e2868987bf6

This pull request renames the end-to-end tests to acceptance tests in
the `apps/admin-x-settings` folder. It updates the `ci.yml` file, the
`package.json` file, the `playwright.config.ts` file, and the test files
to reflect the new naming convention. This change aims to better reflect
the purpose and scope of the tests.
This commit is contained in:
Ronald Langeveld 2023-10-03 16:20:40 +07:00 committed by GitHub
parent 3442fdfee6
commit a596b3aaca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 38 additions and 38 deletions

View File

@ -515,7 +515,7 @@ jobs:
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps
- run: yarn nx run @tryghost/admin-x-settings:test:e2e
- run: yarn nx run @tryghost/admin-x-settings:test:acceptance
- name: Upload test results
if: always()

View File

@ -31,9 +31,9 @@
"lint": "yarn run lint:js",
"lint:js": "eslint --ext .js,.ts,.cjs,.tsx --cache src test",
"test:unit": "yarn build && vitest run",
"test:e2e": "NODE_OPTIONS='--experimental-specifier-resolution=node --no-warnings' VITE_TEST=true playwright test",
"test:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=100 yarn test:e2e --headed",
"test:e2e:full": "ALL_BROWSERS=1 yarn test:e2e",
"test:acceptance": "NODE_OPTIONS='--experimental-specifier-resolution=node --no-warnings' VITE_TEST=true playwright test",
"test:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=100 yarn test:acceptance --headed",
"test:acceptance:full": "ALL_BROWSERS=1 yarn test:acceptance",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"

View File

@ -6,7 +6,7 @@ export const E2E_PORT = 5173;
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './test/e2e',
testDir: './test/acceptance',
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/e2e';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/acceptance';
// CodeMirror takes some time to load in Playwright meaning the first few characters typed don't always
// show up in the input. Since that lag is not consistent, this workaround ensures we type enough

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, responseFixtures} from '../../utils/e2e';
import {globalDataRequests, mockApi, responseFixtures} from '../../utils/acceptance';
test.describe('History', async () => {
test('Browsing history', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../../utils/e2e';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../../utils/acceptance';
test.describe('AMP integration', async () => {
test('Supports toggling and filling in AMP integration', async ({page}) => {

View File

@ -1,6 +1,6 @@
import {Integration, IntegrationsResponseType} from '../../../../src/api/integrations';
import {Webhook, WebhooksResponseType} from '../../../../src/api/webhooks';
import {chooseOptionInSelect, globalDataRequests, limitRequests, mockApi, responseFixtures} from '../../../utils/e2e';
import {chooseOptionInSelect, globalDataRequests, limitRequests, mockApi, responseFixtures} from '../../../utils/acceptance';
import {expect, test} from '@playwright/test';
test.describe('Custom integrations', async () => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../../utils/e2e';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../../utils/acceptance';
test.describe('First Promoter integration', async () => {
test('Supports toggling and filling in First Promoter integration', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../../utils/e2e';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../../utils/acceptance';
test.describe('Pintura integration', async () => {
test('Can toggle Pintura', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../../utils/e2e';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../../utils/acceptance';
test.describe('Slack integration', async () => {
test('Supports updating Slack settings', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../../utils/e2e';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../../utils/acceptance';
test.describe('Unsplash integration', async () => {
test('Supports toggling unsplash integration', async ({page}) => {

View File

@ -1,6 +1,6 @@
import {Integration, IntegrationsResponseType} from '../../../../src/api/integrations';
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, responseFixtures} from '../../../utils/e2e';
import {globalDataRequests, mockApi, responseFixtures} from '../../../utils/acceptance';
test.describe('Zapier integration settings', async () => {
test('Showing and regenerating API keys', async ({page}) => {

View File

@ -1,4 +1,4 @@
import {chooseOptionInSelect, globalDataRequests, mockApi, responseFixtures, updatedSettingsResponse} from '../../utils/e2e';
import {chooseOptionInSelect, globalDataRequests, mockApi, responseFixtures, updatedSettingsResponse} from '../../utils/acceptance';
import {expect, test} from '@playwright/test';
test.describe('Default recipient settings', async () => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/e2e';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/acceptance';
test.describe('Mailgun settings', async () => {
test('Supports setting up mailgun', async ({page}) => {

View File

@ -1,4 +1,4 @@
import {chooseOptionInSelect, globalDataRequests, limitRequests, mockApi, responseFixtures} from '../../utils/e2e';
import {chooseOptionInSelect, globalDataRequests, limitRequests, mockApi, responseFixtures} from '../../utils/acceptance';
import {expect, test} from '@playwright/test';
test.describe('Newsletter settings', async () => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, responseFixtures} from '../../utils/e2e';
import {globalDataRequests, mockApi, responseFixtures} from '../../utils/acceptance';
test.describe('Facebook settings', async () => {
test('Supports editing the facebook card', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/e2e';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/acceptance';
test.describe('Site password settings', async () => {
test('Supports locking and unlocking the site', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/e2e';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/acceptance';
test.describe('Metadata settings', async () => {
test('Supports editing metadata', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/e2e';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/acceptance';
test.describe('Publication language settings', async () => {
test('Supports editing the locale', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/e2e';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/acceptance';
test.describe('Social account settings', async () => {
test('Supports editing social URLs', async ({page}) => {

View File

@ -1,4 +1,4 @@
import {chooseOptionInSelect, globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/e2e';
import {chooseOptionInSelect, globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/acceptance';
import {expect, test} from '@playwright/test';
test.describe('Time zone settings', async () => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/e2e';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/acceptance';
test.describe('Title and description settings', async () => {
test('Supports editing the title and description', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, responseFixtures} from '../../utils/e2e';
import {globalDataRequests, mockApi, responseFixtures} from '../../utils/acceptance';
test.describe('Twitter settings', async () => {
test('Supports editing the twitter card', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, limitRequests, mockApi, responseFixtures} from '../../../utils/e2e';
import {globalDataRequests, limitRequests, mockApi, responseFixtures} from '../../../utils/acceptance';
test.describe('User actions', async () => {
test('Supports suspending a user', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, limitRequests, mockApi, responseFixtures} from '../../../utils/e2e';
import {globalDataRequests, limitRequests, mockApi, responseFixtures} from '../../../utils/acceptance';
test.describe('User invitations', async () => {
test('Supports inviting a user', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, responseFixtures} from '../../../utils/e2e';
import {globalDataRequests, mockApi, responseFixtures} from '../../../utils/acceptance';
test.describe('User profile', async () => {
test('Supports editing user profiles', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, responseFixtures} from '../../../utils/e2e';
import {globalDataRequests, mockApi, responseFixtures} from '../../../utils/acceptance';
test.describe('User roles', async () => {
test('Shows users under their role', async ({page}) => {

View File

@ -1,4 +1,4 @@
import {chooseOptionInSelect, globalDataRequests, mockApi, responseFixtures, updatedSettingsResponse} from '../../utils/e2e';
import {chooseOptionInSelect, globalDataRequests, mockApi, responseFixtures, updatedSettingsResponse} from '../../utils/acceptance';
import {expect, test} from '@playwright/test';
test.describe('Access settings', async () => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/e2e';
import {globalDataRequests, mockApi, updatedSettingsResponse} from '../../utils/acceptance';
test.describe('Analytics settings', async () => {
test('Supports toggling analytics settings', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, responseFixtures, updatedSettingsResponse} from '../../utils/e2e';
import {globalDataRequests, mockApi, responseFixtures, updatedSettingsResponse} from '../../utils/acceptance';
test.describe('Stripe settings', async () => {
test('Supports the Stripe Connect flow', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, responseFixtures, updatedSettingsResponse} from '../../utils/e2e';
import {globalDataRequests, mockApi, responseFixtures, updatedSettingsResponse} from '../../utils/acceptance';
const settingsWithStripe = updatedSettingsResponse([
{key: 'stripe_connect_publishable_key', value: 'pk_test_123'},

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi} from '../utils/e2e';
import {globalDataRequests, mockApi} from '../utils/acceptance';
test.describe('Search', async () => {
test('Hiding and showing groups based on the search term', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, mockSitePreview, responseFixtures} from '../../utils/e2e';
import {globalDataRequests, mockApi, mockSitePreview, responseFixtures} from '../../utils/acceptance';
test.describe('Announcement Bar', async () => {
test('Working with the announcement bar preview', async ({page}) => {

View File

@ -1,4 +1,4 @@
import {chooseOptionInSelect, globalDataRequests, mockApi, mockSitePreview, responseFixtures} from '../../utils/e2e';
import {chooseOptionInSelect, globalDataRequests, mockApi, mockSitePreview, responseFixtures} from '../../utils/acceptance';
import {expect, test} from '@playwright/test';
test.describe('Design settings', async () => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi, responseFixtures} from '../../utils/e2e';
import {globalDataRequests, mockApi, responseFixtures} from '../../utils/acceptance';
test.describe('Navigation settings', async () => {
test('Editing primary and secondary navigation', async ({page}) => {

View File

@ -1,5 +1,5 @@
import {expect, test} from '@playwright/test';
import {globalDataRequests, limitRequests, mockApi, responseFixtures} from '../../utils/e2e';
import {globalDataRequests, limitRequests, mockApi, responseFixtures} from '../../utils/acceptance';
test.describe('Theme settings', async () => {
test('Browsing and installing default themes', async ({page}) => {