diff --git a/.eslintrc.yml b/.eslintrc.yml index ec1d65cde0..e06098c99a 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -19,14 +19,6 @@ parserOptions: sourceType: module overrides: - - files: - - '__tests__/**/*.js' - - '*.spec.js' - - '*.test.js' - - env: - jest: true - - files: - 'jest.config.js' - 'jest.*.config.js' @@ -85,6 +77,24 @@ overrides: # Shorthanding if-condition with && and ||. '@typescript-eslint/no-unused-expressions': off + - files: + - '__tests__/**/*.js' + - '**/*.spec.js' + - '**/*.spec.jsx' + - '**/*.spec.ts' + - '**/*.spec.tsx' + - '**/*.test.js' + - '**/*.test.jsx' + - '**/*.test.ts' + - '**/*.test.tsx' + + env: + jest: true + + rules: + '@typescript-eslint/no-require-imports': off + no-magic-numbers: off + rules: # Only list rules that are not in *:recommended set # If rules are set to disable the one in *:recommended, please elaborate the reason diff --git a/CHANGELOG.md b/CHANGELOG.md index f0cf52355c..00ca1c2746 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,6 +82,7 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/ - Added dedicated loading animation for messages in preparing state for Fluent theme, in PR [#5423](https://github.com/microsoft/BotFramework-WebChat/pull/5423), by [@OEvgeny](https://github.com/OEvgeny) - Resolved [#2661](https://github.com/microsoft/BotFramework-WebChat/issues/2661) and [#5352](https://github.com/microsoft/BotFramework-WebChat/issues/5352). Added speech recognition continuous mode with barge-in support, in PR [#5426](https://github.com/microsoft/BotFramework-WebChat/pull/5426), by [@RushikeshGavali](https://github.com/RushikeshGavali) and [@compulim](https://github.com/compulim) - Set `styleOptions.speechRecognitionContinuous` to `true` with a Web Speech API provider with continuous mode support +- Added support of [contentless activity in livestream](https://github.com/microsoft/BotFramework-WebChat/blob/main/docs/LIVESTREAMING.md#scenario-3-interim-activities-with-no-content), in PR [#5430](https://github.com/microsoft/BotFramework-WebChat/pull/5430), by [@compulim](https://github.com/compulim) ### Changed diff --git a/__tests__/__image_snapshots__/html/activity-order-js-bot-sending-multiple-messages-should-sort-typing-activity-in-its-original-order-5-snap.png b/__tests__/__image_snapshots__/html/activity-order-js-bot-sending-multiple-messages-should-sort-typing-activity-in-its-original-order-5-snap.png deleted file mode 100644 index 359ca556cb..0000000000 Binary files a/__tests__/__image_snapshots__/html/activity-order-js-bot-sending-multiple-messages-should-sort-typing-activity-in-its-original-order-5-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/chunk-js-bot-typing-with-chunks-should-display-partial-message-4-snap.png b/__tests__/__image_snapshots__/html/chunk-js-bot-typing-with-chunks-should-display-partial-message-4-snap.png deleted file mode 100644 index b881212408..0000000000 Binary files a/__tests__/__image_snapshots__/html/chunk-js-bot-typing-with-chunks-should-display-partial-message-4-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/concluded-livestream-js-bot-reusing-concluded-livestream-session-id-should-be-ignored-2-snap.png b/__tests__/__image_snapshots__/html/concluded-livestream-js-bot-reusing-concluded-livestream-session-id-should-be-ignored-2-snap.png deleted file mode 100644 index d9b90f37b9..0000000000 Binary files a/__tests__/__image_snapshots__/html/concluded-livestream-js-bot-reusing-concluded-livestream-session-id-should-be-ignored-2-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/concluded-livestream-js-bot-reusing-concluded-livestream-session-id-should-be-ignored-3-snap.png b/__tests__/__image_snapshots__/html/concluded-livestream-js-bot-reusing-concluded-livestream-session-id-should-be-ignored-3-snap.png deleted file mode 100644 index d9b90f37b9..0000000000 Binary files a/__tests__/__image_snapshots__/html/concluded-livestream-js-bot-reusing-concluded-livestream-session-id-should-be-ignored-3-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/concluded-livestream-js-bot-reusing-concluded-livestream-session-id-should-be-ignored-4-snap.png b/__tests__/__image_snapshots__/html/concluded-livestream-js-bot-reusing-concluded-livestream-session-id-should-be-ignored-4-snap.png deleted file mode 100644 index d9b90f37b9..0000000000 Binary files a/__tests__/__image_snapshots__/html/concluded-livestream-js-bot-reusing-concluded-livestream-session-id-should-be-ignored-4-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/informative-js-informative-typing-message-should-be-shown-as-typing-indicator-1-snap.png b/__tests__/__image_snapshots__/html/informative-js-informative-typing-message-should-be-shown-as-typing-indicator-1-snap.png deleted file mode 100644 index e3d75a1f89..0000000000 Binary files a/__tests__/__image_snapshots__/html/informative-js-informative-typing-message-should-be-shown-as-typing-indicator-1-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/layout-js-livestreaming-should-layout-properly-1-snap.png b/__tests__/__image_snapshots__/html/layout-js-livestreaming-should-layout-properly-1-snap.png deleted file mode 100644 index 9299540e81..0000000000 Binary files a/__tests__/__image_snapshots__/html/layout-js-livestreaming-should-layout-properly-1-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/layout-js-livestreaming-should-layout-properly-2-snap.png b/__tests__/__image_snapshots__/html/layout-js-livestreaming-should-layout-properly-2-snap.png deleted file mode 100644 index d73a87ed0d..0000000000 Binary files a/__tests__/__image_snapshots__/html/layout-js-livestreaming-should-layout-properly-2-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/layout-js-livestreaming-should-layout-properly-3-snap.png b/__tests__/__image_snapshots__/html/layout-js-livestreaming-should-layout-properly-3-snap.png deleted file mode 100644 index 172c91d0a3..0000000000 Binary files a/__tests__/__image_snapshots__/html/layout-js-livestreaming-should-layout-properly-3-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/out-of-order-js-bot-typing-message-in-out-of-order-fashion-should-sort-typing-activity-in-its-original-order-4-snap.png b/__tests__/__image_snapshots__/html/out-of-order-js-bot-typing-message-in-out-of-order-fashion-should-sort-typing-activity-in-its-original-order-4-snap.png deleted file mode 100644 index b881212408..0000000000 Binary files a/__tests__/__image_snapshots__/html/out-of-order-js-bot-typing-message-in-out-of-order-fashion-should-sort-typing-activity-in-its-original-order-4-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/out-of-order-sequence-number-js-bot-typing-message-in-out-of-order-fashion-should-sort-typing-activity-based-on-channel-data-sequence-number-4-snap.png b/__tests__/__image_snapshots__/html/out-of-order-sequence-number-js-bot-typing-message-in-out-of-order-fashion-should-sort-typing-activity-based-on-channel-data-sequence-number-4-snap.png deleted file mode 100644 index b881212408..0000000000 Binary files a/__tests__/__image_snapshots__/html/out-of-order-sequence-number-js-bot-typing-message-in-out-of-order-fashion-should-sort-typing-activity-based-on-channel-data-sequence-number-4-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/simultaneous-js-bot-typing-multiple-messages-should-work-properly-5-snap.png b/__tests__/__image_snapshots__/html/simultaneous-js-bot-typing-multiple-messages-should-work-properly-5-snap.png deleted file mode 100644 index 19dd3dc767..0000000000 Binary files a/__tests__/__image_snapshots__/html/simultaneous-js-bot-typing-multiple-messages-should-work-properly-5-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/html/simultaneous-js-bot-typing-multiple-messages-should-work-properly-6-snap.png b/__tests__/__image_snapshots__/html/simultaneous-js-bot-typing-multiple-messages-should-work-properly-6-snap.png deleted file mode 100644 index 0e66ecafdd..0000000000 Binary files a/__tests__/__image_snapshots__/html/simultaneous-js-bot-typing-multiple-messages-should-work-properly-6-snap.png and /dev/null differ diff --git a/__tests__/basic.js b/__tests__/basic.js index 10812eceab..03caed7c29 100644 --- a/__tests__/basic.js +++ b/__tests__/basic.js @@ -22,184 +22,3 @@ test('setup', async () => { expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); }); - -test('long URLs with break-word', async () => { - const { driver, pageObjects } = await setupWebDriver(); - - await driver.wait(uiConnected(), timeouts.directLine); - await pageObjects.sendMessageViaSendBox( - 'https://subdomain.domain.com/pathname0/pathname1/pathname2/pathname3/pathname4/', - { waitForSend: true } - ); - - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); -}); - -test('long URLs with break-all', async () => { - const WEB_CHAT_PROPS = { styleOptions: { messageActivityWordBreak: 'break-all' } }; - - const { driver, pageObjects } = await setupWebDriver({ props: WEB_CHAT_PROPS }); - - await driver.wait(uiConnected(), timeouts.directLine); - await pageObjects.sendMessageViaSendBox( - 'https://subdomain.domain.com/pathname0/pathname1/pathname2/pathname3/pathname4/', - { waitForSend: true } - ); - - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); -}); - -test('long URLs with keep-all', async () => { - const WEB_CHAT_PROPS = { styleOptions: { messageActivityWordBreak: 'keep-all' } }; - - const { driver, pageObjects } = await setupWebDriver({ props: WEB_CHAT_PROPS }); - - await driver.wait(uiConnected(), timeouts.directLine); - await pageObjects.sendMessageViaSendBox('箸より重いものを持ったことがない箸より重いものを持ったことがない', { - waitForSend: true - }); - - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); -}); - -test('hero card with a long title and richCardWrapTitle set to true', async () => { - const { driver, pageObjects } = await setupWebDriver({ props: { styleOptions: { richCardWrapTitle: true } } }); - - await driver.wait(uiConnected(), timeouts.directLine); - await pageObjects.sendMessageViaSendBox('herocard long title', { waitForSend: true }); - - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); -}); - -test('hero card with a long title and richCardWrapTitle set to default value', async () => { - const { driver, pageObjects } = await setupWebDriver(); - - await driver.wait(uiConnected(), timeouts.directLine); - await pageObjects.sendMessageViaSendBox('herocard long title', { waitForSend: true }); - - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); -}); - -test('thumbnail card with a long title and richCardWrapTitle set to true', async () => { - const { driver, pageObjects } = await setupWebDriver({ props: { styleOptions: { richCardWrapTitle: true } } }); - - await driver.wait(uiConnected(), timeouts.directLine); - await pageObjects.sendMessageViaSendBox('thumbnailcard long title', { waitForSend: true }); - - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); -}); - -test('thumbnail card with a long title and richCardWrapTitle set to default value', async () => { - const { driver, pageObjects } = await setupWebDriver(); - - await driver.wait(uiConnected(), timeouts.directLine); - await pageObjects.sendMessageViaSendBox('thumbnailcard long title', { waitForSend: true }); - - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); -}); - -test('absolute timestamp', async () => { - const activities = [ - { - channelData: {}, - type: 'message', - id: '6266x5ZXhXkBfuIH0fNx0h-o|0000000', - timestamp: '2019-08-08T16:41:12.9397263Z', - from: { - id: 'dl_654b35e09ab4149595a70aa6f1af6f50', - name: '', - role: 'user' - }, - textFormat: 'plain', - text: 'echo "Hello, World!"' - }, - { - channelData: {}, - type: 'message', - id: '6266x5ZXhXkBfuIH0fNx0h-o|0000001', - timestamp: '2019-08-08T16:41:13.1835518Z', - from: { - id: 'webchat-mockbot', - name: 'webchat-mockbot', - role: 'bot' - }, - text: 'Echoing back in a separate activity.' - }, - { - channelData: {}, - type: 'message', - id: '6266x5ZXhXkBfuIH0fNx0h-o|0000002', - timestamp: '2019-08-08T16:41:13.3963019Z', - from: { - id: 'webchat-mockbot', - name: 'webchat-mockbot', - role: 'bot' - }, - text: 'Hello, World!' - } - ]; - const styleOptions = { timestampFormat: 'absolute' }; - const { driver } = await setupWebDriver({ storeInitialState: { activities }, props: { styleOptions } }); - - await driver.wait(uiConnected(), timeouts.directLine); - await driver.wait(minNumActivitiesShown(3), timeouts.directLine); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); -}); - -test('avatar background color', async () => { - const styleOptions = { - botAvatarBackgroundColor: 'red', - botAvatarInitials: 'B', - userAvatarBackgroundColor: 'blue', - userAvatarInitials: 'TJ' - }; - - const { driver, pageObjects } = await setupWebDriver({ props: { styleOptions } }); - - await driver.wait(uiConnected(), timeouts.directLine); - await pageObjects.sendMessageViaSendBox('echo "Hello, World!"', { waitForSend: true }); - - await driver.wait(minNumActivitiesShown(3), timeouts.directLine); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); -}); diff --git a/__tests__/hooks/useEmitTypingIndicator.js b/__tests__/hooks/useEmitTypingIndicator.js deleted file mode 100644 index 0eaee6a1f9..0000000000 --- a/__tests__/hooks/useEmitTypingIndicator.js +++ /dev/null @@ -1,23 +0,0 @@ -import { timeouts } from '../constants.json'; - -import minNumActivitiesShown from '../setup/conditions/minNumActivitiesShown'; -import typingActivityReceived from '../setup/conditions/typingActivityReceived'; -import uiConnected from '../setup/conditions/uiConnected'; - -// selenium-webdriver API doc: -// https://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_WebDriver.html - -jest.setTimeout(timeouts.test); - -test('calling emitTypingIndicator should send a typing activity', async () => { - const { driver, pageObjects } = await setupWebDriver(); - - await driver.wait(uiConnected(), timeouts.directLine); - await pageObjects.sendMessageViaSendBox('echo-typing', { waitForSend: true }); - - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - - await pageObjects.runHook('useEmitTypingIndicator', [], fn => fn()); - - await driver.wait(typingActivityReceived(), timeouts.directLine); -}); diff --git a/__tests__/hooks/useSendTypingIndicator.js b/__tests__/hooks/useSendTypingIndicator.js deleted file mode 100644 index 7df44dc1a1..0000000000 --- a/__tests__/hooks/useSendTypingIndicator.js +++ /dev/null @@ -1,25 +0,0 @@ -import { timeouts } from '../constants.json'; - -// selenium-webdriver API doc: -// https://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_WebDriver.html - -jest.setTimeout(timeouts.test); - -test('getter should get sendTypingIndicator from props', async () => { - const { pageObjects } = await setupWebDriver({ props: { sendTypingIndicator: true } }); - - await expect(pageObjects.runHook('useSendTypingIndicator', [], result => result[0])).resolves.toBeTruthy(); -}); - -test('getter should get default value if not set in props', async () => { - const { pageObjects } = await setupWebDriver(); - - await expect(pageObjects.runHook('useSendTypingIndicator', [], result => result[0])).resolves.toBeFalsy(); -}); - -test('setter should be falsy', async () => { - const { pageObjects } = await setupWebDriver(); - const [_, setSendTypingIndicator] = await pageObjects.runHook('useSendTypingIndicator'); - - expect(setSendTypingIndicator).toBeFalsy(); -}); diff --git a/__tests__/html/conversationStartProperties.noLocaleIsSent.html b/__tests__/html/conversationStartProperties.noLocaleIsSent.html index 3b5ded88c6..b673b24242 100644 --- a/__tests__/html/conversationStartProperties.noLocaleIsSent.html +++ b/__tests__/html/conversationStartProperties.noLocaleIsSent.html @@ -24,7 +24,7 @@ await pageConditions.uiConnected(); await pageObjects.sendMessageViaSendBox('conversationstart'); - await pageConditions.minNumActivitiesShown(1); + await pageConditions.minNumActivitiesShown(2); await host.snapshot(); }); diff --git a/__tests__/html/conversationStartProperties.sendEnUs.html b/__tests__/html/conversationStartProperties.sendEnUs.html index 8083d75c27..74821374f9 100644 --- a/__tests__/html/conversationStartProperties.sendEnUs.html +++ b/__tests__/html/conversationStartProperties.sendEnUs.html @@ -27,7 +27,7 @@ await pageConditions.uiConnected(); await pageObjects.sendMessageViaSendBox('conversationstart'); - await pageConditions.minNumActivitiesShown(1); + await pageConditions.minNumActivitiesShown(2); await host.snapshot(); }); diff --git a/__tests__/html/conversationStartProperties.sendInvalidType.html b/__tests__/html/conversationStartProperties.sendInvalidType.html index a9ff9bff46..4dceace762 100644 --- a/__tests__/html/conversationStartProperties.sendInvalidType.html +++ b/__tests__/html/conversationStartProperties.sendInvalidType.html @@ -27,7 +27,7 @@ await pageConditions.uiConnected(); await pageObjects.sendMessageViaSendBox('conversationstart'); - await pageConditions.minNumActivitiesShown(1); + await pageConditions.minNumActivitiesShown(2); await host.snapshot(); }); diff --git a/__tests__/html/conversationStartProperties.sendNonExisting.html b/__tests__/html/conversationStartProperties.sendNonExisting.html index 8437c39037..84d28b24ea 100644 --- a/__tests__/html/conversationStartProperties.sendNonExisting.html +++ b/__tests__/html/conversationStartProperties.sendNonExisting.html @@ -27,7 +27,7 @@ await pageConditions.uiConnected(); await pageObjects.sendMessageViaSendBox('conversationstart'); - await pageConditions.minNumActivitiesShown(1); + await pageConditions.minNumActivitiesShown(2); await host.snapshot(); }); diff --git a/__tests__/html/conversationStartProperties.sendNonISOFormat.html b/__tests__/html/conversationStartProperties.sendNonISOFormat.html index 2de71308d8..edab8d154c 100644 --- a/__tests__/html/conversationStartProperties.sendNonISOFormat.html +++ b/__tests__/html/conversationStartProperties.sendNonISOFormat.html @@ -27,7 +27,7 @@ await pageConditions.uiConnected(); await pageObjects.sendMessageViaSendBox('conversationstart'); - await pageConditions.minNumActivitiesShown(1); + await pageConditions.minNumActivitiesShown(2); await host.snapshot(); }); diff --git a/__tests__/html/conversationStartProperties.sendZhCn.html b/__tests__/html/conversationStartProperties.sendZhCn.html index 5a806c1e1b..7cbcc79306 100644 --- a/__tests__/html/conversationStartProperties.sendZhCn.html +++ b/__tests__/html/conversationStartProperties.sendZhCn.html @@ -27,7 +27,7 @@ await pageConditions.uiConnected(); await pageObjects.sendMessageViaSendBox('conversationstart'); - await pageConditions.minNumActivitiesShown(1); + await pageConditions.minNumActivitiesShown(2); await host.snapshot(); }); diff --git a/__tests__/html/hooks.useActiveTyping.html b/__tests__/html/hooks.useActiveTyping.html index 26f07fc6ba..49897719fc 100644 --- a/__tests__/html/hooks.useActiveTyping.html +++ b/__tests__/html/hooks.useActiveTyping.html @@ -90,22 +90,28 @@ await pageObjects.typeInSendBox('.'); // THEN: `useActiveTyping` should return both. - await expect(renderWithFunction(() => Object.values(useActiveTyping()[0]))).resolves.toEqual([ - { - at: 600, - expireAt: 5600, - name: expect.any(String), - role: 'bot', - type: 'busy' - }, - { - at: 600, - expireAt: 5600, - name: expect.any(String), - role: 'user', - type: 'busy' - } - ]); + const hookResult = await renderWithFunction(() => Object.values(useActiveTyping()[0])); + + expect(hookResult).toHaveLength(2); + + expect(hookResult).toEqual( + expect.arrayContaining([ + { + at: 600, + expireAt: 5600, + name: expect.any(String), + role: 'bot', + type: 'busy' + }, + { + at: 600, + expireAt: 5600, + name: expect.any(String), + role: 'user', + type: 'busy' + } + ]) + ); });
- + + + + + + + + + + + +diff --git a/__tests__/html/hooks.useActiveTyping.livestream.html b/__tests__/html/hooks.useActiveTyping.livestream.html index a191e61881..64c96c3df0 100644 --- a/__tests__/html/hooks.useActiveTyping.livestream.html +++ b/__tests__/html/hooks.useActiveTyping.livestream.html @@ -74,7 +74,7 @@ { bot: { at: 600, - expireAt: 5600, + expireAt: Infinity, name: 'Bot', role: 'bot', type: 'livestream' diff --git a/__tests__/html/hooks.useActiveTyping.variable.js b/__tests__/html/hooks.useActiveTyping.variable.js deleted file mode 100644 index d750821f8b..0000000000 --- a/__tests__/html/hooks.useActiveTyping.variable.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('useActiveTyping', () => { - test('should support variable timing', () => runHTML('hooks.useActiveTyping.variable.html')); -}); diff --git a/__tests__/html/typing/activityOrder.js b/__tests__/html/typing/activityOrder.js deleted file mode 100644 index fcbd2a8e48..0000000000 --- a/__tests__/html/typing/activityOrder.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('bot sending multiple messages', () => { - test('should sort typing activity in its original order', () => runHTML('typing/activityOrder')); -}); diff --git a/__tests__/html/typing/chunk.js b/__tests__/html/typing/chunk.js deleted file mode 100644 index cb795c1f3b..0000000000 --- a/__tests__/html/typing/chunk.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('bot typing with chunks', () => { - test('should display partial message', () => runHTML('typing/chunk')); -}); diff --git a/__tests__/html/typing/concludedLivestream.js b/__tests__/html/typing/concludedLivestream.js deleted file mode 100644 index 2eff87886c..0000000000 --- a/__tests__/html/typing/concludedLivestream.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('bot reusing concluded livestream session ID', () => { - test('should be ignored', () => runHTML('typing/concludedLivestream')); -}); diff --git a/__tests__/html/typing/informative.js b/__tests__/html/typing/informative.js deleted file mode 100644 index 742379c45e..0000000000 --- a/__tests__/html/typing/informative.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('informative typing message', () => { - test('should be shown as typing indicator', () => runHTML('typing/informative')); -}); diff --git a/__tests__/html/typing/layout.js b/__tests__/html/typing/layout.js deleted file mode 100644 index 0c0f1677ff..0000000000 --- a/__tests__/html/typing/layout.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('Livestreaming', () => { - test('should layout properly', () => runHTML('typing/layout')); -}); diff --git a/__tests__/html/typing/outOfOrder.js b/__tests__/html/typing/outOfOrder.js deleted file mode 100644 index 5e5d8ab0f0..0000000000 --- a/__tests__/html/typing/outOfOrder.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('bot typing message in out-of-order fashion', () => { - test('should sort typing activity in its original order', () => runHTML('typing/outOfOrder')); -}); diff --git a/__tests__/html/typing/outOfOrder.sequenceNumber.js b/__tests__/html/typing/outOfOrder.sequenceNumber.js deleted file mode 100644 index ac2e421ac2..0000000000 --- a/__tests__/html/typing/outOfOrder.sequenceNumber.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('bot typing message in out-of-order fashion', () => { - test('should sort typing activity based on channelData.sequenceNumber', () => runHTML('typing/outOfOrder.sequenceNumber')); -}); diff --git a/__tests__/html/typing/perActivityStyleOptions.js b/__tests__/html/typing/perActivityStyleOptions.js deleted file mode 100644 index 2175f83b8f..0000000000 --- a/__tests__/html/typing/perActivityStyleOptions.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('bot typing message with a custom typing indicator in channelData', () => { - test('should only show/hide typing indicator accordingly', () => runHTML('typing/perActivityStyleOptions')); -}); diff --git a/__tests__/html/typing/simultaneous.js b/__tests__/html/typing/simultaneous.js deleted file mode 100644 index c467feadc0..0000000000 --- a/__tests__/html/typing/simultaneous.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('bot typing multiple messages', () => { - test('should work properly', () => runHTML('typing/simultaneous')); -}); diff --git a/__tests__/html/typing/typingIndicator.shouldNotRevive.js b/__tests__/html/typing/typingIndicator.shouldNotRevive.js deleted file mode 100644 index a506e9bf39..0000000000 --- a/__tests__/html/typing/typingIndicator.shouldNotRevive.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ - -describe('expired typing indicator', () => { - test('should not revive when an OOO message is received', () => runHTML('typing/typingIndicator.shouldNotRevive')); -}); diff --git a/__tests__/html/typingIndicator.liveRegion.multiple.html b/__tests__/html/typingIndicator.liveRegion.multiple.html index 2e87d1fa7b..f0dfae4c93 100644 --- a/__tests__/html/typingIndicator.liveRegion.multiple.html +++ b/__tests__/html/typingIndicator.liveRegion.multiple.html @@ -1,4 +1,4 @@ - +
@@ -8,7 +8,16 @@