Files
freecodecamp--freecodecamp/e2e/cert-username-case-navigation.spec.ts
wehub-resource-sync dde272c4b8
CD - Docker - GHCR Images / Build and Push Images (push) Waiting to run
i18n - Build Validation / Validate i18n Builds (24) (push) Has been cancelled
CI - Node.js / Lint (24) (push) Has been cancelled
CI - Node.js / Build (24) (push) Has been cancelled
CI - Node.js / Test (24) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (24) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 24) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 24) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 11:55:53 +08:00

39 lines
1.2 KiB
TypeScript

import { execSync } from 'child_process';
import { expect, test } from '@playwright/test';
test.describe('Public profile certifications', () => {
test('Should show claimed certifications if the username has all lowercase characters', async ({
page
}) => {
await page.goto('/certifieduser');
await expect(
page.getByRole('link', { name: /View.+Certification/ })
).toHaveCount(25);
});
test('Should show claimed certifications if the username includes uppercase characters', async ({
page
}) => {
await page.goto('/certifieduser');
await page.getByRole('button', { name: 'Edit my profile' }).click();
await page.getByLabel('Username').fill('CertifiedBoozer');
await page.getByRole('button', { name: 'Save' }).nth(0).click();
await expect(page.getByTestId('flash-message')).toContainText(
/We have updated your username to/
);
await page.goto('/certifiedboozer');
await page.waitForURL('/certifiedboozer');
await expect(
page.getByRole('link', { name: /View.+Certification/ })
).toHaveCount(25);
});
test.afterAll(() => {
execSync('node ../tools/scripts/seed/seed-demo-user --certified-user');
});
});