diff --git a/cypress/elements/menuBar.js b/cypress/elements/menuBar.js index f456f3b511..22bf72f3e0 100644 --- a/cypress/elements/menuBar.js +++ b/cypress/elements/menuBar.js @@ -9,8 +9,3 @@ export const clickMenuBarFileButton = () => export const clickMenuBarOptionsButton = () => cy.getBySel(optionsButton).click() - -export const openOptionsModal = (section = 'Data') => { - clickMenuBarOptionsButton() - return cy.getBySel('options-menu-list').contains(section).click() -} diff --git a/cypress/integration/options/limitValues.cy.js b/cypress/integration/options/limitValues.cy.js index 33dce7fe02..acf8a2de5c 100644 --- a/cypress/integration/options/limitValues.cy.js +++ b/cypress/integration/options/limitValues.cy.js @@ -18,13 +18,14 @@ import { deleteAO, saveNewAO, } from '../../elements/fileMenu/index.js' -import { openOptionsModal } from '../../elements/menuBar.js' +import { clickMenuBarOptionsButton } from '../../elements/menuBar.js' import { OPTIONS_TAB_LIMIT_VALUES, changeMaxOperator, changeMinOperator, clickOptionsModalHideButton, clickOptionsModalUpdateButton, + clickOptionsTab, expectMaxOperatorToBeOption, expectMaxValueToBeValue, expectMinOperatorToBeOption, @@ -85,7 +86,8 @@ describe('limit values', () => { expectTableValueToBe(value, index) ) - openOptionsModal(OPTIONS_TAB_LIMIT_VALUES) + clickMenuBarOptionsButton() + clickOptionsTab(OPTIONS_TAB_LIMIT_VALUES) expectMinOperatorToBeOption('>') expectMaxOperatorToBeOption('<') expectMinValueToBeValue('') @@ -107,7 +109,8 @@ describe('limit values', () => { ) // verify options are present when reopening modal - openOptionsModal(OPTIONS_TAB_LIMIT_VALUES) + clickMenuBarOptionsButton() + clickOptionsTab(OPTIONS_TAB_LIMIT_VALUES) expectMinOperatorToBeOption('>=') expectMaxOperatorToBeOption('<=') expectMinValueToBeValue('49500') @@ -123,7 +126,8 @@ describe('limit values', () => { ) // verify options are present when reopening modal - openOptionsModal(OPTIONS_TAB_LIMIT_VALUES) + clickMenuBarOptionsButton() + clickOptionsTab(OPTIONS_TAB_LIMIT_VALUES) expectMinOperatorToBeOption('>=') expectMaxOperatorToBeOption('<=') expectMinValueToBeValue('49500') @@ -148,7 +152,8 @@ describe('limit values', () => { ) // verify options are present when reopening modal - openOptionsModal(OPTIONS_TAB_LIMIT_VALUES) + clickMenuBarOptionsButton() + clickOptionsTab(OPTIONS_TAB_LIMIT_VALUES) expectMinOperatorToBeOption('>=') expectMaxOperatorToBeOption('<') expectMinValueToBeValue('49500') @@ -164,7 +169,8 @@ describe('limit values', () => { ) // verify options are present when reopening modal - openOptionsModal(OPTIONS_TAB_LIMIT_VALUES) + clickMenuBarOptionsButton() + clickOptionsTab(OPTIONS_TAB_LIMIT_VALUES) expectMinOperatorToBeOption('>=') expectMaxOperatorToBeOption('<') expectMinValueToBeValue('49500') @@ -189,7 +195,8 @@ describe('limit values', () => { ) // verify options are present when reopening modal - openOptionsModal(OPTIONS_TAB_LIMIT_VALUES) + clickMenuBarOptionsButton() + clickOptionsTab(OPTIONS_TAB_LIMIT_VALUES) expectMinOperatorToBeOption('>') expectMaxOperatorToBeOption('<=') expectMinValueToBeValue('') @@ -205,7 +212,8 @@ describe('limit values', () => { ) // verify options are present when reopening modal - openOptionsModal(OPTIONS_TAB_LIMIT_VALUES) + clickMenuBarOptionsButton() + clickOptionsTab(OPTIONS_TAB_LIMIT_VALUES) expectMinOperatorToBeOption('>') expectMaxOperatorToBeOption('<=') expectMinValueToBeValue('') @@ -230,7 +238,8 @@ describe('limit values', () => { ) // verify options are present when reopening modal - openOptionsModal(OPTIONS_TAB_LIMIT_VALUES) + clickMenuBarOptionsButton() + clickOptionsTab(OPTIONS_TAB_LIMIT_VALUES) expectMinOperatorToBeOption('=') expectMaxOperatorToBeOption('<') expectMinValueToBeValue('49500') @@ -246,7 +255,8 @@ describe('limit values', () => { ) // verify options are present when reopening modal - openOptionsModal(OPTIONS_TAB_LIMIT_VALUES) + clickMenuBarOptionsButton() + clickOptionsTab(OPTIONS_TAB_LIMIT_VALUES) expectMinOperatorToBeOption('=') expectMaxOperatorToBeOption('<') expectMinValueToBeValue('49500')