-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
205 additions
and
148 deletions.
There are no files selected for viewing
Binary file added
BIN
+67.8 KB
...bubble-border-js-bubble-border-with-color-radius-style-and-width-set-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.1 KB
.../bubble-border-js-bubble-border-with-deprecated-border-style-of-2-px-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.8 KB
...ith-deprecated-border-style-of-dashed-2-px-red-and-dotted-2-px-green-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.9 KB
...r-js-bubble-border-with-deprecated-border-style-of-dashed-and-dotted-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.3 KB
...order-js-bubble-border-with-deprecated-border-style-of-red-and-green-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+67.8 KB
...r-with-deprecated-border-style-with-color-radius-style-and-width-set-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-103 Bytes
(100%)
...s-bubble-nub-at-corner-with-offset-at-bottom-should-have-flipped-nub-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-227 Bytes
(100%)
...ub-at-corner-with-offset-of-10-px-should-have-corner-radius-of-10-px-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-138 Bytes
(100%)
...-nub-at-corner-with-offset-of-5-px-should-have-corner-radius-of-5-px-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-238 Bytes
(100%)
...et-of-minus-10-px-should-have-corner-radius-of-10-px-and-flipped-nub-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-144 Bytes
(100%)
...fset-of-minus-5-px-should-have-corner-radius-of-5-px-and-flipped-nub-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-146 Bytes
(100%)
...bubble-nub-with-avatar-initials-and-a-single-message-should-have-nub-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-479 Bytes
(100%)
...initials-and-carousel-with-a-message-should-have-nub-on-message-only-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-275 Bytes
(100%)
...nd-carousel-with-a-single-attachment-should-have-nub-on-message-only-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-411 Bytes
(100%)
...-avatar-initials-and-carousel-without-a-message-should-not-have-nubs-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-301 Bytes
(100%)
...h-avatar-initials-and-stacked-without-a-message-should-not-have-nubs-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-485 Bytes
(100%)
...apshots__/chrome-docker/bubble-nub-js-bubble-nub-with-standard-setup-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-56 Bytes
(100%)
...ut-avatar-initials-and-a-single-message-should-have-nub-and-indented-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-368 Bytes
(100%)
...carousel-with-a-message-should-have-nub-on-message-only-and-indented-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-257 Bytes
(100%)
...nd-carousel-with-a-single-attachment-should-have-nub-on-message-only-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-470 Bytes
(100%)
...als-and-carousel-without-a-message-should-not-have-nubs-and-indented-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-39 Bytes
(100%)
...ials-and-stacked-without-a-message-should-not-have-nubs-and-indented-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.08 KB
(99%)
...ousel-js-carousel-with-avatar-initials-1-attachment-with-wide-screen-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.07 KB
(99%)
...el-js-carousel-without-avatar-initials-1-attachment-with-wide-screen-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.08 KB
(99%)
...tacked-js-stacked-with-avatar-initials-1-attachment-with-wide-screen-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.08 KB
(99%)
...ked-js-stacked-without-avatar-initials-1-attachment-with-wide-screen-1-snap.png
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
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); | ||
|
||
async function sendMessageAndMatchSnapshot(driver, pageObjects, message) { | ||
await driver.wait(uiConnected(), timeouts.directLine); | ||
await pageObjects.sendMessageViaSendBox(message); | ||
|
||
await driver.wait(minNumActivitiesShown(3), timeouts.directLine); | ||
|
||
const base64PNG = await driver.takeScreenshot(); | ||
|
||
expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions); | ||
} | ||
|
||
describe('bubble border', () => { | ||
test('with color, radius, style, and width set', async () => { | ||
const { driver, pageObjects } = await setupWebDriver({ | ||
props: { | ||
styleOptions: { | ||
bubbleBorderColor: 'Red', | ||
bubbleBorderRadius: 10, | ||
bubbleBorderStyle: 'dashed', | ||
bubbleBorderWidth: 2, | ||
|
||
bubbleFromUserBorderColor: 'Green', | ||
bubbleFromUserBorderRadius: 20, | ||
bubbleFromUserBorderStyle: 'dotted', | ||
bubbleFromUserBorderWidth: 3 | ||
} | ||
}, | ||
zoom: 3 | ||
}); | ||
|
||
await sendMessageAndMatchSnapshot(driver, pageObjects, 'echo Hello, World!'); | ||
}); | ||
|
||
describe('with deprecated border style', () => { | ||
test('with color, radius, style, and width set', async () => { | ||
const { driver, pageObjects } = await setupWebDriver({ | ||
props: { | ||
styleOptions: { | ||
bubbleBorder: 'dashed 2px Red', | ||
bubbleBorderRadius: 10, | ||
|
||
bubbleFromUserBorder: 'dotted 3px Green', | ||
bubbleFromUserBorderRadius: 20 | ||
} | ||
}, | ||
zoom: 3 | ||
}); | ||
|
||
await sendMessageAndMatchSnapshot(driver, pageObjects, 'echo Hello, World!'); | ||
}); | ||
|
||
test('of "dashed 2px Red" and "dotted 2px Green"', async () => { | ||
const { driver, pageObjects } = await setupWebDriver({ | ||
props: { | ||
styleOptions: { | ||
bubbleBorder: 'dashed 2px Red', | ||
bubbleFromUserBorder: 'dotted 2px Green' | ||
} | ||
} | ||
}); | ||
|
||
await driver.wait(uiConnected(), timeouts.directLine); | ||
await pageObjects.sendMessageViaSendBox('Hello, World!'); | ||
await driver.wait(minNumActivitiesShown(2), timeouts.directLine); | ||
|
||
expect(await driver.takeScreenshot()).toMatchImageSnapshot(imageSnapshotOptions); | ||
}); | ||
|
||
test('of "dashed" and "dotted"', async () => { | ||
const { driver, pageObjects } = await setupWebDriver({ | ||
props: { | ||
styleOptions: { | ||
bubbleBorder: 'dashed', | ||
bubbleFromUserBorder: 'dotted' | ||
} | ||
} | ||
}); | ||
|
||
await driver.wait(uiConnected(), timeouts.directLine); | ||
await pageObjects.sendMessageViaSendBox('Hello, World!'); | ||
await driver.wait(minNumActivitiesShown(2), timeouts.directLine); | ||
|
||
expect(await driver.takeScreenshot()).toMatchImageSnapshot(imageSnapshotOptions); | ||
}); | ||
|
||
test('of "2px"', async () => { | ||
const { driver, pageObjects } = await setupWebDriver({ | ||
props: { | ||
styleOptions: { | ||
bubbleBorder: '2px', | ||
bubbleFromUserBorder: '2px' | ||
} | ||
} | ||
}); | ||
|
||
await driver.wait(uiConnected(), timeouts.directLine); | ||
await pageObjects.sendMessageViaSendBox('Hello, World!'); | ||
await driver.wait(minNumActivitiesShown(2), timeouts.directLine); | ||
|
||
expect(await driver.takeScreenshot()).toMatchImageSnapshot(imageSnapshotOptions); | ||
}); | ||
|
||
test('of "Red" and "Green"', async () => { | ||
const { driver, pageObjects } = await setupWebDriver({ | ||
props: { | ||
styleOptions: { | ||
bubbleBorder: 'Red', | ||
bubbleFromUserBorder: 'Green' | ||
} | ||
} | ||
}); | ||
|
||
await driver.wait(uiConnected(), timeouts.directLine); | ||
await pageObjects.sendMessageViaSendBox('Hello, World!'); | ||
await driver.wait(minNumActivitiesShown(2), timeouts.directLine); | ||
|
||
expect(await driver.takeScreenshot()).toMatchImageSnapshot(imageSnapshotOptions); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.