From efba929e3b7a13b67c7d2045fdc1090c659aa650 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Thu, 20 Jun 2024 12:16:56 -0300 Subject: [PATCH 1/2] test: flaky e2ee tests (#32645) --- apps/meteor/tests/e2e/e2e-encryption.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/meteor/tests/e2e/e2e-encryption.spec.ts b/apps/meteor/tests/e2e/e2e-encryption.spec.ts index 14d407aaf81d..6d1d2a2fc770 100644 --- a/apps/meteor/tests/e2e/e2e-encryption.spec.ts +++ b/apps/meteor/tests/e2e/e2e-encryption.spec.ts @@ -230,7 +230,7 @@ test.describe.serial('e2e-encryption', () => { await expect(poHomeChannel.content.lastUserMessage.locator('.rcx-icon--name-key')).toBeVisible(); await page.locator('[data-qa-type="message"]').last().hover(); - await expect(page.locator('role=button[name="Forward message"]')).toBeDisabled(); + await expect(page.locator('role=button[name="Forward message not available on encrypted content"]')).toBeDisabled(); await poHomeChannel.content.openLastMessageMenu(); From 142877891b37fa4f328003ee36a3b828bb8b81ae Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Thu, 20 Jun 2024 13:54:31 -0300 Subject: [PATCH 2/2] test: fix canned-response/business hours flaky test (#32642) --- apps/meteor/app/livechat/server/startup.ts | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/apps/meteor/app/livechat/server/startup.ts b/apps/meteor/app/livechat/server/startup.ts index aba8578dcea9..098fa803711c 100644 --- a/apps/meteor/app/livechat/server/startup.ts +++ b/apps/meteor/app/livechat/server/startup.ts @@ -64,14 +64,22 @@ Meteor.startup(async () => { }); await createDefaultBusinessHourIfNotExists(); - settings.watch('Livechat_enable_business_hours', async (value) => { - logger.debug(`Starting business hour manager ${value}`); - if (value) { - await businessHourManager.startManager(); - return; - } - await businessHourManager.stopManager(); - }); + settings.watch( + 'Livechat_enable_business_hours', + async (value) => { + logger.debug(`Starting business hour manager ${value}`); + if (value) { + await businessHourManager.startManager(); + return; + } + await businessHourManager.stopManager(); + }, + process.env.TEST_MODE === 'true' + ? { + debounce: 10, + } + : undefined, + ); settings.watch('Livechat_Routing_Method', () => { void RoutingManager.startQueue();