-
Notifications
You must be signed in to change notification settings - Fork 4.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
🪟 🚦 E2E tests: clean up matchers #20887
🪟 🚦 E2E tests: clean up matchers #20887
Conversation
# Conflicts: # airbyte-webapp-e2e-tests/cypress/plugins/index.ts
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!
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.
Have not watched cypress run through this, but it looks like CI likes it 🎉
Bear with me, I had a lot of questions! I think it's close, mostly I just want to clarify some things.
cy.get(getFieldDropdownOption(value)).click(); | ||
} | ||
}); | ||
// close dropdown - click on dropdown overlay if 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.
Don't both the cursor and primary key field use Popout
? Both of those would have an overlay, right?
Curious a few things:
- When would the overlay be there or not be there and is that worth documenting somewhere here?
- Do we need a tighter matcher at the top of this file for
<Overlay />
so we're sure we get the one associated with the<Popout />
? We also use the Overlay when there is a modal open and when the new<StreamDetailsPanel />
is open (which I suppose isn't a current concern, but will be soon)
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.
- In case we select the cursor options - there can be just one option selected, so the dropdown closes automatically. Multiple options can be selected in case we select the PK options, so we need to close the dropdown manually.
Firstly, I did a try to close it when multiple options need to be selected, but since we are inwithin()
context, it's strange, but it can find thebody
element. I also tried usingcy.root
andcy.document().its('body').find(...)
to find theOverlay
in the outer scope, but they weren't successful. - Hm... But we can have just one Overlay at the same time. The reason why we need to click on Overlay - current implementation dropdown. I also tried to click outside, at any element, and tried on the
body
element - no effect. Only clicking on overlay allows closing the dropdown.
In the case ofModal
- we usually have buttons, like "Ok" and "Cancel", and we don't useOverlay
element. Except for just one case - when we need to check the behavior when we click outside of theModal
.
I've added some comments to the code above, why we check Overlay existence.
# Conflicts: # airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts
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! Excited to have these in 🎉
* improve serviceTypeDropdownOption selector * add test ids to PathPopout component(s) * add unique id's to table dropdowns * extend submitButtonClick to support optional click options * update dropdown(pathPopout) matchers * add test-id to Overlay component * remove redundant function brackets * revert changes onSubmit button click * fix dropDown overlay issue * move all duplicated intercepters to beforeEach * add test id's to Connections, Sources and Destinations tables * add table helper functions * update source page actions * intercepter fixes * update createTestConnection function with optional replication settings * remove extra Connection name check * replace "cypress-postgres" with "pg-promise" npm package * update cypress config * Revert "update createTestConnection function with optional replication settings" This reverts commit 8e47c78. * Revert "remove extra Connection name check" This reverts commit dfb19c7. * replace openSourceDestinationFromGrid with specific selector * replace openSourceDestinationFromGrid with specific selector * turn on test * add test-id's * fix selectors * update test * update test snapshots * fix lost data-testid after resolve merge conflicts * remove extra check * move clickOnCellInTable helper to common.ts file * remove empty line and comments * fix dropdownType * replace partial string check with exact * extract interceptors and waiters to separate file * fix selector for predefined PK * fix selector * add comment regarding dropdown
* api changes for writing discover catalog * api changes * format * worker change 1 * change return type of the API to return catalogId * worker to call api * typo * 🎉 Source GoogleSheets - migrated SAT to strictness level (#21399) * migrated SAT to strictness level * fixed expected records * revert file from another source * changed extension to txt * changed extension to txt * 🐛Destination-Bigquery: Added an explicit error message if sync fails due to a config issue (#21144) * [19998] Destination-Bigquery: Added an explicit error message in sync fails due to a config issue * ci-connector-ops: split workflows(#21474) * CI: nightly build alpha sources and destinations (#21562) * Revert "Change main class in strict-encrypt destination and bump versions on both destinations to keep them in sync (#21509)" (#21567) This reverts commit 1d202d1. * Fixes webhook updating logic (#21519) * ci_credentials: disable tooling test run by tox (#21580) * disable tox * rename steps * revert changes on experimental workflow * do not install tox * Revert "CI: nightly build alpha sources and destinations (#21562)" (#21589) This reverts commit 61f88f3. * Security update of default docker images (#21407) Because there is a lot of CVEs in those releases. Co-authored-by: Topher Lubaway <[email protected]> * 📝 add docs for how to add normalization (#21563) * add docs * add schema link * update based on feedback * 🪟 🚦 E2E tests: clean up matchers (#20887) * improve serviceTypeDropdownOption selector * add test ids to PathPopout component(s) * add unique id's to table dropdowns * extend submitButtonClick to support optional click options * update dropdown(pathPopout) matchers * add test-id to Overlay component * remove redundant function brackets * revert changes onSubmit button click * fix dropDown overlay issue * move all duplicated intercepters to beforeEach * add test id's to Connections, Sources and Destinations tables * add table helper functions * update source page actions * intercepter fixes * update createTestConnection function with optional replication settings * remove extra Connection name check * replace "cypress-postgres" with "pg-promise" npm package * update cypress config * Revert "update createTestConnection function with optional replication settings" This reverts commit 8e47c78. * Revert "remove extra Connection name check" This reverts commit dfb19c7. * replace openSourceDestinationFromGrid with specific selector * replace openSourceDestinationFromGrid with specific selector * turn on test * add test-id's * fix selectors * update test * update test snapshots * fix lost data-testid after resolve merge conflicts * remove extra check * move clickOnCellInTable helper to common.ts file * remove empty line and comments * fix dropdownType * replace partial string check with exact * extract interceptors and waiters to separate file * fix selector for predefined PK * fix selector * add comment regarding dropdown * 🪟 🎨 [Free connectors] Update modal copy (#21600) * move start/end time options out of optional block (#21541) * lingering fix * reflecting api changes * test fix * worker to call api to do discover work * recovered deleted html * self review * more converters refactor * fix connector test * fix test * fix * fix integration test * add unit test for converter * static fix * api client needs to have a timeout in case request does not get responded --------- Co-authored-by: midavadim <[email protected]> Co-authored-by: Eugene <[email protected]> Co-authored-by: Augustin <[email protected]> Co-authored-by: Greg Solovyev <[email protected]> Co-authored-by: Yatsuk Bogdan <[email protected]> Co-authored-by: Hervé Commowick <[email protected]> Co-authored-by: Topher Lubaway <[email protected]> Co-authored-by: Pedro S. Lopez <[email protected]> Co-authored-by: Vladimir <[email protected]> Co-authored-by: Joey Marshment-Howell <[email protected]> Co-authored-by: Lake Mossman <[email protected]>
* api changes for writing discover catalog * api changes * format * worker change 1 * change return type of the API to return catalogId * worker to call api * typo * 🎉 Source GoogleSheets - migrated SAT to strictness level (#21399) * migrated SAT to strictness level * fixed expected records * revert file from another source * changed extension to txt * changed extension to txt * 🐛Destination-Bigquery: Added an explicit error message if sync fails due to a config issue (#21144) * [19998] Destination-Bigquery: Added an explicit error message in sync fails due to a config issue * ci-connector-ops: split workflows(#21474) * CI: nightly build alpha sources and destinations (#21562) * Revert "Change main class in strict-encrypt destination and bump versions on both destinations to keep them in sync (#21509)" (#21567) This reverts commit 1d202d1. * Fixes webhook updating logic (#21519) * ci_credentials: disable tooling test run by tox (#21580) * disable tox * rename steps * revert changes on experimental workflow * do not install tox * Revert "CI: nightly build alpha sources and destinations (#21562)" (#21589) This reverts commit 61f88f3. * Security update of default docker images (#21407) Because there is a lot of CVEs in those releases. Co-authored-by: Topher Lubaway <[email protected]> * 📝 add docs for how to add normalization (#21563) * add docs * add schema link * update based on feedback * 🪟 🚦 E2E tests: clean up matchers (#20887) * improve serviceTypeDropdownOption selector * add test ids to PathPopout component(s) * add unique id's to table dropdowns * extend submitButtonClick to support optional click options * update dropdown(pathPopout) matchers * add test-id to Overlay component * remove redundant function brackets * revert changes onSubmit button click * fix dropDown overlay issue * move all duplicated intercepters to beforeEach * add test id's to Connections, Sources and Destinations tables * add table helper functions * update source page actions * intercepter fixes * update createTestConnection function with optional replication settings * remove extra Connection name check * replace "cypress-postgres" with "pg-promise" npm package * update cypress config * Revert "update createTestConnection function with optional replication settings" This reverts commit 8e47c78. * Revert "remove extra Connection name check" This reverts commit dfb19c7. * replace openSourceDestinationFromGrid with specific selector * replace openSourceDestinationFromGrid with specific selector * turn on test * add test-id's * fix selectors * update test * update test snapshots * fix lost data-testid after resolve merge conflicts * remove extra check * move clickOnCellInTable helper to common.ts file * remove empty line and comments * fix dropdownType * replace partial string check with exact * extract interceptors and waiters to separate file * fix selector for predefined PK * fix selector * add comment regarding dropdown * 🪟 🎨 [Free connectors] Update modal copy (#21600) * move start/end time options out of optional block (#21541) * lingering fix * reflecting api changes * test fix * reset to master * routing changes * remove unexpected merge * resolve dependency micronaut * resolve dependency * format * fix test * rename and refactor location of test files * test * redo the routing service * add test to config repository * query workspace not connection for discover/check * remove unused bean --------- Co-authored-by: midavadim <[email protected]> Co-authored-by: Eugene <[email protected]> Co-authored-by: Augustin <[email protected]> Co-authored-by: Greg Solovyev <[email protected]> Co-authored-by: Yatsuk Bogdan <[email protected]> Co-authored-by: Hervé Commowick <[email protected]> Co-authored-by: Topher Lubaway <[email protected]> Co-authored-by: Pedro S. Lopez <[email protected]> Co-authored-by: Vladimir <[email protected]> Co-authored-by: Joey Marshment-Howell <[email protected]> Co-authored-by: Lake Mossman <[email protected]>
What
Resolves #20722 (1 point)
How
Most of the cleanup work was done on matches(selectors):
className
,div
, and other not reliable selectors with appropriatedata-testid
selectorscy.intercept
tobeforeEach
function