Skip to content

Commit

Permalink
Added conditional check for mmi build and wait
Browse files Browse the repository at this point in the history
  • Loading branch information
hjetpoluru committed Jul 17, 2024
1 parent b31c31e commit b580504
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/e2e/tests/settings/show-hex-data.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const FixtureBuilder = require('../../fixture-builder');

const selectors = {
accountOptionsMenu: '[data-testid="account-options-menu-button"]',
settingsDiv: { text: 'Settings', tag: 'div' },
settingsDiv: '[data-testid="global-menu-settings"]',
portfolioMenuOption: '[data-testid="global-menu-mmi-portfolio"]',
advancedDiv: { text: 'Advanced', tag: 'div' },
hexDataToggle: '[data-testid="advanced-setting-hex-data"] .toggle-button',
appHeaderLogo: '[data-testid="app-header-logo"]',
Expand All @@ -31,8 +32,13 @@ const inputData = {
// Function to click elements in sequence
async function clickElementsInSequence(driver, clickSelectors) {
for (const selector of clickSelectors) {
await driver.waitForSelector(selector);
await driver.clickElement(selector);
if (process.env.MMI && selector === selectors.settingsDiv) {
await driver.waitForSelector(selectors.portfolioMenuOption);
await driver.clickElement(selector);
} else {
await driver.waitForSelector(selector);
await driver.clickElement(selector);
}
}
}

Expand Down

0 comments on commit b580504

Please sign in to comment.