From 26cca3a9e203cc3b869c7010e9dc92ca65c7a018 Mon Sep 17 00:00:00 2001 From: Corina Date: Fri, 7 Jun 2019 14:31:38 -0700 Subject: [PATCH] Add test for Adaptive Card textarea --- CHANGELOG.md | 1 + __tests__/adaptiveCards.js | 18 ++++++++++++++++++ packages/bundle/package-lock.json | 5 ----- packages/playground/package-lock.json | 5 ----- 4 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 __tests__/adaptiveCards.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a1218ed25..6d41b57976 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix [#1982](https://github.com/Microsoft/BotFramework-WebChat/issues/1982). Move to prettier! by [@corinagum](https://github.com/corinagum) in PR [#2038](https://github.com/Microsoft/BotFramework-WebChat/pull/2038) - Fix [#1429](https://github.com/Microsoft/BotFramework-WebChat/issues/1429). Added markdown string preprocessing so the renderer will respect CRLF carriage returns (\r\n), by [@tdurnford](https://github.com/tdurnford) in PR [#2055](https://github.com/Microsoft/BotFramework-WebChat/pull/2055) - Fix [#2057](https://github.com/Microsoft/BotFramework-WebChat/issues/2057). Added sip protocol to sanitize HTML options, by [@tdurnford](https://github.com/tdurnford) in PR [#2061](https://github.com/Microsoft/BotFramework-WebChat/pull/2061) +- Fix [#1990](https://github.com/Microsoft/BotFramework-WebChat/issues/1990). Bump Adaptive Cards & fix textarea font-family from monospace to Web Chat's `primaryFont`, by [@corinagum](https://github.com/corinagum) in PR [#XXX](https://github.com/Microsoft/BotFramework-WebChat/pull/XXX) ## [4.4.1] - 2019-05-02 diff --git a/__tests__/adaptiveCards.js b/__tests__/adaptiveCards.js new file mode 100644 index 0000000000..8ddde800f4 --- /dev/null +++ b/__tests__/adaptiveCards.js @@ -0,0 +1,18 @@ +import { imageSnapshotOptions, 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('Adaptive Card textarea should not be monospace', async () => { + const { driver, pageObjects } = await setupWebDriver(); + + await pageObjects.sendMessageViaSendBox('card inputs', { + waitForSend: true + }); + + const base64PNG = await driver.takeScreenshot(); + + expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); +}); diff --git a/packages/bundle/package-lock.json b/packages/bundle/package-lock.json index e7b58877d2..45544a24a0 100644 --- a/packages/bundle/package-lock.json +++ b/packages/bundle/package-lock.json @@ -1647,11 +1647,6 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==" }, - "adaptivecards": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/adaptivecards/-/adaptivecards-1.1.3.tgz", - "integrity": "sha512-UeU/w8SqkeBE1NuiI+5C1XxQJtxA/o7l5uDfDG2XCS3oKt73vfj3Bh0DRHtxyVFecoegmBNPzpRo7C6QTcxIRg==" - }, "ajv": { "version": "6.9.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.2.tgz", diff --git a/packages/playground/package-lock.json b/packages/playground/package-lock.json index c43b392186..321671f0f0 100644 --- a/packages/playground/package-lock.json +++ b/packages/playground/package-lock.json @@ -1624,11 +1624,6 @@ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==" }, - "adaptivecards": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/adaptivecards/-/adaptivecards-1.1.3.tgz", - "integrity": "sha512-UeU/w8SqkeBE1NuiI+5C1XxQJtxA/o7l5uDfDG2XCS3oKt73vfj3Bh0DRHtxyVFecoegmBNPzpRo7C6QTcxIRg==" - }, "address": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/address/-/address-1.0.3.tgz",