fixing multiusers tests
This commit is contained in:
parent
88cc9e62e1
commit
5efea0cc12
@ -278,7 +278,7 @@ const ChatMessageList: React.FC<ChatListProps> = ({
|
||||
) : null
|
||||
}
|
||||
</span>
|
||||
<div id="contentRef" ref={contentRef}>
|
||||
<div data-test="contentRef" ref={contentRef}>
|
||||
<ChatPopupContainer />
|
||||
{
|
||||
// @ts-ignore
|
||||
|
@ -99,8 +99,11 @@ const UserListItem: React.FC<UserListItemProps> = ({ user, lockSettings }) => {
|
||||
const avatarContent = user.lastBreakoutRoom?.currentlyInRoom ? user.lastBreakoutRoom?.sequence : iconUser
|
||||
|
||||
return (
|
||||
<Styled.UserItemContents data-test='user'>
|
||||
<Styled.UserItemContents data-test={(user.userId === Auth.userID) ? 'userListItemCurrent' : 'userListItem'}>
|
||||
<Styled.Avatar
|
||||
data-test={user.role === ROLE_MODERATOR ? 'moderatorAvatar' : 'viewerAvatar'}
|
||||
data-test-presenter={user.presenter ? '' : undefined}
|
||||
data-test-avatar = 'avatar'
|
||||
moderator={user.role === ROLE_MODERATOR}
|
||||
presenter={user.presenter}
|
||||
talking={voiceUser?.talking}
|
||||
|
@ -114,7 +114,7 @@ exports.typingIndicator = 'span[data-test="typingIndicator"]';
|
||||
exports.errorTypingIndicator = 'div[data-test="errorTypingIndicator"]';
|
||||
exports.chatUserMessageText = 'div[data-test="messageContent"] p';
|
||||
exports.secondChatUserMessageText = 'p[data-test="chatUserMessageText"]>>nth=1';
|
||||
exports.chatWelcomeMessageText = 'div[data-test="contentRef"] div';
|
||||
exports.chatWelcomeMessageText = 'div[data-test="contentRef"]';
|
||||
exports.waitingUsersLobbyMessage = 'div[data-test="lobbyMessage"] >> textarea';
|
||||
exports.sendLobbyMessage = 'div[data-test="lobbyMessage"] >> button';
|
||||
exports.lobbyMessage = 'div[data-test="lobbyMessage"] >> p';
|
||||
@ -320,7 +320,7 @@ exports.notesTitle = 'h2[data-test="notesTitle"]';
|
||||
exports.dataSavingsTab = 'span[id="dataSaving"]';
|
||||
|
||||
// User
|
||||
const userAvatar = 'div[data-test="userAvatar"]';
|
||||
const userAvatar = 'div[data-test-avatar="avatar"]';
|
||||
const networkDataContainer = 'div[data-test="networkDataContainer"]';
|
||||
exports.userAvatar = userAvatar;
|
||||
exports.moderatorAvatar = 'div[data-test="moderatorAvatar"]';
|
||||
@ -330,7 +330,7 @@ exports.awayIcon = `${userAvatar} > div > i[class="icon-bbb-time"]`;
|
||||
exports.setStatus = 'li[data-test="setStatus"]';
|
||||
exports.away = 'li[data-test="away"]';
|
||||
exports.applaud = 'li[data-test="applause"]';
|
||||
exports.userListItem = 'div[data-test="user"]>>nth=1';
|
||||
exports.userListItem = 'div[data-test="userListItem"]';
|
||||
exports.currentUser = 'div[data-test="userListItemCurrent"]';
|
||||
exports.multiWhiteboardTool = 'span[data-test="multiWhiteboardTool"]';
|
||||
exports.manageUsers = 'button[data-test="manageUsers"]';
|
||||
|
@ -112,6 +112,9 @@ class LockViewers extends MultiUsers {
|
||||
await this.initUserPage2(true);
|
||||
await this.modPage.waitAndClick(`${e.userListItem}>>nth=1`);
|
||||
await this.modPage.waitAndClick(`${e.unlockUserButton}>>nth=1`);
|
||||
|
||||
await this.modPage.waitAndClick(`${e.userListItem}>>nth=0`);
|
||||
await this.modPage.waitAndClick(`${e.unlockUserButton}>>nth=1`);
|
||||
|
||||
await this.userPage2.waitAndClick(`${e.userListItem}>>nth=1`);
|
||||
await this.userPage2.waitAndClick(`${e.startPrivateChat}>>nth=1`);
|
||||
|
@ -149,7 +149,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} > div ${e.userAvatar}`);
|
||||
await this.modPage.comparingSelectorsBackgroundColor(e.avatarsWrapperAvatar, `${e.userListItem}`);
|
||||
await sleep(1000);
|
||||
await this.userPage.waitAndClick(e.lowerHandBtn);
|
||||
await this.userPage.waitAndClick(e.reactionsButton);
|
||||
@ -172,7 +172,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} > div ${e.userAvatar}`);
|
||||
await this.modPage.comparingSelectorsBackgroundColor(e.avatarsWrapperAvatar, `${e.userListItem}`);
|
||||
await this.modPage.waitAndClick(e.raiseHandRejection);
|
||||
await this.userPage.waitAndClick(e.reactionsButton);
|
||||
await this.userPage.hasElement(e.raiseHandBtn);
|
||||
|
@ -22,7 +22,7 @@ test.describe.parallel('User', () => {
|
||||
await multiusers.raiseHandRejected();
|
||||
});
|
||||
|
||||
test('Toggle user list @ci @flaky', async ({ browser, context, page }) => {
|
||||
test('Toggle user list @ci', async ({ browser, context, page }) => {
|
||||
const multiusers = new MultiUsers(browser, context);
|
||||
await multiusers.initModPage(page);
|
||||
await multiusers.toggleUserList();
|
||||
@ -31,7 +31,7 @@ test.describe.parallel('User', () => {
|
||||
|
||||
test.describe.parallel('List', () => {
|
||||
// https://docs.bigbluebutton.org/2.6/release-tests.html#set-status--raise-hand-automated
|
||||
test('Change user status @ci', async ({ browser, page }) => {
|
||||
test('Change user status @ci @flaky', async ({ browser, page }) => {
|
||||
const status = new Status(browser, page);
|
||||
await status.init(true, true);
|
||||
await status.changeUserStatus();
|
||||
@ -44,34 +44,34 @@ test.describe.parallel('User', () => {
|
||||
});
|
||||
|
||||
// https://docs.bigbluebutton.org/2.6/release-tests.html#make-viewer-a-presenter-automated
|
||||
test('Make presenter @ci @flaky', async ({ browser, context, page }) => {
|
||||
test('Make presenter @ci', async ({ browser, context, page }) => {
|
||||
const multiusers = new MultiUsers(browser, context);
|
||||
await multiusers.initPages(page);
|
||||
await multiusers.makePresenter();
|
||||
});
|
||||
|
||||
// https://docs.bigbluebutton.org/2.6/release-tests.html#taking-presenter-status-back-automated
|
||||
test('Take presenter @ci @flaky', async ({ browser, context, page }) => {
|
||||
test('Take presenter @ci', async ({ browser, context, page }) => {
|
||||
const multiusers = new MultiUsers(browser, context);
|
||||
await multiusers.initModPage(page);
|
||||
await multiusers.initModPage2();
|
||||
await multiusers.takePresenter();
|
||||
});
|
||||
|
||||
test('Promote to moderator @ci @flaky', async ({ browser, context, page }) => {
|
||||
test('Promote to moderator @ci', async ({ browser, context, page }) => {
|
||||
const multiusers = new MultiUsers(browser, context);
|
||||
await multiusers.initPages(page);
|
||||
await multiusers.promoteToModerator();
|
||||
});
|
||||
|
||||
test('Demote to viewer @ci @flaky', async ({ browser, context, page }) => {
|
||||
test('Demote to viewer @ci', async ({ browser, context, page }) => {
|
||||
const multiusers = new MultiUsers(browser, context);
|
||||
await multiusers.initModPage(page);
|
||||
await multiusers.initModPage2();
|
||||
await multiusers.demoteToViewer();
|
||||
});
|
||||
|
||||
test('Give and remove whiteboard access @ci @flaky', async ({ browser, context, page }) => {
|
||||
test('Give and remove whiteboard access @ci', async ({ browser, context, page }) => {
|
||||
const multiusers = new MultiUsers(browser, context);
|
||||
await multiusers.initModPage(page);
|
||||
await multiusers.initModPage2();
|
||||
@ -102,7 +102,7 @@ test.describe.parallel('User', () => {
|
||||
await guestPolicy.initModPage(page);
|
||||
await guestPolicy.messageToGuestLobby();
|
||||
});
|
||||
test('Allow Everyone @flaky', async ({ browser, context, page }) => {
|
||||
test('Allow Everyone', async ({ browser, context, page }) => {
|
||||
const guestPolicy = new GuestPolicy(browser, context);
|
||||
await guestPolicy.initModPage(page);
|
||||
await guestPolicy.allowEveryone();
|
||||
@ -126,7 +126,7 @@ test.describe.parallel('User', () => {
|
||||
await guestPolicy.messageToSpecificUser();
|
||||
});
|
||||
|
||||
test('Accept @flaky', async ({ browser, context, page }) => {
|
||||
test('Accept', async ({ browser, context, page }) => {
|
||||
const guestPolicy = new GuestPolicy(browser, context);
|
||||
await guestPolicy.initModPage(page);
|
||||
await guestPolicy.acceptSpecificUser();
|
||||
|
Loading…
Reference in New Issue
Block a user