mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
feat(tests): Avoids using aria selector for breakout rooms.
It is reported to be slow at times.
This commit is contained in:
@@ -119,7 +119,7 @@ class BreakoutRoom extends BasePageObject {
|
||||
|
||||
await listItem.click();
|
||||
|
||||
const button = listItem.$(`aria/${MORE_LABEL}`);
|
||||
const button = listItem.$(`button[title="${MORE_LABEL}"]`);
|
||||
|
||||
await button.waitForClickable();
|
||||
await button.click();
|
||||
@@ -153,7 +153,7 @@ export default class BreakoutRooms extends BasePageObject {
|
||||
await participantsPane.open();
|
||||
}
|
||||
|
||||
const addBreakoutButton = this.participant.driver.$(`aria/${ADD_BREAKOUT_ROOM}`);
|
||||
const addBreakoutButton = this.participant.driver.$(`button=${ADD_BREAKOUT_ROOM}`);
|
||||
|
||||
await addBreakoutButton.waitForDisplayed();
|
||||
await addBreakoutButton.click();
|
||||
@@ -179,7 +179,7 @@ export default class BreakoutRooms extends BasePageObject {
|
||||
await participantsPane.open();
|
||||
}
|
||||
|
||||
const leaveButton = this.participant.driver.$(`aria/${LEAVE_ROOM_LABEL}`);
|
||||
const leaveButton = this.participant.driver.$(`button=${LEAVE_ROOM_LABEL}`);
|
||||
|
||||
await leaveButton.isClickable();
|
||||
await leaveButton.click();
|
||||
@@ -189,7 +189,7 @@ export default class BreakoutRooms extends BasePageObject {
|
||||
* Auto assign participants to breakout rooms.
|
||||
*/
|
||||
async autoAssignToBreakoutRooms() {
|
||||
const button = this.participant.driver.$(`aria/${AUTO_ASSIGN_LABEL}`);
|
||||
const button = this.participant.driver.$(`button=${AUTO_ASSIGN_LABEL}`);
|
||||
|
||||
await button.waitForClickable();
|
||||
await button.click();
|
||||
@@ -204,8 +204,9 @@ export default class BreakoutRooms extends BasePageObject {
|
||||
await participantsPane.selectParticipant(participant);
|
||||
await participantsPane.openParticipantContextMenu(participant);
|
||||
|
||||
const sendButton = this.participant.driver.$(`aria/${roomName}`);
|
||||
const sendButton = this.participant.driver.$(`div=${roomName}`);
|
||||
|
||||
await sendButton.scrollIntoView();
|
||||
await sendButton.waitForClickable();
|
||||
await sendButton.click();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ describe('Breakout rooms', () => {
|
||||
|
||||
await p1.driver.waitUntil(
|
||||
async () => await p1BreakoutRooms.getRoomsCount() === 1, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'No breakout room added for p1'
|
||||
});
|
||||
|
||||
@@ -47,7 +47,7 @@ describe('Breakout rooms', () => {
|
||||
// second participant should also see one breakout room
|
||||
await p2.driver.waitUntil(
|
||||
async () => await p2.getBreakoutRooms().getRoomsCount() === 1, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'No breakout room seen by p2'
|
||||
});
|
||||
});
|
||||
@@ -59,7 +59,7 @@ describe('Breakout rooms', () => {
|
||||
// there should be one breakout room
|
||||
await p1.driver.waitUntil(
|
||||
async () => await p1BreakoutRooms.getRoomsCount() === 1, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'No breakout room seen by p1'
|
||||
});
|
||||
|
||||
@@ -100,7 +100,7 @@ describe('Breakout rooms', () => {
|
||||
|
||||
return list[0].participantCount === 1;
|
||||
}, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'P2 is not seeing p1 in the breakout room'
|
||||
});
|
||||
});
|
||||
@@ -142,7 +142,7 @@ describe('Breakout rooms', () => {
|
||||
|
||||
return list[0].participantCount === 0;
|
||||
}, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'P2 is seeing p1 in the breakout room'
|
||||
});
|
||||
});
|
||||
@@ -157,14 +157,14 @@ describe('Breakout rooms', () => {
|
||||
// there should be no breakout rooms
|
||||
await p1.driver.waitUntil(
|
||||
async () => await p1BreakoutRooms.getRoomsCount() === 0, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'Breakout room was not removed for p1'
|
||||
});
|
||||
|
||||
// the second participant should also see no breakout rooms
|
||||
await p2.driver.waitUntil(
|
||||
async () => await p2.getBreakoutRooms().getRoomsCount() === 0, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'Breakout room was not removed for p2'
|
||||
});
|
||||
});
|
||||
@@ -181,7 +181,7 @@ describe('Breakout rooms', () => {
|
||||
// there should be two breakout rooms
|
||||
await p1.driver.waitUntil(
|
||||
async () => await p1BreakoutRooms.getRoomsCount() === 2, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'Breakout room was not created by p1'
|
||||
});
|
||||
|
||||
@@ -225,7 +225,7 @@ describe('Breakout rooms', () => {
|
||||
return list[0].participantCount === 1 && list[1].participantCount === 1
|
||||
&& (list[0].name === MAIN_ROOM_NAME || list[1].name === MAIN_ROOM_NAME);
|
||||
}, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'P2 is not seeing p1 in the main room'
|
||||
});
|
||||
});
|
||||
@@ -249,7 +249,7 @@ describe('Breakout rooms', () => {
|
||||
|
||||
return list[0].participantCount === 1 && list[1].participantCount === 1;
|
||||
}, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'P1 is not seeing two breakout rooms'
|
||||
});
|
||||
|
||||
@@ -310,7 +310,7 @@ describe('Breakout rooms', () => {
|
||||
|
||||
return list[0].participantCount + list[1].participantCount === 1;
|
||||
}, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: `${p.name} is not seeing an empty breakout room and one with one participant`
|
||||
});
|
||||
|
||||
@@ -341,7 +341,7 @@ describe('Breakout rooms', () => {
|
||||
await p1.driver.waitUntil(
|
||||
async () => await p1BreakoutRooms.getRoomsCount() === 1
|
||||
&& (await p1BreakoutRooms.getRooms())[0].participantCount === 0, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'No breakout room added for p1'
|
||||
});
|
||||
|
||||
@@ -379,7 +379,7 @@ describe('Breakout rooms', () => {
|
||||
|
||||
return list[0].participantCount === 1;
|
||||
}, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'P1 is not seeing p2 in the breakout room'
|
||||
});
|
||||
|
||||
@@ -425,7 +425,7 @@ describe('Breakout rooms', () => {
|
||||
|
||||
return list[0].name === myNewRoomName;
|
||||
}, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'The breakout room was not renamed for p1'
|
||||
});
|
||||
|
||||
@@ -447,7 +447,7 @@ describe('Breakout rooms', () => {
|
||||
|
||||
return list[0].participantCount === 0;
|
||||
}, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'The breakout room not found or not empty for p1'
|
||||
});
|
||||
|
||||
@@ -457,7 +457,7 @@ describe('Breakout rooms', () => {
|
||||
|
||||
return list?.length === 1;
|
||||
}, {
|
||||
timeout: 3000,
|
||||
timeout: 5000,
|
||||
timeoutMsg: 'The breakout room not seen by p2'
|
||||
});
|
||||
|
||||
|
||||
@@ -366,7 +366,7 @@ export const config: WebdriverIO.MultiremoteConfig = {
|
||||
// make sure all browsers are at the main app in iframe (if used), so we collect debug info
|
||||
await Promise.all(multiremotebrowser.instances.map(async (instance: string) => {
|
||||
// @ts-ignore
|
||||
await ctx[instance].switchToIFrame();
|
||||
await ctx[instance]?.switchToIFrame();
|
||||
}));
|
||||
|
||||
const allProcessing: Promise<any>[] = [];
|
||||
|
||||
Reference in New Issue
Block a user