Skip to content

Commit dd49fc9

Browse files
committed
test: update cypress tests
1 parent dc2bd49 commit dd49fc9

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/eui/src/components/modal/modal.spec.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const Modal = ({
5252
title: 'Do this thing',
5353
onClose: closeModal,
5454
children: null,
55-
focusTrapProps,
55+
'aria-labelledby': 'modalTitle',
5656
};
5757

5858
return (
@@ -71,7 +71,9 @@ const Modal = ({
7171
{isModalVisible && (
7272
<EuiModal {...modalProps}>
7373
<EuiModalHeader>
74-
<EuiModalHeaderTitle>Title of modal</EuiModalHeaderTitle>
74+
<EuiModalHeaderTitle id="modalTitle">
75+
Title of modal
76+
</EuiModalHeaderTitle>
7577
</EuiModalHeader>
7678

7779
<EuiModalBody>
@@ -152,7 +154,6 @@ describe('EuiModal', () => {
152154
cy.realPress('Enter');
153155
cy.focused().contains('Title of modal');
154156
cy.realPress('Tab');
155-
cy.realPress('Tab');
156157
cy.focused().contains('Close');
157158
cy.realPress('Escape');
158159
cy.focused().contains('Show confirm modal');
@@ -186,7 +187,6 @@ describe('EuiModal', () => {
186187
cy.realPress('Enter');
187188
cy.focused().contains('Title of modal');
188189
cy.realPress('Tab');
189-
cy.realPress('Tab');
190190
cy.focused().contains('Show Popover');
191191
cy.realPress('Enter');
192192
cy.focused().contains('Popover content');

packages/eui/src/components/tool_tip/tool_tip.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ describe('EuiToolTip', () => {
152152

153153
cy.get('[data-test-subj="modal"]').focus();
154154

155-
cy.repeatRealPress('Tab', 2);
155+
cy.realPress('Tab');
156156
cy.get('[data-test-subj="tool_tip"]').should('exist');
157157

158158
cy.realPress('Escape');

0 commit comments

Comments
 (0)