Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
y3rsh committed Nov 15, 2024
1 parent 708639d commit 9025d29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions protocol-designer/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ export const content = {
opentrons: 'Opentrons',
charSet: 'UTF-8',
header: 'Protocol Designer',
createNew: 'Create new',
import: 'Import',
welcome: 'Welcome to Protocol Designer!',
createProtocol: 'Create a protocol',
editProtocol: 'Edit existing protocol',
appSettings: 'App settings',
privacy: 'Privacy',
shareSessions: 'Share sessions with Opentrons',
Expand All @@ -57,9 +53,9 @@ export const content = {
export const locators = {
import: 'Import',
createNew: 'Create new',
settingsDataTestid: 'SettingsIconButton',
createProtocol: 'Create a protocol',
editProtocol: 'label',
editProtocol: 'Edit existing protocol',
settingsDataTestid: 'SettingsIconButton',
settings: 'Settings',
privacyPolicy: 'a[href="https://opentrons.com/privacy-policy"]',
eula: 'a[href="https://opentrons.com/eula"]',
Expand Down Expand Up @@ -104,8 +100,8 @@ Cypress.Commands.add('verifyCreateNewHeader', () => {
// Home Page
Cypress.Commands.add('verifyHomePage', () => {
cy.contains(content.welcome)
cy.contains('button', content.createProtocol).should('be.visible')
cy.contains('label', content.editProtocol).should('be.visible')
cy.contains('button', locators.createProtocol).should('be.visible')
cy.contains('label', locators.editProtocol).should('be.visible')
cy.getByTestId(locators.settingsDataTestid).should('be.visible')
cy.get(locators.privacyPolicy).should('exist').and('be.visible')
cy.get(locators.eula).should('exist').and('be.visible')
Expand All @@ -117,7 +113,7 @@ Cypress.Commands.add('clickCreateNew', () => {

// Header Import
Cypress.Commands.add('importProtocol', (protocolFilePath: string) => {
cy.contains(content.import).click()
cy.contains(locators.import).click()
cy.get('[data-cy="landing-page"]')
.find('input[type=file]')
.selectFile(protocolFilePath, { force: true })
Expand Down
2 changes: 1 addition & 1 deletion protocol-designer/cypress/support/testFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { isEnumValue } from './utils'

// ////////////////////////////////////////////
// This is the data section where we map all the protocol files
// We map to have IDE autocompletion of all the protocol files we have available to test with
// This allows for IDE . completion and type checking
// ////////////////////////////////////////////

export enum TestFilePath {
Expand Down

0 comments on commit 9025d29

Please sign in to comment.