@@ -10,62 +10,59 @@ import { expect, test } from "@playwright/test";
1010import { widgetTest } from "../fixtures/widget-user.ts" ;
1111import { HOST1 , TestHelpers } from "./test-helpers.ts" ;
1212
13- widgetTest (
14- "Footer interaction in PiP" ,
15- async ( { addUser, browserName, page } ) => {
16- test . skip (
17- browserName === "firefox" ,
18- "The is test is not working on firefox CI environment. No mic/audio device inputs so cam/mic are disabled" ,
19- ) ;
20-
21- test . slow ( ) ;
22-
23- const valere = await addUser ( "Valere" , HOST1 ) ;
24-
25- const callRoom = "CallRoom" ;
26- await TestHelpers . createRoom ( "CallRoom" , valere . page ) ;
27-
28- await TestHelpers . createRoom ( "OtherRoom" , valere . page ) ;
29-
30- await TestHelpers . switchToRoomNamed ( valere . page , callRoom ) ;
31-
32- // Start the call as Valere
33- await TestHelpers . startCallInCurrentRoom ( valere . page , false ) ;
34- await expect (
35- valere . page . locator ( 'iframe[title="Element Call"]' ) ,
36- ) . toBeVisible ( ) ;
37-
38- await TestHelpers . joinCallFromLobby ( valere . page ) ;
39- // wait a bit so that the PIP has rendered
40- await valere . page . waitForTimeout ( 600 ) ;
41-
42- // Switch to the other room, the call should go to PIP
43- await TestHelpers . switchToRoomNamed ( valere . page , "OtherRoom" ) ;
44-
45- // We should see the PIP overlay
46- const iFrame = valere . page
47- . locator ( 'iframe[title="Element Call"]' )
48- . contentFrame ( ) ;
49-
50- {
51- // Check for a bug where the video had the wrong fit in PIP
52- const hangupButton = iFrame . getByRole ( "button" , { name : "End call" } ) ;
53- const videoMuteButton = iFrame . getByRole ( "button" , {
54- name : "Stop video" ,
55- } ) ;
56- const audioMuteButton = iFrame . getByRole ( "button" , {
57- name : "Mute microphone" ,
58- } ) ;
59- await expect ( hangupButton ) . toBeVisible ( ) ;
60- await expect ( videoMuteButton ) . toBeVisible ( ) ;
61- await expect ( audioMuteButton ) . toBeVisible ( ) ;
62-
63- // TODO once we have the EW version that supports the interactive pip element we can activate those checks
64- // await videoMuteButton.click();
65- // await audioMuteButton.click();
66-
67- // await expect(videoMuteButton).toHaveCSS("disabled", "true");
68- // await expect(audioMuteButton).toHaveCSS("disabled", "true");
69- }
70- } ,
71- ) ;
13+ widgetTest ( "Footer interaction in PiP" , async ( { addUser, browserName } ) => {
14+ test . skip (
15+ browserName === "firefox" ,
16+ "The is test is not working on firefox CI environment. No mic/audio device inputs so cam/mic are disabled" ,
17+ ) ;
18+
19+ test . slow ( ) ;
20+
21+ const valere = await addUser ( "Valere" , HOST1 ) ;
22+ await valere . page . pause ( ) ;
23+ const callRoom = "CallRoom" ;
24+ await TestHelpers . createRoom ( "CallRoom" , valere . page ) ;
25+
26+ await TestHelpers . createRoom ( "OtherRoom" , valere . page ) ;
27+
28+ await TestHelpers . switchToRoomNamed ( valere . page , callRoom ) ;
29+
30+ // Start the call as Valere
31+ await TestHelpers . startCallInCurrentRoom ( valere . page , false ) ;
32+ await expect (
33+ valere . page . locator ( 'iframe[title="Element Call"]' ) ,
34+ ) . toBeVisible ( ) ;
35+
36+ await TestHelpers . joinCallFromLobby ( valere . page ) ;
37+ // wait a bit so that the PIP has rendered
38+ await valere . page . waitForTimeout ( 600 ) ;
39+
40+ // Switch to the other room, the call should go to PIP
41+ await TestHelpers . switchToRoomNamed ( valere . page , "OtherRoom" ) ;
42+
43+ // We should see the PIP overlay
44+ const iFrame = valere . page
45+ . locator ( 'iframe[title="Element Call"]' )
46+ . contentFrame ( ) ;
47+
48+ {
49+ // Check for a bug where the video had the wrong fit in PIP
50+ const hangupButton = iFrame . getByRole ( "button" , { name : "End call" } ) ;
51+ const videoMuteButton = iFrame . getByRole ( "button" , {
52+ name : "Stop video" ,
53+ } ) ;
54+ const audioMuteButton = iFrame . getByRole ( "button" , {
55+ name : "Mute microphone" ,
56+ } ) ;
57+ await expect ( hangupButton ) . toBeVisible ( ) ;
58+ await expect ( videoMuteButton ) . toBeVisible ( ) ;
59+ await expect ( audioMuteButton ) . toBeVisible ( ) ;
60+
61+ // TODO once we have the EW version that supports the interactive pip element we can activate those checks
62+ // await videoMuteButton.click();
63+ // await audioMuteButton.click();
64+
65+ // await expect(videoMuteButton).toHaveCSS("disabled", "true");
66+ // await expect(audioMuteButton).toHaveCSS("disabled", "true");
67+ }
68+ } ) ;
0 commit comments