Skip to content

Commit 1d529a0

Browse files
committed
fix(tap): widget message meet cannot use meet helper functions
1 parent bd5b2ca commit 1d529a0

File tree

1 file changed

+20
-6
lines changed
  • test/journeys/specs/tap/widget-message-meet

1 file changed

+20
-6
lines changed

test/journeys/specs/tap/widget-message-meet/index.js

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import '@ciscospark/plugin-phone';
55
import {switchToMeet, switchToMessage} from '../../../lib/test-helpers/menu';
66
import {clearEventLog, getEventLog} from '../../../lib/events';
77
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';
99

1010
describe(`Widget Message Meet TAP`, () => {
1111
const browserLocal = browser.select(`browserLocal`);
@@ -148,19 +148,33 @@ describe(`Widget Message Meet TAP`, () => {
148148
});
149149

150150
describe(`meet widget`, () => {
151+
const meetWidget = `.ciscospark-meet-component-wrapper`;
151152
it(`can answer and hangup in call`, () => {
152153
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();
156165
// Pausing to let locus session flush
157166
browserLocal.pause(5000);
167+
158168
});
159169

160170
it(`can decline an incoming call`, () => {
161171
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();
164178
});
165179
});
166180
});

0 commit comments

Comments
 (0)