diff --git a/tests/e2e/visual/contacts/contact-user-hierarchy-creation.wdio-spec.js b/tests/e2e/visual/contacts/contact-user-hierarchy-creation.wdio-spec.js index 4d2cf1f858..eb6545ab0f 100644 --- a/tests/e2e/visual/contacts/contact-user-hierarchy-creation.wdio-spec.js +++ b/tests/e2e/visual/contacts/contact-user-hierarchy-creation.wdio-spec.js @@ -85,7 +85,7 @@ describe('Creating and editing contacts and users', () => { await commonPage.openMoreOptionsMenu(); await browser.pause(150); // Waiting for animation to avoid blurry screenshots await generateScreenshot('new-chw-supervisor', 'edit-facility'); - await commonPage.accessEditOption(openMoreOptionsMenu = false); + await commonPage.accessEditOption(false); await contactPage.openPrimaryContactSearchDropdown(); await contactPage.inputPrimaryContactSearchValue('John'); await generateScreenshot('new-chw-supervisor', 'set-primary-contact'); diff --git a/tests/page-objects/default/common/common.wdio.page.js b/tests/page-objects/default/common/common.wdio.page.js index 88301ab14b..f30551ea3d 100644 --- a/tests/page-objects/default/common/common.wdio.page.js +++ b/tests/page-objects/default/common/common.wdio.page.js @@ -92,7 +92,7 @@ const openMoreOptionsMenu = async () => { }; const performMenuAction = async (actionSelector, openMoreOptionsMenu = true) => { - if(openMoreOptionsMenu){ + if (openMoreOptionsMenu){ await openMoreOptionsMenu(); } const actionElement = await actionSelector(); @@ -101,7 +101,7 @@ const performMenuAction = async (actionSelector, openMoreOptionsMenu = true) => }; const accessEditOption = async (openMoreOptionsMenu = true) => { - await performMenuAction(kebabMenuSelectors.edit, openMoreOptionsMenu = true); + await performMenuAction(kebabMenuSelectors.edit, openMoreOptionsMenu); }; const accessDeleteOption = async () => {