From cfe8276dac2189f3a8167e7db9e060114d63fbc0 Mon Sep 17 00:00:00 2001 From: Ioan Moldovan Date: Tue, 14 May 2024 13:25:04 +0200 Subject: [PATCH] #5706 Update text for keys expiration date popup (#5712) * fix: update text for keys expiration date popup * fix: test * fix: pr reviews --- .../content_scripts/webmail/setup-webmail-content-script.ts | 2 +- test/source/tests/setup.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extension/js/content_scripts/webmail/setup-webmail-content-script.ts b/extension/js/content_scripts/webmail/setup-webmail-content-script.ts index f4e3db89d88..4c58e0da86d 100644 --- a/extension/js/content_scripts/webmail/setup-webmail-content-script.ts +++ b/extension/js/content_scripts/webmail/setup-webmail-content-script.ts @@ -414,7 +414,7 @@ export const contentScriptSetupIfVacant = async (webmailSpecific: WebmailSpecifi } warningMsg = expirationText + - `To receive the latest keys, please ensure that you can connect to your corporate network either through VPN or in person and reload Gmail.
` + + `To receive the latest keys, please ensure that you are connected to your corporate network (or through VPN) and have entered your FlowCrypt passphrase. Then reload Gmail.
` + `If this notification still shows after that, please contact your Help Desk.`; } else { let expirationText: string; diff --git a/test/source/tests/setup.ts b/test/source/tests/setup.ts index 1f71de34897..6d08fae2228 100644 --- a/test/source/tests/setup.ts +++ b/test/source/tests/setup.ts @@ -859,7 +859,7 @@ AN8G3r5Htj8olot+jm9mIa5XLXWzMNUZgg== const gmailPage = await openMockGmailPage(t, browser, acctEmail); // Check if notification presents let warningMsg = - 'Your local keys are expired.\nTo receive the latest keys, please ensure that you can connect to your corporate network either through VPN or in person and reload Gmail.\nIf this notification still shows after that, please contact your Help Desk.'; + 'Your local keys are expired.\nTo receive the latest keys, please ensure that you are connected to your corporate network (or through VPN) and have entered your FlowCrypt passphrase. Then reload Gmail.\nIf this notification still shows after that, please contact your Help Desk.'; await gmailPage.waitForContent('@webmail-notification-notify_expiring_keys', warningMsg); // Generate expired key(positive expiration) and check if it shows correct note const key = await opgp.generateKey({ @@ -875,7 +875,7 @@ AN8G3r5Htj8olot+jm9mIa5XLXWzMNUZgg== await Util.sleep(1); // Check if notification presents warningMsg = - 'Your local keys expire in 18 days.\nTo receive the latest keys, please ensure that you can connect to your corporate network either through VPN or in person and reload Gmail.\nIf this notification still shows after that, please contact your Help Desk.'; + 'Your local keys expire in 18 days.\nTo receive the latest keys, please ensure that you are connected to your corporate network (or through VPN) and have entered your FlowCrypt passphrase. Then reload Gmail.\nIf this notification still shows after that, please contact your Help Desk.'; await gmailPage.waitForContent('@webmail-notification-notify_expiring_keys', warningMsg); // Check if warning message still presents when EKM returns error t.context.mockApi!.configProvider.config.ekm!.returnError = new HttpClientErr('RequestTimeout', Status.BAD_REQUEST);