Minor fixes for chat tests
This commit is contained in:
parent
746fb46df4
commit
6f25cbcaf4
@ -103,7 +103,7 @@ class TypingIndicator extends PureComponent {
|
||||
|
||||
return (
|
||||
<div className={cx(style)}>
|
||||
<span className={styles.typingIndicator}>{error || typingElement}</span>
|
||||
<span className={styles.typingIndicator} data-test="typingIndicator">{error || typingElement}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -14,13 +14,13 @@ class CharacterLimit extends Page {
|
||||
|
||||
await this.type(e.chatBox, e.longMessage5000);
|
||||
await this.waitAndClick(e.sendButton);
|
||||
await this.page.waitForSelector(e.chatUserMessageText);
|
||||
await this.waitForSelector(e.chatUserMessageText);
|
||||
await expect(messageLocator).toHaveCount(1);
|
||||
|
||||
await this.type(e.chatBox, e.longMessage5001);
|
||||
await this.page.waitForSelector(e.typingIndicator);
|
||||
await this.waitForSelector(e.typingIndicator);
|
||||
await this.waitAndClick(e.sendButton);
|
||||
await this.page.waitForSelector(e.chatUserMessageText);
|
||||
await this.waitForSelector(e.chatUserMessageText);
|
||||
await expect(messageLocator).toHaveCount(1);
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ class EmptyMessage extends Page {
|
||||
|
||||
async test() {
|
||||
await openChat(this.page);
|
||||
const messageLocator = this.page.locator(e.chatUserMessageText);
|
||||
const messageLocator = this.getLocator(e.chatUserMessageText);
|
||||
|
||||
await this.waitAndClick(e.sendButton);
|
||||
await expect(messageLocator).toHaveCount(0);
|
||||
|
Loading…
Reference in New Issue
Block a user