Minor fixes for chat tests

This commit is contained in:
Maxim Khlobystov 2022-01-19 11:17:09 -05:00
parent 746fb46df4
commit 6f25cbcaf4
3 changed files with 5 additions and 5 deletions

View File

@ -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>
);
}

View File

@ -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);
}
}

View File

@ -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);