-
Notifications
You must be signed in to change notification settings - Fork 46
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
front: fix flaky e2e test 008 #10475
Conversation
The issue might be |
The count works fine, the issue is with selecting the train card when it's not loaded in the DOM |
1439b48
to
8d8843f
Compare
The commit has been reverted here, maybe we should re-add it ? @anisometropie |
8d8843f
to
2634e9e
Compare
Indeed, both commits from #10474 need to be re-applied to check whether the issue is indeed fixed. (Since it was flaky, need to test multiple times to ensure it doesn't succeed by chance.) |
@@ -94,7 +94,7 @@ class OperationalStudiesTimetablePage extends CommonPage { | |||
|
|||
// Verify that simulation results are displayed | |||
async verifySimulationResultsVisibility(): Promise<void> { | |||
await this.page.waitForLoadState('networkidle'); | |||
await this.page.waitForLoadState('networkidle', { timeout: 60_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.
60s is a very long time, do we really need it? I don't think #10371 increases the simulation time.
const trainElementHandle = this.timetableTrains.nth(currentTrainIndex); | ||
|
||
await trainElementHandle.scrollIntoViewIfNeeded(); | ||
await trainElementHandle.waitFor(); |
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.
Does waitFor()
really do anything here? I'd assume scrollIntoViewIfNeeded()
to be enough to make the element visible.
const trainButton = OperationalStudiesTimetablePage.getTrainButton( | ||
this.timetableTrains.nth(currentTrainIndex) | ||
); | ||
const trainElementHandle = this.timetableTrains.nth(currentTrainIndex); |
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.
Kind of orthogonal to this PR, but it's nicer to use for (const trainElement of await this.timetableTrains.all())
instead of a counter.
2634e9e
to
08c13fb
Compare
pushed back in my commits for #10377, E2e are running ok |
Signed-off-by: maymanaf <[email protected]>
This reverts commit c4827a5.
This reverts commit d5369f8.
08c13fb
to
92d65e8
Compare
92d65e8
to
2b1016c
Compare
Fixed in this PR |
No description provided.