-
Notifications
You must be signed in to change notification settings - Fork 25
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
fix e2e test flakiness due to workshop page fixture #9288
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9288 +/- ##
==========================================
+ Coverage 74.24% 75.23% +0.98%
==========================================
Files 1332 1363 +31
Lines 40817 42085 +1268
Branches 7634 7834 +200
==========================================
+ Hits 30306 31661 +1355
+ Misses 10511 10424 -87 ☔ View full report in Codecov by Sentry. |
Playwright test resultsDetails
Flaky testschrome › tests/extensionConsole/activation.spec.ts › can activate a mod with built-in integration Skipped testschrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options |
My guess unfortunately was not right, but I'm trying making some slight tweaks to visibility checks in fixtures |
This reverts commit 55b9e58.
@@ -70,7 +70,6 @@ export const test = pageContextFixture.extend<{ | |||
async _workshopPage({ context, extensionId }, use) { | |||
const newPage = await context.newPage(); | |||
const workshopPage = new WorkshopPage(newPage, extensionId); | |||
await workshopPage.goto(); |
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.
since we navigate and refresh the workshop each time we need to use it, we don't initially need to load it. Avoiding this goto
avoids some weird behavior we are observing when we load the extension console twice in quick succession
await expect(async () => { | ||
await this.getByRole("heading", { name: "Activate " }).waitFor({ | ||
timeout: 10_000, | ||
}); | ||
try { | ||
await this.getByText(this.modId).waitFor({ timeout: 10_000 }); | ||
} catch (error) { | ||
await this.page.reload(); | ||
throw error; | ||
} | ||
}).toPass({ timeout: 30_000 }); |
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.
I'm not actually sure we need this additional handling any more... I added this when I was seeing issues loading the activation page where the page actually just crashed, but not seeing that any more with the changes to the workshop page fixture
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.
This reload cycle will happen ever 10s, so I'd be in favor of removing if you don't think it's needed especially w.r.t. this being on a POM
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.
I'll try this in the follow-up right after this is merged
test.fixme( | ||
process.env.GITHUB_WORKFLOW === PRE_RELEASE_BROWSER_WORKFLOW_NAME && | ||
isMsEdge(chromiumChannel), | ||
"Skipping test for MS Edge in pre-release workflow, see https://github.com/pixiebrix/pixiebrix-extension/issues/9125", | ||
); |
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.
I think the edge flakiness has been resolved by this PR change.
const modsPage = new ModsPage(this.page, this.extensionId); | ||
await modsPage.goto(); |
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.
this modsPage wasn't being used.
There's some additional msedge flakiness that I'll address in a follow-up |
@@ -300,8 +299,9 @@ export class PageEditorPage extends BasePageObject { | |||
* @see newPageEditorPage in fixtures/testBase.ts | |||
*/ | |||
async cleanup() { | |||
const modsPage = new ModsPage(this.page, this.extensionId); | |||
await modsPage.goto(); | |||
if (this.savedModIds.length === 0) { |
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.
opportunity/future work: Do we want to consider removing the cleanup portion of our tests in favor of the server cron job?
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.
Yea, I think that would be a good endeavor to pursue! Would save us some time on test runs
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.
Agreed
What does this PR do?
Discussion
Checklist
Leave all that are relevant and check off as completed
For more information on our expectations for the PR process, see the
code review principles doc