mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(tests): Drop more aria selectors.
This commit is contained in:
@@ -49,7 +49,7 @@ export default class ChatPanel extends BasePageObject {
|
||||
}
|
||||
|
||||
async clickCreatePollButton() {
|
||||
await this.participant.driver.$('aria/Create a poll').click();
|
||||
await this.participant.driver.$('button=Create a poll').click();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,7 +95,7 @@ export default class ChatPanel extends BasePageObject {
|
||||
* Clicks the "Add option" button.
|
||||
*/
|
||||
async clickAddOptionButton() {
|
||||
await this.participant.driver.$('aria/Add option').click();
|
||||
await this.participant.driver.$('button=Add option').click();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,35 +141,35 @@ export default class ChatPanel extends BasePageObject {
|
||||
* Clicks the "Save" button.
|
||||
*/
|
||||
async clickSavePollButton() {
|
||||
await this.participant.driver.$('aria/Save').click();
|
||||
await this.participant.driver.$('button=Save').click();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clicks the "Edit" button.
|
||||
*/
|
||||
async clickEditPollButton() {
|
||||
await this.participant.driver.$('aria/Edit').click();
|
||||
await this.participant.driver.$('button=Edit').click();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clicks the "Skip" button.
|
||||
*/
|
||||
async clickSkipPollButton() {
|
||||
await this.participant.driver.$('aria/Skip').click();
|
||||
await this.participant.driver.$('button=Skip').click();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clicks the "Send" button.
|
||||
*/
|
||||
async clickSendPollButton() {
|
||||
await this.participant.driver.$('aria/Send poll').click();
|
||||
await this.participant.driver.$('button=Send').click();
|
||||
}
|
||||
|
||||
/**
|
||||
* Waits for the "Send" button to be visible.
|
||||
*/
|
||||
async waitForSendButton() {
|
||||
await this.participant.driver.$('aria/Send poll').waitForExist({
|
||||
await this.participant.driver.$('button=Send').waitForExist({
|
||||
timeout: 1000,
|
||||
timeoutMsg: 'Send button not visible'
|
||||
});
|
||||
@@ -185,7 +185,7 @@ export default class ChatPanel extends BasePageObject {
|
||||
(id, ix) => document.getElementById(`poll-answer-checkbox-${id}-${ix}`)?.click(),
|
||||
pollId, index);
|
||||
|
||||
await this.participant.driver.$('aria/Submit').click();
|
||||
await this.participant.driver.$('button=Submit').click();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@ import BasePageObject from './BasePageObject';
|
||||
|
||||
const LOCAL_VIDEO_XPATH = '//span[@id="localVideoContainer"]';
|
||||
const LOCAL_VIDEO_MENU_TRIGGER = '#local-video-menu-trigger';
|
||||
const LOCAL_USER_CONTROLS = 'aria/Local user controls';
|
||||
const LOCAL_USER_CONTROLS = 'button[title="Local user controls"]';
|
||||
const HIDE_SELF_VIEW_BUTTON_XPATH = '//div[contains(@class, "popover")]//div[@id="hideselfviewButton"]';
|
||||
|
||||
/**
|
||||
|
||||
@@ -106,17 +106,12 @@ export default class Notifications extends BasePageObject {
|
||||
* @private
|
||||
*/
|
||||
private async closeNotification(testId: string, skipNonExisting = false) {
|
||||
const notification = this.participant.driver.$(`[data-testid="${testId}"]`);
|
||||
const closeButton = this.participant.driver.$('[data-testid="${testId}"] #close-notification');
|
||||
|
||||
if (skipNonExisting && !await notification.isExisting()) {
|
||||
if (skipNonExisting && !await closeButton.isExisting()) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
await notification.waitForExist();
|
||||
await notification.waitForStable();
|
||||
|
||||
const closeButton = notification.$('#close-notification');
|
||||
|
||||
await closeButton.moveTo();
|
||||
await closeButton.click();
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ export default class ParticipantsPane extends BasePageObject {
|
||||
await this.open();
|
||||
}
|
||||
|
||||
const inviteButton = this.participant.driver.$(`aria/${INVITE}`);
|
||||
const inviteButton = this.participant.driver.$(`button=${INVITE}`);
|
||||
|
||||
await inviteButton.waitForDisplayed();
|
||||
await inviteButton.click();
|
||||
@@ -262,7 +262,7 @@ export default class ParticipantsPane extends BasePageObject {
|
||||
.substring('participant-item-'.length);
|
||||
|
||||
const moreOptionsButton
|
||||
= this.participant.driver.$(`aria/More moderation options ${participantNameToReject}`);
|
||||
= this.participant.driver.$(`button[title="More moderation options ${participantNameToReject}"]`);
|
||||
|
||||
await moreOptionsButton.click();
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ export default class Toolbar extends BasePageObject {
|
||||
* @private
|
||||
*/
|
||||
private getButton(accessibilityCSSSelector: string) {
|
||||
return this.participant.driver.$(`aria/${accessibilityCSSSelector}`);
|
||||
return this.participant.driver.$(`[aria-label="${accessibilityCSSSelector}"]`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -248,7 +248,7 @@ export default class Toolbar extends BasePageObject {
|
||||
* @private
|
||||
*/
|
||||
private async isOverflowMenuOpen() {
|
||||
return await this.participant.driver.$$(`aria/${OVERFLOW_MENU}`).length > 0;
|
||||
return await this.participant.driver.$$(`[aria-label="${OVERFLOW_MENU}"]`).length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,7 +8,7 @@ export default class Visitors extends BasePageObject {
|
||||
* Returns the visitors dialog element if any.
|
||||
*/
|
||||
hasVisitorsDialog() {
|
||||
return this.participant.driver.$('aria/Joining meeting');
|
||||
return this.participant.driver.$('div=Joining meeting');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user