Skip to content
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

e2e-test: fix notebook-create flakes #5976

Merged
merged 3 commits into from
Jan 13, 2025
Merged

Conversation

midleman
Copy link
Contributor

@midleman midleman commented Jan 13, 2025

Summary

Trying to fix flakes on notebook-create.test.ts.

QA Notes

✅ Ran 10x on Linux

@:notebook

Copy link

github-actions bot commented Jan 13, 2025

E2E Tests 🚀  ?
This PR will run tests tagged with: @critical @notebook

Comment on lines +44 to +48
// Wait for the desired kernel to populate in dropdown, if no show then wait for "Select Kernel"
const kernelLabelLocator = this.code.driver.page.locator(KERNEL_LABEL);
try {
await expect(kernelLabelLocator).toHaveText(new RegExp(desiredKernel), { timeout: 10000 });
} catch (e) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This snippet was the main change. Most of the time of dropdown populates with the kernel and the tests resumes. But in a flaky trace, I noticed that "Select Kernel" would first appear and then it populated the desired kernel value. This doesn't always happen, but it explains why sometimes it was unable to interact with the elements down below. It thought it wasn't selected, but it was. Modified to make it more explicit and first wait for desired kernel, and then if that doesn't happen, we can resume to selecting one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth a try! This function is painful!

@midleman midleman marked this pull request as ready for review January 13, 2025 20:00
jonvanausdeln
jonvanausdeln previously approved these changes Jan 13, 2025
Copy link
Contributor

@jonvanausdeln jonvanausdeln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! :shipit:
It works on my windows box

testlabauto
testlabauto previously approved these changes Jan 13, 2025
Copy link
Contributor

@testlabauto testlabauto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@midleman midleman dismissed stale reviews from testlabauto and jonvanausdeln via 8e3295f January 13, 2025 20:54
@midleman midleman merged commit 905ca26 into main Jan 13, 2025
10 checks passed
@midleman midleman deleted the mi/fix-notebook-create-flakes branch January 13, 2025 21:18
@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants