mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-07 18:03:49 -05:00
test: update completion modal tests (#53377)
This commit is contained in:
committed by
GitHub
parent
878f112d6f
commit
581e553d2e
@@ -1,12 +1,12 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import translations from '../client/i18n/locales/english/translations.json';
|
||||
|
||||
const timeCalculatorUrl =
|
||||
'/learn/scientific-computing-with-python/scientific-computing-with-python-projects/time-calculator';
|
||||
const nextChallengeURL =
|
||||
'/learn/data-analysis-with-python/data-analysis-with-python-projects/demographic-data-analyzer';
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto(
|
||||
'/learn/scientific-computing-with-python/scientific-computing-with-python-projects/arithmetic-formatter'
|
||||
'/learn/data-analysis-with-python/data-analysis-with-python-projects/mean-variance-standard-deviation-calculator'
|
||||
);
|
||||
await page.getByLabel('Solution Link').fill('https://example.com');
|
||||
await page
|
||||
@@ -44,7 +44,7 @@ test.describe('Challenge Completion Modal Tests (Signed Out)', () => {
|
||||
await page
|
||||
.getByRole('button', { name: translations.buttons['go-to-next'] })
|
||||
.click();
|
||||
await expect(page).toHaveURL(timeCalculatorUrl);
|
||||
await expect(page).toHaveURL(nextChallengeURL);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -73,6 +73,6 @@ test.describe('Challenge Completion Modal Tests (Signed In)', () => {
|
||||
await page
|
||||
.getByRole('button', { name: translations.buttons['submit-and-go'] })
|
||||
.click();
|
||||
await expect(page).toHaveURL(timeCalculatorUrl);
|
||||
await expect(page).toHaveURL(nextChallengeURL);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user