-
Notifications
You must be signed in to change notification settings - Fork 93
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
Conversation
E2E Tests 🚀 ? |
// 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) { |
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 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.
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.
Worth a try! This function is painful!
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.
LGTM!
It works on my windows box
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.
LGTM!
8e3295f
Summary
Trying to fix flakes on
notebook-create.test.ts
.QA Notes
✅ Ran 10x on Linux
@:notebook