test: update approach of getting elements background color on raise hand tests
This commit is contained in:
parent
bbbd8ccef1
commit
83d0b0bfad
@ -290,9 +290,10 @@ class Page {
|
||||
|
||||
async comparingSelectorsBackgroundColor(selector1, selector2) {
|
||||
const getBackgroundColorComputed = (locator) => locator.evaluate((elem) => getComputedStyle(elem).backgroundColor);
|
||||
const avatarInToastElementColor = this.page.locator(selector1);
|
||||
const avatarInUserListColor = this.page.locator(selector2);
|
||||
await expect(getBackgroundColorComputed(avatarInToastElementColor)).toStrictEqual(getBackgroundColorComputed(avatarInUserListColor));
|
||||
const avatarInToastElementColor = this.getLocator(selector1);
|
||||
const avatarInUserListColor = this.getLocator(selector2);
|
||||
await expect(await getBackgroundColorComputed(avatarInToastElementColor))
|
||||
.toStrictEqual(await getBackgroundColorComputed(avatarInUserListColor));
|
||||
}
|
||||
|
||||
async reloadPage() {
|
||||
|
@ -151,7 +151,7 @@ class MultiUsers {
|
||||
await this.userPage.waitAndClick(e.raiseHandBtn);
|
||||
await this.userPage.waitAndClick(e.reactionsButton);
|
||||
await this.userPage.hasElement(e.lowerHandBtn);
|
||||
await this.modPage.comparingSelectorsBackgroundColor(e.avatarsWrapperAvatar, `${e.userListItem}`);
|
||||
await this.modPage.comparingSelectorsBackgroundColor(e.avatarsWrapperAvatar, `${e.userListItem} div:first-child`);
|
||||
await sleep(1000);
|
||||
await this.userPage.waitAndClick(e.lowerHandBtn);
|
||||
await this.userPage.waitAndClick(e.reactionsButton);
|
||||
@ -174,7 +174,7 @@ class MultiUsers {
|
||||
await this.userPage.waitAndClick(e.reactionsButton);
|
||||
await this.userPage.hasElement(e.lowerHandBtn);
|
||||
await this.userPage.press('Escape');
|
||||
await this.modPage.comparingSelectorsBackgroundColor(e.avatarsWrapperAvatar, `${e.userListItem}`);
|
||||
await this.modPage.comparingSelectorsBackgroundColor(e.avatarsWrapperAvatar, `${e.userListItem} div:first-child`);
|
||||
await this.modPage.waitAndClick(e.raiseHandRejection);
|
||||
await this.userPage.waitAndClick(e.reactionsButton);
|
||||
await this.userPage.hasElement(e.raiseHandBtn);
|
||||
|
Loading…
Reference in New Issue
Block a user