Files
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

31 lines
874 B
TypeScript

import { expect, test } from '@playwright/test';
import { SuperBlocks } from '@freecodecamp/shared/config/curriculum';
test.describe('Archive Page', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/learn/archive');
});
test('links back to the current curriculum', async ({ page }) => {
const newCurriculumLink = page.locator(
'.archived-warning a[href="/learn"]'
);
await newCurriculumLink.click();
await expect(page).toHaveURL('/learn');
});
test('opens an archived superblock from the archive map', async ({
page
}) => {
const archivedSuperBlockPath = `/learn/${SuperBlocks.RespWebDesignNew}/`;
const archivedSuperBlockLink = page.locator(
`a[href="${archivedSuperBlockPath}"]`
);
await archivedSuperBlockLink.click();
await expect(page).toHaveURL(archivedSuperBlockPath);
});
});