Skip to content

Commit a3797aa

Browse files
Zeegaannul800sebastiaan
authored andcommitted
v9: Fixing flaky cypress test "Macro in Grid" (#11485)
* fixed flaky macro test and updated cypress version * fixed flaky macro test and updated cypress version * Update package.json * Fixed failing tabs test * Amend magic numbers with actual wait * Update tests/Umbraco.Tests.AcceptanceTest/cypress/integration/Content/content.ts * Updated UI to click on button instead of icon * Make macro test click bottom to ensure we're not clicking on icon Co-authored-by: Nikolaj Geisle <[email protected]> (cherry picked from commit 34be464) # Conflicts: # tests/Umbraco.Tests.AcceptanceTest/cypress/integration/Tabs/tabs.ts
1 parent 0bd82d3 commit a3797aa

File tree

3 files changed

+556
-3
lines changed
  • src
    • Umbraco.Tests.AcceptanceTest/cypress/integration/Content
    • Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker
  • tests/Umbraco.Tests.AcceptanceTest/cypress/integration/Tabs

3 files changed

+556
-3
lines changed

src/Umbraco.Tests.AcceptanceTest/cypress/integration/Content/content.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,8 @@ context('Content', () => {
766766
// Click macro
767767
cy.get(':nth-child(4) > .umb-card-grid-item > :nth-child(1)').click();
768768
// Select the macro
769-
cy.get('.umb-card-grid-item').contains(macroName).click();
769+
cy.get(`.umb-card-grid-item[title='${macroName}']`).click('bottom');
770+
770771

771772
// Save and publish
772773
cy.umbracoButtonByLabelKey('buttons_saveAndPublish').click();

src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
<p ng-bind="a11yInfo" role="alert"></p>
2929
<ul class="umb-card-grid -three-in-row">
3030
<li ng-repeat="availableItem in macros | orderBy:'name' | filter:model.searchTerm">
31-
<button class="btn-reset umb-card-grid-item" title="{{availableItem.name}}" ng-click="selectMacro(availableItem)">
31+
<button class="btn-reset umb-card-grid-item" title="{{availableItem.name}}" ng-click="selectMacro(availableItem)">
3232
<span>
3333
<umb-icon icon="icon-settings-alt"></umb-icon>
3434
{{availableItem.name}}
3535
</span>
36-
</button>
36+
</button>
3737
</li>
3838
</ul>
3939

0 commit comments

Comments
 (0)