-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
55 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
35 changes: 35 additions & 0 deletions
35
appium/tests/specs/mock/inbox/CheckShowOnlyEncryptedEmails.spec.ts
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { MockApi } from 'api-mocks/mock'; | ||
import { MockApiConfig } from 'api-mocks/mock-config'; | ||
import { MailFolderScreen, MenuBarScreen, SetupKeyScreen, SplashScreen } from '../../../screenobjects/all-screens'; | ||
|
||
describe('INBOX: ', () => { | ||
it('user is able to see only encrypted emails when he clicks show only encrypted emails button', async () => { | ||
const mockApi = new MockApi(); | ||
|
||
mockApi.fesConfig = MockApiConfig.defaultEnterpriseFesConfiguration; | ||
mockApi.ekmConfig = MockApiConfig.defaultEnterpriseEkmConfiguration; | ||
const plainEmailSubject = 'Honor reply-to address - plain'; | ||
const encryptedEmailSubject = 'Encrypted email with public key attached'; | ||
mockApi.addGoogleAccount('[email protected]', { | ||
messages: [plainEmailSubject, encryptedEmailSubject], | ||
}); | ||
|
||
await mockApi.withMockedApis(async () => { | ||
await SplashScreen.mockLogin(); | ||
await SetupKeyScreen.setPassPhrase(); | ||
await MailFolderScreen.checkInboxScreen(); | ||
|
||
// Check if both encrypted & plain emails are present | ||
await MailFolderScreen.checkEmailIsDisplayed(plainEmailSubject); | ||
await MailFolderScreen.checkEmailIsDisplayed(encryptedEmailSubject); | ||
|
||
await MenuBarScreen.clickMenuBtn(); | ||
await MenuBarScreen.clickShowOnlyEncryptedEmailsToggle(); | ||
await browser.pause(1000); | ||
await MenuBarScreen.clickInboxButton(); | ||
|
||
// Now check if plain email is not present | ||
await MailFolderScreen.checkEmailIsNotDisplayed(plainEmailSubject); | ||
}); | ||
}); | ||
}); |