From e6d334574fb3b868d7b0785d4c77809d63dd743d Mon Sep 17 00:00:00 2001 From: Ioan Moldovan Date: Thu, 22 Sep 2022 01:35:26 -0400 Subject: [PATCH 1/3] fix: increase passphrase timeout --- test/source/mock/backend/backend-data.ts | 2 +- test/source/tests/setup.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/source/mock/backend/backend-data.ts b/test/source/mock/backend/backend-data.ts index 1b54851f76a..2b4f26e6cec 100644 --- a/test/source/mock/backend/backend-data.ts +++ b/test/source/mock/backend/backend-data.ts @@ -97,7 +97,7 @@ export class BackendData { "flags": [ "FORBID_STORING_PASS_PHRASE", ], - "in_memory_pass_phrase_session_length": 3 + "in_memory_pass_phrase_session_length": 10 }; } if (domain === 'no-submit-client-configuration.flowcrypt.test') { diff --git a/test/source/tests/setup.ts b/test/source/tests/setup.ts index e08a10efebc..fa2a8ad0e77 100644 --- a/test/source/tests/setup.ts +++ b/test/source/tests/setup.ts @@ -937,7 +937,7 @@ AN8G3r5Htj8olot+jm9mIa5XLXWzMNUZgg== 'cryptup_userpassphrasesessionlengthclientconfigurationflowcrypttest_rules' ]); let savedPassphrase = await BrowserRecipe.getPassphraseFromInMemoryStore(settingsPage, acctEmail, longid); - expect((rules as { in_memory_pass_phrase_session_length: number }).in_memory_pass_phrase_session_length).to.be.equal(3); + expect((rules as { in_memory_pass_phrase_session_length: number }).in_memory_pass_phrase_session_length).to.be.equal(10); expect(savedPassphrase).to.be.equal(passphrase); // wait 1 minute because we delete expired passphrase every 1 minute await Util.sleep(3); From 45e0aa63ec648d7a45c1f2a504a9bef4f54a07e4 Mon Sep 17 00:00:00 2001 From: Ioan Moldovan Date: Thu, 22 Sep 2022 01:51:15 -0400 Subject: [PATCH 2/3] fix: sleep --- test/source/tests/setup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/source/tests/setup.ts b/test/source/tests/setup.ts index fa2a8ad0e77..39806a11a94 100644 --- a/test/source/tests/setup.ts +++ b/test/source/tests/setup.ts @@ -940,7 +940,7 @@ AN8G3r5Htj8olot+jm9mIa5XLXWzMNUZgg== expect((rules as { in_memory_pass_phrase_session_length: number }).in_memory_pass_phrase_session_length).to.be.equal(10); expect(savedPassphrase).to.be.equal(passphrase); // wait 1 minute because we delete expired passphrase every 1 minute - await Util.sleep(3); + await Util.sleep(10); savedPassphrase = await BrowserRecipe.getPassphraseFromInMemoryStore(settingsPage, acctEmail, longid); expect(savedPassphrase).to.be.undefined; })); From 4b96abbc63597f09fec1a4164eeb22fce47a73f2 Mon Sep 17 00:00:00 2001 From: Ioan Moldovan Date: Thu, 22 Sep 2022 01:51:50 -0400 Subject: [PATCH 3/3] fix: comment --- test/source/tests/setup.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/test/source/tests/setup.ts b/test/source/tests/setup.ts index 39806a11a94..090ef92a471 100644 --- a/test/source/tests/setup.ts +++ b/test/source/tests/setup.ts @@ -939,7 +939,6 @@ AN8G3r5Htj8olot+jm9mIa5XLXWzMNUZgg== let savedPassphrase = await BrowserRecipe.getPassphraseFromInMemoryStore(settingsPage, acctEmail, longid); expect((rules as { in_memory_pass_phrase_session_length: number }).in_memory_pass_phrase_session_length).to.be.equal(10); expect(savedPassphrase).to.be.equal(passphrase); - // wait 1 minute because we delete expired passphrase every 1 minute await Util.sleep(10); savedPassphrase = await BrowserRecipe.getPassphraseFromInMemoryStore(settingsPage, acctEmail, longid); expect(savedPassphrase).to.be.undefined;