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

test(app): Add end-to-end test automation using Cypress #8081

Closed
wants to merge 7 commits into from

Conversation

Corey-ONeal
Copy link

Overview

Added end-to-end test automation for the Opentrons run app using Cypress. Contains a total of 6 test suites and utilizes the ability to now open the app in a web browser. Was built around version 4.3.1 of the run app.

To run this manually, please ensure the Docker emulator is up and running, using make docker-emulator and already calibrated. You will also need to start the app in "external browser mode" prior to running the test automation using make external-browser-app. The app will then be accessible via http:https://localhost:8090.

Once that is done, kick off the test automation with make test-e2e. The test automation can take about 7-8 minutes to fully execute all 6 test suites due to the second test suite taking 6-7 mins to execute 4 different protocols on the emulator.

Changelog

Changelog:

  • Added Cypress dependencies to app directory
  • Created 6 test suites running through the various components of the run app
  • Integrated e2e test automation with makefile and GitHub actions
  • Added instructions for executing test automation to the README in app directory

Review requests

Those with more experience using GitHub actions, please review the integration with GitHub actions (app-test-build-deploy.yaml) to ensure it is set up correctly.

…ress. Includes a total of 6 test suites and utilizes the Docker emulator.
@Corey-ONeal Corey-ONeal requested review from a team as code owners July 9, 2021 14:36
@SyntaxColoring SyntaxColoring changed the title Adding end-to-end test automation for the run app using Cypress feat(app): Add end-to-end test automation using Cypress Jul 9, 2021

// Confirm that initial page has loaded properly and all inital content is present
it('Successfully loads page', () => {
cy.get('.dZMtmt > .Svg-sc-1lpozsw-0 > path').should('exist')
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these IDs deterministic, or will they change according to the whims of React?

Can/should we change the app source to provide more stable IDs for these tests to hook into?

I'm not familiar with common E2E practice—maybe that wouldn't be worth it, and it's okay to treat this as a snapshot?

@@ -25,6 +22,8 @@
"classnames": "2.2.5",
"connected-react-router": "6.8.0",
"core-js": "3.2.1",
"cypress-file-upload": "^5.0.8",
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't figure out why, but a top-level make setup is giving me this yarn warning:

warning " > [email protected]" has incorrect peer dependency "cypress@^3.0.0".

We clearly ask for cypress-file-upload ^5.0.8, so I don't know why it's talking about 3.5.3. 🤷

@mcous mcous changed the title feat(app): Add end-to-end test automation using Cypress test(app): Add end-to-end test automation using Cypress Jul 20, 2021
@y3rsh y3rsh self-assigned this Jul 21, 2021
@y3rsh y3rsh added the qa QA input / review required label Jul 21, 2021
@y3rsh y3rsh closed this Aug 27, 2021
@y3rsh y3rsh deleted the opentrons-app_ws-remote-testE2E branch April 14, 2022 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa QA input / review required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants