-
Notifications
You must be signed in to change notification settings - Fork 11
issue #517 followup EKM UI tests #730
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
8 commits
Select commit
Hold shift + click to select a range
c0ce1e2
added new specs which cover 517 issue
acladima 9966f01
Merge branch 'master' into tests/issues-517
acladima 28d0799
covered 517 issue
acladima fce0d6a
added fixes for PR
acladima c24e87b
added fixes for PR
acladima f26366b
added fixes for PR
acladima bee8fc9
Branch was auto-updated.
github-actions[bot] d512a94
Branch was auto-updated.
github-actions[bot] 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
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,90 @@ | ||
| import BaseScreen from './base.screen'; | ||
|
|
||
| const SELECTORS = { | ||
| KEYS_HEADER: '-ios class chain:**/XCUIElementTypeStaticText[`label == "Keys"`]', | ||
| ADD_BUTTON: '~Add', | ||
| NAME_AND_EMAIL: '-ios class chain:**/XCUIElementTypeOther/XCUIElementTypeStaticText[1]', | ||
| DATE_CREATED: '-ios class chain:**/XCUIElementTypeOther/XCUIElementTypeStaticText[2]', | ||
| FINGERPRINT: '-ios class chain:**/XCUIElementTypeOther/XCUIElementTypeStaticText[3]', | ||
| SHOW_PUBLIC_KEY_BUTTON: '~Show public key', | ||
| SHOW_KEY_DETAILS_BUTTON: '~Show key details', | ||
| COPY_TO_CLIPBOARD_BUTTON: '~Copy to clipboard', | ||
| SHARE_BUTTON: '~Share', | ||
| SHOW_PRIVATE_KEY_BUTTON: '~Show private key' | ||
| }; | ||
|
|
||
| class KeysScreen extends BaseScreen { | ||
| constructor () { | ||
| super(SELECTORS.KEYS_HEADER); | ||
| } | ||
|
|
||
| get keysHeader() { | ||
| return $(SELECTORS.KEYS_HEADER); | ||
| } | ||
|
|
||
| get addButton() { | ||
| return $(SELECTORS.ADD_BUTTON); | ||
| } | ||
|
|
||
| get nameAndEmail() { | ||
| return $(SELECTORS.NAME_AND_EMAIL); | ||
| } | ||
|
|
||
| get dateCreated() { | ||
| return $(SELECTORS.DATE_CREATED); | ||
| } | ||
|
|
||
| get fingerPrint() { | ||
| return $(SELECTORS.FINGERPRINT); | ||
| } | ||
|
|
||
| get showPublicKeyButton() { | ||
| return $(SELECTORS.SHOW_PUBLIC_KEY_BUTTON); | ||
| } | ||
|
|
||
| get showPrivateKeyButton() { | ||
| return $(SELECTORS.SHOW_PRIVATE_KEY_BUTTON); | ||
| } | ||
|
|
||
| get showKeyDetailsButton() { | ||
| return $(SELECTORS.SHOW_KEY_DETAILS_BUTTON); | ||
| } | ||
|
|
||
| get shareButton() { | ||
| return $(SELECTORS.SHARE_BUTTON); | ||
| } | ||
|
|
||
| get copyToClipboardButton() { | ||
| return $(SELECTORS.COPY_TO_CLIPBOARD_BUTTON); | ||
| } | ||
|
|
||
| checkKeysScreen() { | ||
| //will add value verification for key later, need to create Api request for get key value | ||
| this.keysHeader.waitForDisplayed(); | ||
| //this.addButton.waitForDisplayed({reverse: true}); - disabled due to https://github.com/FlowCrypt/flowcrypt-ios/issues/715 | ||
| this.nameAndEmail.waitForExist(); | ||
| this.dateCreated.waitForExist(); | ||
| this.fingerPrint.waitForExist(); | ||
| expect(this.nameAndEmail.getAttribute('value')).not.toEqual(null); | ||
| expect(this.dateCreated.getAttribute('value')).not.toEqual(null); | ||
| expect(this.fingerPrint.getAttribute('value')).not.toEqual(null); | ||
| } | ||
|
|
||
| clickOnKey() { | ||
| this.nameAndEmail.click(); | ||
| } | ||
|
|
||
| checkSelectedKeyScreen() { | ||
| this.showPublicKeyButton.waitForDisplayed(); | ||
| this.showPrivateKeyButton.waitForDisplayed(); | ||
| this.showKeyDetailsButton.waitForDisplayed(); | ||
| this.shareButton.waitForDisplayed(); | ||
| this.copyToClipboardButton.waitForDisplayed(); | ||
| } | ||
|
|
||
| clickOnShowPublicKey() { | ||
| this.showPublicKeyButton.click(); | ||
| } | ||
| } | ||
|
|
||
| export default new KeysScreen(); |
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 |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import BaseScreen from './base.screen'; | ||
|
|
||
| const SELECTORS = { | ||
| BACK_BTN: '~arrow left c', | ||
| PUBLIC_KEY: '-ios class chain:**/XCUIElementTypeOther/XCUIElementTypeStaticText[1]', | ||
| }; | ||
|
|
||
| class PublicKeyScreen extends BaseScreen { | ||
| constructor () { | ||
| super(SELECTORS.BACK_BTN); | ||
| } | ||
|
|
||
| get backButton() { | ||
| return $(SELECTORS.BACK_BTN); | ||
| } | ||
|
|
||
| get publicKey() { | ||
| return $(SELECTORS.PUBLIC_KEY); | ||
| } | ||
|
|
||
| checkPublicKey() { | ||
| this.backButton.waitForDisplayed(); | ||
| this.publicKey.waitForExist(); | ||
| expect(this.publicKey.getAttribute('value')).not.toEqual(null); | ||
| } | ||
| } | ||
|
|
||
| export default new PublicKeyScreen(); |
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,31 @@ | ||
| import BaseScreen from './base.screen'; | ||
| const SELECTORS = { | ||
| MENU_ICON: '~menu icn', | ||
| }; | ||
|
|
||
| class SettingsScreen extends BaseScreen { | ||
| constructor () { | ||
| super(SELECTORS.MENU_ICON); | ||
| } | ||
|
|
||
| settingsItem (setting) { | ||
| return $(`~${setting}`); | ||
| } | ||
|
|
||
| checkSettingsScreen() { | ||
| this.settingsItem('Security and Privacy').waitForDisplayed(); | ||
| this.settingsItem('Contacts').waitForDisplayed(); | ||
| this.settingsItem('Keys').waitForDisplayed(); | ||
| this.settingsItem('Attester').waitForDisplayed(); | ||
| this.settingsItem('Notifications').waitForDisplayed(); | ||
| this.settingsItem('Legal').waitForDisplayed(); | ||
| this.settingsItem('Experimental').waitForDisplayed(); | ||
| this.settingsItem('Backups').waitForDisplayed({reverse: true}); | ||
| } | ||
|
|
||
| clickOnSettingItem(item) { | ||
| this.settingsItem(item).click(); | ||
| } | ||
| } | ||
|
|
||
| export default new SettingsScreen(); |
50 changes: 50 additions & 0 deletions
50
appium/tests/specs/inbox/CheckEncryptedEmailAfterRestartApp.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,50 @@ | ||
| import { | ||
| SplashScreen, | ||
| CreateKeyScreen, | ||
| InboxScreen, | ||
| EmailScreen | ||
| } from '../../screenobjects/all-screens'; | ||
|
|
||
| import {CommonData} from '../../data'; | ||
|
|
||
| describe('INBOX: ', () => { | ||
|
|
||
| it('user is able to see encrypted email with pass phrase after restart app', () => { | ||
|
|
||
| const senderEmail = CommonData.sender.email; | ||
| const emailSubject = 'encrypted message'; | ||
| const emailText = 'test test'; | ||
| const wrongPassPhrase = 'user is not able to see email'; | ||
|
|
||
| const correctPassPhrase = CommonData.account.passPhrase; | ||
|
|
||
| const bundleId = CommonData.bundleId.id; | ||
|
|
||
| SplashScreen.login(); | ||
| CreateKeyScreen.setPassPhrase(); | ||
|
|
||
| InboxScreen.clickOnEmailBySubject(senderEmail); | ||
| EmailScreen.checkOpenedEmail(senderEmail, emailSubject, emailText); | ||
|
|
||
| driver.terminateApp(bundleId); | ||
|
|
||
| driver.activateApp(bundleId); | ||
|
|
||
| InboxScreen.clickOnEmailBySubject(emailSubject); | ||
|
|
||
| //try to see encrypted message with wrong pass phrase | ||
| EmailScreen.enterPassPhrase(wrongPassPhrase); | ||
| EmailScreen.clickOkButton(); | ||
| EmailScreen.checkErrorMessage(); | ||
|
|
||
| //check email after setting correct pass phrase | ||
| EmailScreen.enterPassPhrase(correctPassPhrase); | ||
| EmailScreen.clickSaveButton(); | ||
| EmailScreen.checkOpenedEmail(senderEmail, emailSubject, emailText); | ||
|
|
||
| //reopen email without pass phrase | ||
| EmailScreen.clickBackButton(); | ||
| InboxScreen.clickOnEmailBySubject(emailSubject); | ||
| EmailScreen.checkOpenedEmail(senderEmail, emailSubject, emailText); | ||
| }); | ||
| }); |
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
35 changes: 35 additions & 0 deletions
35
appium/tests/specs/settings/CheckSettingsForLoggedUser.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,35 @@ | ||
| import { | ||
| SplashScreen, | ||
| CreateKeyScreen, | ||
| MenuBarScreen, | ||
| SettingsScreen, | ||
| KeysScreen, | ||
| PublicKeyScreen | ||
| } from '../../screenobjects/all-screens'; | ||
|
|
||
|
|
||
| describe('SETTINGS: ', () => { | ||
|
|
||
| it('user should see public key and should not see private key', () => { | ||
|
|
||
| SplashScreen.login(); | ||
| CreateKeyScreen.setPassPhrase(); | ||
|
|
||
| MenuBarScreen.clickMenuIcon(); | ||
| MenuBarScreen.checkUserEmail(); | ||
| MenuBarScreen.checkMenuBar(); | ||
|
|
||
| MenuBarScreen.clickSettingsButton(); | ||
| SettingsScreen.checkSettingsScreen(); | ||
| SettingsScreen.clickOnSettingItem('Keys'); | ||
|
|
||
| KeysScreen.checkKeysScreen(); | ||
| KeysScreen.clickOnKey(); | ||
|
|
||
| KeysScreen.checkSelectedKeyScreen(); | ||
|
|
||
| KeysScreen.clickOnShowPublicKey(); | ||
| PublicKeyScreen.checkPublicKey(); | ||
|
|
||
| }); | ||
| }); |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please name it
checkWrongPassPhraseErrorMessageto be more specific