mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(playwright): remove localhost from expected url (#53532)
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
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';
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto(
|
||||
'/learn/scientific-computing-with-python/scientific-computing-with-python-projects/arithmetic-formatter'
|
||||
@@ -41,9 +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(
|
||||
'http://localhost:8000/learn/scientific-computing-with-python/scientific-computing-with-python-projects/time-calculator'
|
||||
);
|
||||
await expect(page).toHaveURL(timeCalculatorUrl);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -72,8 +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(
|
||||
'http://localhost:8000/learn/scientific-computing-with-python/scientific-computing-with-python-projects/time-calculator'
|
||||
);
|
||||
await expect(page).toHaveURL(timeCalculatorUrl);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user