feat(client): migrate to Gatsby v5 and React 18 (#65729)

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Sem Bauke
2026-02-11 19:15:32 +01:00
committed by GitHub
parent 1ecd36c440
commit 30bcf40381
65 changed files with 3979 additions and 5867 deletions
-19
View File
@@ -7,13 +7,6 @@ test.describe('Public profile certifications', () => {
}) => {
await page.goto('/certifieduser');
// If you build the client locally, delete the button click below.
if (!process.env.CI) {
await page
.getByRole('button', { name: 'Preview custom 404 page' })
.click();
}
await expect(
page.getByRole('link', { name: /View.+Certification/ })
).toHaveCount(25);
@@ -24,11 +17,6 @@ test.describe('Public profile certifications', () => {
}) => {
await page.goto('/certifieduser');
if (!process.env.CI) {
await page
.getByRole('button', { name: 'Preview custom 404 page' })
.click();
}
await page.getByRole('button', { name: 'Edit my profile' }).click();
await page.getByLabel('Username').fill('CertifiedBoozer');
@@ -38,13 +26,6 @@ test.describe('Public profile certifications', () => {
);
await page.goto('/certifiedboozer');
// If you build the client locally, delete the button click below.
if (!process.env.CI) {
await page
.getByRole('button', { name: 'Preview custom 404 page' })
.click();
}
await page.waitForURL('/certifiedboozer');
await expect(
page.getByRole('link', { name: /View.+Certification/ })
-6
View File
@@ -66,12 +66,6 @@ test.describe('Completed project preview', () => {
test('it should be viewable on the timeline', async ({ page }) => {
await page.goto('/developmentuser');
if (!process.env.CI) {
await page
.getByRole('button', { name: 'Preview custom 404 page' })
.click();
}
await expect(
page.getByRole('heading', { name: '@developmentuser' })
).toBeVisible();
-4
View File
@@ -4,10 +4,6 @@ import translations from '../client/i18n/locales/english/translations.json';
test.beforeEach(async ({ page }) => {
await page.goto('/certifieduser');
if (!process.env.CI) {
await page.getByRole('button', { name: 'Preview custom 404 page' }).click();
}
await page.getByRole('button', { name: 'Edit my profile' }).click();
});
-6
View File
@@ -17,12 +17,6 @@ test.describe('Add Experience Item', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/developmentuser');
if (!process.env.CI) {
await page
.getByRole('button', { name: 'Preview custom 404 page' })
.click();
}
await page.getByRole('button', { name: 'Edit my profile' }).click();
await expect(async () => {
-6
View File
@@ -4,12 +4,6 @@ test.describe('Picture input field', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/certifieduser');
if (!process.env.CI) {
await page
.getByRole('button', { name: 'Preview custom 404 page' })
.click();
}
await page.getByRole('button', { name: 'Edit my profile' }).click();
});
-4
View File
@@ -19,10 +19,6 @@ test.beforeEach(async ({ page }) => {
await page.goto('/certifieduser');
if (!process.env.CI) {
await page.getByRole('button', { name: 'Preview custom 404 page' }).click();
}
await page.getByRole('button', { name: 'Edit my profile' }).click();
});
-6
View File
@@ -16,12 +16,6 @@ test.describe('Add Portfolio Item', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/certifieduser');
if (!process.env.CI) {
await page
.getByRole('button', { name: 'Preview custom 404 page' })
.click();
}
await page.getByRole('button', { name: 'Edit my profile' }).click();
// Will check if the portfolio button is hydrated correctly with different intervals.
-14
View File
@@ -88,13 +88,6 @@ test.describe('Profile component', () => {
test.describe('when viewing my own profile', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/certifieduser');
// If you build the client locally, delete the button click below.
if (!process.env.CI) {
await page
.getByRole('button', { name: 'Preview custom 404 page' })
.click();
}
});
test('renders the camper profile correctly', async ({ page }) => {
@@ -173,13 +166,6 @@ test.describe('Profile component', () => {
test.describe("when viewing someone else's profile", () => {
test.beforeEach(async ({ page }) => {
await page.goto('/publicUser');
// If you build the client locally, delete the button click below.
if (!process.env.CI) {
await page
.getByRole('button', { name: 'Preview custom 404 page' })
.click();
}
});
test.describe('while logged in', () => {
+28 -2
View File
@@ -236,14 +236,40 @@ test.describe('Quiz challenge', () => {
// Wait for the page content to render
await expect(page.getByRole('radiogroup')).toHaveCount(20);
await page.getByRole('link', { name: 'Basic HTML Quiz' }).click();
// navigate to /learn
await page.getByTestId('header-universal-nav-logo').click();
await expect(page.getByRole('dialog', { name: 'Exit Quiz' })).toBeVisible();
await page
.getByRole('button', { name: 'Yes, I want to leave the quiz' })
.click();
await page.waitForURL('/learn/responsive-web-design-v9/#quiz-basic-html');
await expect(page).toHaveURL(allowTrailingSlash('/learn'));
await expect(
page.getByRole('heading', { name: 'Welcome back, Full Stack User.' })
).toBeVisible();
});
test('should show a confirm exit modal when user presses the back button', async ({
page
}) => {
const blockPath = '/learn/responsive-web-design-v9/#quiz-basic-html';
await page.goto(blockPath);
await page.goto(quizPath);
await expect(page.getByRole('radiogroup')).toHaveCount(20);
await page.goBack();
await expect(page).toHaveURL(allowTrailingSlash(quizPath));
await expect(page.getByRole('dialog', { name: 'Exit Quiz' })).toBeVisible();
await page
.getByRole('button', { name: 'Yes, I want to leave the quiz' })
.click();
await page.waitForURL(blockPath);
await expect(
page.getByRole('heading', { level: 3, name: 'Basic HTML Quiz' })
).toBeVisible();
-5
View File
@@ -15,11 +15,6 @@ test('should be possible to report a user from their profile page', async ({
}) => {
await page.goto('/twaha');
// If you build the client locally, delete the button click below.
if (!process.env.CI) {
await page.getByRole('button', { name: 'Preview custom 404 page' }).click();
}
await page.getByText("Flag This User's Account for Abuse").click();
await expect(
-8
View File
@@ -9,10 +9,6 @@ test.beforeEach(async ({ page }) => {
await page.goto('/certifieduser');
if (!process.env.CI) {
await page.getByRole('button', { name: 'Preview custom 404 page' }).click();
}
await page.getByRole('button', { name: 'Edit my profile' }).click();
});
@@ -64,10 +60,6 @@ test('Should allow empty string in any field in about settings', async ({
await page.reload();
if (!process.env.CI) {
await page.getByRole('button', { name: 'Preview custom 404 page' }).click();
}
await page.getByRole('button', { name: 'Edit my profile' }).click();
await expect(nameInput).toHaveValue('');
await expect(locationInput).toHaveValue('');
-6
View File
@@ -26,12 +26,6 @@ test.describe('Username Settings Validation', () => {
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
await page.goto(`/certifieduser`);
if (!process.env.CI) {
await page
.getByRole('button', { name: 'Preview custom 404 page' })
.click();
}
await page.getByRole('button', { name: 'Edit my profile' }).click();
});