@@ -10,7 +10,7 @@ import {setupOneOnOneUsers} from '../../../lib/test-users';
10
10
describe ( 'Widget Space: One on One: TAP' , ( ) => {
11
11
const browserLocal = browser . select ( 'browserLocal' ) ;
12
12
const browserRemote = browser . select ( 'browserRemote' ) ;
13
- let local , mccoy , remote , spock ;
13
+ let local , localUser , remote , remoteUser ;
14
14
15
15
before ( 'load browsers' , ( ) => {
16
16
browser
@@ -21,18 +21,18 @@ describe('Widget Space: One on One: TAP', () => {
21
21
} ) ;
22
22
23
23
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 } ;
27
27
} ) ;
28
28
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 ) ;
31
31
local . browser . waitForExist ( `[placeholder="Send a message to ${ remote . displayName } "]` , 30000 ) ;
32
32
} ) ;
33
33
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 ) ;
36
36
remote . browser . waitForExist ( `[placeholder="Send a message to ${ local . displayName } "]` , 30000 ) ;
37
37
} ) ;
38
38
@@ -63,6 +63,7 @@ describe('Widget Space: One on One: TAP', () => {
63
63
64
64
it ( 'closes the menu with the exit button' , ( ) => {
65
65
local . browser . click ( basicElements . exitButton ) ;
66
+ // Activity menu animates the hide, wait for it to be gone
66
67
local . browser . waitForVisible ( basicElements . activityMenu , 1500 , true ) ;
67
68
} ) ;
68
69
@@ -76,6 +77,8 @@ describe('Widget Space: One on One: TAP', () => {
76
77
77
78
it ( 'switches to message widget' , ( ) => {
78
79
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 ) ;
79
82
assert . isTrue ( local . browser . isVisible ( basicElements . messageWidget ) ) ;
80
83
assert . isFalse ( local . browser . isVisible ( basicElements . meetWidget ) ) ;
81
84
} ) ;
@@ -87,6 +90,8 @@ describe('Widget Space: One on One: TAP', () => {
87
90
88
91
it ( 'switches to meet widget' , ( ) => {
89
92
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 ) ;
90
95
assert . isTrue ( local . browser . isVisible ( basicElements . meetWidget ) ) ;
91
96
assert . isFalse ( local . browser . isVisible ( basicElements . messageWidget ) ) ;
92
97
} ) ;
0 commit comments