Skip to content

Commit 34be464

Browse files
ZeegaanNikolaj Geisle
andauthored
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]>
1 parent a7ff1e2 commit 34be464

File tree

3 files changed

+5
-4
lines changed
  • src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker
  • tests/Umbraco.Tests.AcceptanceTest/cypress/integration

3 files changed

+5
-4
lines changed

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

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,8 @@ context('Content', () => {
759759
// Click macro
760760
cy.get(':nth-child(4) > .umb-card-grid-item > :nth-child(1)').click();
761761
// Select the macro
762-
cy.get('.umb-card-grid-item').contains(macroName).click();
762+
cy.get(`.umb-card-grid-item[title='${macroName}']`).click('bottom');
763+
763764

764765
// Save and publish
765766
cy.umbracoButtonByLabelKey('buttons_saveAndPublish').click();

tests/Umbraco.Tests.AcceptanceTest/cypress/integration/Tabs/tabs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ import {
9393
//Check if tab is there, else if it wasnt created, this test would always pass
9494
cy.get('[title="aTab 1"]').should('be.visible');
9595
//Delete a tab
96-
cy.get('.btn-reset > [icon="icon-trash"]').click();
96+
cy.get('.btn-reset > [icon="icon-trash"]').first().click();
9797
cy.get('.umb-button > .btn').last().click();
9898
cy.umbracoButtonByLabelKey('buttons_save').click();
9999
//Assert

0 commit comments

Comments
 (0)