mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
refactor: move playwright config into e2e folder (#64741)
This commit is contained in:
committed by
GitHub
parent
eff230799e
commit
15c98b0db9
@@ -168,7 +168,7 @@ jobs:
|
||||
run: pnpm run seed:certified-user
|
||||
|
||||
- name: Run playwright tests
|
||||
run: npx playwright test --project=${{ matrix.browsers }} --grep-invert 'third-party-donation.spec.ts'
|
||||
run: pnpm run playwright:run --project=${{ matrix.browsers }} --grep-invert 'third-party-donation.spec.ts'
|
||||
|
||||
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
|
||||
if: ${{ !cancelled() }}
|
||||
|
||||
@@ -151,7 +151,7 @@ jobs:
|
||||
run: pnpm run seed:certified-user
|
||||
|
||||
- name: Run playwright tests
|
||||
run: npx playwright test third-party-donation.spec.ts --project=${{ matrix.browsers }}
|
||||
run: pnpm run playwright:run third-party-donation.spec.ts --project=${{ matrix.browsers }}
|
||||
|
||||
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
|
||||
if: ${{ !cancelled() }}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
/* eslint-disable filenames-simple/naming-convention */
|
||||
import { createLintStagedConfig } from '@freecodecamp/eslint-config/lintstaged';
|
||||
|
||||
export default createLintStagedConfig(import.meta.dirname);
|
||||
@@ -0,0 +1 @@
|
||||
playwright/
|
||||
@@ -7,11 +7,11 @@ test.describe('When the user has not accepted the Academic Honesty Policy', () =
|
||||
test.use({ storageState: 'playwright/.auth/development-user.json' });
|
||||
|
||||
test.beforeEach(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user');
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test('they should be able to accept it', async ({ page }) => {
|
||||
|
||||
@@ -52,6 +52,6 @@ test.describe('Public profile certifications', () => {
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -12,11 +12,11 @@ import {
|
||||
test.describe('Claim a certification - almost certified user', () => {
|
||||
test.beforeEach(async () => {
|
||||
await deleteAllEmails();
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --unclaimed-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --unclaimed-user');
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
test.use({ storageState: 'playwright/.auth/certified-user.json' });
|
||||
|
||||
|
||||
@@ -228,11 +228,11 @@ test.describe('Signed in user', () => {
|
||||
test.use({ storageState: 'playwright/.auth/development-user.json' });
|
||||
|
||||
test.beforeEach(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user');
|
||||
});
|
||||
|
||||
test.afterEach(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test('User can reset on a multi-file project after reloading and saving', async ({
|
||||
|
||||
@@ -5,7 +5,7 @@ test.describe('Before completing the project', () => {
|
||||
test.use({ storageState: 'playwright/.auth/development-user.json' });
|
||||
|
||||
test.beforeEach(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --set-true isDonating');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --set-true isDonating');
|
||||
});
|
||||
|
||||
test('should not allow you to submit a URL', async ({ page }) => {
|
||||
@@ -24,7 +24,7 @@ test.describe('Before completing the project', () => {
|
||||
|
||||
test.describe('After completing the project', () => {
|
||||
test.beforeAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test('should allow you to submit a URL', async ({ page }) => {
|
||||
|
||||
@@ -39,7 +39,7 @@ test.describe('Completed project preview', () => {
|
||||
test.use({ storageState: 'playwright/.auth/development-user.json' });
|
||||
|
||||
test.beforeEach(async ({ request }) => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user');
|
||||
|
||||
await authedRequest({
|
||||
request,
|
||||
|
||||
@@ -9,7 +9,7 @@ const nextChallengeURL =
|
||||
'/learn/data-analysis-with-python/data-analysis-with-python-projects/demographic-data-analyzer';
|
||||
|
||||
test.beforeAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
|
||||
@@ -14,9 +14,9 @@ test.beforeEach(async ({ page }) => {
|
||||
test.afterAll(
|
||||
async () =>
|
||||
await Promise.all([
|
||||
execP('node ./tools/scripts/seed/seed-demo-user --certified-user'),
|
||||
execP('node ./tools/scripts/seed/seed-surveys'),
|
||||
execP('node ./tools/scripts/seed/seed-ms-username')
|
||||
execP('node ../tools/scripts/seed/seed-demo-user --certified-user'),
|
||||
execP('node ../tools/scripts/seed/seed-surveys'),
|
||||
execP('node ../tools/scripts/seed/seed-ms-username')
|
||||
])
|
||||
);
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ test.describe('Donate page', () => {
|
||||
test.use({ storageState: 'playwright/.auth/development-user.json' });
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --set-true isDonating');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --set-true isDonating');
|
||||
await page.goto('/donate');
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test('should render the donate page correctly', async ({ page }) => {
|
||||
|
||||
@@ -205,11 +205,11 @@ test.describe('Donation modal appearance logic - New user', () => {
|
||||
});
|
||||
|
||||
test.beforeEach(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user');
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test('should not appear if the user has less than 10 completed challenges in total and has just completed 3 challenges', async ({
|
||||
@@ -278,7 +278,9 @@ test.describe('Donation modal appearance logic - New user', () => {
|
||||
test.describe('Donation modal appearance logic - Certified user claiming a new block', () => {
|
||||
test.use({ storageState: 'playwright/.auth/certified-user.json' });
|
||||
test.beforeEach(() =>
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --almost-certified-user')
|
||||
execSync(
|
||||
'node ../tools/scripts/seed/seed-demo-user --almost-certified-user'
|
||||
)
|
||||
);
|
||||
|
||||
test('should appear if the user has just completed a new block, and should not appear if the user re-submits the projects of the block', async ({
|
||||
@@ -349,7 +351,9 @@ test.describe('Donation modal appearance logic - Certified user claiming a new b
|
||||
test.describe('Donation modal appearance logic - Certified user claiming a new module', () => {
|
||||
test.use({ storageState: 'playwright/.auth/certified-user.json' });
|
||||
test.beforeEach(() =>
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --almost-certified-user')
|
||||
execSync(
|
||||
'node ../tools/scripts/seed/seed-demo-user --almost-certified-user'
|
||||
)
|
||||
);
|
||||
|
||||
test('should appear if the user has just completed a new module', async ({
|
||||
@@ -442,12 +446,12 @@ test.describe('Donation modal appearance logic - Certified user', () => {
|
||||
test.describe('Donation modal appearance logic - Donor user', () => {
|
||||
test.beforeAll(() => {
|
||||
execSync(
|
||||
'node ./tools/scripts/seed/seed-demo-user --certified-user --set-true isDonating'
|
||||
'node ../tools/scripts/seed/seed-demo-user --certified-user --set-true isDonating'
|
||||
);
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test('should not appear', async ({
|
||||
|
||||
@@ -16,7 +16,7 @@ const originalEmail = 'foo@bar.com';
|
||||
const newEmail = 'foo-update@bar.com';
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
await page.goto('/settings');
|
||||
});
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ test.describe('Email sign-up page when user is signed in', () => {
|
||||
// It's necessary to seed with a user that has not accepted the privacy
|
||||
// terms, otherwise the user will be redirected away from the email sign-up
|
||||
// page.
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
await page.goto('/learn');
|
||||
});
|
||||
|
||||
@@ -111,7 +111,7 @@ test.describe('Email sign-up page when the user is new', () => {
|
||||
test.use({ storageState: 'playwright/.auth/development-user.json' });
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user');
|
||||
|
||||
await page.goto('/learn');
|
||||
});
|
||||
@@ -134,7 +134,7 @@ test.describe('Email sign-up page when the user has made a selection', () => {
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
execSync(
|
||||
'node ./tools/scripts/seed/seed-demo-user --certified-user --set-false sendQuincyEmail'
|
||||
'node ../tools/scripts/seed/seed-demo-user --certified-user --set-false sendQuincyEmail'
|
||||
);
|
||||
await page.goto('/learn');
|
||||
});
|
||||
|
||||
@@ -4,8 +4,8 @@ const url =
|
||||
'/learn/foundational-c-sharp-with-microsoft/foundational-c-sharp-with-microsoft-certification-exam/foundational-c-sharp-with-microsoft-certification-exam';
|
||||
test.describe('Exam Survey', () => {
|
||||
test.beforeAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node tools/scripts/seed/seed-surveys.js delete-only');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-surveys.js delete-only');
|
||||
});
|
||||
|
||||
test('Should show the survey alert and be able to complete the survey', async ({
|
||||
|
||||
@@ -21,11 +21,11 @@ function getCompletedIds(completedChallenges: { id: string }[]): string[] {
|
||||
test.use({ storageState: 'playwright/.auth/development-user.json' });
|
||||
|
||||
test.beforeAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user');
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test.describe('failed update flushing', () => {
|
||||
|
||||
+3
-3
@@ -6,7 +6,7 @@ setup.describe('certifieduser', () => {
|
||||
setup.use({ storageState: { cookies: [], origins: [] } });
|
||||
|
||||
setup.beforeAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user ');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user ');
|
||||
});
|
||||
|
||||
setup('can sign in', async ({ request }) => {
|
||||
@@ -25,11 +25,11 @@ setup.describe('developmentuser', () => {
|
||||
// We can only sign in as a single user (one with email: 'foo@bar.com'), so
|
||||
// changing users means changing the record with that email in the database.
|
||||
setup.beforeAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user');
|
||||
});
|
||||
|
||||
setup.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
setup('can sign in', async ({ request }) => {
|
||||
|
||||
+2
-2
@@ -29,11 +29,11 @@ test.describe('Header', () => {
|
||||
});
|
||||
|
||||
test.beforeAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user');
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test('Has link for skip content', async ({ page }) => {
|
||||
|
||||
@@ -15,7 +15,7 @@ const settingsPageElement = {
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Reset input values
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
|
||||
await page.goto('/certifieduser');
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ test.describe('Link MS user component (signed-out user)', () => {
|
||||
|
||||
test.describe('Link MS user component (signed-in user)', () => {
|
||||
test.afterEach(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-ms-username');
|
||||
execSync('node ../tools/scripts/seed/seed-ms-username');
|
||||
});
|
||||
|
||||
test("should recognize the user's MS account", async ({ page }) => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { test, expect } from '@playwright/test';
|
||||
import { clearEditor, focusEditor } from './utils/editor';
|
||||
test.describe('multifileCertProjects', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
await page.goto(
|
||||
'learn/2022/responsive-web-design/build-a-tribute-page-project/build-a-tribute-page'
|
||||
);
|
||||
|
||||
+3
-1
@@ -2,7 +2,9 @@
|
||||
"name": "@freecodecamp/e2e",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"lint": "eslint --max-warnings 0"
|
||||
"lint": "eslint --max-warnings 0",
|
||||
"playwright:watch": "playwright test --ui-port=0",
|
||||
"playwright:run": "playwright test"
|
||||
},
|
||||
"author": "freeCodeCamp <team@freecodecamp.org>",
|
||||
"license": "BSD-3-Clause",
|
||||
|
||||
@@ -6,13 +6,13 @@ import { defineConfig, devices } from '@playwright/test';
|
||||
* Read environment variables from file.
|
||||
* https://github.com/motdotla/dotenv
|
||||
*/
|
||||
const envPath = path.resolve(__dirname, '.env');
|
||||
const envPath = path.resolve(__dirname, '..', '.env');
|
||||
dotenvConfig({ path: envPath });
|
||||
/**
|
||||
* See https://playwright.dev/docs/test-configuration.
|
||||
*/
|
||||
export default defineConfig({
|
||||
testDir: 'e2e',
|
||||
testDir: '.',
|
||||
/* Run tests in files in parallel */
|
||||
fullyParallel: false,
|
||||
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
||||
@@ -5,11 +5,11 @@ import translations from '../client/i18n/locales/english/translations.json';
|
||||
test.use({ storageState: 'playwright/.auth/development-user.json' });
|
||||
|
||||
test.beforeAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user');
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test.describe('Add Portfolio Item', () => {
|
||||
|
||||
@@ -10,7 +10,7 @@ test.beforeEach(async ({ page }) => {
|
||||
});
|
||||
|
||||
test.afterEach(async () => {
|
||||
await execP('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
await execP('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test.describe('Progress reset modal', () => {
|
||||
|
||||
@@ -74,11 +74,11 @@ const pasteContent = async (page: Page) => {
|
||||
test.use({ storageState: 'playwright/.auth/development-user.json' });
|
||||
|
||||
test.beforeAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user');
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test.describe('Projects', () => {
|
||||
|
||||
@@ -11,7 +11,7 @@ test.describe('Email sign-up page when user is not signed in', () => {
|
||||
test.use({ storageState: { cookies: [], origins: [] } });
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
await page.goto('/email-sign-up');
|
||||
});
|
||||
|
||||
@@ -71,7 +71,7 @@ test.describe('Email sign-up page when user is not signed in', () => {
|
||||
test.describe('Email sign-up page when user is signed in', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// It's necessary to seed with a user that has not selected an email newsletter option.
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
|
||||
await page.goto('/email-sign-up');
|
||||
});
|
||||
|
||||
@@ -52,7 +52,7 @@ const legacyCertifications = [
|
||||
|
||||
test.describe('Settings - Certified User', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
await page.goto('/settings');
|
||||
});
|
||||
|
||||
@@ -257,13 +257,13 @@ test.describe('Settings - Certified User', () => {
|
||||
test.describe('Settings - Certified User without Full Stack Certification', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
execSync(
|
||||
'node ./tools/scripts/seed/seed-demo-user --certified-user --set-false isFullStackCert'
|
||||
'node ../tools/scripts/seed/seed-demo-user --certified-user --set-false isFullStackCert'
|
||||
);
|
||||
await page.goto('/settings');
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test('should allow claiming Full Stack cert if the user has completed all requirements', async ({
|
||||
@@ -297,12 +297,12 @@ test.describe('Settings - New User', () => {
|
||||
test.use({ storageState: 'playwright/.auth/development-user.json' });
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user');
|
||||
await page.goto('/settings');
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test('should not allow claiming Full Stack cert if the user has not completed all the required certs', async ({
|
||||
|
||||
@@ -5,7 +5,7 @@ test.describe('When the user HAS NOT claimed their cert', () => {
|
||||
test.use({ storageState: 'playwright/.auth/development-user.json' });
|
||||
|
||||
test.beforeAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user');
|
||||
});
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
@@ -27,7 +27,7 @@ test.describe('When the user HAS NOT claimed their cert', () => {
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ test.describe('Super Block Page - Authenticated User', () => {
|
||||
test.use({ storageState: 'playwright/.auth/development-user.json' });
|
||||
|
||||
test.beforeEach(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user');
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test.describe('Super Block in List View', () => {
|
||||
|
||||
@@ -4,7 +4,7 @@ import translations from '../client/i18n/locales/english/translations.json';
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
execSync(
|
||||
'node ./tools/scripts/seed/seed-demo-user --certified-user --set-false isFullStackCert'
|
||||
'node ../tools/scripts/seed/seed-demo-user --certified-user --set-false isFullStackCert'
|
||||
);
|
||||
|
||||
await page.goto('/certifieduser');
|
||||
@@ -17,7 +17,7 @@ test.beforeEach(async ({ page }) => {
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test('Should allow empty string in any field in about settings', async ({
|
||||
|
||||
@@ -7,11 +7,11 @@ import { alertToBeVisible } from './utils/alerts';
|
||||
test.use({ storageState: 'playwright/.auth/development-user.json' });
|
||||
|
||||
test.beforeEach(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user');
|
||||
});
|
||||
|
||||
test.afterAll(() => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
test.describe('Initially', () => {
|
||||
|
||||
@@ -4,7 +4,7 @@ import translations from '../client/i18n/locales/english/translations.json';
|
||||
|
||||
test.afterAll(() => {
|
||||
// change the name back to the original
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
});
|
||||
|
||||
const settingsObject = {
|
||||
@@ -23,7 +23,7 @@ const settingsObject = {
|
||||
|
||||
test.describe('Username Settings Validation', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
execSync('node ./tools/scripts/seed/seed-demo-user --certified-user');
|
||||
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
|
||||
await page.goto(`/certifieduser`);
|
||||
|
||||
if (!process.env.CI) {
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
import { configTypeChecked } from '@freecodecamp/eslint-config/base';
|
||||
import { defineConfig, globalIgnores } from 'eslint/config';
|
||||
|
||||
export default defineConfig(
|
||||
// include all in root dir, but not subdirs:
|
||||
globalIgnores(['**/*', '!*.js', '!*.ts', '!*.mjs']),
|
||||
{
|
||||
extends: [configTypeChecked],
|
||||
rules: {
|
||||
'@typescript-eslint/no-unsafe-member-access': 'off',
|
||||
'@typescript-eslint/no-unsafe-call': 'off',
|
||||
'@typescript-eslint/no-unsafe-assignment': 'off'
|
||||
}
|
||||
}
|
||||
);
|
||||
+2
-3
@@ -52,7 +52,6 @@
|
||||
"knip:all": "npx -y knip@5 ",
|
||||
"lint-root": "pnpm npm-run-all lint:*",
|
||||
"lint": "turbo lint && turbo lint-root",
|
||||
"lint:eslint": "eslint --max-warnings 0",
|
||||
"lint:challenges": "cd ./curriculum && pnpm run lint-challenges",
|
||||
"lint:ts": "tsc && tsc -p shared && tsc -p api && tsc -p client && tsc -p curriculum && tsc -p e2e && tsc -p tools/challenge-helper-scripts",
|
||||
"lint:prettier": "prettier --list-different .",
|
||||
@@ -80,8 +79,8 @@
|
||||
"test:shared": "cd ./shared && pnpm vitest run",
|
||||
"test:client": "cd ./client && pnpm test run",
|
||||
"prepare": "husky",
|
||||
"playwright:run": "playwright test",
|
||||
"playwright:watch": "playwright test --ui-port=0"
|
||||
"playwright:run": "pnpm -F e2e run playwright:run",
|
||||
"playwright:watch": "pnpm -F e2e run playwright:watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"dotenv": "16.4.5",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"include": [
|
||||
"*.ts",
|
||||
"curriculum/*.test.ts",
|
||||
"tools/challenge-editor/**/*",
|
||||
"tools/scripts/**/*.ts",
|
||||
|
||||
Reference in New Issue
Block a user