Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v9: Fixing flaky cypress test "Macro in Grid" #11485

Merged
merged 9 commits into from
Oct 26, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
<p ng-bind="a11yInfo" role="alert"></p>
<ul class="umb-card-grid -three-in-row">
<li ng-repeat="availableItem in macros | orderBy:'name' | filter:model.searchTerm">
<button class="btn-reset umb-card-grid-item" title="{{availableItem.name}}" ng-click="selectMacro(availableItem)">
<button class="btn-reset umb-card-grid-item" title="{{availableItem.name}}" ng-click="selectMacro(availableItem)">
<span>
<umb-icon icon="icon-settings-alt"></umb-icon>
{{availableItem.name}}
</span>
</button>
</button>
</li>
</ul>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,8 @@ context('Content', () => {
// Click macro
cy.get(':nth-child(4) > .umb-card-grid-item > :nth-child(1)').click();
// Select the macro
cy.get('.umb-card-grid-item').contains(macroName).click();
cy.get(`.umb-card-grid-item[title='${macroName}']`).click('bottom');


// Save and publish
cy.umbracoButtonByLabelKey('buttons_saveAndPublish').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ import {
//Check if tab is there, else if it wasnt created, this test would always pass
cy.get('[title="aTab 1"]').should('be.visible');
//Delete a tab
cy.get('.btn-reset > [icon="icon-trash"]').click();
cy.get('.btn-reset > [icon="icon-trash"]').first().click();
cy.get('.umb-button > .btn').last().click();
cy.umbracoButtonByLabelKey('buttons_save').click();
//Assert
Expand Down