test: update completion modal tests (#53377)

This commit is contained in:
Oliver Eyton-Williams
2024-02-09 09:45:54 +01:00
committed by GitHub
parent 878f112d6f
commit 581e553d2e

View File

@@ -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);
});
});