Skip to content

Commit

Permalink
#4700 Fix mock test (#4706)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioanmo226 authored Sep 22, 2022
1 parent 343ca09 commit 91d74a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/source/mock/backend/backend-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
5 changes: 2 additions & 3 deletions test/source/tests/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -937,10 +937,9 @@ 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);
await Util.sleep(10);
savedPassphrase = await BrowserRecipe.getPassphraseFromInMemoryStore(settingsPage, acctEmail, longid);
expect(savedPassphrase).to.be.undefined;
}));
Expand Down

0 comments on commit 91d74a8

Please sign in to comment.