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(labware-library): mock file-saver while using cypress #5932

Merged
merged 1 commit into from
Jun 17, 2020

Conversation

IanLondon
Copy link
Contributor

@IanLondon IanLondon commented Jun 16, 2020

overview

Addresses LC side of #5457. If we like this approach, I'll repeat it for PD's use of file-saver to close that issue

Note: I think we have a ticket somewhere for not having mu's in the filenames, but I didn't want to address that in this PR, too separate of a concern to fit in here. Plus now that we have a test for the file name, we can TDD that when we get to it 🙃

changelog

review requests

  • In the sandbox build (or plain make -C labware-library dev), you should be able to save labware files in LC normally
  • Cypress should still pass (3 cases below)
  1. in CI
  2. with make -C labware-library test-e2e
  3. with make -C labware-library dev CYPRESS=1 then when that's running, in another tab, cd labware-library; yarn cypress open

risk assessment

Low, if it goes really wrong this would block file download in LC, but should be easy to prove that this is still working or not (eg try to d/l in sandbox)

@@ -30,6 +30,13 @@ const envVars = passThruEnvVars.reduce(
{ ...envVarsWithDefaults }
)

const testAliases =
process.env.CYPRESS === '1'
? {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

if we needed any more E2E mocks, we'd add them here

Copy link
Contributor

@mcous mcous left a comment

Choose a reason for hiding this comment

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

💯 I like this approach

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.

clever, I like this!

@IanLondon IanLondon merged commit 07f7180 into edge Jun 17, 2020
@IanLondon IanLondon deleted the ll_mock-file-saver-e2e branch June 17, 2020 14: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.

3 participants