feat(tests): Drop more aria selectors.

This commit is contained in:
damencho
2025-10-22 08:27:59 -05:00
committed by Дамян Минков
parent fa9703a41e
commit a5ca57b8e4
6 changed files with 16 additions and 21 deletions

View File

@@ -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();
}
/**

View File

@@ -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"]';
/**

View File

@@ -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();
}

View File

@@ -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();

View File

@@ -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;
}
/**

View File

@@ -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');
}
/**