fix(playwright): remove localhost from expected url (#53532)

This commit is contained in:
Krzysztof G
2024-02-05 08:32:58 +01:00
committed by GitHub
parent e4513ad293
commit 574a0ea26f
2 changed files with 19 additions and 22 deletions
+5 -6
View File
@@ -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);
});
});