diff --git a/.github/workflows/pull-request-validation.yml b/.github/workflows/pull-request-validation.yml index 680f4b05fa..341d3590d9 100644 --- a/.github/workflows/pull-request-validation.yml +++ b/.github/workflows/pull-request-validation.yml @@ -236,11 +236,11 @@ jobs: - run: npm clean-install - - name: Run docker-compose build - run: docker-compose -f docker-compose-wsl2.yml build --build-arg REGISTRY=mcr.microsoft.com/mirror/docker/library + - name: Run docker compose build + run: docker compose -f docker-compose-wsl2.yml build --build-arg REGISTRY=mcr.microsoft.com/mirror/docker/library - - name: Run docker-compose up - run: docker-compose -f docker-compose-wsl2.yml up --detach --scale chrome=2 + - name: Run docker compose up + run: docker compose -f docker-compose-wsl2.yml up --detach --scale chrome=2 - name: Wait for Docker to be ready run: | @@ -269,7 +269,7 @@ jobs: - if: always() name: Print Docker logs - run: docker-compose -f docker-compose-wsl2.yml logs + run: docker compose -f docker-compose-wsl2.yml logs - if: always() name: Append ID to test result diff --git a/__tests__/__image_snapshots__/chrome-docker/style-options-js-style-options-bubble-background-and-color-1-snap.png b/__tests__/__image_snapshots__/chrome-docker/style-options-js-style-options-bubble-background-and-color-1-snap.png deleted file mode 100644 index d9bbfb5417..0000000000 Binary files a/__tests__/__image_snapshots__/chrome-docker/style-options-js-style-options-bubble-background-and-color-1-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/chrome-docker/style-options-js-style-options-hide-scroll-to-bottom-button-1-snap.png b/__tests__/__image_snapshots__/chrome-docker/style-options-js-style-options-hide-scroll-to-bottom-button-1-snap.png deleted file mode 100644 index 8f7c71cce2..0000000000 Binary files a/__tests__/__image_snapshots__/chrome-docker/style-options-js-style-options-hide-scroll-to-bottom-button-1-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/chrome-docker/style-options-js-style-options-hide-scroll-to-bottom-button-2-snap.png b/__tests__/__image_snapshots__/chrome-docker/style-options-js-style-options-hide-scroll-to-bottom-button-2-snap.png deleted file mode 100644 index 153284c88c..0000000000 Binary files a/__tests__/__image_snapshots__/chrome-docker/style-options-js-style-options-hide-scroll-to-bottom-button-2-snap.png and /dev/null differ diff --git a/__tests__/__image_snapshots__/chrome-docker/video-js-video-1-snap.png b/__tests__/__image_snapshots__/chrome-docker/video-js-video-1-snap.png index 12df712fa6..3ca5366456 100644 Binary files a/__tests__/__image_snapshots__/chrome-docker/video-js-video-1-snap.png and b/__tests__/__image_snapshots__/chrome-docker/video-js-video-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/chat-adapter-direct-line-app-service-extension-js-direct-line-app-service-service-chat-adapter-should-connect-to-the-mock-bot-1-snap.png b/__tests__/__image_snapshots__/html/chat-adapter-direct-line-app-service-extension-js-direct-line-app-service-service-chat-adapter-should-connect-to-the-mock-bot-1-snap.png index 76ee65ac0e..3f3c251d51 100644 Binary files a/__tests__/__image_snapshots__/html/chat-adapter-direct-line-app-service-extension-js-direct-line-app-service-service-chat-adapter-should-connect-to-the-mock-bot-1-snap.png and b/__tests__/__image_snapshots__/html/chat-adapter-direct-line-app-service-extension-js-direct-line-app-service-service-chat-adapter-should-connect-to-the-mock-bot-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/conversation-start-properties-no-locale-is-sent-js-conversation-start-properties-with-no-locale-is-sent-should-get-hello-and-welcome-message-1-snap.png b/__tests__/__image_snapshots__/html/conversation-start-properties-no-locale-is-sent-js-conversation-start-properties-with-no-locale-is-sent-should-get-hello-and-welcome-message-1-snap.png index 60e934cd50..712f13b2b8 100644 Binary files a/__tests__/__image_snapshots__/html/conversation-start-properties-no-locale-is-sent-js-conversation-start-properties-with-no-locale-is-sent-should-get-hello-and-welcome-message-1-snap.png and b/__tests__/__image_snapshots__/html/conversation-start-properties-no-locale-is-sent-js-conversation-start-properties-with-no-locale-is-sent-should-get-hello-and-welcome-message-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/conversation-start-properties-send-en-us-js-conversation-start-properties-with-locale-of-en-us-should-get-hello-and-welcome-message-1-snap.png b/__tests__/__image_snapshots__/html/conversation-start-properties-send-en-us-js-conversation-start-properties-with-locale-of-en-us-should-get-hello-and-welcome-message-1-snap.png index 60e934cd50..70325cd939 100644 Binary files a/__tests__/__image_snapshots__/html/conversation-start-properties-send-en-us-js-conversation-start-properties-with-locale-of-en-us-should-get-hello-and-welcome-message-1-snap.png and b/__tests__/__image_snapshots__/html/conversation-start-properties-send-en-us-js-conversation-start-properties-with-locale-of-en-us-should-get-hello-and-welcome-message-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/conversation-start-properties-send-invalid-type-js-conversation-start-properties-with-locale-of-invalid-type-should-get-hello-and-welcome-message-1-snap.png b/__tests__/__image_snapshots__/html/conversation-start-properties-send-invalid-type-js-conversation-start-properties-with-locale-of-invalid-type-should-get-hello-and-welcome-message-1-snap.png index 60e934cd50..712f13b2b8 100644 Binary files a/__tests__/__image_snapshots__/html/conversation-start-properties-send-invalid-type-js-conversation-start-properties-with-locale-of-invalid-type-should-get-hello-and-welcome-message-1-snap.png and b/__tests__/__image_snapshots__/html/conversation-start-properties-send-invalid-type-js-conversation-start-properties-with-locale-of-invalid-type-should-get-hello-and-welcome-message-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/conversation-start-properties-send-non-existing-js-conversation-start-properties-with-non-existing-locale-should-get-hello-and-welcome-message-1-snap.png b/__tests__/__image_snapshots__/html/conversation-start-properties-send-non-existing-js-conversation-start-properties-with-non-existing-locale-should-get-hello-and-welcome-message-1-snap.png index 60e934cd50..7c662e4c4c 100644 Binary files a/__tests__/__image_snapshots__/html/conversation-start-properties-send-non-existing-js-conversation-start-properties-with-non-existing-locale-should-get-hello-and-welcome-message-1-snap.png and b/__tests__/__image_snapshots__/html/conversation-start-properties-send-non-existing-js-conversation-start-properties-with-non-existing-locale-should-get-hello-and-welcome-message-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/conversation-start-properties-send-non-iso-format-js-conversation-start-properties-with-non-iso-format-locale-should-get-hello-and-welcome-message-1-snap.png b/__tests__/__image_snapshots__/html/conversation-start-properties-send-non-iso-format-js-conversation-start-properties-with-non-iso-format-locale-should-get-hello-and-welcome-message-1-snap.png index 60e934cd50..809585b2b9 100644 Binary files a/__tests__/__image_snapshots__/html/conversation-start-properties-send-non-iso-format-js-conversation-start-properties-with-non-iso-format-locale-should-get-hello-and-welcome-message-1-snap.png and b/__tests__/__image_snapshots__/html/conversation-start-properties-send-non-iso-format-js-conversation-start-properties-with-non-iso-format-locale-should-get-hello-and-welcome-message-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/conversation-start-properties-send-zh-cn-js-conversation-start-properties-with-locale-of-zh-cn-should-get-hello-and-welcome-in-simplified-chinese-1-snap.png b/__tests__/__image_snapshots__/html/conversation-start-properties-send-zh-cn-js-conversation-start-properties-with-locale-of-zh-cn-should-get-hello-and-welcome-in-simplified-chinese-1-snap.png index 029b279549..3bd852d2df 100644 Binary files a/__tests__/__image_snapshots__/html/conversation-start-properties-send-zh-cn-js-conversation-start-properties-with-locale-of-zh-cn-should-get-hello-and-welcome-in-simplified-chinese-1-snap.png and b/__tests__/__image_snapshots__/html/conversation-start-properties-send-zh-cn-js-conversation-start-properties-with-locale-of-zh-cn-should-get-hello-and-welcome-in-simplified-chinese-1-snap.png differ diff --git a/__tests__/__image_snapshots__/html/style-options-bubble-border-js-bubble-border-with-color-radius-style-and-width-set-1-snap.png b/__tests__/__image_snapshots__/html/style-options-bubble-border-js-bubble-border-with-color-radius-style-and-width-set-1-snap.png index 5b1dd598f0..63699f251f 100644 Binary files a/__tests__/__image_snapshots__/html/style-options-bubble-border-js-bubble-border-with-color-radius-style-and-width-set-1-snap.png and b/__tests__/__image_snapshots__/html/style-options-bubble-border-js-bubble-border-with-color-radius-style-and-width-set-1-snap.png differ diff --git a/__tests__/__image_snapshots__/chrome-docker/file-attachment-js-show-zip-files-with-content-url-1-snap.png b/__tests__/__image_snapshots__/html/upload-zip-file-with-content-url-js-upload-a-zip-file-with-content-url-should-send-1-snap.png similarity index 100% rename from __tests__/__image_snapshots__/chrome-docker/file-attachment-js-show-zip-files-with-content-url-1-snap.png rename to __tests__/__image_snapshots__/html/upload-zip-file-with-content-url-js-upload-a-zip-file-with-content-url-should-send-1-snap.png diff --git a/__tests__/__image_snapshots__/chrome-docker/file-attachment-js-show-zip-files-without-content-url-1-snap.png b/__tests__/__image_snapshots__/html/upload-zip-file-without-content-url-js-upload-a-zip-file-without-content-url-should-send-1-snap.png similarity index 100% rename from __tests__/__image_snapshots__/chrome-docker/file-attachment-js-show-zip-files-without-content-url-1-snap.png rename to __tests__/__image_snapshots__/html/upload-zip-file-without-content-url-js-upload-a-zip-file-without-content-url-should-send-1-snap.png diff --git a/__tests__/fileAttachment.js b/__tests__/fileAttachment.js deleted file mode 100644 index 383116841a..0000000000 --- a/__tests__/fileAttachment.js +++ /dev/null @@ -1,139 +0,0 @@ -import { imageSnapshotOptions, timeouts } from './constants.json'; - -import allImagesLoaded from './setup/conditions/allImagesLoaded'; -import minNumActivitiesShown from './setup/conditions/minNumActivitiesShown'; -import uiConnected from './setup/conditions/uiConnected'; -import getActivityElements from './setup/elements/getActivityElements'; - -// selenium-webdriver API doc: -// https://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_WebDriver.html - -jest.setTimeout(timeouts.test); - -test('show ZIP files with contentUrl', async () => { - const { driver, pageObjects } = await setupWebDriver({ - createDirectLine: options => { - const directLine = window.WebChat.createDirectLine(options); - const patchedDirectLine = { - activity$: new Observable(observer => { - const subscription = directLine.activity$.subscribe({ - next(activity) { - observer.next( - Object.assign({}, activity, { - attachments: (activity.attachments || []).map(attachment => - Object.assign({}, attachment, { - contentUrl: 'https://example.org/' - }) - ) - }) - ); - } - }); - - return () => subscription.unsubscribe(); - }), - - connectionStatus$: directLine.connectionStatus$, - postActivity: directLine.postActivity.bind(directLine), - token: directLine.token - }; - - return patchedDirectLine; - }, - props: { styleOptions: { sendAttachmentOn: 'attach' } } - }); - - await driver.wait(uiConnected(), timeouts.directLine); - - await pageObjects.sendFile('empty.zip'); - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); - - const [firstActivity, secondActivity] = await getActivityElements(driver); - - await expect( - driver.executeScript( - firstActivity => firstActivity.querySelector('a[target="_blank"]').getAttribute('href'), - firstActivity - ) - ).resolves.toEqual('https://example.org/'); - - await expect( - driver.executeScript( - firstActivity => firstActivity.querySelector('a[target="_blank"]').getAttribute('download'), - firstActivity - ) - ).resolves.toEqual('empty.zip'); - - await expect( - driver.executeScript( - secondActivity => secondActivity.querySelector('a[target="_blank"]').getAttribute('href'), - secondActivity - ) - ).resolves.toEqual('https://example.org/'); - - await expect( - driver.executeScript( - secondActivity => secondActivity.querySelector('a[target="_blank"]').getAttribute('download'), - secondActivity - ) - ).resolves.toEqual('empty.zip'); -}); - -test('show ZIP files without contentUrl', async () => { - const { driver, pageObjects } = await setupWebDriver({ - createDirectLine: options => { - const directLine = window.WebChat.createDirectLine(options); - const patchedDirectLine = { - activity$: new Observable(observer => { - const subscription = directLine.activity$.subscribe({ - next(activity) { - observer.next( - Object.assign({}, activity, { - attachments: (activity.attachments || []).map(attachment => - Object.assign({}, attachment, { - contentUrl: undefined - }) - ) - }) - ); - } - }); - - return () => subscription.unsubscribe(); - }), - - connectionStatus$: directLine.connectionStatus$, - postActivity: directLine.postActivity.bind(directLine), - token: directLine.token - }; - - return patchedDirectLine; - }, - props: { styleOptions: { sendAttachmentOn: 'attach' } } - }); - - await driver.wait(uiConnected(), timeouts.directLine); - - await pageObjects.sendFile('empty.zip'); - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); - - await expect( - driver.executeScript(() => !!document.querySelector('[role="listitem"]:nth-child(1) a')) - ).resolves.toBeFalsy(); - await expect( - driver.executeScript(() => !!document.querySelector('[role="listitem"]:nth-child(2) a')) - ).resolves.toBeFalsy(); - await expect( - driver.executeScript(() => !!document.querySelector('[role="listitem"]:nth-child(1) a')) - ).resolves.toBeFalsy(); -}); diff --git a/__tests__/hooks/useReferenceGrammarId.js b/__tests__/hooks/useReferenceGrammarId.js deleted file mode 100644 index ac534329b8..0000000000 --- a/__tests__/hooks/useReferenceGrammarId.js +++ /dev/null @@ -1,33 +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 return reference grammar ID', async () => { - const { pageObjects } = await setupWebDriver({ - createDirectLine: options => { - const workingDirectLine = window.WebChat.createDirectLine(options); - - return { - activity$: workingDirectLine.activity$, - connectionStatus$: workingDirectLine.connectionStatus$, - getSessionId: workingDirectLine.getSessionId.bind(workingDirectLine), - postActivity: workingDirectLine.postActivity.bind(workingDirectLine), - referenceGrammarId: '12345678-1234-5678-abcd-12345678abcd' - }; - } - }); - - const [referenceGrammarID] = await pageObjects.runHook('useReferenceGrammarID'); - - expect(referenceGrammarID).toBe('12345678-1234-5678-abcd-12345678abcd'); -}); - -test('setter should be falsy', async () => { - const { pageObjects } = await setupWebDriver(); - const [_, setReferenceGrammarID] = await pageObjects.runHook('useReferenceGrammarID'); - - expect(setReferenceGrammarID).toBeFalsy(); -}); diff --git a/__tests__/html/assets/uploads/empty.zip b/__tests__/html/assets/uploads/empty.zip new file mode 100644 index 0000000000..37e10a926f Binary files /dev/null and b/__tests__/html/assets/uploads/empty.zip differ diff --git a/__tests__/html/chatAdapter.directLineAppServiceExtension.html b/__tests__/html/chatAdapter.directLineAppServiceExtension.html index 3f50ef624a..af4f9cb00d 100644 --- a/__tests__/html/chatAdapter.directLineAppServiceExtension.html +++ b/__tests__/html/chatAdapter.directLineAppServiceExtension.html @@ -1,4 +1,4 @@ - + @@ -10,19 +10,18 @@
+ + + + + + + +
+ + + diff --git a/__tests__/html/hooks.useReferenceGrammarId.js b/__tests__/html/hooks.useReferenceGrammarId.js new file mode 100644 index 0000000000..c1136cd13b --- /dev/null +++ b/__tests__/html/hooks.useReferenceGrammarId.js @@ -0,0 +1,5 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('useReferenceGrammarId', () => { + test('should return value', () => runHTML('hooks.useReferenceGrammarId.html')); +}); diff --git a/__tests__/html/speech.customAudioConfig.html b/__tests__/html/speech.customAudioConfig.html index c84cb5b2f7..32d9508357 100644 --- a/__tests__/html/speech.customAudioConfig.html +++ b/__tests__/html/speech.customAudioConfig.html @@ -11,7 +11,7 @@ + + + + +
+ + + diff --git a/__tests__/html/upload/uploadZipFileWithContentURL.js b/__tests__/html/upload/uploadZipFileWithContentURL.js new file mode 100644 index 0000000000..d67c3066e4 --- /dev/null +++ b/__tests__/html/upload/uploadZipFileWithContentURL.js @@ -0,0 +1,5 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('upload a zip file with contentURL', () => { + test('should send', () => runHTML('upload/uploadZipFileWithContentURL')); +}); diff --git a/__tests__/html/upload/uploadZipFileWithoutContentURL.html b/__tests__/html/upload/uploadZipFileWithoutContentURL.html new file mode 100644 index 0000000000..69e648ecbf --- /dev/null +++ b/__tests__/html/upload/uploadZipFileWithoutContentURL.html @@ -0,0 +1,68 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html/upload/uploadZipFileWithoutContentURL.js b/__tests__/html/upload/uploadZipFileWithoutContentURL.js new file mode 100644 index 0000000000..57115ea8cf --- /dev/null +++ b/__tests__/html/upload/uploadZipFileWithoutContentURL.js @@ -0,0 +1,5 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('upload a zip file without contentURL', () => { + test('should send', () => runHTML('upload/uploadZipFileWithoutContentURL')); +}); diff --git a/__tests__/setup/setupTestFramework.js b/__tests__/setup/setupTestFramework.js index 7c7db9e974..5b087932ff 100644 --- a/__tests__/setup/setupTestFramework.js +++ b/__tests__/setup/setupTestFramework.js @@ -72,7 +72,8 @@ global.setupWebDriver = async options => { return { driver, pageObjects }; } catch (err) { try { - console.log('Browser console logs at exception', await getBrowserConsoleLogs(driver)); + console.error(err); + console.error('Browser console logs at exception', await getBrowserConsoleLogs(driver)); } catch (err) {} await driver.quit(); diff --git a/__tests__/setup/web/index.html b/__tests__/setup/web/index.html index 23f5fb7ae4..42ba45e31b 100644 --- a/__tests__/setup/web/index.html +++ b/__tests__/setup/web/index.html @@ -167,7 +167,7 @@ } else { const { token } = await retry(async () => { try { - const res = await fetch('https://webchat-mockbot.azurewebsites.net/directline/token', { + const res = await fetch('https://hawo-mockbot4-token-app.blueriver-ce85e8f0.westus.azurecontainerapps.io/api/token/directline', { method: 'POST', timeout: 2000 }); diff --git a/__tests__/styleOptions.js b/__tests__/styleOptions.js deleted file mode 100644 index b0ebf2d8e4..0000000000 --- a/__tests__/styleOptions.js +++ /dev/null @@ -1,95 +0,0 @@ -import { imageSnapshotOptions, timeouts } from './constants.json'; - -import minNumActivitiesShown from './setup/conditions/minNumActivitiesShown'; -import negationOf from './setup/conditions/negationOf'; -import scrollToBottomButtonVisible from './setup/conditions/scrollToBottomButtonVisible'; -import scrollToBottomCompleted from './setup/conditions/scrollToBottomCompleted'; -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); - -describe('style options', () => { - test('bubble background and color', async () => { - const { driver, pageObjects } = await setupWebDriver({ - props: { - styleOptions: { - bubbleBackground: '#900', - bubbleBorderColor: 'rgba(0, 0, 0, .5)', - bubbleBorderWidth: 2, - bubbleFromUserBackground: '#090', - bubbleFromUserBorderColor: 'rgba(0, 0, 0, .5)', - bubbleFromUserBorderWidth: 2, - bubbleFromUserNubSize: 10, - bubbleFromUserTextColor: 'rgba(255, 255, 255, .5)', - bubbleNubSize: 10, - bubbleTextColor: 'rgba(255, 255, 255, .5)' - } - } - }); - - await driver.wait(uiConnected(), timeouts.directLine); - await pageObjects.sendMessageViaSendBox('echo This will set bubble background and text color.', { - waitForSend: true - }); - - await driver.wait(minNumActivitiesShown(3), timeouts.directLine); - - expect(await driver.takeScreenshot()).toMatchImageSnapshot(imageSnapshotOptions); - }); - - test('hide scroll to bottom button', async () => { - const { driver, pageObjects } = await setupWebDriver({ - createDirectLine: options => { - const workingDirectLine = window.WebChat.createDirectLine(options); - - return { - activity$: new Observable(activityObserver => { - window.WebChatTest.activityObserver = activityObserver; - - const subscription = workingDirectLine.activity$.subscribe({ - complete: () => activityObserver.complete(), - error: value => activityObserver.error(value), - next: value => activityObserver.next(value) - }); - - return () => subscription.unsubscribe(); - }), - connectionStatus$: workingDirectLine.connectionStatus$, - postActivity: workingDirectLine.postActivity.bind(workingDirectLine), - token: workingDirectLine.token - }; - }, - setup: () => window.WebChatTest.loadScript('https://unpkg.com/core-js@2.6.3/client/core.min.js') - }); - - await driver.wait(uiConnected(), timeouts.directLine); - await pageObjects.sendMessageViaSendBox('markdown', { waitForSend: true }); - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(scrollToBottomCompleted(), timeouts.ui); - - await pageObjects.scrollToTop(); - - await driver.executeScript(() => { - window.WebChatTest.activityObserver.next({ - from: { - id: 'bot', - role: 'bot' - }, - text: 'Hello, World!', - type: 'message' - }); - }); - - await driver.wait(minNumActivitiesShown(3), timeouts.directLine); - await driver.wait(scrollToBottomButtonVisible(), timeouts.ui); - expect(await driver.takeScreenshot()).toMatchImageSnapshot(imageSnapshotOptions); - - await pageObjects.updateProps({ styleOptions: { scrollToEndButtonBehavior: false } }); - - await driver.wait(negationOf(scrollToBottomButtonVisible()), timeouts.ui); - expect(await driver.takeScreenshot()).toMatchImageSnapshot(imageSnapshotOptions); - }); -}); diff --git a/package.json b/package.json index 06a44287e1..23568680d0 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,8 @@ "bump:packages": "for i in `find packages -name package.json ! -path */node_modules/* | xargs realpath | xargs dirname`; do echo \u001b[32m--- Bumping $i/package.json ---\u001b[0m; cd $i; npm run bump; if [ $? -ne 0 ]; then echo \u001b[31m--- Error while bumping $i/package.json ---\u001b[0m; break; fi; cd $OLDPWD; done; echo \u001b[32m--- Bump completed ---\u001b[0m && lerna clean --yes && lerna bootstrap", "bump:samples": "for i in `find samples -name package.json ! -path */node_modules/* | xargs realpath | xargs dirname`; do echo \u001b[32m--- Bumping $i/package.json ---\u001b[0m; cd $i; npm run bump; if [ $? -ne 0 ]; then echo \u001b[31m--- Error while bumping $i/package.json ---\u001b[0m; break; fi; cd $OLDPWD; done; echo \u001b[32m--- Bump completed ---\u001b[0m", "docker": "npm run docker:up", - "docker:down": "docker-compose -f docker-compose-wsl2.yml down --rmi all", - "docker:up": "docker-compose -f docker-compose-wsl2.yml down && docker-compose -f docker-compose-wsl2.yml up --build --scale chrome=4", + "docker:down": "docker compose -f docker-compose-wsl2.yml down --rmi all", + "docker:up": "docker compose -f docker-compose-wsl2.yml down && docker compose -f docker-compose-wsl2.yml up --build --scale chrome=4", "eslint": "npm run precommit", "lint-staged": "lint-staged", "pack-all": "npx lerna exec --scope=botframework* -- npm pack --pack-destination=$PWD && zip tarball.zip *.tgz", diff --git a/packages/test/page-object/src/globals/testHelpers/token/fetchDirectLineAppServiceExtensionToken.js b/packages/test/page-object/src/globals/testHelpers/token/fetchDirectLineAppServiceExtensionToken.js index e85444420a..a16411e806 100644 --- a/packages/test/page-object/src/globals/testHelpers/token/fetchDirectLineAppServiceExtensionToken.js +++ b/packages/test/page-object/src/globals/testHelpers/token/fetchDirectLineAppServiceExtensionToken.js @@ -1,7 +1,8 @@ -export default async function fetchDirectLineAppServiceExtensionToken( - url = 'https://webchat-mockbot3.azurewebsites.net/api/token/directlinease' -) { - const res = await fetch(url, { method: 'POST' }); +export default async function fetchDirectLineAppServiceExtensionToken() { + const res = await fetch( + 'https://hawo-mockbot4-token-app.blueriver-ce85e8f0.westus.azurecontainerapps.io/api/token/directlinease', + { method: 'POST' } + ); if (!res.ok) { throw new Error('Failed to fetch Direct Line App Service Extension token.'); @@ -9,5 +10,5 @@ export default async function fetchDirectLineAppServiceExtensionToken( const { token } = await res.json(); - return token; + return { domain: new URL('https://hawo-mockbot4-bot-app.azurewebsites.net/.bot/v3/directline').toString(), token }; } diff --git a/packages/test/page-object/src/globals/testHelpers/token/fetchDirectLineSpeechCredentials.js b/packages/test/page-object/src/globals/testHelpers/token/fetchDirectLineSpeechCredentials.js index e92fe493dd..5c9d40d3a5 100644 --- a/packages/test/page-object/src/globals/testHelpers/token/fetchDirectLineSpeechCredentials.js +++ b/packages/test/page-object/src/globals/testHelpers/token/fetchDirectLineSpeechCredentials.js @@ -5,9 +5,12 @@ function createFetchDirectLineSpeechCredentials() { return () => { if (!resultPromise || Date.now() > expireAfter) { expireAfter = Date.now() + 5000; - resultPromise = fetch('https://webchat-mockbot-streaming.azurewebsites.net/speechservices/token', { - method: 'POST' - }) + resultPromise = fetch( + 'https://hawo-mockbot4-token-app.blueriver-ce85e8f0.westus.azurecontainerapps.io/api/token/speech', + { + method: 'POST' + } + ) .then(res => { if (!res.ok) { throw new Error('Failed to fetch Direct Line Speech credentials.'); diff --git a/packages/test/page-object/src/globals/testHelpers/token/fetchDirectLineToken.js b/packages/test/page-object/src/globals/testHelpers/token/fetchDirectLineToken.js index 092c05e1fd..4f6e703cc8 100644 --- a/packages/test/page-object/src/globals/testHelpers/token/fetchDirectLineToken.js +++ b/packages/test/page-object/src/globals/testHelpers/token/fetchDirectLineToken.js @@ -1,4 +1,6 @@ -export default async function fetchDirectLineToken(url = 'https://webchat-mockbot.azurewebsites.net/directline/token') { +export default async function fetchDirectLineToken( + url = 'https://hawo-mockbot4-token-app.blueriver-ce85e8f0.westus.azurecontainerapps.io/api/token/directline' +) { const res = await fetch(url, { method: 'POST' }); if (!res.ok) { diff --git a/packages/test/page-object/src/globals/testHelpers/token/fetchSpeechServicesCredentials.js b/packages/test/page-object/src/globals/testHelpers/token/fetchSpeechServicesCredentials.js index cc32c57301..1a7b5af62d 100644 --- a/packages/test/page-object/src/globals/testHelpers/token/fetchSpeechServicesCredentials.js +++ b/packages/test/page-object/src/globals/testHelpers/token/fetchSpeechServicesCredentials.js @@ -2,7 +2,7 @@ function createFetchSpeechServicesCredentials() { let expireAfter = 0; let resultPromise; - return (url = 'https://webchat-mockbot.azurewebsites.net/speechservices/token') => { + return (url = 'https://hawo-mockbot4-token-app.blueriver-ce85e8f0.westus.azurecontainerapps.io/api/token/speech') => { if (!resultPromise || Date.now() > expireAfter) { expireAfter = Date.now() + 5000; resultPromise = fetch(url, { method: 'POST' })