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(ll): make cypress tests compatible with deployed environments #16405

Merged
merged 13 commits into from
Oct 22, 2024

Conversation

y3rsh
Copy link
Collaborator

@y3rsh y3rsh commented Oct 2, 2024

Overview

Labware Library Cypress tests were able to run locally and in CI but some patterns did not allow for the same test to execute against a deployed environment. Additionally there were no instructions or make targets to quickly run the tests against a deployed environment.

Test Plan and Hands on Testing

  • all the specs work in the Cypress GUI and through make for me locally
  • reviewer checkout this branch and make -C labware-library test-e2e-remote REMOTE_BASE_URL='https://labware.opentrons.com'
  • CI works. The success of the labware library e2e tests job in Labware Library test, build, and deploy proves the tests also still works against localhost

Review requests

  • normal review of code
  • run locally for yourself to validate and tick the box 😊

Risk assessment

  • None, test only

@y3rsh y3rsh self-assigned this Oct 2, 2024
@y3rsh y3rsh requested review from a team as code owners October 2, 2024 21:44
@y3rsh y3rsh requested review from shlokamin and removed request for a team October 2, 2024 21:44
@y3rsh
Copy link
Collaborator Author

y3rsh commented Oct 2, 2024

There might be an issue where the tests are not working in CI???
Will have to figure that out. make test-e2e is working locally for me.

Fixed. Removed the mock and replaced with real file read.

Copy link
Member

@shlokamin shlokamin left a comment

Choose a reason for hiding this comment

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

love this. your file saver approach is honestly way better than the mocked file saver we used before, we should do the same thing for PD

Comment on lines -10 to -18
const testAliases: {} | { 'file-saver': string } =
process.env.CYPRESS === '1'
? {
'file-saver':
path.resolve(__dirname, 'cypress/mocks/file-saver.js') ?? '',
}
: {}

Copy link
Member

Choose a reason for hiding this comment

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

these deletions make me so happy

@y3rsh y3rsh merged commit 824f8c8 into edge Oct 22, 2024
11 checks passed
@y3rsh y3rsh deleted the ll-enable-cypress-against-deployed-environment branch October 22, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants