-
Notifications
You must be signed in to change notification settings - Fork 11
added new spec for check recipients in offline mode #1432
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
5 commits
Select commit
Hold shift + click to select a range
46680e1
added new spec for check recipients in offline mode, added new method…
acladima 032f082
Merge branch 'master' into test/issue-1420
acladima 626ea49
added fixes after review
acladima 714686e
updated indents in files after review
acladima c8eeeb6
Merge branch 'master' into test/issue-1420
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1 @@ | ||
| export const DEFAULT_TIMEOUT = 15000; | ||
|
|
||
| export const DEFAULT_TIMEOUT = 15000; |
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
28 changes: 14 additions & 14 deletions
28
appium/tests/specs/live/update/CheckAppAfterUpdateFromOldVersion.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
69 changes: 69 additions & 0 deletions
69
appium/tests/specs/mock/setup/CheckRecipientsInOfflineMode.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,69 @@ | ||
| import { | ||
| SplashScreen, | ||
| SetupKeyScreen, | ||
| MailFolderScreen, | ||
| NewMessageScreen, | ||
| } from '../../../screenobjects/all-screens'; | ||
| import { CommonData } from '../../../data'; | ||
| import { MockApi } from "../../../../api-mocks/mock"; | ||
| import { attesterPublicKeySamples } from "../../../../api-mocks/apis/attester/attester-endpoints"; | ||
|
|
||
| describe('COMPOSE EMAIL: ', () => { | ||
|
|
||
| it('check valid, revoked and expired recipients in offline mode', async () => { | ||
|
|
||
| const validEmail = CommonData.validMockUser.email; | ||
| const expiredEmail = CommonData.expiredMockUser.email; | ||
| const revokedEmail = CommonData.revokedMockUser.email; | ||
|
|
||
|
|
||
| const mockApi = new MockApi(); | ||
| mockApi.fesConfig = { | ||
| clientConfiguration: { | ||
| flags: ["NO_PRV_CREATE", "NO_PRV_BACKUP", "NO_ATTESTER_SUBMIT", "PRV_AUTOIMPORT_OR_AUTOGEN", "FORBID_STORING_PASS_PHRASE"], | ||
| key_manager_url: "https://ekm.flowcrypt.com", | ||
| } | ||
| }; | ||
| mockApi.attesterConfig = { | ||
| servedPubkeys: { | ||
| 'valid@domain.test': attesterPublicKeySamples.valid, | ||
| 'expired@domain.test': attesterPublicKeySamples.expired, | ||
| 'revoked@domain.test': attesterPublicKeySamples.revoked, | ||
| } | ||
| }; | ||
|
|
||
| await mockApi.withMockedApis(async () => { | ||
| await SplashScreen.login(); | ||
| await SetupKeyScreen.setPassPhrase(); | ||
| await MailFolderScreen.checkInboxScreen(); | ||
|
|
||
| await MailFolderScreen.clickCreateEmail(); | ||
| await NewMessageScreen.setAddRecipient(validEmail); | ||
| await NewMessageScreen.setAddRecipient(expiredEmail); | ||
| await NewMessageScreen.setAddRecipient(revokedEmail); | ||
|
|
||
| await NewMessageScreen.checkAddedRecipientColor(validEmail, 0, 'green'); | ||
| await NewMessageScreen.checkAddedRecipientColor(expiredEmail, 1, 'orange'); | ||
| await NewMessageScreen.checkAddedRecipientColor(revokedEmail, 2, 'red'); | ||
|
|
||
| await NewMessageScreen.deleteAddedRecipient(2); | ||
| await NewMessageScreen.deleteAddedRecipient(1); | ||
| await NewMessageScreen.deleteAddedRecipient(0); | ||
|
|
||
| mockApi.attesterConfig = { | ||
| returnError: { | ||
| code: 400, | ||
| message: "some client err" | ||
| } | ||
| }; | ||
|
|
||
| await NewMessageScreen.setAddRecipient(validEmail); | ||
| await NewMessageScreen.setAddRecipient(expiredEmail); | ||
| await NewMessageScreen.setAddRecipient(revokedEmail); | ||
|
|
||
| await NewMessageScreen.checkAddedRecipientColor(validEmail, 0, 'green'); | ||
| await NewMessageScreen.checkAddedRecipientColor(expiredEmail, 1, 'red'); | ||
| await NewMessageScreen.checkAddedRecipientColor(revokedEmail, 2, 'red'); | ||
| }); | ||
| }); | ||
| }); | ||
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
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.