Skip to content

Commit 4bddb50

Browse files
committed
Fix test for moving attachment bar above send box
1 parent c4efc05 commit 4bddb50

24 files changed

+8
-123
lines changed
Loading
Loading
Loading
62 Bytes
Loading

__tests__/html2/sendBox/previewBeforeSend/comprehensive.skip.html

Lines changed: 0 additions & 115 deletions
This file was deleted.

__tests__/html2/sendBox/previewBeforeSend/deleteButton.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242

4343
await waitFor(() => expect(queryAllByTestId(document, testIds.sendBoxAttachmentBarItem)).toHaveLength(1));
4444

45-
// WHEN: Press TAB key twice to move the focus to the delete button.
46-
await host.sendKeys('TAB', 'TAB');
45+
// WHEN: Press SHIFT-TAB key twice to move the focus to the delete button.
46+
await host.sendShiftTab(2);
4747

4848
// THEN: Should focus on the attachment delete button.
4949
expect(document.activeElement.getAttribute('data-testid')).toBe(testIds.sendBoxAttachmentBarItemDeleteButton);

__tests__/html2/sendBox/previewBeforeSend/deleteButtonInTextMode.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
);
4949
}
5050

51-
// WHEN: Press TAB key twice to move the focus to the delete button.
52-
await host.sendKeys('TAB', 'TAB');
51+
// WHEN: Press SHIFT-TAB key 5 times to move the focus to the delete button of the first attachment.
52+
await host.sendShiftTab(5);
5353

54-
// THEN: Should focus on the attachment delete button of the 4th attachment.
55-
expect(document.activeElement.getAttribute('data-testid')).toBe(testIds.sendBoxAttachmentBarItemDeleteButton);
54+
// THEN: Should focus on the attachment delete button of the first attachment.
55+
expect(document.activeElement).toBe(pageElements.allByTestId(testIds.sendBoxAttachmentBarItemDeleteButton)[0]);
5656

5757
// WHEN: Press SPACEBAR key.
5858
await host.sendKeys(' ');
72 Bytes
Loading

0 commit comments

Comments
 (0)