-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: password protected messages compliance
- Loading branch information
Showing
4 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,6 +236,42 @@ export const defineComposeTests = (testVariant: TestVariant, testWithBrowser: Te | |
}) | ||
); | ||
|
||
test( | ||
'[email protected] - disallow password protected message terms', | ||
testWithBrowser(async (t, browser) => { | ||
const acct = '[email protected]'; | ||
const rules = getKeyManagerAutogenRules(t.context.urls!.port!); | ||
const disallowedPasswordMessageErrorText = 'Password-protected messages are disabled'; | ||
|
||
t.context.mockApi!.configProvider = new ConfigurationProvider({ | ||
attester: { | ||
pubkeyLookup: {}, | ||
}, | ||
ekm: { | ||
keys: [testConstants.existingPrv], | ||
}, | ||
fes: { | ||
clientConfiguration: { | ||
...rules, | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
disallow_password_messages_for_terms: ['forbidden', 'test'], | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
disallow_password_messages_error_text: disallowedPasswordMessageErrorText, | ||
}, | ||
}, | ||
}); | ||
const settingsPage = await BrowserRecipe.openSettingsLoginApprove(t, browser, acct); | ||
await SetupPageRecipe.autoSetupWithEKM(settingsPage); | ||
const composePage = await ComposePageRecipe.openStandalone(t, browser, acct); | ||
await ComposePageRecipe.fillMsg(composePage, { to: '[email protected]' }, 'forbidden subject'); | ||
await composePage.waitAndClick('@action-send', { delay: 1 }); | ||
await PageRecipe.waitForModalAndRespond(composePage, 'error', { | ||
contentToCheck: disallowedPasswordMessageErrorText, | ||
clickOn: 'confirm', | ||
}); | ||
}) | ||
); | ||
|
||
test( | ||
'compose - signed with entered pass phrase + will remember pass phrase in session', | ||
testWithBrowser(async (t, browser) => { | ||
|