From 9025d29d78001f506f645501a9d474c11b7d33fd Mon Sep 17 00:00:00 2001 From: Josh McVey Date: Fri, 15 Nov 2024 07:39:18 -0600 Subject: [PATCH] cleanup --- protocol-designer/cypress/support/commands.ts | 14 +++++--------- protocol-designer/cypress/support/testFiles.ts | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/protocol-designer/cypress/support/commands.ts b/protocol-designer/cypress/support/commands.ts index b142cd2b6e0..b97c11f2bd2 100644 --- a/protocol-designer/cypress/support/commands.ts +++ b/protocol-designer/cypress/support/commands.ts @@ -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', @@ -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"]', @@ -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') @@ -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 }) diff --git a/protocol-designer/cypress/support/testFiles.ts b/protocol-designer/cypress/support/testFiles.ts index 1a4d26b7de6..d8364b67ed8 100644 --- a/protocol-designer/cypress/support/testFiles.ts +++ b/protocol-designer/cypress/support/testFiles.ts @@ -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 {