mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
chore(e2e,playwright): update config to only run .spec.ts files (#51985)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test.describe('Blocked Page', () => {
|
||||
test('should render correctly', async ({ page }) => {
|
||||
await page.goto('/blocked');
|
||||
await expect(page).toHaveTitle('Access Denied | freeCodeCamp.org');
|
||||
|
||||
const mainHeading = page.getByTestId('main-heading');
|
||||
await expect(mainHeading).toHaveText("We can't log you in.");
|
||||
|
||||
const blockedBodyText = page.getByTestId('blocked-body-text');
|
||||
await expect(blockedBodyText).toHaveText(
|
||||
"United States export control and economic sanctions rules don't allow us to log in visitors from your region. " +
|
||||
'Sorry about this. The situation may change in the future.If you want, you can learn more about these restrictions.'
|
||||
);
|
||||
|
||||
const learnMoreLink = page.getByTestId('learn-more-link');
|
||||
await expect(learnMoreLink).toHaveAttribute(
|
||||
'href',
|
||||
'https://www.okta.com/blocked'
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user