Skip to content

Commit

Permalink
Moved reference in test from aria-id to data-name in order to introdu…
Browse files Browse the repository at this point in the history
…ce a standard

Improved testing of the confirmation dialog
  • Loading branch information
rob-baillie-ortoo committed Dec 13, 2021
1 parent 62ea46a commit 18d97f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('c-modal', () => {
return Promise.resolve()
.then( () => {
const clickEvent = new CustomEvent( 'click', {} );
return element.shadowRoot.querySelector( 'button[aria-id="cancel-cross"]' ).dispatchEvent( clickEvent );
return element.shadowRoot.querySelector( 'button[data-name="cancel-cross"]' ).dispatchEvent( clickEvent );
})
.then( () => {
expect( cancelHandler ).toHaveBeenCalled();
Expand Down
2 changes: 1 addition & 1 deletion framework/default/ortoo-core/default/lwc/modal/modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
title={labels.close}
onclick={handleCancel}
aria-id="cancel-cross"
data-name="cancel-cross"
>
<lightning-icon
icon-name="utility:close"
Expand Down

0 comments on commit 18d97f8

Please sign in to comment.