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

Select sync mode dropdown with a data-testid #16053

Conversation

ambirdsall
Copy link
Contributor

@ambirdsall ambirdsall commented Aug 28, 2022

What

Adds a data-testid selector to the dropdown so it can be selected in cypress tests without relying on unreliable generated class names; also adjusts the strategy for selecting the dropdown option. While using a data-testid attribute is usually the best way to select parts of the UI in tests, the menu items within the dropdown are dynamically constructed by the react-select library after being passed around multiple files: customizing this would be confusing to write and maintain. Instead, we can use the .react-select__menu class to identify the dropdown menu (since only one will be open at a time) and use cy.contains to select specific dropdown items by their text content.

@github-actions github-actions bot added area/platform issues related to the platform area/frontend Related to the Airbyte webapp labels Aug 28, 2022
@ambirdsall ambirdsall force-pushed the alex/add-test-selector-for-sync-mode-dropdown branch from 757b821 to 85d45a3 Compare August 28, 2022 18:04
@ambirdsall ambirdsall force-pushed the alex/add-test-selector-for-sync-mode-dropdown branch from 85d45a3 to 953cc4a Compare August 28, 2022 18:43
@ambirdsall ambirdsall marked this pull request as ready for review August 28, 2022 18:45
@ambirdsall ambirdsall requested a review from a team as a code owner August 28, 2022 18:45
@ambirdsall ambirdsall requested review from SofiiaZaitseva and removed request for a team August 28, 2022 18:45
@ambirdsall ambirdsall merged commit 6b60954 into Sofiia_UpdateConnection_ExtendE2ETests Aug 29, 2022
@ambirdsall ambirdsall deleted the alex/add-test-selector-for-sync-mode-dropdown branch August 29, 2022 14:48
SofiiaZaitseva added a commit that referenced this pull request Sep 2, 2022
* add tests for PokeAPI

* Update connection.spec.ts

add body verification

* add page object model for update connection (poke api) test

* change structure with using POM

* Select sync mode dropdown with a data-testid (#16053)

* Fix coments

* fix goToDestinationPage signature

* move fillEmail method

* change structure with using POM

* Fix coments

* Update connection.spec.ts

fix request url and schedule dropdown value

Co-authored-by: Alex Birdsall <ambirdsall@gmail.com>
robbinhan pushed a commit to robbinhan/airbyte that referenced this pull request Sep 29, 2022
* add tests for PokeAPI

* Update connection.spec.ts

add body verification

* add page object model for update connection (poke api) test

* change structure with using POM

* Select sync mode dropdown with a data-testid (airbytehq#16053)

* Fix coments

* fix goToDestinationPage signature

* move fillEmail method

* change structure with using POM

* Fix coments

* Update connection.spec.ts

fix request url and schedule dropdown value

Co-authored-by: Alex Birdsall <ambirdsall@gmail.com>
jhammarstedt pushed a commit to jhammarstedt/airbyte that referenced this pull request Oct 31, 2022
* add tests for PokeAPI

* Update connection.spec.ts

add body verification

* add page object model for update connection (poke api) test

* change structure with using POM

* Select sync mode dropdown with a data-testid (airbytehq#16053)

* Fix coments

* fix goToDestinationPage signature

* move fillEmail method

* change structure with using POM

* Fix coments

* Update connection.spec.ts

fix request url and schedule dropdown value

Co-authored-by: Alex Birdsall <ambirdsall@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp area/platform issues related to the platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants