diff --git a/__tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-with-custom-thumbnail-quality-1-snap.png b/__tests__/__image_snapshots__/html/custom-thumbnail-quality-js-with-web-worker-upload-a-picture-with-custom-thumbnail-quality-should-send-1-snap.png similarity index 100% rename from __tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-with-custom-thumbnail-quality-1-snap.png rename to __tests__/__image_snapshots__/html/custom-thumbnail-quality-js-with-web-worker-upload-a-picture-with-custom-thumbnail-quality-should-send-1-snap.png diff --git a/__tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-without-web-worker-with-custom-thumbnail-quality-1-snap.png b/__tests__/__image_snapshots__/html/custom-thumbnail-quality-js-without-web-worker-upload-a-picture-with-custom-thumbnail-quality-should-send-1-snap.png similarity index 93% rename from __tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-without-web-worker-with-custom-thumbnail-quality-1-snap.png rename to __tests__/__image_snapshots__/html/custom-thumbnail-quality-js-without-web-worker-upload-a-picture-with-custom-thumbnail-quality-should-send-1-snap.png index 296e10b78f..18b1508a7b 100644 Binary files a/__tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-without-web-worker-with-custom-thumbnail-quality-1-snap.png and b/__tests__/__image_snapshots__/html/custom-thumbnail-quality-js-without-web-worker-upload-a-picture-with-custom-thumbnail-quality-should-send-1-snap.png differ diff --git a/__tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-with-custom-thumbnail-size-1-snap.png b/__tests__/__image_snapshots__/html/custom-thumbnail-size-js-with-web-worker-upload-a-picture-with-custom-thumbnail-size-should-send-1-snap.png similarity index 95% rename from __tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-with-custom-thumbnail-size-1-snap.png rename to __tests__/__image_snapshots__/html/custom-thumbnail-size-js-with-web-worker-upload-a-picture-with-custom-thumbnail-size-should-send-1-snap.png index a719b8ca6c..eaef99105e 100644 Binary files a/__tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-with-custom-thumbnail-size-1-snap.png and b/__tests__/__image_snapshots__/html/custom-thumbnail-size-js-with-web-worker-upload-a-picture-with-custom-thumbnail-size-should-send-1-snap.png differ diff --git a/__tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-without-web-worker-with-custom-thumbnail-size-1-snap.png b/__tests__/__image_snapshots__/html/custom-thumbnail-size-js-without-web-worker-upload-a-picture-with-custom-thumbnail-size-should-send-1-snap.png similarity index 96% rename from __tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-without-web-worker-with-custom-thumbnail-size-1-snap.png rename to __tests__/__image_snapshots__/html/custom-thumbnail-size-js-without-web-worker-upload-a-picture-with-custom-thumbnail-size-should-send-1-snap.png index e8beb2e7f9..c9181c4d8a 100644 Binary files a/__tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-without-web-worker-with-custom-thumbnail-size-1-snap.png and b/__tests__/__image_snapshots__/html/custom-thumbnail-size-js-without-web-worker-upload-a-picture-with-custom-thumbnail-size-should-send-1-snap.png differ diff --git a/__tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-without-web-worker-1-snap.png b/__tests__/__image_snapshots__/html/simple-js-without-web-worker-upload-a-picture-without-web-worker-should-send-1-snap.png similarity index 93% rename from __tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-without-web-worker-1-snap.png rename to __tests__/__image_snapshots__/html/simple-js-without-web-worker-upload-a-picture-without-web-worker-should-send-1-snap.png index a2c1fa0332..582b604bc2 100644 Binary files a/__tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-without-web-worker-1-snap.png and b/__tests__/__image_snapshots__/html/simple-js-without-web-worker-upload-a-picture-without-web-worker-should-send-1-snap.png differ diff --git a/__tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-txt-plain-file-1-snap.png b/__tests__/__image_snapshots__/html/upload-plain-text-file-js-upload-a-plain-text-file-should-send-1-snap.png similarity index 100% rename from __tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-txt-plain-file-1-snap.png rename to __tests__/__image_snapshots__/html/upload-plain-text-file-js-upload-a-plain-text-file-should-send-1-snap.png diff --git a/__tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-zip-file-1-snap.png b/__tests__/__image_snapshots__/html/upload-zip-file-js-upload-a-zip-file-should-send-1-snap.png similarity index 100% rename from __tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-zip-file-1-snap.png rename to __tests__/__image_snapshots__/html/upload-zip-file-js-upload-a-zip-file-should-send-1-snap.png diff --git a/__tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-2-snap.png b/__tests__/__image_snapshots__/html/with-telemetry-js-with-web-worker-upload-a-picture-should-send-telemetry-1-snap.png similarity index 90% rename from __tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-2-snap.png rename to __tests__/__image_snapshots__/html/with-telemetry-js-with-web-worker-upload-a-picture-should-send-telemetry-1-snap.png index ab225c984d..982cd34a71 100644 Binary files a/__tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-2-snap.png and b/__tests__/__image_snapshots__/html/with-telemetry-js-with-web-worker-upload-a-picture-should-send-telemetry-1-snap.png differ diff --git a/__tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-with-custom-thumbnail-disabled-1-snap.png b/__tests__/__image_snapshots__/html/without-thumbnail-js-with-web-worker-upload-a-picture-without-thumbnail-should-send-1-snap.png similarity index 100% rename from __tests__/__image_snapshots__/chrome-docker/upload-js-upload-a-picture-with-custom-thumbnail-disabled-1-snap.png rename to __tests__/__image_snapshots__/html/without-thumbnail-js-with-web-worker-upload-a-picture-without-thumbnail-should-send-1-snap.png diff --git a/__tests__/html/upload/uploadPlainTextFile.html b/__tests__/html/upload/uploadPlainTextFile.html new file mode 100644 index 0000000000..9d9c5fba50 --- /dev/null +++ b/__tests__/html/upload/uploadPlainTextFile.html @@ -0,0 +1,36 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html/upload/uploadPlainTextFile.js b/__tests__/html/upload/uploadPlainTextFile.js new file mode 100644 index 0000000000..75bfb38580 --- /dev/null +++ b/__tests__/html/upload/uploadPlainTextFile.js @@ -0,0 +1,5 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('upload a plain text file', () => { + test('should send', () => runHTML('upload/uploadPlainTextFile')); +}); diff --git a/__tests__/html/upload/uploadZipFile.html b/__tests__/html/upload/uploadZipFile.html new file mode 100644 index 0000000000..efdc442fd9 --- /dev/null +++ b/__tests__/html/upload/uploadZipFile.html @@ -0,0 +1,36 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html/upload/uploadZipFile.js b/__tests__/html/upload/uploadZipFile.js new file mode 100644 index 0000000000..9f5d3cfaa7 --- /dev/null +++ b/__tests__/html/upload/uploadZipFile.js @@ -0,0 +1,5 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('upload a zip file', () => { + test('should send', () => runHTML('upload/uploadZipFile')); +}); diff --git a/__tests__/html/upload/withWebWorker/customThumbnailQuality.html b/__tests__/html/upload/withWebWorker/customThumbnailQuality.html new file mode 100644 index 0000000000..82a2f2fbe4 --- /dev/null +++ b/__tests__/html/upload/withWebWorker/customThumbnailQuality.html @@ -0,0 +1,39 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html/upload/withWebWorker/customThumbnailQuality.js b/__tests__/html/upload/withWebWorker/customThumbnailQuality.js new file mode 100644 index 0000000000..19dae95c4e --- /dev/null +++ b/__tests__/html/upload/withWebWorker/customThumbnailQuality.js @@ -0,0 +1,5 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('with Web Worker upload a picture with custom thumbnail quality', () => { + test('should send', () => runHTML('upload/withWebWorker/customThumbnailQuality')); +}); diff --git a/__tests__/html/upload/withWebWorker/customThumbnailSize.html b/__tests__/html/upload/withWebWorker/customThumbnailSize.html new file mode 100644 index 0000000000..3ed91bc9f7 --- /dev/null +++ b/__tests__/html/upload/withWebWorker/customThumbnailSize.html @@ -0,0 +1,41 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html/upload/withWebWorker/customThumbnailSize.js b/__tests__/html/upload/withWebWorker/customThumbnailSize.js new file mode 100644 index 0000000000..68a1f1a303 --- /dev/null +++ b/__tests__/html/upload/withWebWorker/customThumbnailSize.js @@ -0,0 +1,5 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('with Web Worker upload a picture with custom thumbnail size', () => { + test('should send', () => runHTML('upload/withWebWorker/customThumbnailSize')); +}); diff --git a/__tests__/html/upload/withWebWorker/withTelemetry.html b/__tests__/html/upload/withWebWorker/withTelemetry.html new file mode 100644 index 0000000000..15e16664cb --- /dev/null +++ b/__tests__/html/upload/withWebWorker/withTelemetry.html @@ -0,0 +1,132 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html/upload/withWebWorker/withTelemetry.js b/__tests__/html/upload/withWebWorker/withTelemetry.js new file mode 100644 index 0000000000..171eaa8d07 --- /dev/null +++ b/__tests__/html/upload/withWebWorker/withTelemetry.js @@ -0,0 +1,5 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('with Web Worker upload a picture', () => { + test('should send telemetry', () => runHTML('upload/withWebWorker/withTelemetry')); +}); diff --git a/__tests__/html/upload/withWebWorker/withoutThumbnail.html b/__tests__/html/upload/withWebWorker/withoutThumbnail.html new file mode 100644 index 0000000000..90826fcc80 --- /dev/null +++ b/__tests__/html/upload/withWebWorker/withoutThumbnail.html @@ -0,0 +1,39 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html/upload/withWebWorker/withoutThumbnail.js b/__tests__/html/upload/withWebWorker/withoutThumbnail.js new file mode 100644 index 0000000000..6e712be428 --- /dev/null +++ b/__tests__/html/upload/withWebWorker/withoutThumbnail.js @@ -0,0 +1,5 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('with Web Worker upload a picture without thumbnail', () => { + test('should send', () => runHTML('upload/withWebWorker/withoutThumbnail')); +}); diff --git a/__tests__/html/upload/withoutWebWorker/customThumbnailQuality.html b/__tests__/html/upload/withoutWebWorker/customThumbnailQuality.html new file mode 100644 index 0000000000..33fe8ac72d --- /dev/null +++ b/__tests__/html/upload/withoutWebWorker/customThumbnailQuality.html @@ -0,0 +1,41 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html/upload/withoutWebWorker/customThumbnailQuality.js b/__tests__/html/upload/withoutWebWorker/customThumbnailQuality.js new file mode 100644 index 0000000000..6cdf858c59 --- /dev/null +++ b/__tests__/html/upload/withoutWebWorker/customThumbnailQuality.js @@ -0,0 +1,5 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('without Web Worker upload a picture with custom thumbnail quality', () => { + test('should send', () => runHTML('upload/withoutWebWorker/customThumbnailQuality')); +}); diff --git a/__tests__/html/upload/withoutWebWorker/customThumbnailSize.html b/__tests__/html/upload/withoutWebWorker/customThumbnailSize.html new file mode 100644 index 0000000000..bdef87cf3a --- /dev/null +++ b/__tests__/html/upload/withoutWebWorker/customThumbnailSize.html @@ -0,0 +1,43 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html/upload/withoutWebWorker/customThumbnailSize.js b/__tests__/html/upload/withoutWebWorker/customThumbnailSize.js new file mode 100644 index 0000000000..379e321b1b --- /dev/null +++ b/__tests__/html/upload/withoutWebWorker/customThumbnailSize.js @@ -0,0 +1,5 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('without Web Worker upload a picture with custom thumbnail size', () => { + test('should send', () => runHTML('upload/withoutWebWorker/customThumbnailSize')); +}); diff --git a/__tests__/html/upload/withoutWebWorker/simple.html b/__tests__/html/upload/withoutWebWorker/simple.html new file mode 100644 index 0000000000..06cbe98ce4 --- /dev/null +++ b/__tests__/html/upload/withoutWebWorker/simple.html @@ -0,0 +1,38 @@ + + + + + + + + + +
+ + + diff --git a/__tests__/html/upload/withoutWebWorker/simple.js b/__tests__/html/upload/withoutWebWorker/simple.js new file mode 100644 index 0000000000..3861683324 --- /dev/null +++ b/__tests__/html/upload/withoutWebWorker/simple.js @@ -0,0 +1,5 @@ +/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ + +describe('without Web Worker upload a picture without Web Worker', () => { + test('should send', () => runHTML('upload/withoutWebWorker/simple')); +}); diff --git a/__tests__/upload.js b/__tests__/upload.js deleted file mode 100644 index 85ccc40864..0000000000 --- a/__tests__/upload.js +++ /dev/null @@ -1,311 +0,0 @@ -/* eslint no-magic-numbers: "off" */ -/* eslint no-undef: "off" */ - -import { imageSnapshotOptions, timeouts } from './constants.json'; - -import allImagesLoaded from './setup/conditions/allImagesLoaded'; -import minNumActivitiesShown from './setup/conditions/minNumActivitiesShown'; -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('upload a picture', () => { - test('', async () => { - const { driver, pageObjects } = await setupWebDriver({ - props: { - onTelemetry: event => { - const { data, dimensions, duration, error, fatal, name, type, value } = event; - - window.WebChatTest.telemetryMeasurements.push({ - data, - dimensions, - duration, - error, - fatal, - name, - type, - value - }); - } - }, - setup: () => { - window.WebChatTest.telemetryMeasurements = []; - }, - // TODO: [P3] Offline bot did not reply with a downloadable attachment, so we need to use production bot - useProductionBot: true - }); - - await driver.wait(uiConnected(), timeouts.directLine); - - await pageObjects.sendFile('seaofthieves.jpg'); - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const telemetryMeasurements = await driver.executeScript(() => - window.WebChatTest.telemetryMeasurements.filter(({ name }) => - ['init', 'sendFiles', 'sendFiles:makeThumbnail'].includes(name) - ) - ); - - expect(telemetryMeasurements).toHaveProperty('length', 4); - expect(telemetryMeasurements[2]).toHaveProperty('name', 'sendFiles:makeThumbnail'); - expect(telemetryMeasurements[2]).toHaveProperty('type', 'timingend'); - - telemetryMeasurements[2].duration = 1000; - - expect(telemetryMeasurements).toMatchInlineSnapshot(` - Array [ - Object { - "data": null, - "dimensions": Object { - "capability:downscaleImage:workerType": "web worker", - "capability:renderer": "html", - "prop:locale": "en-US", - "prop:speechRecognition": "false", - "prop:speechSynthesis": "false", - }, - "duration": null, - "error": null, - "fatal": null, - "name": "init", - "type": "event", - "value": null, - }, - Object { - "data": null, - "dimensions": Object { - "capability:downscaleImage:workerType": "web worker", - "capability:renderer": "html", - "prop:locale": "en-US", - "prop:speechRecognition": "false", - "prop:speechSynthesis": "false", - }, - "duration": null, - "error": null, - "fatal": null, - "name": "sendFiles:makeThumbnail", - "type": "timingstart", - "value": null, - }, - Object { - "data": null, - "dimensions": Object { - "capability:downscaleImage:workerType": "web worker", - "capability:renderer": "html", - "prop:locale": "en-US", - "prop:speechRecognition": "false", - "prop:speechSynthesis": "false", - }, - "duration": 1000, - "error": null, - "fatal": null, - "name": "sendFiles:makeThumbnail", - "type": "timingend", - "value": null, - }, - Object { - "data": Object { - "numFiles": 1, - "sumSizeInKB": 379, - }, - "dimensions": Object { - "capability:downscaleImage:workerType": "web worker", - "capability:renderer": "html", - "prop:locale": "en-US", - "prop:speechRecognition": "false", - "prop:speechSynthesis": "false", - }, - "duration": null, - "error": null, - "fatal": null, - "name": "sendFiles", - "type": "event", - "value": null, - }, - ] - `); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); - }); - - test('with custom thumbnail size', async () => { - const { driver, pageObjects } = await setupWebDriver({ - props: { - styleOptions: { - uploadThumbnailContentType: 'image/png', - uploadThumbnailHeight: 60, - uploadThumbnailWidth: 120 - } - }, - // TODO: [P3] Offline bot did not reply with a downloadable attachment, so we need to use production bot - useProductionBot: true - }); - - await driver.wait(uiConnected(), timeouts.directLine); - - await pageObjects.sendFile('seaofthieves.jpg'); - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); - }); - - test('with custom thumbnail quality', async () => { - const { driver, pageObjects } = await setupWebDriver({ - props: { - styleOptions: { - uploadThumbnailQuality: 0.1 - } - }, - // TODO: [P3] Offline bot did not reply with a downloadable attachment, so we need to use production bot - useProductionBot: true - }); - - await driver.wait(uiConnected(), timeouts.directLine); - - await pageObjects.sendFile('seaofthieves.jpg'); - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); - }); - - test('with custom thumbnail disabled', async () => { - const { driver, pageObjects } = await setupWebDriver({ - props: { - styleOptions: { - enableUploadThumbnail: false - } - }, - // TODO: [P3] Offline bot did not reply with a downloadable attachment, so we need to use production bot - useProductionBot: true - }); - - await driver.wait(uiConnected(), timeouts.directLine); - - await pageObjects.sendFile('seaofthieves.jpg'); - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); - }); - - describe('without Web Worker', () => { - test('', async () => { - const { driver, pageObjects } = await setupWebDriver({ - // TODO: [P3] Offline bot did not reply with a downloadable attachment, so we need to use production bot - useProductionBot: true - }); - - await driver.executeScript(() => { - window.Worker = undefined; - }); - await driver.wait(uiConnected(), timeouts.directLine); - - await pageObjects.sendFile('seaofthieves.jpg'); - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); - }); - - test('with custom thumbnail size', async () => { - const { driver, pageObjects } = await setupWebDriver({ - props: { - styleOptions: { - uploadThumbnailContentType: 'image/png', - uploadThumbnailHeight: 60, - uploadThumbnailWidth: 120 - } - }, - // TODO: [P3] Offline bot did not reply with a downloadable attachment, so we need to use production bot - useProductionBot: true - }); - - await driver.executeScript(() => { - window.Worker = undefined; - }); - await driver.wait(uiConnected(), timeouts.directLine); - - await pageObjects.sendFile('seaofthieves.jpg'); - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); - }); - - test('with custom thumbnail quality', async () => { - const { driver, pageObjects } = await setupWebDriver({ - props: { - styleOptions: { - uploadThumbnailQuality: 0.1 - } - }, - // TODO: [P3] Offline bot did not reply with a downloadable attachment, so we need to use production bot - useProductionBot: true - }); - - await driver.executeScript(() => { - window.Worker = undefined; - }); - await driver.wait(uiConnected(), timeouts.directLine); - - await pageObjects.sendFile('seaofthieves.jpg'); - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); - }); - }); -}); - -test('upload a ZIP file', async () => { - const { driver, pageObjects } = await setupWebDriver({ - // TODO: [P3] Offline bot did not reply with a downloadable attachment, so we need to use production bot - useProductionBot: true - }); - - 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); -}); - -test('upload a .txt (plain) file', async () => { - const { driver, pageObjects } = await setupWebDriver({ - // TODO: [P3] Offline bot did not reply with a downloadable attachment, so we need to use production bot - useProductionBot: true - }); - - await driver.wait(uiConnected(), timeouts.directLine); - - await pageObjects.sendFile('empty.txt'); - await driver.wait(minNumActivitiesShown(2), timeouts.directLine); - await driver.wait(allImagesLoaded(), timeouts.fetchImage); - - const base64PNG = await driver.takeScreenshot(); - - expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); -});