From 44bcbdac7fc33c9615ef3423a10d948141e0baa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Carden=CC=83a?= <35935591+luisecm@users.noreply.github.com> Date: Wed, 23 Oct 2024 16:10:05 -0600 Subject: [PATCH] update(test): fix group chats tests --- playwright/PageObjects/MainPage.ts | 2 +- playwright/specs/03-friends-two-instances.spec.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/playwright/PageObjects/MainPage.ts b/playwright/PageObjects/MainPage.ts index 62c811c..68b49fe 100644 --- a/playwright/PageObjects/MainPage.ts +++ b/playwright/PageObjects/MainPage.ts @@ -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.*/); } diff --git a/playwright/specs/03-friends-two-instances.spec.ts b/playwright/specs/03-friends-two-instances.spec.ts index 5a948ce..3d6f836 100644 --- a/playwright/specs/03-friends-two-instances.spec.ts +++ b/playwright/specs/03-friends-two-instances.spec.ts @@ -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",