test: Prevent user from posting public chat (#21257)
* prevent user from posting public chat * changed location initUserPage2
This commit is contained in:
parent
8654f34c26
commit
5c8079e8dd
@ -344,6 +344,23 @@ class Chat extends MultiUsers {
|
||||
await this.modPage.hasElementDisabled(e.chatBox);
|
||||
await this.modPage.hasElementDisabled(e.sendButton);
|
||||
}
|
||||
|
||||
async preventUserFromUsingPublicChat(context) {
|
||||
await openPublicChat(this.modPage);
|
||||
await openPublicChat(this.userPage);
|
||||
await this.modPage.waitAndClick(e.userListItem);
|
||||
await this.modPage.waitAndClick(e.togglePublicChat);
|
||||
await this.initUserPage2(true, context)
|
||||
await this.userPage.hasElementDisabled(e.chatBox);
|
||||
await this.userPage.hasElementDisabled(e.sendButton);
|
||||
await this.userPage2.hasElement(e.chatBox);
|
||||
await this.userPage2.hasElement(e.sendButton);
|
||||
await this.userPage2.type(e.chatBox, 'test');
|
||||
await this.userPage2.waitAndClick(e.sendButton);
|
||||
await this.modPage.hasText(e.chatUserMessageText, 'test');
|
||||
await this.userPage.hasText(e.chatUserMessageText, 'test');
|
||||
await this.userPage2.hasText(e.chatUserMessageText, 'test');
|
||||
}
|
||||
}
|
||||
|
||||
exports.Chat = Chat;
|
||||
|
@ -91,4 +91,8 @@ test.describe('Chat', () => {
|
||||
test('Private chat disabled when user leaves meeting @ci', async () => {
|
||||
await chat.chatDisabledUserLeaves();
|
||||
});
|
||||
|
||||
test('Prevent specific user from sending public chat messages @ci', async ({ context }) => {
|
||||
await chat.preventUserFromUsingPublicChat(context);
|
||||
});
|
||||
});
|
||||
|
@ -395,6 +395,7 @@ exports.userBannedMessage2 = 'div[id="app"] >> div >> div:nth-child(2)';
|
||||
exports.meetingEndedModalTitle = 'h1[data-test="meetingEndedModalTitle"]';
|
||||
exports.unmuteUser = 'li[data-test="unmuteUser"]';
|
||||
exports.ejectCamera = 'li[data-test="ejectCamera"]';
|
||||
exports.togglePublicChat = 'li[data-test="togglePublicChat"]';
|
||||
|
||||
// Lock Viewers
|
||||
exports.lockViewersButton = 'li[data-test="lockViewersButton"]';
|
||||
|
Loading…
Reference in New Issue
Block a user