Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ appium/package-lock.json
appium/tmp
appium/.env
appium/FlowCrypt.app
appium/video

1 change: 1 addition & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ blocks:
on_fail:
commands:
- artifact push job ~/Library/Logs/DiagnosticReports/FlowCrypt_*
- artifact push job ~/git/flowcrypt-ios/appium/video/*.mp4
- name: TypeScript + Swift tests
dependencies: []
run: # don't run if the only thing that changed is Appium test deps
Expand Down
13 changes: 8 additions & 5 deletions appium/config/wdio.shared.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { join } = require('path');
const video = require('wdio-video-reporter');

exports.config = {

Expand All @@ -16,11 +17,13 @@ exports.config = {
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
maxInstancesPerCapability: 1,
reporters: ['spec',
['allure', {
outputDir: './tmp',
disableWebdriverStepsReporting: true,
disableWebdriverScreenshotsReporting: false,
reporters: [
'spec',
[video, {
saveAllVideos: false, // If true, also saves videos for successful test cases
videoSlowdownMultiplier: 3, // Higher to get slower videos, lower for faster videos [Value 1-100]
videoRenderTimeout: 10, // Max seconds to wait for a video to finish rendering
outputDir: './video',
}]
],
services: [
Expand Down
1 change: 1 addition & 0 deletions appium/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"request": "^2.88.2",
"ts-node": "^10.4.0",
"typescript": "^4.4.4",
"wdio-video-reporter": "^3.1.3",
"webdriverio": "7.16.4"
}
}
18 changes: 15 additions & 3 deletions appium/tests/screenobjects/inbox.screen.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import BaseScreen from './base.screen';
import ElementHelper from "../helpers/ElementHelper";
import TouchHelper from "../helpers/TouchHelper";

const SELECTORS = {
ENTER_YOUR_PASS_PHRASE_FIELD: '-ios class chain:**/XCUIElementTypeSecureTextField[`value == "Enter your pass phrase"`]',
Expand All @@ -19,7 +20,7 @@ class InboxScreen extends BaseScreen {
}

get inboxHeader() {
return $(SELECTORS.INBOX_HEADER)
return $(SELECTORS.INBOX_HEADER)
}

clickOnUserEmail = async (email: string) => {
Expand All @@ -28,16 +29,27 @@ class InboxScreen extends BaseScreen {
}

clickOnEmailBySubject = async (subject: string) => {
await ElementHelper.waitAndClick(await $(`~${subject}`), 500);
const selector = `~${subject}`;
if (await (await $(selector)).isDisplayed() !== true) {
await TouchHelper.scrollDown();
}
await ElementHelper.waitAndClick(await $(selector), 500);
}

clickCreateEmail = async () => {
if (await (await this.createEmailButton).isDisplayed() !== true ) {
await TouchHelper.scrollDown();
await (await this.createEmailButton).waitForDisplayed();
}
await ElementHelper.waitAndClick(await this.createEmailButton);
}
Comment on lines 39 to 45
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is interesting - the create email button always hovers in the same space. Why is it needed to scroll down before we can tap it? (in actual app, I don't need to scroll to see/tap the button)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

appium doesn't see the button until you scroll in case we have full list of emails. Ask maybe devs why it could be

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filing an issue


checkInboxScreen = async () => {
await (await this.inboxHeader).waitForDisplayed();
await (await this.createEmailButton).waitForDisplayed();
if (await (await this.createEmailButton).isDisplayed() !== true) {
await TouchHelper.scrollDown();
await (await this.createEmailButton).waitForDisplayed();
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ describe('COMPOSE EMAIL: ', () => {

await MenuBarScreen.clickMenuIcon();
await MenuBarScreen.clickInboxButton();
await InboxScreen.checkInboxScreen();

// Add first contact
await InboxScreen.clickCreateEmail();
Expand Down
1 change: 0 additions & 1 deletion appium/tests/specs/login/GmailLogin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ describe('LOGIN: ', () => {

await MenuBarScreen.clickLogout();
await SplashScreen.checkLoginPage();

});
});
});