@@ -5,7 +5,7 @@ import '@ciscospark/plugin-phone';
5
5
import { switchToMeet , switchToMessage } from '../../../lib/test-helpers/menu' ;
6
6
import { clearEventLog , getEventLog } from '../../../lib/events' ;
7
7
import { sendMessage , verifyMessageReceipt } from '../../../lib/test-helpers/messaging' ;
8
- import { call , answer , hangup , decline } from '../../../lib/test-helpers/meet' ;
8
+ import { elements } from '../../../lib/test-helpers/meet' ;
9
9
10
10
describe ( `Widget Message Meet TAP` , ( ) => {
11
11
const browserLocal = browser . select ( `browserLocal` ) ;
@@ -148,19 +148,33 @@ describe(`Widget Message Meet TAP`, () => {
148
148
} ) ;
149
149
150
150
describe ( `meet widget` , ( ) => {
151
+ const meetWidget = `.ciscospark-meet-component-wrapper` ;
151
152
it ( `can answer and hangup in call` , ( ) => {
152
153
switchToMeet ( browserLocal ) ;
153
- call ( browserLocal , browserRemote ) ;
154
- answer ( browserRemote ) ;
155
- hangup ( browserLocal ) ;
154
+ browserLocal . element ( meetWidget ) . element ( elements . callButton ) . waitForVisible ( ) ;
155
+ browserLocal . element ( meetWidget ) . element ( elements . callButton ) . click ( ) ;
156
+ browserRemote . waitForVisible ( elements . answerButton ) ;
157
+ browserRemote . element ( meetWidget ) . element ( elements . answerButton ) . click ( ) ;
158
+ browserRemote . waitForVisible ( elements . remoteVideo ) ;
159
+ // Let call elapse 5 seconds before hanging up
160
+ browserLocal . pause ( 5000 ) ;
161
+ browserLocal . moveToObject ( meetWidget ) ;
162
+ browserLocal . waitForVisible ( elements . callControls ) ;
163
+ browserLocal . moveToObject ( elements . hangupButton ) ;
164
+ browserLocal . element ( meetWidget ) . element ( elements . hangupButton ) . click ( ) ;
156
165
// Pausing to let locus session flush
157
166
browserLocal . pause ( 5000 ) ;
167
+
158
168
} ) ;
159
169
160
170
it ( `can decline an incoming call` , ( ) => {
161
171
switchToMeet ( browserRemote ) ;
162
- call ( browserRemote , browserLocal ) ;
163
- decline ( browserLocal ) ;
172
+ browserRemote . element ( meetWidget ) . element ( elements . callButton ) . waitForVisible ( ) ;
173
+ browserRemote . element ( meetWidget ) . element ( elements . callButton ) . click ( ) ;
174
+ browserLocal . waitForVisible ( elements . declineButton ) ;
175
+ browserLocal . element ( meetWidget ) . element ( elements . declineButton ) . click ( ) ;
176
+ browserLocal . element ( meetWidget ) . element ( elements . callButton ) . waitForVisible ( ) ;
177
+ browserRemote . element ( meetWidget ) . element ( elements . callButton ) . waitForVisible ( ) ;
164
178
} ) ;
165
179
} ) ;
166
180
} ) ;
0 commit comments