Skip to content

Commit

Permalink
update(test): fix group chats tests
Browse files Browse the repository at this point in the history
  • Loading branch information
luisecm committed Oct 23, 2024
1 parent 5b47f65 commit 44bcbda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion playwright/PageObjects/MainPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export default class MainPage {
.textContent();
const statusIndicator = chatPreviewLocator.getByTestId("status-indicator");
expect(text).toEqual(expectedText);
expect(timestamp).toEqual("just now");
expect(timestamp).toMatch(/just now|1 minute ago/);
expect(statusIndicator).toHaveClass(/.*\bonline\b.*/);
}

Expand Down
3 changes: 3 additions & 0 deletions playwright/specs/03-friends-two-instances.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2092,11 +2092,14 @@ test.describe("Two instances tests - Friends and Chats", () => {
3,
);

await chatsMainPageFirst.clickOnShowSidebarIfClosed();
await chatsMainPageFirst.validateChatPreviewMessageTextGroup(
"Group Chat 1",
"Hello Group",
3,
);

await chatsMainPageSecond.clickOnShowSidebarIfClosed();
await chatsMainPageSecond.validateChatPreviewMessageTextGroup(
"Group Chat 1",
"Hello Group",
Expand Down

0 comments on commit 44bcbda

Please sign in to comment.