Skip to content

Commit

Permalink
Wait until all outgoing activities sent
Browse files Browse the repository at this point in the history
  • Loading branch information
compulim committed Feb 5, 2019
1 parent c08a9f8 commit 9ceac67
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion __tests__/username.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { By, Key } from 'selenium-webdriver';
import { imageSnapshotOptions, timeouts } from './constants.json';

import allImagesLoaded from './setup/conditions/allImagesLoaded';
import allOutgoingActivitiesSent from './setup/conditions/allOutgoingActivitiesSent';
import botConnected from './setup/conditions/botConnected';
import minNumActivitiesShown from './setup/conditions/minNumActivitiesShown';

Expand All @@ -17,7 +18,8 @@ test('send username in activity', async () => {
const input = await driver.findElement(By.css('input[type="text"]'));

await input.sendKeys('user name', Key.RETURN);
await driver.wait(minNumActivitiesShown(3), 2000);
await driver.wait(allOutgoingActivitiesSent(), timeouts.directLine);
await driver.wait(minNumActivitiesShown(3), timeouts.directLine);

// Hide cursor before taking screenshot
await pageObjects.hideCursor();
Expand Down

0 comments on commit 9ceac67

Please sign in to comment.