diff --git a/src/main/archetype/ui.tests/test-module/lib/wdio.commands.js b/src/main/archetype/ui.tests/test-module/lib/wdio.commands.js index b256e1253..538598a9f 100644 --- a/src/main/archetype/ui.tests/test-module/lib/wdio.commands.js +++ b/src/main/archetype/ui.tests/test-module/lib/wdio.commands.js @@ -115,10 +115,16 @@ browser.addCommand('AEMSitesSetPageTitle', function(parentPath, name, title) { // Navigate to page parent path browser.url(path.posix.join(AEM_SITES_PATH, parentPath)); +#if ( $aemVersion != "cloud" ) + const checkboxSelector = `[data-foundation-collection-item-id="${path.posix.join(parentPath, name)}"] td:first-child img`; +#else + const checkboxSelector = `[data-foundation-collection-item-id="${path.posix.join(parentPath, name)}"] [type="checkbox"]`; +#end + // Select sample page in the list - $(`[data-foundation-collection-item-id="${path.posix.join(parentPath, name)}"] [type="checkbox"]`).waitForClickable(); + $(checkboxSelector).waitForClickable(); browser.pause(1000); // Avoid action bar not appearing after clicking checkbox - $(`[data-foundation-collection-item-id="${path.posix.join(parentPath, name)}"] [type="checkbox"]`).click(); + $(checkboxSelector).click(); // Access page properties form $('[data-foundation-collection-action*="properties"]').click(); // Store original title @@ -128,7 +134,7 @@ browser.addCommand('AEMSitesSetPageTitle', function(parentPath, name, title) { // Submit $('[type="submit"]').click(); // Wait until we get redirected to the Sites console - $(`[data-foundation-collection-item-id="${path.posix.join(parentPath, name)}"] [type="checkbox"]`).waitForExist(); + $(checkboxSelector).waitForExist(); return originalTitle; }); diff --git a/src/main/archetype/ui.tests/test-module/specs/aem/basic.js b/src/main/archetype/ui.tests/test-module/specs/aem/basic.js index ad1a400e8..e8bfc7506 100644 --- a/src/main/archetype/ui.tests/test-module/specs/aem/basic.js +++ b/src/main/archetype/ui.tests/test-module/specs/aem/basic.js @@ -29,7 +29,11 @@ describe('AEM Basic', () => { $('[data-foundation-toggleable-control-src$="solutionswitcher.html"]').click(); +#if ( $aemVersion != "cloud" ) $('coral-shell-solutionswitcher').waitForDisplayed(); +#else + $('coral-shell-menu[aria-label$="solutions"]').waitForDisplayed(); +#end }); });