Skip to content

Commit 3f364ea

Browse files
committed
test(tap): add wait for animations
1 parent 028e9f7 commit 3f364ea

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

test/journeys/specs/tap/widget-space/oneOnOne.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {setupOneOnOneUsers} from '../../../lib/test-users';
1010
describe('Widget Space: One on One: TAP', () => {
1111
const browserLocal = browser.select('browserLocal');
1212
const browserRemote = browser.select('browserRemote');
13-
let local, mccoy, remote, spock;
13+
let local, localUser, remote, remoteUser;
1414

1515
before('load browsers', () => {
1616
browser
@@ -21,18 +21,18 @@ describe('Widget Space: One on One: TAP', () => {
2121
});
2222

2323
before('create test users', () => {
24-
[mccoy, spock] = setupOneOnOneUsers();
25-
local = {browser: browserLocal, user: mccoy, displayName: mccoy.displayName};
26-
remote = {browser: browserRemote, user: spock, displayName: spock.displayName};
24+
[localUser, remoteUser] = setupOneOnOneUsers();
25+
local = {browser: browserLocal, user: localUser, displayName: localUser.displayName};
26+
remote = {browser: browserRemote, user: remoteUser, displayName: remoteUser.displayName};
2727
});
2828

29-
before('inject token for spock', () => {
30-
loginAndOpenWidget(local.browser, spock.token.access_token, true, mccoy.email);
29+
before('inject token for local user', () => {
30+
loginAndOpenWidget(local.browser, local.user.token.access_token, true, remote.user.email);
3131
local.browser.waitForExist(`[placeholder="Send a message to ${remote.displayName}"]`, 30000);
3232
});
3333

34-
before('open remote widget for mccoy', () => {
35-
loginAndOpenWidget(remote.browser, mccoy.token.access_token, true, spock.email);
34+
before('open remote widget for remote user', () => {
35+
loginAndOpenWidget(remote.browser, remote.user.token.access_token, true, local.user.email);
3636
remote.browser.waitForExist(`[placeholder="Send a message to ${local.displayName}"]`, 30000);
3737
});
3838

@@ -63,6 +63,7 @@ describe('Widget Space: One on One: TAP', () => {
6363

6464
it('closes the menu with the exit button', () => {
6565
local.browser.click(basicElements.exitButton);
66+
// Activity menu animates the hide, wait for it to be gone
6667
local.browser.waitForVisible(basicElements.activityMenu, 1500, true);
6768
});
6869

@@ -76,6 +77,8 @@ describe('Widget Space: One on One: TAP', () => {
7677

7778
it('switches to message widget', () => {
7879
local.browser.element(basicElements.controlsContainer).element(basicElements.messageActivityButton).click();
80+
// Activity menu animates the hide, wait for it to be gone
81+
local.browser.waitForVisible(basicElements.activityMenu, 1500, true);
7982
assert.isTrue(local.browser.isVisible(basicElements.messageWidget));
8083
assert.isFalse(local.browser.isVisible(basicElements.meetWidget));
8184
});
@@ -87,6 +90,8 @@ describe('Widget Space: One on One: TAP', () => {
8790

8891
it('switches to meet widget', () => {
8992
local.browser.element(basicElements.controlsContainer).element(basicElements.meetActivityButton).click();
93+
// Activity menu animates the hide, wait for it to be gone
94+
local.browser.waitForVisible(basicElements.activityMenu, 1500, true);
9095
assert.isTrue(local.browser.isVisible(basicElements.meetWidget));
9196
assert.isFalse(local.browser.isVisible(basicElements.messageWidget));
9297
});

test/journeys/specs/tap/widget-space/space.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ describe('Widget Space: Group Space: TAP', () => {
7474

7575
it('closes the menu with the exit button', () => {
7676
local.browser.click(elements.exitButton);
77+
// Activity menu animates the hide, wait for it to be gone
7778
local.browser.waitForVisible(elements.activityMenu, 1500, true);
7879
});
7980

@@ -84,6 +85,8 @@ describe('Widget Space: Group Space: TAP', () => {
8485

8586
it('switches to message widget', () => {
8687
local.browser.element(elements.controlsContainer).element(elements.messageButton).click();
88+
// Activity menu animates the hide, wait for it to be gone
89+
local.browser.waitForVisible(elements.activityMenu, 1500, true);
8790
assert.isTrue(local.browser.isVisible(elements.messageWidget));
8891
});
8992
});

0 commit comments

Comments
 (0)