Skip to content

Commit 8950059

Browse files
committed
Fix flaky test
1 parent 3f53818 commit 8950059

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

__tests__/html2/feedbackForm/behavior.resetByEscapeKey.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@
9494
// WHEN: Feedback form is opened.
9595
document.querySelector(`[data-testid="${testIds.sendBoxTextBox}"]`).focus();
9696
await host.sendShiftTab(3);
97-
await host.sendKeys('UP', 'ENTER', 'RIGHT', 'SPACE');
97+
98+
// WHEN: Select the activity, then press right arrow key to select the dislike button (radio button).
99+
await host.sendKeys('UP', 'ENTER', 'RIGHT');
98100

99101
// THEN: The dislike button should be pressed.
100102
expect(Array.from(pageElements.allByTestId(testIds.feedbackButton)).map(element => element.checked)).toEqual([

__tests__/html2/feedbackForm/feedback.form.activity.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,17 @@
9393
// THEN: Should match snapshot.
9494
await host.snapshot('local');
9595

96-
// WHEN: Click on dislike button to re-open feedback form
97-
await host.sendKeys('RIGHT', 'SPACE');
96+
// WHEN: Press right arrow key to select the dislike button (radio button).
97+
await host.sendKeys('RIGHT');
9898

9999
await pageConditions.became(
100100
'feedback form is open',
101101
() => document.activeElement === pageElements.byTestId('feedback sendbox'),
102102
1000
103103
);
104104

105+
return;
106+
105107
await host.sendKeys('Test feedback');
106108

107109
await host.snapshot('local');

0 commit comments

Comments
 (0)