-
Notifications
You must be signed in to change notification settings - Fork 11
added new specs for checking EKM setup with revoked key #1526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9fa11a7
added nes specs for checking EKM setup
acladima 065ef7f
added fixes after review
acladima ecb7ba9
added fixes after review
acladima 11b8e91
added fixes after review
acladima 6292c2e
added fixes after review
acladima 857d57f
Merge branch 'master' into tests/issue-1491
acladima 9963a2b
#1491 fix UI test for recipient check
ioanmo226 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
61 changes: 61 additions & 0 deletions
61
appium/tests/specs/mock/setup/SetupOnlyRevokedKeyFromEKM.spec.ts
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| import { MockApi } from 'api-mocks/mock'; | ||
| import { | ||
| SplashScreen, | ||
| SetupKeyScreen, | ||
| } from '../../../screenobjects/all-screens'; | ||
| import { attesterPublicKeySamples } from "../../../../api-mocks/apis/attester/attester-endpoints"; | ||
| import { ekmPrivateKeySamples } from "../../../../api-mocks/apis/ekm/ekm-endpoints"; | ||
| import MailFolderScreen from "../../../screenobjects/mail-folder.screen"; | ||
| import NewMessageScreen from "../../../screenobjects/new-message.screen"; | ||
| import BaseScreen from "../../../screenobjects/base.screen"; | ||
| import { CommonData } from "../../../data"; | ||
|
|
||
|
|
||
| describe('SETUP: ', () => { | ||
|
|
||
| it('test that returns only revoked key from EKM during setup', async () => { | ||
|
|
||
| const mockApi = new MockApi(); | ||
| const recipientEmail = CommonData.recipient.email; | ||
| const recipientName = CommonData.recipient.name; | ||
| const emailSubject = CommonData.simpleEmail.subject; | ||
| const emailText = CommonData.simpleEmail.message; | ||
|
|
||
| const noPrivateKeyError = 'Error\n' + | ||
| 'Could not compose message\n' + | ||
| '\n' + | ||
| 'Error: Error encrypting message: Could not find valid key packet for signing in key bf79556b2cad5c1e'; | ||
|
|
||
| mockApi.fesConfig = { | ||
| clientConfiguration: { | ||
| flags: ["NO_PRV_CREATE", "NO_PRV_BACKUP", "NO_ATTESTER_SUBMIT", "PRV_AUTOIMPORT_OR_AUTOGEN", "FORBID_STORING_PASS_PHRASE"], | ||
| key_manager_url: CommonData.keyManagerURL.mockServer, | ||
| } | ||
| }; | ||
| mockApi.attesterConfig = { | ||
| servedPubkeys: { | ||
| 'robot@flowcrypt.com': attesterPublicKeySamples.valid | ||
| } | ||
| }; | ||
|
|
||
| mockApi.ekmConfig = { | ||
| returnKeys: [ekmPrivateKeySamples.revokedPrv] | ||
| }; | ||
|
|
||
| await mockApi.withMockedApis(async () => { | ||
| await SplashScreen.login(); | ||
| await SetupKeyScreen.setPassPhrase(); | ||
| await MailFolderScreen.checkInboxScreen(); | ||
| await MailFolderScreen.clickCreateEmail(); | ||
|
|
||
| await NewMessageScreen.composeEmail(recipientEmail, emailSubject, emailText); | ||
| await NewMessageScreen.checkFilledComposeEmailInfo({ | ||
| recipients: [recipientName], | ||
| subject: emailSubject, | ||
| message: emailText | ||
| }); | ||
| await NewMessageScreen.clickSendButton(); | ||
| await BaseScreen.checkModalMessage(noPrivateKeyError); | ||
| }); | ||
| }); | ||
| }); | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.