Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
skowalski08 committed Feb 10, 2025
1 parent 7f53251 commit 90f2706
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 95 deletions.
4 changes: 2 additions & 2 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { defineConfig } from "cypress";
import { defineConfig } from 'cypress'

export default defineConfig({

Check failure on line 3 in cypress.config.ts

View workflow job for this annotation

GitHub Actions / js checks

Prefer named exports

Check failure on line 3 in cypress.config.ts

View workflow job for this annotation

GitHub Actions / js checks

Prefer named exports
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
})
28 changes: 11 additions & 17 deletions protocol-designer/cypress/e2e/mixSettings.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import '../support/commands'
import {
MixActions,
MixVerifications,
} from '../support/mixSetting'
import { MixActions, MixVerifications } from '../support/mixSetting'
import { UniversalActions } from '../support/universalActions'
import { TestFilePath, getTestFile } from '../support/testFiles'
import {
verifyImportProtocolPage,
} from '../support/import'
import { verifyImportProtocolPage } from '../support/import'
import { runSteps } from '../support/StepExecution'
import type { StepsList } from '../support/StepExecution'

Expand All @@ -18,14 +13,13 @@ describe('Redesigned Mixing Steps - Happy Path', () => {
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.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: StepsList = [
Expand Down Expand Up @@ -66,11 +60,11 @@ describe('Redesigned Mixing Steps - Happy Path', () => {
MixActions.Rename,
MixActions.Save,
MixVerifications.Rename,
MixActions.Save
MixActions.Save,
]
runSteps(steps)
});
});
})
})

/*
To Add:
Expand All @@ -80,4 +74,4 @@ MixActions.FlowRateWarning, **for asp and disp
To Change:
Need to refactor labware set up to have different labware on deck for better well selection coverage
*/
*/
6 changes: 3 additions & 3 deletions protocol-designer/cypress/support/StepExecution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
MixActions,
MixVerifications,
executeMixAction,
executeVerifyMixStep
executeVerifyMixStep,
} from './mixSetting'

export type StepsList = Array<
Expand All @@ -38,7 +38,7 @@ export const runSteps = (steps: StepsList): void => {
SetupVerifications,
UniversalActions,
MixActions,
MixVerifications
MixVerifications,
]

if (!isEnumValue(enumsToCheck, steps)) {
Expand All @@ -60,6 +60,6 @@ export const runSteps = (steps: StepsList): void => {
executeMixAction(step as MixActions)
} else if (isEnumValue([MixVerifications], step)) {
executeVerifyMixStep(step as MixVerifications)
}
}
})
}
16 changes: 9 additions & 7 deletions protocol-designer/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ export const content = {
appSettings: 'App Info',
privacy: 'Privacy',
shareSessions: 'Share analytics with Opentrons',
move: "Move",
transfer: "Transfer",
mix: "Mix",
pause: "Pause",
heaterShaker: "Heater-shaker",
thermocyler: "Thermocycler",
move: 'Move',
transfer: 'Transfer',
mix: 'Mix',
pause: 'Pause',
heaterShaker: 'Heater-shaker',
thermocyler: 'Thermocycler',
}

export const locators = {
Expand Down Expand Up @@ -204,7 +204,9 @@ Cypress.Commands.add('openFilePage', () => {
// Pipette Page Actions
//

Cypress.Commands.add('choosePipettes', (leftPipetteSelector, rightPipetteSelector) => {
Cypress.Commands.add(
'choosePipettes',
(leftPipetteSelector, rightPipetteSelector) => {
cy.get('[id="PipetteSelect_left"]').click()
cy.get(leftPipetteSelector).click()
cy.get('[id="PipetteSelect_right"]').click()
Expand Down
Loading

0 comments on commit 90f2706

Please sign in to comment.