test(chat): Adjust notification message selector

This commit is contained in:
João Victor 2024-10-17 08:59:20 -03:00
parent 83514efe58
commit e3fc7e713c
5 changed files with 7 additions and 4 deletions

View File

@ -9,7 +9,7 @@ interface ChatMessageNotificationContentProps {
const ChatMessageNotificationContent: React.FC<ChatMessageNotificationContentProps> = (props) => {
const { text, iconName } = props;
return (
<Styled.Root>
<Styled.Root data-test="chatMessageNotificationContent">
{iconName && <Styled.Icon iconName={iconName} />}
<Styled.Typography>
{text}

View File

@ -22,7 +22,9 @@ export const Icon = styled(BaseIcon)`
}
`;
export const Typography = styled.span`
export const Typography = styled.p`
display: inline;
margin: 0;
vertical-align: baseline;
overflow-wrap: break-word;
white-space: pre-wrap;

View File

@ -144,7 +144,7 @@ const ChatMessageToolbar: React.FC<ChatMessageToolbarProps> = (props) => {
}}
icon="happy"
color="light"
data-test="emojiPickerButton"
data-test="reactionsPickerButton"
ref={setReactionsAnchor}
/>
)}

View File

@ -63,7 +63,7 @@ class Chat extends MultiUsers {
// clear
await this.modPage.waitAndClick(e.chatOptions);
await this.modPage.waitAndClick(e.chatClear);
await this.modPage.hasText(e.chatUserMessageText, 'The public chat history was cleared by a moderator', 'should display the message where the chat has been cleared');
await this.modPage.hasText(e.chatNotificationMessageText, 'The public chat history was cleared by a moderator', 'should display the message where the chat has been cleared');
}
async copyChat() {

View File

@ -120,6 +120,7 @@ exports.closePrivateChat = 'button[data-test="closePrivateChat"]';
exports.typingIndicator = 'span[data-test="typingIndicator"]';
exports.errorTypingIndicator = 'div[data-test="errorTypingIndicator"]';
exports.chatUserMessageText = 'div[data-test="messageContent"] p';
exports.chatNotificationMessageText = 'div[data-test="chatMessageNotificationContent"] p';
exports.secondChatUserMessageText = 'p[data-test="chatUserMessageText"]>>nth=1';
exports.chatWelcomeMessageText = 'div[data-test="welcomeMessage"]';
exports.waitingUsersLobbyMessage = 'div[data-test="lobbyMessage"] >> textarea';