-
Notifications
You must be signed in to change notification settings - Fork 54
[Issue #8184] allow usage of playwright tags in e2e test jobs #8960
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -10,23 +10,24 @@ test.beforeEach(async ({ page }) => { | |||||||||||||||||||||||||||||
| await page.goto("/", { waitUntil: "domcontentloaded", timeout }); | ||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| test("has title", async ({ page }) => { | ||||||||||||||||||||||||||||||
| await expect(page).toHaveTitle(/Simpler.Grants.gov/); | ||||||||||||||||||||||||||||||
| test("has title", { tag: "@smoke" }, async ({ page }) => { | ||||||||||||||||||||||||||||||
| await expect(page).toHaveTitle(/Simpler\.Grants\.gov/); | ||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| test("clicking 'follow on GitHub' link opens a new tab pointed at Github repository", async ({ | ||||||||||||||||||||||||||||||
| page, | ||||||||||||||||||||||||||||||
| context, | ||||||||||||||||||||||||||||||
| }) => { | ||||||||||||||||||||||||||||||
| const pagePromise = context.waitForEvent("page"); | ||||||||||||||||||||||||||||||
| // Click the Follow on GitHub link | ||||||||||||||||||||||||||||||
| await page.getByRole("link", { name: "Follow on GitHub" }).click(); | ||||||||||||||||||||||||||||||
| const newPage = await pagePromise; | ||||||||||||||||||||||||||||||
| await newPage.waitForLoadState(); | ||||||||||||||||||||||||||||||
| await expect(newPage).toHaveURL( | ||||||||||||||||||||||||||||||
| /https:\/\/github.com\/HHS\/simpler-grants-gov/, | ||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||
| test( | ||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will do this: test(
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just to confirm, the change here is to change the regex from
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should escape the period, but with escaping, I think
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just learned that I have to put the 'add a suggestion' to put code in comment. This is what I type. |
||||||||||||||||||||||||||||||
| "clicking 'follow on GitHub' link opens a new tab pointed at Github repository", | ||||||||||||||||||||||||||||||
| { tag: "@full-regression" }, | ||||||||||||||||||||||||||||||
| async ({ page, context }) => { | ||||||||||||||||||||||||||||||
| const pagePromise = context.waitForEvent("page"); | ||||||||||||||||||||||||||||||
| // Click the Follow on GitHub link | ||||||||||||||||||||||||||||||
| await page.getByRole("link", { name: "Follow on GitHub" }).click(); | ||||||||||||||||||||||||||||||
| const newPage = await pagePromise; | ||||||||||||||||||||||||||||||
| await newPage.waitForLoadState(); | ||||||||||||||||||||||||||||||
| await expect(newPage).toHaveURL( | ||||||||||||||||||||||||||||||
| /^https:\/\/github\.com\/HHS\/simpler-grants-gov/, | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| /^https:\/\/github\.com\/HHS\/simpler-grants-gov/, | |
| /^https:\/\/github\.com\/HHS\/simpler-grants-gov(?:\/)?$/, |
https://github.com/HHS/simpler-grants-gov
https://github.com/HHS/simpler-grants-gov/
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.
got it - this does make this more specific. At this point it should probably just be a string though. I'll make that change

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.
Maybe add these as well?