-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #334 from pnax/url-domain
Perform a test through the URL directly
- Loading branch information
Showing
7 changed files
with
59 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const { test, expect } = require('@playwright/test'); | ||
|
||
import { goToHome, setLang } from './utils/app.utils'; | ||
|
||
test.describe('Redirection should properly work', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await goToHome(page); | ||
await setLang(page, 'en'); | ||
}); | ||
|
||
test('/ should redirect to /check', async ({ page, baseURL }) => { | ||
await page.goto( baseURL + '/' ); | ||
await expect(page).toHaveURL( baseURL + '/check' ); | ||
}); | ||
|
||
test('/domain_check should redirect to /check', async ({ page, baseURL }) => { | ||
await page.goto( baseURL + '/domain_check' ); | ||
await expect(page).toHaveURL( baseURL + '/check' ); | ||
}); | ||
|
||
test('/test/<test-id> should redirect to /result/<test-id>', async ({ page, baseURL }) => { | ||
const testID = '226f6d4f44ae3f80'; | ||
|
||
await page.goto( baseURL + '/test/' + testID ); | ||
await expect(page).toHaveURL( baseURL + '/result/' + testID ); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters