diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f656ee89a..d951fde376 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,10 +22,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Breaking changes + +- Style options are introduced to send button for improved accessibility: + - `suggestedActionBackground` and `suggestedActionXXXBackground` are being deprecated in favor of `suggestedActionBackgroundColor` and `suggestedActionBackgroundColorOnXXX` respectively, for consistencies when porting to other platforms + - `suggestedActionDisabledXXX` is being renamed to `suggestedActionXXXOnDisabled`, for consistencies with other style options + - `suggestedActionXXXOnActive`, `suggestedActionXXXOnFocus`, `suggestedActionXXXOnHover` are introduced for styling per user gestures + - `suggestedActionKeyboardFocusIndicatorXXX` are introduced for styling the "focus ring" when [focused using a keyboard](https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible) + ### Fixed +- Fixes [#4018](https://github.com/microsoft/BotFramework-WebChat/issues/4018). When using TAB or SHIFT + TAB key to focus on the transcript, it should select the last activity, by [@compulim](https://github.com/compulim), in PR [#4035](https://github.com/microsoft/BotFramework-WebChat/pull/4035) - Fixes [#4020](https://github.com/microsoft/BotFramework-WebChat/issues/4020). With or without scan mode turned on, screen reader users should be able to press ENTER to focus on interactive activity, by [@compulim](https://github.com/compulim), in PR [#4041](https://github.com/microsoft/BotFramework-WebChat/pull/4041) - Fixes [#4021](https://github.com/microsoft/BotFramework-WebChat/issues/4021). For screen reader usability, suggested actions container should not render "Is empty" alt text initially, by [@compulim](https://github.com/compulim), in PR [#4041](https://github.com/microsoft/BotFramework-WebChat/pull/4041) +- Fixes [#4029](https://github.com/microsoft/BotFramework-WebChat/issues/4029). Added new keyboard focus indicator for suggested actions, by [@compulim](https://github.com/compulim), in PR [#4035](https://github.com/microsoft/BotFramework-WebChat/pull/4035) + - New style options are introduced: `suggestedActionXXXOnActive`, `suggestedActionXXXOnFocus`, `suggestedActionXXXOnHover`, `suggestedActionKeyboardFocusIndicatorXXX` + - Style options are renamed: `suggestedActionDisabledXXX` become `suggestedActionXXXOnDisabled` +- Fixes [#4028](https://github.com/microsoft/BotFramework-WebChat/issues/4028). Added new keyboard focus indicator for send box buttons, by [@compulim](https://github.com/compulim), in PR [#4035](https://github.com/microsoft/BotFramework-WebChat/pull/4035) + - New style options are introduced: `sendBoxButtonXXXOnActive`, `sendBoxButtonXXXOnFocus`, `sendBoxButtonXXXOnHover`, `sendBoxButtonKeyboardFocusIndicatorXXX` ## [4.14.1] - 2021-09-07 diff --git a/__tests__/__image_snapshots__/chrome-docker/adaptive-cards-js-disable-card-inputs-2-snap.png b/__tests__/__image_snapshots__/chrome-docker/adaptive-cards-js-disable-card-inputs-2-snap.png index a528675021..ab80b073aa 100644 Binary files a/__tests__/__image_snapshots__/chrome-docker/adaptive-cards-js-disable-card-inputs-2-snap.png and b/__tests__/__image_snapshots__/chrome-docker/adaptive-cards-js-disable-card-inputs-2-snap.png differ diff --git a/__tests__/__image_snapshots__/chrome-docker/scroll-to-bottom-js-should-stick-to-bottom-if-submitting-an-adaptive-card-while-suggested-actions-is-open-1-snap.png b/__tests__/__image_snapshots__/chrome-docker/scroll-to-bottom-js-should-stick-to-bottom-if-submitting-an-adaptive-card-while-suggested-actions-is-open-1-snap.png deleted file mode 100644 index d20b513eb0..0000000000 Binary files a/__tests__/__image_snapshots__/chrome-docker/scroll-to-bottom-js-should-stick-to-bottom-if-submitting-an-adaptive-card-while-suggested-actions-is-open-1-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/chrome-docker/scroll-to-bottom-js-show-new-messages-button-only-when-new-message-come-3-snap.png b/__tests__/__image_snapshots__/chrome-docker/scroll-to-bottom-js-show-new-messages-button-only-when-new-message-come-3-snap.png index 3a0dad6bd9..f780d0c829 100644 Binary files a/__tests__/__image_snapshots__/chrome-docker/scroll-to-bottom-js-show-new-messages-button-only-when-new-message-come-3-snap.png and b/__tests__/__image_snapshots__/chrome-docker/scroll-to-bottom-js-show-new-messages-button-only-when-new-message-come-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/auto-scroll-with-suggested-actions-submit-adaptive-cards-js-auto-scroll-with-suggested-actions-shown-should-stick-to-bottom-if-submitting-an-adaptive-card-1-snap.png b/__tests__/__image_snapshots__/html/auto-scroll-with-suggested-actions-submit-adaptive-cards-js-auto-scroll-with-suggested-actions-shown-should-stick-to-bottom-if-submitting-an-adaptive-card-1-snap.png new file mode 100644 index 0000000000..da169e13d5 Binary files /dev/null and b/__tests__/__image_snapshots__/html/auto-scroll-with-suggested-actions-submit-adaptive-cards-js-auto-scroll-with-suggested-actions-shown-should-stick-to-bottom-if-submitting-an-adaptive-card-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/focus-management-disable-adaptive-card-manual-js-focus-management-focus-should-not-move-after-adaptive-card-is-disable-after-manually-disabled-2-snap.png b/__tests__/__image_snapshots__/html/focus-management-disable-adaptive-card-manual-js-focus-management-focus-should-not-move-after-adaptive-card-is-disable-after-manually-disabled-2-snap.png index 2afe53dc7f..146a54379e 100644 Binary files a/__tests__/__image_snapshots__/html/focus-management-disable-adaptive-card-manual-js-focus-management-focus-should-not-move-after-adaptive-card-is-disable-after-manually-disabled-2-snap.png and b/__tests__/__image_snapshots__/html/focus-management-disable-adaptive-card-manual-js-focus-management-focus-should-not-move-after-adaptive-card-is-disable-after-manually-disabled-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/focus-management-disable-adaptive-card-manual-js-focus-management-focus-should-not-move-after-adaptive-card-is-disable-after-manually-disabled-3-snap.png b/__tests__/__image_snapshots__/html/focus-management-disable-adaptive-card-manual-js-focus-management-focus-should-not-move-after-adaptive-card-is-disable-after-manually-disabled-3-snap.png index 894047eec3..e061e5ffdc 100644 Binary files a/__tests__/__image_snapshots__/html/focus-management-disable-adaptive-card-manual-js-focus-management-focus-should-not-move-after-adaptive-card-is-disable-after-manually-disabled-3-snap.png and b/__tests__/__image_snapshots__/html/focus-management-disable-adaptive-card-manual-js-focus-management-focus-should-not-move-after-adaptive-card-is-disable-after-manually-disabled-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/focus-management-disable-ui-js-focus-management-focus-should-not-move-after-the-whole-ui-is-disabled-2-snap.png b/__tests__/__image_snapshots__/html/focus-management-disable-ui-js-focus-management-focus-should-not-move-after-the-whole-ui-is-disabled-2-snap.png index ce1bb14329..6590015319 100644 Binary files a/__tests__/__image_snapshots__/html/focus-management-disable-ui-js-focus-management-focus-should-not-move-after-the-whole-ui-is-disabled-2-snap.png and b/__tests__/__image_snapshots__/html/focus-management-disable-ui-js-focus-management-focus-should-not-move-after-the-whole-ui-is-disabled-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/focus-management-disable-ui-js-focus-management-focus-should-not-move-after-the-whole-ui-is-disabled-3-snap.png b/__tests__/__image_snapshots__/html/focus-management-disable-ui-js-focus-management-focus-should-not-move-after-the-whole-ui-is-disabled-3-snap.png index 6d3666d1e8..9fb2293e09 100644 Binary files a/__tests__/__image_snapshots__/html/focus-management-disable-ui-js-focus-management-focus-should-not-move-after-the-whole-ui-is-disabled-3-snap.png and b/__tests__/__image_snapshots__/html/focus-management-disable-ui-js-focus-management-focus-should-not-move-after-the-whole-ui-is-disabled-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/hooks-use-text-box-js-use-text-box-should-work-properly-1-snap.png b/__tests__/__image_snapshots__/html/hooks-use-text-box-js-use-text-box-should-work-properly-1-snap.png index f0ba007036..92bb17e337 100644 Binary files a/__tests__/__image_snapshots__/html/hooks-use-text-box-js-use-text-box-should-work-properly-1-snap.png and b/__tests__/__image_snapshots__/html/hooks-use-text-box-js-use-text-box-should-work-properly-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/hooks-use-text-box-js-use-text-box-should-work-properly-2-snap.png b/__tests__/__image_snapshots__/html/hooks-use-text-box-js-use-text-box-should-work-properly-2-snap.png index be6bd99592..060fb2f75b 100644 Binary files a/__tests__/__image_snapshots__/html/hooks-use-text-box-js-use-text-box-should-work-properly-2-snap.png and b/__tests__/__image_snapshots__/html/hooks-use-text-box-js-use-text-box-should-work-properly-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-1-snap.png b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-1-snap.png new file mode 100644 index 0000000000..9c1b230189 Binary files /dev/null and b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-2-snap.png b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-2-snap.png new file mode 100644 index 0000000000..10f4f7de7d Binary files /dev/null and b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-3-snap.png b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-3-snap.png new file mode 100644 index 0000000000..d6b5640ef2 Binary files /dev/null and b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-4-snap.png b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-4-snap.png new file mode 100644 index 0000000000..4f66dfcf30 Binary files /dev/null and b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-4-snap.png differ diff --git a/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-5-snap.png b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-5-snap.png new file mode 100644 index 0000000000..c6fb087085 Binary files /dev/null and b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-default-style-options-5-snap.png differ diff --git a/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-1-snap.png b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-1-snap.png new file mode 100644 index 0000000000..a0396d785a Binary files /dev/null and b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-2-snap.png b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-2-snap.png new file mode 100644 index 0000000000..bd7e0098af Binary files /dev/null and b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-3-snap.png b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-3-snap.png new file mode 100644 index 0000000000..2f5fdce4fe Binary files /dev/null and b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-4-snap.png b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-4-snap.png new file mode 100644 index 0000000000..0badea4f14 Binary files /dev/null and b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-4-snap.png differ diff --git a/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-5-snap.png b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-5-snap.png new file mode 100644 index 0000000000..bd41fc43e3 Binary files /dev/null and b/__tests__/__image_snapshots__/html/send-box-button-style-options-js-send-box-button-with-different-style-options-5-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-access-key-js-suggested-actions-should-be-focusable-using-access-key-1-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-access-key-js-suggested-actions-should-be-focusable-using-access-key-1-snap.png index fa3eadbf9f..352f6b2bf5 100644 Binary files a/__tests__/__image_snapshots__/html/suggested-actions-access-key-js-suggested-actions-should-be-focusable-using-access-key-1-snap.png and b/__tests__/__image_snapshots__/html/suggested-actions-access-key-js-suggested-actions-should-be-focusable-using-access-key-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-access-key-js-suggested-actions-should-be-focusable-using-access-key-2-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-access-key-js-suggested-actions-should-be-focusable-using-access-key-2-snap.png index 1c8aed7619..341a765633 100644 Binary files a/__tests__/__image_snapshots__/html/suggested-actions-access-key-js-suggested-actions-should-be-focusable-using-access-key-2-snap.png and b/__tests__/__image_snapshots__/html/suggested-actions-access-key-js-suggested-actions-should-be-focusable-using-access-key-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-access-key-js-suggested-actions-should-be-focusable-using-access-key-3-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-access-key-js-suggested-actions-should-be-focusable-using-access-key-3-snap.png index 15d8b95284..9be0e1b3e6 100644 Binary files a/__tests__/__image_snapshots__/html/suggested-actions-access-key-js-suggested-actions-should-be-focusable-using-access-key-3-snap.png and b/__tests__/__image_snapshots__/html/suggested-actions-access-key-js-suggested-actions-should-be-focusable-using-access-key-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-layout-js-suggested-actions-in-left-to-right-using-stacked-layout-and-disabled-should-be-correct-1-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-layout-js-suggested-actions-in-left-to-right-using-stacked-layout-and-disabled-should-be-correct-1-snap.png new file mode 100644 index 0000000000..c6bc13c2d4 Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-layout-js-suggested-actions-in-left-to-right-using-stacked-layout-and-disabled-should-be-correct-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-layout-js-suggested-actions-in-right-to-left-using-stacked-layout-and-disabled-should-be-correct-1-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-layout-js-suggested-actions-in-right-to-left-using-stacked-layout-and-disabled-should-be-correct-1-snap.png new file mode 100644 index 0000000000..f55645dd65 Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-layout-js-suggested-actions-in-right-to-left-using-stacked-layout-and-disabled-should-be-correct-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-no-access-key-js-suggested-actions-with-access-key-disabled-should-not-have-screen-reader-text-related-to-access-key-1-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-no-access-key-js-suggested-actions-with-access-key-disabled-should-not-have-screen-reader-text-related-to-access-key-1-snap.png index a40756ca37..0c4485d5d2 100644 Binary files a/__tests__/__image_snapshots__/html/suggested-actions-no-access-key-js-suggested-actions-with-access-key-disabled-should-not-have-screen-reader-text-related-to-access-key-1-snap.png and b/__tests__/__image_snapshots__/html/suggested-actions-no-access-key-js-suggested-actions-with-access-key-disabled-should-not-have-screen-reader-text-related-to-access-key-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-no-access-key-js-suggested-actions-with-access-key-disabled-should-not-have-screen-reader-text-related-to-access-key-2-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-no-access-key-js-suggested-actions-with-access-key-disabled-should-not-have-screen-reader-text-related-to-access-key-2-snap.png index da13cfb563..5a9e75db82 100644 Binary files a/__tests__/__image_snapshots__/html/suggested-actions-no-access-key-js-suggested-actions-with-access-key-disabled-should-not-have-screen-reader-text-related-to-access-key-2-snap.png and b/__tests__/__image_snapshots__/html/suggested-actions-no-access-key-js-suggested-actions-with-access-key-disabled-should-not-have-screen-reader-text-related-to-access-key-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-1-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-1-snap.png new file mode 100644 index 0000000000..11dc0c9261 Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-2-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-2-snap.png new file mode 100644 index 0000000000..f6457ce1a1 Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-3-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-3-snap.png new file mode 100644 index 0000000000..e7d9087743 Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-4-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-4-snap.png new file mode 100644 index 0000000000..58cbcd7c6b Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-4-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-5-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-5-snap.png new file mode 100644 index 0000000000..7777b6f9bc Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-5-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-6-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-6-snap.png new file mode 100644 index 0000000000..de33171eb8 Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-style-options-6-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-1-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-1-snap.png new file mode 100644 index 0000000000..5572be8b33 Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-2-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-2-snap.png new file mode 100644 index 0000000000..f6457ce1a1 Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-3-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-3-snap.png new file mode 100644 index 0000000000..a343bd2e15 Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-4-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-4-snap.png new file mode 100644 index 0000000000..ecaa742b1c Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-4-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-5-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-5-snap.png new file mode 100644 index 0000000000..a04fbbd9ad Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-5-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-6-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-6-snap.png new file mode 100644 index 0000000000..1b673056ca Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-overriding-with-deprecated-style-options-6-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-1-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-1-snap.png new file mode 100644 index 0000000000..b197715475 Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-2-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-2-snap.png new file mode 100644 index 0000000000..0789b2ad8f Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-3-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-3-snap.png new file mode 100644 index 0000000000..c476602d31 Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-4-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-4-snap.png new file mode 100644 index 0000000000..834a6bb831 Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-4-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-5-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-5-snap.png new file mode 100644 index 0000000000..321f9aaa62 Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-5-snap.png differ diff --git a/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-6-snap.png b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-6-snap.png new file mode 100644 index 0000000000..1043932807 Binary files /dev/null and b/__tests__/__image_snapshots__/html/suggested-actions-style-options-js-suggested-actions-when-using-default-style-options-6-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-adaptive-card-js-transcript-navigation-proactive-message-behavior-should-keep-activity-focus-when-interactive-element-is-focused-1-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-adaptive-card-js-transcript-navigation-proactive-message-behavior-should-keep-activity-focus-when-interactive-element-is-focused-1-snap.png new file mode 100644 index 0000000000..e13d1caefc Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-adaptive-card-js-transcript-navigation-proactive-message-behavior-should-keep-activity-focus-when-interactive-element-is-focused-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-adaptive-card-js-transcript-navigation-proactive-message-behavior-should-keep-activity-focus-when-interactive-element-is-focused-2-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-adaptive-card-js-transcript-navigation-proactive-message-behavior-should-keep-activity-focus-when-interactive-element-is-focused-2-snap.png new file mode 100644 index 0000000000..8a934158f8 Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-adaptive-card-js-transcript-navigation-proactive-message-behavior-should-keep-activity-focus-when-interactive-element-is-focused-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-1-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-1-snap.png new file mode 100644 index 0000000000..5c2713131d Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-2-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-2-snap.png new file mode 100644 index 0000000000..6de43d72aa Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-3-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-3-snap.png new file mode 100644 index 0000000000..a4d2914829 Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-4-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-4-snap.png new file mode 100644 index 0000000000..dd8524fda6 Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-4-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-5-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-5-snap.png new file mode 100644 index 0000000000..580178c616 Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-behavior-proactive-message-js-transcript-navigation-proactive-message-behavior-should-focus-on-last-activity-when-focus-is-on-send-box-5-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-default-active-descendant-shift-tab-js-transcript-navigation-should-auto-select-last-activity-when-shift-tab-into-the-transcript-1-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-default-active-descendant-shift-tab-js-transcript-navigation-should-auto-select-last-activity-when-shift-tab-into-the-transcript-1-snap.png new file mode 100644 index 0000000000..8729f9f340 Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-default-active-descendant-shift-tab-js-transcript-navigation-should-auto-select-last-activity-when-shift-tab-into-the-transcript-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-default-active-descendant-shift-tab-js-transcript-navigation-should-auto-select-last-activity-when-shift-tab-into-the-transcript-2-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-default-active-descendant-shift-tab-js-transcript-navigation-should-auto-select-last-activity-when-shift-tab-into-the-transcript-2-snap.png new file mode 100644 index 0000000000..200f45cce4 Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-default-active-descendant-shift-tab-js-transcript-navigation-should-auto-select-last-activity-when-shift-tab-into-the-transcript-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-default-active-descendant-tab-js-transcript-navigation-should-auto-select-last-activity-when-tab-into-the-transcript-1-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-default-active-descendant-tab-js-transcript-navigation-should-auto-select-last-activity-when-tab-into-the-transcript-1-snap.png new file mode 100644 index 0000000000..2f43cec825 Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-default-active-descendant-tab-js-transcript-navigation-should-auto-select-last-activity-when-tab-into-the-transcript-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-default-active-descendant-tab-js-transcript-navigation-should-auto-select-last-activity-when-tab-into-the-transcript-2-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-default-active-descendant-tab-js-transcript-navigation-should-auto-select-last-activity-when-tab-into-the-transcript-2-snap.png new file mode 100644 index 0000000000..0cbaf5d602 Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-default-active-descendant-tab-js-transcript-navigation-should-auto-select-last-activity-when-tab-into-the-transcript-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-keyboard-js-transcript-navigation-when-focusing-on-transcript-using-keyboard-should-scroll-focused-activity-into-view-1-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-keyboard-js-transcript-navigation-when-focusing-on-transcript-using-keyboard-should-scroll-focused-activity-into-view-1-snap.png new file mode 100644 index 0000000000..ccbfe97dba Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-keyboard-js-transcript-navigation-when-focusing-on-transcript-using-keyboard-should-scroll-focused-activity-into-view-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-keyboard-js-transcript-navigation-when-focusing-on-transcript-using-keyboard-should-scroll-focused-activity-into-view-2-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-keyboard-js-transcript-navigation-when-focusing-on-transcript-using-keyboard-should-scroll-focused-activity-into-view-2-snap.png new file mode 100644 index 0000000000..b62d881c32 Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-keyboard-js-transcript-navigation-when-focusing-on-transcript-using-keyboard-should-scroll-focused-activity-into-view-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-keyboard-js-transcript-navigation-when-focusing-on-transcript-using-keyboard-should-scroll-focused-activity-into-view-3-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-keyboard-js-transcript-navigation-when-focusing-on-transcript-using-keyboard-should-scroll-focused-activity-into-view-3-snap.png new file mode 100644 index 0000000000..ccbfe97dba Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-keyboard-js-transcript-navigation-when-focusing-on-transcript-using-keyboard-should-scroll-focused-activity-into-view-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-mouse-js-transcript-navigation-when-focusing-on-transcript-using-mouse-should-not-scroll-focused-activity-into-view-1-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-mouse-js-transcript-navigation-when-focusing-on-transcript-using-mouse-should-not-scroll-focused-activity-into-view-1-snap.png new file mode 100644 index 0000000000..ccbfe97dba Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-mouse-js-transcript-navigation-when-focusing-on-transcript-using-mouse-should-not-scroll-focused-activity-into-view-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-mouse-js-transcript-navigation-when-focusing-on-transcript-using-mouse-should-not-scroll-focused-activity-into-view-2-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-mouse-js-transcript-navigation-when-focusing-on-transcript-using-mouse-should-not-scroll-focused-activity-into-view-2-snap.png new file mode 100644 index 0000000000..b62d881c32 Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-mouse-js-transcript-navigation-when-focusing-on-transcript-using-mouse-should-not-scroll-focused-activity-into-view-2-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-mouse-js-transcript-navigation-when-focusing-on-transcript-using-mouse-should-not-scroll-focused-activity-into-view-3-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-mouse-js-transcript-navigation-when-focusing-on-transcript-using-mouse-should-not-scroll-focused-activity-into-view-3-snap.png new file mode 100644 index 0000000000..5f0a64fda1 Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-mouse-js-transcript-navigation-when-focusing-on-transcript-using-mouse-should-not-scroll-focused-activity-into-view-3-snap.png differ diff --git a/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-mouse-js-transcript-navigation-when-focusing-on-transcript-using-mouse-should-not-scroll-focused-activity-into-view-4-snap.png b/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-mouse-js-transcript-navigation-when-focusing-on-transcript-using-mouse-should-not-scroll-focused-activity-into-view-4-snap.png new file mode 100644 index 0000000000..0526c782ed Binary files /dev/null and b/__tests__/__image_snapshots__/html/transcript-navigation-scroll-into-view-mouse-js-transcript-navigation-when-focusing-on-transcript-using-mouse-should-not-scroll-focused-activity-into-view-4-snap.png differ diff --git a/__tests__/__image_snapshots__/html/use-text-box-submit-main-js-use-text-box-submit-and-set-focus-to-main-1-snap.png b/__tests__/__image_snapshots__/html/use-text-box-submit-main-js-use-text-box-submit-and-set-focus-to-main-1-snap.png index bdcfd6f662..903b243085 100644 Binary files a/__tests__/__image_snapshots__/html/use-text-box-submit-main-js-use-text-box-submit-and-set-focus-to-main-1-snap.png and b/__tests__/__image_snapshots__/html/use-text-box-submit-main-js-use-text-box-submit-and-set-focus-to-main-1-snap.png differ diff --git a/__tests__/adaptiveCards.js b/__tests__/adaptiveCards.js index 2f59f7194f..28bcd2bedf 100644 --- a/__tests__/adaptiveCards.js +++ b/__tests__/adaptiveCards.js @@ -135,6 +135,17 @@ test('disable card inputs', async () => { await pageObjects.updateProps({ disabled: false }); + // Wait until render after update props + await driver.wait( + () => + driver.executeScript(() => { + const button = document.querySelector('.ac-actionSet button:nth-of-type(2)'); + + return button && !button.disabled; + }), + timeouts.ui + ); + // Click "Submit" button should send values to the bot await driver.executeScript(() => { document.querySelector('.ac-actionSet button:nth-of-type(2)').click(); diff --git a/__tests__/basic.js b/__tests__/basic.js index 2d7ee40378..76c9bacf33 100644 --- a/__tests__/basic.js +++ b/__tests__/basic.js @@ -64,6 +64,7 @@ test('long URLs with keep-all', async () => { const { driver, pageObjects } = await setupWebDriver({ props: WEB_CHAT_PROPS }); + await driver.wait(uiConnected(), timeouts.directLine); await pageObjects.sendMessageViaSendBox('箸より重いものを持ったことがない箸より重いものを持ったことがない', { waitForSend: true }); diff --git a/__tests__/html/accessibility.adaptiveCard.withoutTapAction.html b/__tests__/html/accessibility.adaptiveCard.withoutTapAction.html index 29623363f5..332a63f956 100644 --- a/__tests__/html/accessibility.adaptiveCard.withoutTapAction.html +++ b/__tests__/html/accessibility.adaptiveCard.withoutTapAction.html @@ -24,7 +24,7 @@ await pageConditions.minNumActivitiesShown(2); await pageConditions.scrollToBottomCompleted(); - document.querySelector('select').focus(); + document.querySelector('select.ac-input').focus(); await host.sendShiftTab(); diff --git a/__tests__/html/autoScroll.withSuggestedActions.submitAdaptiveCards.html b/__tests__/html/autoScroll.withSuggestedActions.submitAdaptiveCards.html new file mode 100644 index 0000000000..b522e6cc34 --- /dev/null +++ b/__tests__/html/autoScroll.withSuggestedActions.submitAdaptiveCards.html @@ -0,0 +1,47 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html/autoScroll.withSuggestedActions.submitAdaptiveCards.js b/__tests__/html/autoScroll.withSuggestedActions.submitAdaptiveCards.js new file mode 100644 index 0000000000..01905fae3c --- /dev/null +++ b/__tests__/html/autoScroll.withSuggestedActions.submitAdaptiveCards.js @@ -0,0 +1,6 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('Auto-scroll with suggested actions shown', () => { + test('should stick to bottom if submitting an Adaptive Card', () => + runHTML('autoScroll.withSuggestedActions.submitAdaptiveCards.html')); +}); diff --git a/__tests__/html/sendBox.button.styleOptions.html b/__tests__/html/sendBox.button.styleOptions.html new file mode 100644 index 0000000000..9010326d62 --- /dev/null +++ b/__tests__/html/sendBox.button.styleOptions.html @@ -0,0 +1,94 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html/sendBox.button.styleOptions.js b/__tests__/html/sendBox.button.styleOptions.js new file mode 100644 index 0000000000..bd363d0b6f --- /dev/null +++ b/__tests__/html/sendBox.button.styleOptions.js @@ -0,0 +1,6 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('send box button', () => { + test('with different style options', () => runHTML('sendBox.button.styleOptions')); + test('with default style options', () => runHTML('sendBox.button.styleOptions?default=true')); +}); diff --git a/__tests__/html/suggestedActions.layout.html b/__tests__/html/suggestedActions.layout.html index 425b879eaf..0c093c0532 100644 --- a/__tests__/html/suggestedActions.layout.html +++ b/__tests__/html/suggestedActions.layout.html @@ -55,6 +55,8 @@ const initialFewerItems = !!params.get('fewer'); const initialPreset = params.get('preset'); + const initialDisabled = params.get('disabled') === 'true' || /-disabled$/.test(initialPreset); + const RadioRow = ({ checked, onChange, label, value }) => (