-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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(cypress): Fix failing/flaky E2E tests #22460
Changes from all commits
9757c7f
4bdba37
de8e46f
9b01795
f1f0a91
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 |
---|---|---|
|
@@ -82,7 +82,7 @@ function prepareDashboardFilters( | |
}).then(res => { | ||
const { body } = res; | ||
const dashboardId = body.result.id; | ||
const allFilters: Record<string, any>[] = []; | ||
const allFilters: Record<string, unknown>[] = []; | ||
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 believe these are import { Filters } from '@superset-ui/core';
const allFilters: Record<string, Filters>[] = []; 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. Hmm, I tried this but it gave me a "Module '"@superset-ui/core"' has no exported member 'Filter'." error. I also didn't see anywhere else in |
||
filters.forEach((f, i) => { | ||
allFilters.push({ | ||
id: `NATIVE_FILTER-fLH0pxFQ${i}`, | ||
|
@@ -202,6 +202,7 @@ function openVerticalFilterBar() { | |
|
||
function setFilterBarOrientation(orientation: 'vertical' | 'horizontal') { | ||
cy.getBySel('filterbar-orientation-icon').click(); | ||
cy.wait(250); | ||
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. Can we add timeout to 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. Actually, not sure which method do we prefer in Superset, so feel free to leave it as is 🙂 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. Nevermind, I didn't notice that it's merged 😄 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. Haha no worries! The issue seemed to be that the loading of the page caused some scrolling action while the menu was opening, which disrupted Cypress's ability to click on the menu item even though it is able to find it, so this |
||
cy.getBySel('dropdown-selectable-info') | ||
.contains('Orientation of filter bar') | ||
.should('exist'); | ||
|
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.
Cool, I didn't know that
should
waits andthen
doesn't!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.
Me either, this PR was a learning experience!