diff --git a/CHANGELOG.md b/CHANGELOG.md index 06d825402c..2a39f3f111 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,6 +87,7 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/ - Added sliding dots typing indicator in Fluent theme, in PR [#5447](https://github.com/microsoft/BotFramework-WebChat/pull/5447) and PR [#5448](https://github.com/microsoft/BotFramework-WebChat/pull/5448), by [@compulim](https://github.com/compulim) - (Experimental) Add an ability to pass `completion` prop into Fluent send box and expose the component, in PR [#5466](https://github.com/microsoft/BotFramework-WebChat/pull/5466), by [@OEvgeny](https://github.com/OEvgeny) - Added feedback form for like/dislike button when `feedbackActionsPlacement` is `"activity-actions"`, in PR [#5460](https://github.com/microsoft/BotFramework-WebChat/pull/5460), PR [#5469](https://github.com/microsoft/BotFramework-WebChat/pull/5469), and PR [5470](https://github.com/microsoft/BotFramework-WebChat/pull/5470) by [@lexi-taylor](https://github.com/lexi-taylor) and [@OEvgeny](https://github.com/OEvgeny) + - ESCAPE key should reset the feedback form, in PR [#5480](https://github.com/microsoft/BotFramework-WebChat/pull/5480), by [@compulim](https://github.com/compulim) - Added multi-dimensional grouping, `styleOptions.groupActivitiesBy`, and `useGroupActivitiesByName` hook, in PR [#5471](https://github.com/microsoft/BotFramework-WebChat/pull/5471), by [@compulim](https://github.com/compulim) - Existing behavior will be kept and activities will be grouped by `sender` followed by `status` - `useGroupActivitiesByName` is favored over the existing `useGroupActivities` hook for performance reason @@ -221,6 +222,8 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/ - Fixed [#5472](https://github.com/microsoft/BotFramework-WebChat/issues/5472), ensure proper inheritance from the outside of Web Chat for visibility CSS property when hidden, in PR [#5473](https://github.com/microsoft/BotFramework-WebChat/pull/5473), by [@OEvgeny](https://github.com/OEvgeny) - Fixed [#5474](https://github.com/microsoft/BotFramework-WebChat/issues/5474). Disable AMD glue code in bundle, in PR [#5478](https://github.com/microsoft/BotFramework-WebChat/pull/5478), by [@compulim](https://github.com/compulim) - Downstreamers who use our CommonJS and ES Modules output with esbuild will need to disable AMD themselves to prevent conflict with RequireJS +- Fixed [#5479](https://github.com/microsoft/BotFramework-WebChat/issues/5479). Fixed feedback form buttons should not squash other buttons, in PR [#5480](https://github.com/microsoft/BotFramework-WebChat/pull/5480), by [@compulim](https://github.com/compulim) + - Migrated to radio button for like/dislike where form submission is required # Removed diff --git a/__tests__/__image_snapshots__/html/feedback-activity-status-basic-js-vote-button-should-display-1-snap.png b/__tests__/__image_snapshots__/html/feedback-activity-status-basic-js-vote-button-should-display-1-snap.png deleted file mode 100644 index 84d96156be..0000000000 Binary files a/__tests__/__image_snapshots__/html/feedback-activity-status-basic-js-vote-button-should-display-1-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/feedback-activity-status-basic-js-vote-button-should-display-2-snap.png b/__tests__/__image_snapshots__/html/feedback-activity-status-basic-js-vote-button-should-display-2-snap.png deleted file mode 100644 index 774267ef27..0000000000 Binary files a/__tests__/__image_snapshots__/html/feedback-activity-status-basic-js-vote-button-should-display-2-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/feedback-activity-status-basic-js-vote-button-should-display-3-snap.png b/__tests__/__image_snapshots__/html/feedback-activity-status-basic-js-vote-button-should-display-3-snap.png deleted file mode 100644 index c2fad81446..0000000000 Binary files a/__tests__/__image_snapshots__/html/feedback-activity-status-basic-js-vote-button-should-display-3-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/feedback-activity-status-basic-js-vote-button-should-display-4-snap.png b/__tests__/__image_snapshots__/html/feedback-activity-status-basic-js-vote-button-should-display-4-snap.png deleted file mode 100644 index 235ed230ef..0000000000 Binary files a/__tests__/__image_snapshots__/html/feedback-activity-status-basic-js-vote-button-should-display-4-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/feedback-activity-status-click-js-vote-button-should-send-event-on-click-1-snap.png b/__tests__/__image_snapshots__/html/feedback-activity-status-click-js-vote-button-should-send-event-on-click-1-snap.png deleted file mode 100644 index 84d96156be..0000000000 Binary files a/__tests__/__image_snapshots__/html/feedback-activity-status-click-js-vote-button-should-send-event-on-click-1-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/feedback-activity-status-click-js-vote-button-should-send-event-on-click-2-snap.png b/__tests__/__image_snapshots__/html/feedback-activity-status-click-js-vote-button-should-send-event-on-click-2-snap.png deleted file mode 100644 index 743997bb35..0000000000 Binary files a/__tests__/__image_snapshots__/html/feedback-activity-status-click-js-vote-button-should-send-event-on-click-2-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/feedback-activity-status-click-js-vote-button-should-send-event-on-click-3-snap.png b/__tests__/__image_snapshots__/html/feedback-activity-status-click-js-vote-button-should-send-event-on-click-3-snap.png deleted file mode 100644 index 05e3c87eb9..0000000000 Binary files a/__tests__/__image_snapshots__/html/feedback-activity-status-click-js-vote-button-should-send-event-on-click-3-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/feedback-activity-status-click-js-vote-button-should-send-event-on-click-4-snap.png b/__tests__/__image_snapshots__/html/feedback-activity-status-click-js-vote-button-should-send-event-on-click-4-snap.png deleted file mode 100644 index 05e3c87eb9..0000000000 Binary files a/__tests__/__image_snapshots__/html/feedback-activity-status-click-js-vote-button-should-send-event-on-click-4-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-1-snap.png b/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-1-snap.png index 3081e33b5d..ff056d2158 100644 Binary files a/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-1-snap.png and b/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-2-snap.png b/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-2-snap.png index e2c6064fe6..2335e78b6b 100644 Binary files a/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-2-snap.png and b/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-3-snap.png b/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-3-snap.png index 3d8f42c781..1d849a6c39 100644 Binary files a/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-3-snap.png and b/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-4-snap.png b/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-4-snap.png index bbbe30ff3e..94a1d50faa 100644 Binary files a/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-4-snap.png and b/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-4-snap.png differ diff --git a/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-5-snap.png b/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-5-snap.png index aac31bb094..8c63de3a4e 100644 Binary files a/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-5-snap.png and b/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-5-snap.png differ diff --git a/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-6-snap.png b/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-6-snap.png index a6b7dd4f1b..74545b9367 100644 Binary files a/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-6-snap.png and b/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-6-snap.png differ diff --git a/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-7-snap.png b/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-7-snap.png index dd048ebebd..c3cb51280c 100644 Binary files a/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-7-snap.png and b/__tests__/__image_snapshots__/html/side-by-side-wide-dark-js-fluent-theme-applied-dark-theme-applied-side-by-side-left-transcript-right-feedback-7-snap.png differ diff --git a/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-1-snap.png b/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-1-snap.png index a2bbb5c017..5f282f1dc4 100644 Binary files a/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-1-snap.png and b/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-2-snap.png b/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-2-snap.png index b43f646781..a1f7bc10b7 100644 Binary files a/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-2-snap.png and b/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-3-snap.png b/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-3-snap.png index 27538955d3..4408a2fd31 100644 Binary files a/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-3-snap.png and b/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-4-snap.png b/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-4-snap.png index 0148a62862..0ad874050e 100644 Binary files a/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-4-snap.png and b/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-4-snap.png differ diff --git a/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-5-snap.png b/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-5-snap.png index fc0429e73e..c21de29aa0 100644 Binary files a/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-5-snap.png and b/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-5-snap.png differ diff --git a/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-6-snap.png b/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-6-snap.png index b59619851e..41a13f1f93 100644 Binary files a/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-6-snap.png and b/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-6-snap.png differ diff --git a/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-7-snap.png b/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-7-snap.png index 04ff78df03..d487c27acd 100644 Binary files a/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-7-snap.png and b/__tests__/__image_snapshots__/html/side-by-side-wide-js-fluent-theme-applied-side-by-side-left-transcript-right-feedback-7-snap.png differ diff --git a/__tests__/html/feedbackActivityStatus.basic.js b/__tests__/html/feedbackActivityStatus.basic.js deleted file mode 100644 index 2d0c215fd1..0000000000 --- a/__tests__/html/feedbackActivityStatus.basic.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('vote button', () => { - test('should display', () => runHTML('feedbackActivityStatus.basic.html')); -}); diff --git a/__tests__/html/feedbackActivityStatus.click.js b/__tests__/html/feedbackActivityStatus.click.js deleted file mode 100644 index 532d4959f7..0000000000 --- a/__tests__/html/feedbackActivityStatus.click.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('vote button', () => { - test('should send event on click', () => runHTML('feedbackActivityStatus.click.html')); -}); diff --git a/__tests__/html/feedbackActivityStatus.single.js b/__tests__/html/feedbackActivityStatus.single.js deleted file mode 100644 index dd55168a1c..0000000000 --- a/__tests__/html/feedbackActivityStatus.single.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('vote button', () => { - test('should display a single button', () => runHTML('feedbackActivityStatus.single.html')); -}); diff --git a/__tests__/html/fluentTheme/side-by-side.wide.dark.html b/__tests__/html/fluentTheme/side-by-side.wide.dark.html index 4ab51fbd35..ec5156f86e 100644 --- a/__tests__/html/fluentTheme/side-by-side.wide.dark.html +++ b/__tests__/html/fluentTheme/side-by-side.wide.dark.html @@ -834,14 +834,15 @@ await host.snapshot(); await host.sendKeys('TAB'); await host.snapshot(); - await host.sendKeys('ENTER'); + await host.sendKeys('SPACE'); await host.snapshot(); await host.sendKeys('TAB'); await host.snapshot(); - await host.sendKeys('ENTER'); + await host.sendKeys('SPACE'); await host.snapshot(); - await host.sendKeys('ESCAPE'); - await host.sendKeys('ESCAPE'); + await host.sendKeys('SPACE'); // Clear feedback but still focused on feedback button + await host.sendKeys('ESCAPE'); // Focus on activity + await host.sendKeys('ESCAPE'); // Clear activity selection await host.snapshot(); } })); diff --git a/__tests__/html/fluentTheme/side-by-side.wide.html b/__tests__/html/fluentTheme/side-by-side.wide.html index 423e5fbd46..faabeee7f1 100644 --- a/__tests__/html/fluentTheme/side-by-side.wide.html +++ b/__tests__/html/fluentTheme/side-by-side.wide.html @@ -817,14 +817,15 @@ await host.snapshot(); await host.sendKeys('TAB'); await host.snapshot(); - await host.sendKeys('ENTER'); + await host.sendKeys('SPACE'); await host.snapshot(); await host.sendKeys('TAB'); await host.snapshot(); - await host.sendKeys('ENTER'); + await host.sendKeys('SPACE'); await host.snapshot(); - await host.sendKeys('ESCAPE'); - await host.sendKeys('ESCAPE'); + await host.sendKeys('SPACE'); // Clear feedback but still focused on feedback button + await host.sendKeys('ESCAPE'); // Focus on activity + await host.sendKeys('ESCAPE'); // Clear activity selection await host.snapshot(); } })); diff --git a/__tests__/html2/activity/feedback.activity.dismiss.html.snap-1.png b/__tests__/html2/activity/feedback.activity.dismiss.html.snap-1.png deleted file mode 100644 index 5f6585c6cb..0000000000 Binary files a/__tests__/html2/activity/feedback.activity.dismiss.html.snap-1.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.activity.dismiss.html.snap-2.png b/__tests__/html2/activity/feedback.activity.dismiss.html.snap-2.png deleted file mode 100644 index 9bd1a806fe..0000000000 Binary files a/__tests__/html2/activity/feedback.activity.dismiss.html.snap-2.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.activity.dismiss.html.snap-3.png b/__tests__/html2/activity/feedback.activity.dismiss.html.snap-3.png deleted file mode 100644 index bff2338747..0000000000 Binary files a/__tests__/html2/activity/feedback.activity.dismiss.html.snap-3.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.activity.dismiss.html.snap-4.png b/__tests__/html2/activity/feedback.activity.dismiss.html.snap-4.png deleted file mode 100644 index fd6fbb6689..0000000000 Binary files a/__tests__/html2/activity/feedback.activity.dismiss.html.snap-4.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.activity.html.snap-1.png b/__tests__/html2/activity/feedback.activity.html.snap-1.png deleted file mode 100644 index 67c845d8e8..0000000000 Binary files a/__tests__/html2/activity/feedback.activity.html.snap-1.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.activity.html.snap-2.png b/__tests__/html2/activity/feedback.activity.html.snap-2.png deleted file mode 100644 index 59396b69a4..0000000000 Binary files a/__tests__/html2/activity/feedback.activity.html.snap-2.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.activity.html.snap-3.png b/__tests__/html2/activity/feedback.activity.html.snap-3.png deleted file mode 100644 index ae9653483b..0000000000 Binary files a/__tests__/html2/activity/feedback.activity.html.snap-3.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.activity.html.snap-4.png b/__tests__/html2/activity/feedback.activity.html.snap-4.png deleted file mode 100644 index fb698d702d..0000000000 Binary files a/__tests__/html2/activity/feedback.activity.html.snap-4.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.activity.html.snap-5.png b/__tests__/html2/activity/feedback.activity.html.snap-5.png deleted file mode 100644 index afb993d76b..0000000000 Binary files a/__tests__/html2/activity/feedback.activity.html.snap-5.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.form.activity.html.snap-1.png b/__tests__/html2/activity/feedback.form.activity.html.snap-1.png deleted file mode 100644 index 708ad549a1..0000000000 Binary files a/__tests__/html2/activity/feedback.form.activity.html.snap-1.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.form.activity.html.snap-2.png b/__tests__/html2/activity/feedback.form.activity.html.snap-2.png deleted file mode 100644 index a20059bfe8..0000000000 Binary files a/__tests__/html2/activity/feedback.form.activity.html.snap-2.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.status.html.snap-1.png b/__tests__/html2/activity/feedback.status.html.snap-1.png deleted file mode 100644 index 2807fc5937..0000000000 Binary files a/__tests__/html2/activity/feedback.status.html.snap-1.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.status.html.snap-2.png b/__tests__/html2/activity/feedback.status.html.snap-2.png deleted file mode 100644 index 64ba12a7b0..0000000000 Binary files a/__tests__/html2/activity/feedback.status.html.snap-2.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.status.html.snap-3.png b/__tests__/html2/activity/feedback.status.html.snap-3.png deleted file mode 100644 index e67c6a0b45..0000000000 Binary files a/__tests__/html2/activity/feedback.status.html.snap-3.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.status.html.snap-4.png b/__tests__/html2/activity/feedback.status.html.snap-4.png deleted file mode 100644 index d527b79069..0000000000 Binary files a/__tests__/html2/activity/feedback.status.html.snap-4.png and /dev/null differ diff --git a/__tests__/html2/activity/feedback.status.html.snap-5.png b/__tests__/html2/activity/feedback.status.html.snap-5.png deleted file mode 100644 index 1a4cb33859..0000000000 Binary files a/__tests__/html2/activity/feedback.status.html.snap-5.png and /dev/null differ diff --git a/__tests__/html2/feedbackForm/behavior.changeMind.keyboard.html b/__tests__/html2/feedbackForm/behavior.changeMind.keyboard.html new file mode 100644 index 0000000000..7b3bdf775f --- /dev/null +++ b/__tests__/html2/feedbackForm/behavior.changeMind.keyboard.html @@ -0,0 +1,130 @@ + + +
+ + + + + + + + + + + + diff --git a/__tests__/html2/feedbackForm/behavior.changeMind.mouse.html b/__tests__/html2/feedbackForm/behavior.changeMind.mouse.html new file mode 100644 index 0000000000..eacc67559d --- /dev/null +++ b/__tests__/html2/feedbackForm/behavior.changeMind.mouse.html @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + diff --git a/__tests__/html2/feedbackForm/behavior.noopByEnterKey.html b/__tests__/html2/feedbackForm/behavior.noopByEnterKey.html new file mode 100644 index 0000000000..33dfb1bc55 --- /dev/null +++ b/__tests__/html2/feedbackForm/behavior.noopByEnterKey.html @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + diff --git a/__tests__/html2/feedbackForm/behavior.resetByEscapeKey.html b/__tests__/html2/feedbackForm/behavior.resetByEscapeKey.html new file mode 100644 index 0000000000..5853662308 --- /dev/null +++ b/__tests__/html2/feedbackForm/behavior.resetByEscapeKey.html @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + diff --git a/__tests__/html2/feedbackForm/behavior.resetByEscapeKey.html.snap-1.png b/__tests__/html2/feedbackForm/behavior.resetByEscapeKey.html.snap-1.png new file mode 100644 index 0000000000..5b8b75b2ae Binary files /dev/null and b/__tests__/html2/feedbackForm/behavior.resetByEscapeKey.html.snap-1.png differ diff --git a/__tests__/html2/feedbackForm/behavior.resetByEscapeKey.html.snap-2.png b/__tests__/html2/feedbackForm/behavior.resetByEscapeKey.html.snap-2.png new file mode 100644 index 0000000000..747cea12aa Binary files /dev/null and b/__tests__/html2/feedbackForm/behavior.resetByEscapeKey.html.snap-2.png differ diff --git a/__tests__/html2/feedbackForm/behavior.selectByClick.html b/__tests__/html2/feedbackForm/behavior.selectByClick.html new file mode 100644 index 0000000000..d92773b1b2 --- /dev/null +++ b/__tests__/html2/feedbackForm/behavior.selectByClick.html @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + diff --git a/__tests__/html2/feedbackForm/behavior.selectByClick.html.snap-1.png b/__tests__/html2/feedbackForm/behavior.selectByClick.html.snap-1.png new file mode 100644 index 0000000000..2c9ff4cbb2 Binary files /dev/null and b/__tests__/html2/feedbackForm/behavior.selectByClick.html.snap-1.png differ diff --git a/__tests__/html2/activity/feedback.activity.dismiss.html b/__tests__/html2/feedbackForm/feedback.activity.dismiss.html similarity index 99% rename from __tests__/html2/activity/feedback.activity.dismiss.html rename to __tests__/html2/feedbackForm/feedback.activity.dismiss.html index 92c3f6258c..9297963050 100644 --- a/__tests__/html2/activity/feedback.activity.dismiss.html +++ b/__tests__/html2/feedbackForm/feedback.activity.dismiss.html @@ -96,7 +96,7 @@ await new Promise(resolve => setTimeout(resolve, 400)); await host.snapshot('local'); - await host.sendKeys('ENTER'); + await host.sendKeys('SPACE'); await host.snapshot('local'); await directLine.emulateIncomingActivity({ diff --git a/__tests__/html2/feedbackForm/feedback.activity.dismiss.html.snap-1.png b/__tests__/html2/feedbackForm/feedback.activity.dismiss.html.snap-1.png new file mode 100644 index 0000000000..b34fa9a883 Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.activity.dismiss.html.snap-1.png differ diff --git a/__tests__/html2/feedbackForm/feedback.activity.dismiss.html.snap-2.png b/__tests__/html2/feedbackForm/feedback.activity.dismiss.html.snap-2.png new file mode 100644 index 0000000000..8f67c82737 Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.activity.dismiss.html.snap-2.png differ diff --git a/__tests__/html2/feedbackForm/feedback.activity.dismiss.html.snap-3.png b/__tests__/html2/feedbackForm/feedback.activity.dismiss.html.snap-3.png new file mode 100644 index 0000000000..13b832b375 Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.activity.dismiss.html.snap-3.png differ diff --git a/__tests__/html2/feedbackForm/feedback.activity.dismiss.html.snap-4.png b/__tests__/html2/feedbackForm/feedback.activity.dismiss.html.snap-4.png new file mode 100644 index 0000000000..fe1ec58bcc Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.activity.dismiss.html.snap-4.png differ diff --git a/__tests__/html2/activity/feedback.form.activity.html b/__tests__/html2/feedbackForm/feedback.form.activity.html similarity index 65% rename from __tests__/html2/activity/feedback.form.activity.html rename to __tests__/html2/feedbackForm/feedback.form.activity.html index 5ee654daf9..7b721a27f4 100644 --- a/__tests__/html2/activity/feedback.form.activity.html +++ b/__tests__/html2/feedbackForm/feedback.form.activity.html @@ -2,39 +2,40 @@ - - - - + - - - diff --git a/__tests__/html2/feedbackForm/feedback.status.html.snap-1.png b/__tests__/html2/feedbackForm/feedback.status.html.snap-1.png new file mode 100644 index 0000000000..2967e776bb Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.status.html.snap-1.png differ diff --git a/__tests__/html2/feedbackForm/feedback.status.html.snap-2.png b/__tests__/html2/feedbackForm/feedback.status.html.snap-2.png new file mode 100644 index 0000000000..537f6f8fe9 Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.status.html.snap-2.png differ diff --git a/__tests__/html2/feedbackForm/feedback.status.html.snap-3.png b/__tests__/html2/feedbackForm/feedback.status.html.snap-3.png new file mode 100644 index 0000000000..618b02ebb9 Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.status.html.snap-3.png differ diff --git a/__tests__/html2/feedbackForm/feedback.status.html.snap-4.png b/__tests__/html2/feedbackForm/feedback.status.html.snap-4.png new file mode 100644 index 0000000000..df35ee30d4 Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.status.html.snap-4.png differ diff --git a/__tests__/html2/feedbackForm/feedback.status.html.snap-5.png b/__tests__/html2/feedbackForm/feedback.status.html.snap-5.png new file mode 100644 index 0000000000..1c2096f2d4 Binary files /dev/null and b/__tests__/html2/feedbackForm/feedback.status.html.snap-5.png differ diff --git a/__tests__/html2/feedbackForm/layout.html b/__tests__/html2/feedbackForm/layout.html new file mode 100644 index 0000000000..361ce2bb58 --- /dev/null +++ b/__tests__/html2/feedbackForm/layout.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + diff --git a/__tests__/html2/feedbackForm/layout.html.snap-1.png b/__tests__/html2/feedbackForm/layout.html.snap-1.png new file mode 100644 index 0000000000..d43d9686b8 Binary files /dev/null and b/__tests__/html2/feedbackForm/layout.html.snap-1.png differ diff --git a/__tests__/html2/feedbackForm/layout.html.snap-2.png b/__tests__/html2/feedbackForm/layout.html.snap-2.png new file mode 100644 index 0000000000..36ff95e9f6 Binary files /dev/null and b/__tests__/html2/feedbackForm/layout.html.snap-2.png differ diff --git a/__tests__/html2/feedbackForm/layout.userReview.html b/__tests__/html2/feedbackForm/layout.userReview.html new file mode 100644 index 0000000000..ef8bee212c --- /dev/null +++ b/__tests__/html2/feedbackForm/layout.userReview.html @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + diff --git a/__tests__/html2/feedbackForm/layout.userReview.html.snap-1.png b/__tests__/html2/feedbackForm/layout.userReview.html.snap-1.png new file mode 100644 index 0000000000..30825fa5a3 Binary files /dev/null and b/__tests__/html2/feedbackForm/layout.userReview.html.snap-1.png differ diff --git a/__tests__/html2/feedbackForm/layout.userReview.html.snap-2.png b/__tests__/html2/feedbackForm/layout.userReview.html.snap-2.png new file mode 100644 index 0000000000..3a39c1910d Binary files /dev/null and b/__tests__/html2/feedbackForm/layout.userReview.html.snap-2.png differ diff --git a/__tests__/html2/feedbackForm/layout.userReview.html.snap-3.png b/__tests__/html2/feedbackForm/layout.userReview.html.snap-3.png new file mode 100644 index 0000000000..5b6d2076c1 Binary files /dev/null and b/__tests__/html2/feedbackForm/layout.userReview.html.snap-3.png differ diff --git a/__tests__/html2/feedbackForm/layout.withCopyButton.html b/__tests__/html2/feedbackForm/layout.withCopyButton.html new file mode 100644 index 0000000000..015edd2007 --- /dev/null +++ b/__tests__/html2/feedbackForm/layout.withCopyButton.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + diff --git a/__tests__/html2/feedbackForm/layout.withCopyButton.html.snap-1.png b/__tests__/html2/feedbackForm/layout.withCopyButton.html.snap-1.png new file mode 100644 index 0000000000..6b80da26a1 Binary files /dev/null and b/__tests__/html2/feedbackForm/layout.withCopyButton.html.snap-1.png differ diff --git a/__tests__/html2/feedbackForm/layout.withCopyButton.html.snap-2.png b/__tests__/html2/feedbackForm/layout.withCopyButton.html.snap-2.png new file mode 100644 index 0000000000..89eea79cb6 Binary files /dev/null and b/__tests__/html2/feedbackForm/layout.withCopyButton.html.snap-2.png differ diff --git a/__tests__/html2/feedbackForm/layout.withFluent.html b/__tests__/html2/feedbackForm/layout.withFluent.html new file mode 100644 index 0000000000..a93af0c0aa --- /dev/null +++ b/__tests__/html2/feedbackForm/layout.withFluent.html @@ -0,0 +1,9 @@ + + + + + + + diff --git a/__tests__/html2/feedbackForm/layout.withFluent.html.snap-1.png b/__tests__/html2/feedbackForm/layout.withFluent.html.snap-1.png new file mode 100644 index 0000000000..fcab043f5a Binary files /dev/null and b/__tests__/html2/feedbackForm/layout.withFluent.html.snap-1.png differ diff --git a/__tests__/html2/feedbackForm/layout.withFluent.html.snap-2.png b/__tests__/html2/feedbackForm/layout.withFluent.html.snap-2.png new file mode 100644 index 0000000000..9f09a0ecd3 Binary files /dev/null and b/__tests__/html2/feedbackForm/layout.withFluent.html.snap-2.png differ diff --git a/__tests__/html2/feedbackStatus/behavior.escapeKey.html b/__tests__/html2/feedbackStatus/behavior.escapeKey.html new file mode 100644 index 0000000000..30dc6bb076 --- /dev/null +++ b/__tests__/html2/feedbackStatus/behavior.escapeKey.html @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + diff --git a/__tests__/html2/activity/feedback.activity.html b/__tests__/html2/feedbackStatus/feedback.activity.html similarity index 98% rename from __tests__/html2/activity/feedback.activity.html rename to __tests__/html2/feedbackStatus/feedback.activity.html index c98b5787b2..b13cdf6592 100644 --- a/__tests__/html2/activity/feedback.activity.html +++ b/__tests__/html2/feedbackStatus/feedback.activity.html @@ -135,11 +135,11 @@ await new Promise(resolve => setTimeout(resolve, 400)); await host.snapshot('local'); - await host.sendKeys('ENTER'); + await host.sendKeys('SPACE'); await host.snapshot('local'); await host.sendKeys('TAB'); await host.snapshot('local'); - await host.sendKeys('ENTER'); + await host.sendKeys('SPACE'); await host.snapshot('local'); }); diff --git a/__tests__/html2/feedbackStatus/feedback.activity.html.snap-1.png b/__tests__/html2/feedbackStatus/feedback.activity.html.snap-1.png new file mode 100644 index 0000000000..c7f04beeaf Binary files /dev/null and b/__tests__/html2/feedbackStatus/feedback.activity.html.snap-1.png differ diff --git a/__tests__/html2/feedbackStatus/feedback.activity.html.snap-2.png b/__tests__/html2/feedbackStatus/feedback.activity.html.snap-2.png new file mode 100644 index 0000000000..3c6ed87a0c Binary files /dev/null and b/__tests__/html2/feedbackStatus/feedback.activity.html.snap-2.png differ diff --git a/__tests__/html2/feedbackStatus/feedback.activity.html.snap-3.png b/__tests__/html2/feedbackStatus/feedback.activity.html.snap-3.png new file mode 100644 index 0000000000..2be69c27d6 Binary files /dev/null and b/__tests__/html2/feedbackStatus/feedback.activity.html.snap-3.png differ diff --git a/__tests__/html2/feedbackStatus/feedback.activity.html.snap-4.png b/__tests__/html2/feedbackStatus/feedback.activity.html.snap-4.png new file mode 100644 index 0000000000..1c0dfb8699 Binary files /dev/null and b/__tests__/html2/feedbackStatus/feedback.activity.html.snap-4.png differ diff --git a/__tests__/html2/feedbackStatus/feedback.activity.html.snap-5.png b/__tests__/html2/feedbackStatus/feedback.activity.html.snap-5.png new file mode 100644 index 0000000000..a64deef13b Binary files /dev/null and b/__tests__/html2/feedbackStatus/feedback.activity.html.snap-5.png differ diff --git a/__tests__/html/feedbackActivityStatus.basic.html b/__tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html similarity index 87% rename from __tests__/html/feedbackActivityStatus.basic.html rename to __tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html index cdc4736b67..2ff7af5d3c 100644 --- a/__tests__/html/feedbackActivityStatus.basic.html +++ b/__tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html @@ -1,4 +1,4 @@ - + @@ -9,6 +9,10 @@ diff --git a/__tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html.snap-1.png b/__tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html.snap-1.png new file mode 100644 index 0000000000..8c0a24ff13 Binary files /dev/null and b/__tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html.snap-1.png differ diff --git a/__tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html.snap-2.png b/__tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html.snap-2.png new file mode 100644 index 0000000000..b6c0fc9339 Binary files /dev/null and b/__tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html.snap-2.png differ diff --git a/__tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html.snap-3.png b/__tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html.snap-3.png new file mode 100644 index 0000000000..58f47243ce Binary files /dev/null and b/__tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html.snap-3.png differ diff --git a/__tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html.snap-4.png b/__tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html.snap-4.png new file mode 100644 index 0000000000..4c5447255c Binary files /dev/null and b/__tests__/html2/feedbackStatus/feedbackActivityStatus.basic.html.snap-4.png differ diff --git a/__tests__/html/feedbackActivityStatus.click.html b/__tests__/html2/feedbackStatus/feedbackActivityStatus.click.html similarity index 91% rename from __tests__/html/feedbackActivityStatus.click.html rename to __tests__/html2/feedbackStatus/feedbackActivityStatus.click.html index 36629172ef..f45b602055 100644 --- a/__tests__/html/feedbackActivityStatus.click.html +++ b/__tests__/html2/feedbackStatus/feedbackActivityStatus.click.html @@ -10,6 +10,10 @@ diff --git a/__tests__/__image_snapshots__/html/feedback-activity-status-single-js-vote-button-should-display-a-single-button-1-snap.png b/__tests__/html2/feedbackStatus/feedbackActivityStatus.single.html.snap-1.png similarity index 100% rename from __tests__/__image_snapshots__/html/feedback-activity-status-single-js-vote-button-should-display-a-single-button-1-snap.png rename to __tests__/html2/feedbackStatus/feedbackActivityStatus.single.html.snap-1.png diff --git a/__tests__/html2/feedbackStatus/layout.html b/__tests__/html2/feedbackStatus/layout.html new file mode 100644 index 0000000000..d809f45197 --- /dev/null +++ b/__tests__/html2/feedbackStatus/layout.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + diff --git a/__tests__/html2/feedbackStatus/layout.html.snap-1.png b/__tests__/html2/feedbackStatus/layout.html.snap-1.png new file mode 100644 index 0000000000..60333903da Binary files /dev/null and b/__tests__/html2/feedbackStatus/layout.html.snap-1.png differ diff --git a/__tests__/html2/fluentTheme/defaultFeedback.activity.dark.html b/__tests__/html2/fluentTheme/defaultFeedback.activity.dark.html index cc3b7f65f1..fa0fab6460 100644 --- a/__tests__/html2/fluentTheme/defaultFeedback.activity.dark.html +++ b/__tests__/html2/fluentTheme/defaultFeedback.activity.dark.html @@ -100,9 +100,10 @@ await host.sendShiftTab(2); await host.sendKeys('ENTER'); - // Click like button - await host.sendKeys('ENTER'); + // WHEN: The like button is being clicked. + await host.sendKeys('SPACE'); + // THEN: Should open the feedback form. await pageConditions.became( 'feedback form is open', () => document.activeElement === pageElements.byTestId('feedback sendbox'), diff --git a/__tests__/html2/fluentTheme/defaultFeedback.activity.dark.html.snap-1.png b/__tests__/html2/fluentTheme/defaultFeedback.activity.dark.html.snap-1.png index 45f09f805c..ee393cc716 100644 Binary files a/__tests__/html2/fluentTheme/defaultFeedback.activity.dark.html.snap-1.png and b/__tests__/html2/fluentTheme/defaultFeedback.activity.dark.html.snap-1.png differ diff --git a/__tests__/html2/fluentTheme/defaultFeedback.activity.html b/__tests__/html2/fluentTheme/defaultFeedback.activity.html index 70065e3e4b..2ac2f31daa 100644 --- a/__tests__/html2/fluentTheme/defaultFeedback.activity.html +++ b/__tests__/html2/fluentTheme/defaultFeedback.activity.html @@ -59,16 +59,15 @@ await host.sendShiftTab(2); await host.sendKeys('ENTER'); - await host.sendKeys('ENTER'); + await host.sendKeys('SPACE'); await host.snapshot('local'); // Dismiss like button - await host.sendShiftTab(2); - await host.sendKeys('ENTER'); + await host.sendKeys('ESCAPE'); // Click like button - await host.sendKeys('ENTER'); + await host.sendKeys('SPACE'); await pageConditions.became( 'feedback form is open', @@ -82,13 +81,8 @@ await host.snapshot('local'); - pageElements.byTestId('send box text area').focus(); - await host.sendShiftTab(2); - - await host.sendKeys('ENTER'); // Send dislike - await host.sendTab(1); - await host.sendKeys('ENTER'); + await host.sendKeys('RIGHT', 'SPACE'); await pageConditions.became( 'feedback form is open', @@ -129,4 +123,4 @@ - \ No newline at end of file + diff --git a/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-1.png b/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-1.png index a1d5ec2fcb..bb1f8fdc08 100644 Binary files a/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-1.png and b/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-1.png differ diff --git a/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-2.png b/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-2.png index 66072faa38..81c7177f65 100644 Binary files a/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-2.png and b/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-2.png differ diff --git a/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-3.png b/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-3.png index 90219d52b5..41e6680631 100644 Binary files a/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-3.png and b/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-3.png differ diff --git a/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-4.png b/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-4.png index 138aa93cbc..30fc0d10c0 100644 Binary files a/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-4.png and b/__tests__/html2/fluentTheme/defaultFeedback.activity.html.snap-4.png differ diff --git a/__tests__/html2/fluentTheme/feedback.form.markdown.html b/__tests__/html2/fluentTheme/feedback.form.markdown.html index 845daadc5a..1c486a3135 100644 --- a/__tests__/html2/fluentTheme/feedback.form.markdown.html +++ b/__tests__/html2/fluentTheme/feedback.form.markdown.html @@ -58,7 +58,7 @@ await host.sendShiftTab(2); await host.sendKeys('ENTER'); - await host.sendKeys('ENTER'); + await host.sendKeys('SPACE'); await pageConditions.became( 'feedback form is open', diff --git a/__tests__/html2/fluentTheme/feedback.form.markdown.html.snap-1.png b/__tests__/html2/fluentTheme/feedback.form.markdown.html.snap-1.png index ff4788368d..cf91727b99 100644 Binary files a/__tests__/html2/fluentTheme/feedback.form.markdown.html.snap-1.png and b/__tests__/html2/fluentTheme/feedback.form.markdown.html.snap-1.png differ diff --git a/__tests__/html2/fluentTheme/feedback.form.multiple.html b/__tests__/html2/fluentTheme/feedback.form.multiple.html index 124cf7131f..ebdcedf22b 100644 --- a/__tests__/html2/fluentTheme/feedback.form.multiple.html +++ b/__tests__/html2/fluentTheme/feedback.form.multiple.html @@ -81,7 +81,7 @@ await host.sendShiftTab(2); await host.sendKeys('ENTER'); - await host.sendKeys('ENTER'); + await host.sendKeys('SPACE'); await pageConditions.became( 'feedback form is open', diff --git a/__tests__/html2/fluentTheme/feedback.form.multiple.html.snap-1.png b/__tests__/html2/fluentTheme/feedback.form.multiple.html.snap-1.png index 368bdb8b59..674d5a4490 100644 Binary files a/__tests__/html2/fluentTheme/feedback.form.multiple.html.snap-1.png and b/__tests__/html2/fluentTheme/feedback.form.multiple.html.snap-1.png differ diff --git a/__tests__/html2/fluentTheme/feedbackForm.noDisclaimer.html b/__tests__/html2/fluentTheme/feedbackForm.noDisclaimer.html index 9de8a2b339..883e865d2c 100644 --- a/__tests__/html2/fluentTheme/feedbackForm.noDisclaimer.html +++ b/__tests__/html2/fluentTheme/feedbackForm.noDisclaimer.html @@ -56,7 +56,7 @@ await host.sendKeys('ENTER'); - await host.sendKeys('ENTER'); + await host.sendKeys('SPACE'); await pageConditions.became( 'feedback form is open', diff --git a/__tests__/html2/fluentTheme/feedbackForm.noDisclaimer.html.snap-1.png b/__tests__/html2/fluentTheme/feedbackForm.noDisclaimer.html.snap-1.png index b0cd409cea..a93485dcbf 100644 Binary files a/__tests__/html2/fluentTheme/feedbackForm.noDisclaimer.html.snap-1.png and b/__tests__/html2/fluentTheme/feedbackForm.noDisclaimer.html.snap-1.png differ diff --git a/__tests__/html2/preact/activity/feedback.status.html b/__tests__/html2/preact/activity/feedback.status.html index fb1673e0c8..c6f20b56e2 100644 --- a/__tests__/html2/preact/activity/feedback.status.html +++ b/__tests__/html2/preact/activity/feedback.status.html @@ -21,7 +21,8 @@ const { React: { useMemo }, WebChat: { - hooks: { useDirection } + hooks: { useDirection }, + testIds } } = window; @@ -139,7 +140,7 @@ await host.snapshot('local'); const [,, activityStatus] = pageElements.activityStatuses(); - const buttons = activityStatus.querySelectorAll('button'); + const buttons = activityStatus.querySelectorAll(`[data-testid="${testIds.feedbackButton}"]`); pageElements.sendBoxTextBox().focus(); @@ -168,7 +169,7 @@ await host.snapshot('local'); - await host.sendKeys('ENTER'); + await host.sendKeys('SPACE'); await host.snapshot('local'); }); diff --git a/__tests__/html2/preact/activity/feedback.status.html.snap-1.png b/__tests__/html2/preact/activity/feedback.status.html.snap-1.png index 2807fc5937..2967e776bb 100644 Binary files a/__tests__/html2/preact/activity/feedback.status.html.snap-1.png and b/__tests__/html2/preact/activity/feedback.status.html.snap-1.png differ diff --git a/__tests__/html2/preact/activity/feedback.status.html.snap-2.png b/__tests__/html2/preact/activity/feedback.status.html.snap-2.png index 64ba12a7b0..537f6f8fe9 100644 Binary files a/__tests__/html2/preact/activity/feedback.status.html.snap-2.png and b/__tests__/html2/preact/activity/feedback.status.html.snap-2.png differ diff --git a/__tests__/html2/preact/activity/feedback.status.html.snap-3.png b/__tests__/html2/preact/activity/feedback.status.html.snap-3.png index e67c6a0b45..b0006c584e 100644 Binary files a/__tests__/html2/preact/activity/feedback.status.html.snap-3.png and b/__tests__/html2/preact/activity/feedback.status.html.snap-3.png differ diff --git a/__tests__/html2/preact/activity/feedback.status.html.snap-4.png b/__tests__/html2/preact/activity/feedback.status.html.snap-4.png index d527b79069..df35ee30d4 100644 Binary files a/__tests__/html2/preact/activity/feedback.status.html.snap-4.png and b/__tests__/html2/preact/activity/feedback.status.html.snap-4.png differ diff --git a/__tests__/html2/preact/activity/feedback.status.html.snap-5.png b/__tests__/html2/preact/activity/feedback.status.html.snap-5.png index 1a4cb33859..1c2096f2d4 100644 Binary files a/__tests__/html2/preact/activity/feedback.status.html.snap-5.png and b/__tests__/html2/preact/activity/feedback.status.html.snap-5.png differ diff --git a/__tests__/html2/speech/comprehensive.html b/__tests__/html2/speech/comprehensive.html index 712a86f323..5558536658 100644 --- a/__tests__/html2/speech/comprehensive.html +++ b/__tests__/html2/speech/comprehensive.html @@ -85,7 +85,7 @@ expect(speechSynthesis).toHaveProperty('speaking', false); // THEN: Should construct SpeechRecognition(). - expect(ponyfill.SpeechRecognition).toHaveBeenCalledTimes(1); + await waitFor(() => expect(ponyfill.SpeechRecognition).toHaveBeenCalledTimes(1)); const { value: speechRecognition1 } = ponyfill.SpeechRecognition.mock.results[0]; diff --git a/__tests__/html2/speech/errorTelemetry.html b/__tests__/html2/speech/errorTelemetry.html index f456f1d6f0..3bfd809b32 100644 --- a/__tests__/html2/speech/errorTelemetry.html +++ b/__tests__/html2/speech/errorTelemetry.html @@ -78,7 +78,7 @@ ); // THEN: Should construct the SpeechRecognition() instance and call start(). - expect(ponyfill.SpeechRecognition).toHaveBeenCalledTimes(1); + await waitFor(() => expect(ponyfill.SpeechRecognition).toHaveBeenCalledTimes(1)); const { value: speechRecognition1 } = ponyfill.SpeechRecognition.mock.results[0]; diff --git a/packages/component/src/ActivityFeedback/ActivityFeedback.tsx b/packages/component/src/ActivityFeedback/ActivityFeedback.tsx index bb9caa8006..412f821fab 100644 --- a/packages/component/src/ActivityFeedback/ActivityFeedback.tsx +++ b/packages/component/src/ActivityFeedback/ActivityFeedback.tsx @@ -1,27 +1,85 @@ -import { WebChatActivity } from 'botframework-webchat-core'; -import React, { memo } from 'react'; -import FeedbackLoopWithMessage from './private/FeedbackLoopWithMessage'; -import FeedbackLoopWithoutMessage from './private/FeedbackLoopWithoutMessage'; +import classNames from 'classnames'; +import React, { memo, useCallback, useMemo, type FormEventHandler, type KeyboardEventHandler } from 'react'; +import { Extract, wrapWith } from 'react-wrap-with'; +import { useRefFrom } from 'use-ref-from'; + +import useStyleSet from '../hooks/useStyleSet'; +import FeedbackForm from './private/FeedbackForm'; +import FeedbackVoteButtonBar from './private/FeedbackVoteButtonBar'; +import isActionRequireReview from './private/isActionRequireReview'; import ActivityFeedbackComposer from './providers/ActivityFeedbackComposer'; -import useShouldShowFeedbackForm from './providers/useShouldShowFeedbackForm'; +import useActivityFeedbackHooks from './providers/useActivityFeedbackHooks'; + +function InternalActivityFeedback() { + const { useActions, useFeedbackText, useFocusFeedbackButton, useHasSubmitted, useSelectedAction, useSubmit } = + useActivityFeedbackHooks(); + + const [_, setFeedbackText] = useFeedbackText(); + const [{ feedbackForm }] = useStyleSet(); + const [actions] = useActions(); + const [hasSubmitted] = useHasSubmitted(); + const [selectedAction, setSelectedAction] = useSelectedAction(); + const focusFeedbackButton = useFocusFeedbackButton(); + const submit = useSubmit(); + + const firstActionRequireReview = useMemo(() => actions.find(isActionRequireReview), [actions]); + const selectedActionRef = useRefFrom(selectedAction); + + const handleReset = useCallback