-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Topic Page Playwright Tests #2191
New Topic Page Playwright Tests #2191
Conversation
e2e-tests/tests/topics.spec.ts
Outdated
test('Check redirection for sourceless topic', async ({ context }) => { | ||
const page = await goToPageWithLang(context, '/topics/Monkey'); | ||
const expectedUrl = 'search?q=Monkey&tab=sheet&tvar=1&tsort=relevance&stopics_enFilters=Monkey&svar=1&ssort=relevance'; | ||
await page.waitForTimeout(10000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should try to avoid timeouts at all costs as they either make the tests brittle (when too short) and greatly increase the run time (when too long). Is there no better way to do this? I think you can await an element on the search page to exist.
e2e-tests/tests/topics.spec.ts
Outdated
|
||
test('Check no redirection when user is admin', async ({ context }) => { | ||
const page = await goToPageWithUser(context, '/topics/Monkey', testAdminUser); | ||
await page.waitForTimeout(10000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. Why does the await on line 53 not suffice?
Description
New tests for validation of basic Topic Pages functinality
added new users to test database as well as envionment vars with users data.
Code Changes
The following changes were made to the files below
Notes
Any additional notes go here