-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: android detox tests * chore: add workflow for android e2e * fix: set NDK path in local.properties --------- Co-authored-by: [email protected] <[email protected]>
- Loading branch information
1 parent
6e7859b
commit 2e0fe01
Showing
6 changed files
with
46 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: E2E Android | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- packages/mobile/** | ||
|
||
jobs: | ||
detox: | ||
timeout-minutes: 10 | ||
runs-on: [self-hosted, macOS, ARM64, android] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
npm i | ||
npm run lerna bootstrap --scope @quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/mobile,backend-bundle | ||
- name: Pull binaries | ||
run: | | ||
git lfs install | ||
git lfs pull | ||
- name: Set NDK path in local.properties | ||
run: | | ||
printf "\ | ||
ndk.path=${{ env.NDK_PATH }}\n\ | ||
" > packages/mobile/android/local.properties | ||
- name: Build Detox | ||
run: | | ||
cd packages/mobile | ||
detox build -c android.emu.debug.ci | ||
- name: Run basic tests | ||
run: | | ||
cd packages/mobile | ||
detox test starter -c android.emu.debug.ci |
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
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 |
---|---|---|
@@ -1,14 +1,5 @@ | ||
import info from './info' | ||
|
||
const { ios } = info | ||
|
||
const press = async (element, double = false) => { | ||
if (ios) { | ||
await element.tap() | ||
} else { | ||
if (double) await element.longPress() // Idle | ||
await element.longPress() | ||
} | ||
const press = async (element) => { | ||
await element.tap() | ||
} | ||
|
||
export default press |
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 |
---|---|---|
@@ -1,14 +1,5 @@ | ||
import info from './info' | ||
|
||
const { ios } = info | ||
|
||
const write = async (element, text) => { | ||
if (ios) { | ||
await element.typeText(text) | ||
} else { | ||
await element.longPress() | ||
await element.typeText(text) | ||
} | ||
await element.typeText(text) | ||
} | ||
|
||
export default write |