Skip to content

Commit

Permalink
Qa remove reuse app state (#1501)
Browse files Browse the repository at this point in the history
  • Loading branch information
Any2suited66 authored and sroy3 committed Sep 5, 2024
1 parent 8e5f830 commit dcf287d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ workflows:
steps:
- avd-manager@1.2:
inputs:
- api_level: "30"
- api_level: "34"
- emulator_id: emulator-5554
- emulator_channel: "0"
- create_command_flags: --sdcard 512M
Expand Down
2 changes: 1 addition & 1 deletion packages/core-mobile/e2e/configs/reuseStateConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"maxWorkers": 1,
"testEnvironment": "detox/runners/jest/testEnvironment",
"testRunner": "jest-circus/runner",
"testTimeout": 180000,
"testTimeout": 9999999,
"rootDir": "..",
"testMatch": [
"<rootDir>/tests/**/*.e2e.ts",
Expand Down
19 changes: 11 additions & 8 deletions packages/core-mobile/e2e/pages/swapTab.page.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Actions from '../helpers/actions'
import Assert from '../helpers/assertions'
import { Platform } from '../helpers/constants'
import delay from '../helpers/waits'
import swapTab from '../locators/swapTab.loc'
import bottomTabsPage from './bottomTabs.page'
import plusMenuPage from './plusMenu.page'
Expand Down Expand Up @@ -37,6 +38,10 @@ class SwapTabPage {
return by.id(swapTab.reviewOrderBtn)
}

get disabledReviewOrderBtn() {
return by.id(swapTab.disabledReviewOrderBtn)
}

get approveBtn() {
return by.id(swapTab.approveBtn)
}
Expand All @@ -61,16 +66,13 @@ class SwapTabPage {
await Actions.tapElementAtIndex(this.selectTokenDropdown, 0)
}

async reviewOrderButton() {
await Actions.tapElementAtIndex(this.reviewOrderBtn, 0)
}

async waitForReviewOrderBtnEnabled() {
await Actions.waitForElement(this.reviewOrderBtn, 5000)
async reviewOrderButton(index = 0) {
await Actions.tapElementAtIndex(this.reviewOrderBtn, index)
}

async tapApproveButton() {
await Actions.waitForElement(this.approveBtn, 5000)
await Actions.waitForElement(this.approveBtn, 10000)
delay(2000)
await Actions.tapElementAtIndex(this.approveBtn, 0)
}

Expand Down Expand Up @@ -109,8 +111,9 @@ class SwapTabPage {
await this.inputTokenAmount(amount)
await this.tapSelectTokenDropdown()
await sendPage.selectToken(to)
await this.waitForReviewOrderBtnEnabled()
await delay(5000)
await this.reviewOrderButton()
await Actions.waitForElement(this.approveBtn, 10000, 1)
await this.tapApproveButton()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ echo "IS_REGRESSION_RUN should be true: $IS_REGRESSION_RUN"

if (($IS_REGRESSION_RUN=='true')); then
./node_modules/.bin/detox test --listTests --configuration android.internal.release.regression.ci
QT_QPA_PLATFORM=xcb; ./node_modules/.bin/detox test --configuration android.internal.release.regression.ci --headless --reuse; test_result=$?
QT_QPA_PLATFORM=xcb; ./node_modules/.bin/detox test --configuration android.internal.release.regression.ci --headless; test_result=$?
else
./node_modules/.bin/detox test --listTests --configuration android.internal.release.smoke.reuse_state.ci
QT_QPA_PLATFORM=xcb; ./node_modules/.bin/detox test --configuration android.internal.release.smoke.reuse_state.ci --headless --reuse; test_result=$?
QT_QPA_PLATFORM=xcb; ./node_modules/.bin/detox test --configuration android.internal.release.smoke.reuse_state.ci --headless; test_result=$?
fi

npx ts-node ./e2e/attachLogsSendResultsToTestrail.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ PIPELINE=$(
-H 'Content-Type: application/json' \
-d '{
"build_params": {
"branch": "main",
"pipeline_id": "build-ios-apps-internal-triggered-e2e"
"branch": $BITRISE_GIT_BRANCH,
"pipeline_id": "build-ios-apps-internal-triggered-e2e",
"commit_message": $GIT_CLONE_COMMIT_MESSAGE_SUBJECT,
},
"hook_info": {
"type": "bitrise"
Expand Down

0 comments on commit dcf287d

Please sign in to comment.