-
Notifications
You must be signed in to change notification settings - Fork 179
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(protocol-designer): start of cypress happy path test for mix settings #17320
base: edge
Are you sure you want to change the base?
Changes from all commits
4ee94fa
0deebbe
5cace81
0bb214d
d1d8732
7b4bbd6
2de5551
5764922
c33abc1
b467943
a755f98
4b18b81
044007d
5ff3113
43e18a1
e08d71f
a42308c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { defineConfig } from "cypress"; | ||
|
||
export default defineConfig({ | ||
Check failure on line 3 in cypress.config.ts GitHub Actions / js checks
|
||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, | ||
}, | ||
}); |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we know why this file was added? I fully agree with having fixtures, but this one feels like it was automatically generated by Cypress There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @skowalski08 , this is actually a smidge more severe, my apologies. It appears that you have created a cypress, fixtures, and support file within the Opentrons Directory independent of Protocol-Designer See here https://github.com/Opentrons/opentrons/tree/a42308ca809c4a7389dbc423fd7bd20bbf5dacc9/cypress |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "hello@cypress.io", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/// <reference types="cypress" /> | ||
Check failure on line 1 in cypress/support/commands.ts GitHub Actions / js checks
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would go away from the triple slash, which is causing a linting error, but also might delete the rest of the commented out space There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pardon, see earlier comment: https://github.com/Opentrons/opentrons/pull/17320/files#r1926035830 |
||
// *********************************************** | ||
// This example commands.ts shows you how to | ||
// create various custom commands and overwrite | ||
// existing commands. | ||
// | ||
// For more comprehensive examples of custom | ||
// commands please read more here: | ||
// https://on.cypress.io/custom-commands | ||
// *********************************************** | ||
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add('login', (email, password) => { ... }) | ||
// | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) | ||
// | ||
// declare global { | ||
// namespace Cypress { | ||
// interface Chainable { | ||
// login(email: string, password: string): Chainable<void> | ||
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element> | ||
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element> | ||
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element> | ||
// } | ||
// } | ||
// } |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// *********************************************************** | ||
// This example support/e2e.ts is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.js using ES2015 syntax: | ||
import './commands' | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,61 @@ | ||||
import '../support/commands.ts'; // Importing the custom commands file | ||||
Check failure on line 1 in protocol-designer/cypress/e2e/mixSettings.cy.ts GitHub Actions / js checks
|
||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See example here without using the .ts extension
|
||||
import { | ||||
Actions, | ||||
Verifications, | ||||
runMixSetup, | ||||
} from '../support/mixSetting' | ||||
import { UniversalActions } from '../support/universalActions' | ||||
import { TestFilePath, getTestFile } from '../support/testFiles' | ||||
import { | ||||
// verifyOldProtocolModal, | ||||
verifyImportProtocolPage, | ||||
} from '../support/import' | ||||
|
||||
describe('Redesigned Mixing Steps - Happy Path', () => { | ||||
beforeEach(() => { | ||||
cy.visit('/') | ||||
cy.closeAnalyticsModal() | ||||
const protocol = getTestFile(TestFilePath.DoItAllV8) | ||||
cy.importProtocol(protocol.path) | ||||
verifyImportProtocolPage(protocol) | ||||
|
||||
// NOTE: vv make this chunk better// | ||||
cy.contains("Edit protocol").click() | ||||
cy.contains("Protocol steps").click() | ||||
cy.get('[id="AddStepButton"]').contains("Add Step").click() | ||||
cy.verifyOverflowBtn() | ||||
}); | ||||
|
||||
|
||||
it('It should verify the working function of every permutation of mix checkboxes', () => { | ||||
const steps: Array<Actions | Verifications | UniversalActions> = [ | ||||
Actions.SelectMix, | ||||
UniversalActions.Snapshot, | ||||
Verifications.PartOne, | ||||
Actions.SelectLabware, | ||||
Actions.SelectWellInputField, | ||||
Verifications.WellSelectPopout, | ||||
UniversalActions.Snapshot, | ||||
Actions.Save, | ||||
Actions.EnterVolume, | ||||
Actions.EnterMixReps, | ||||
Actions.SelectTipHandling, | ||||
UniversalActions.Snapshot, | ||||
Actions.Continue, | ||||
Verifications.PartTwoAsp, | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was really impressed by how thorough your verifications were! |
||||
Actions.AspirateFlowRate, | ||||
Actions.AspWellOrder, | ||||
Verifications.AspWellOrder, | ||||
// Actions.Dispense, | ||||
// Verifications.PartTwoDisp, | ||||
|
||||
] | ||||
|
||||
runMixSetup(steps) | ||||
// cy.contains('Primary order').closest('div') | ||||
}); | ||||
}); | ||||
|
||||
/* | ||||
NEED TO ADD RENAME | ||||
*/ |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Looks like it's causing trouble with your home.cy.ts file. The cypress test likely will fail until this happens |
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.
Ah, /opentrons/protocol-designer/cypress.config.js I think is where we defined this. There are two places to go from here: