Skip to content

Commit

Permalink
Tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
corinagum committed Oct 16, 2020
1 parent 514dd37 commit 2a3bb39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions __tests__/richCards.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,30 @@ test('oauth card', async () => {
});

test('receipt card', async () => {
const { driver, pageObjects } = await setupWebDriver();
const { driver, pageObjects } = await setupWebDriver({ useProductionBot: true });

await driver.wait(uiConnected(), timeouts.directLine);
console.log('test');
await pageObjects.sendMessageViaSendBox('receiptcard', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
await driver.wait(allImagesLoaded(), timeouts.fetchImage);
await driver.wait(scrollToBottomCompleted(), timeouts.scrollToBottom);

const base64PNG = await driver.takeScreenshot();

expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions);
});

test('receipt card with quantity', async () => {
const { driver, pageObjects } = await setupWebDriver();
const { driver, pageObjects } = await setupWebDriver({ useProductionBot: true });

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('receiptcard2', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
await driver.wait(allImagesLoaded(), timeouts.fetchImage);
await driver.wait(scrollToBottomCompleted(), timeouts.scrollToBottom);

const base64PNG = await driver.takeScreenshot();

Expand Down

0 comments on commit 2a3bb39

Please sign in to comment.