diff --git a/.github/workflows/e2e-ios.yml b/.github/workflows/e2e-ios.yml index 91c81888e1..ca0933e2d4 100644 --- a/.github/workflows/e2e-ios.yml +++ b/.github/workflows/e2e-ios.yml @@ -8,7 +8,7 @@ on: jobs: detox: timeout-minutes: 10 - runs-on: [self-hosted, macOS, ARM64] + runs-on: [self-hosted, macOS, ARM64, iOS] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/e2e.android.yml b/.github/workflows/e2e.android.yml new file mode 100644 index 0000000000..055b6fa994 --- /dev/null +++ b/.github/workflows/e2e.android.yml @@ -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 diff --git a/packages/mobile/.detoxrc.js b/packages/mobile/.detoxrc.js index b5832f5d0e..a03e86f3a9 100644 --- a/packages/mobile/.detoxrc.js +++ b/packages/mobile/.detoxrc.js @@ -77,7 +77,7 @@ module.exports = { emulator_ci: { type: 'android.emulator', device: { - avdName: 'Pixel_3a_API_34_arm64-v8a', + avdName: 'Pixel_7_API_31', }, }, }, diff --git a/packages/mobile/e2e/starter.test.js b/packages/mobile/e2e/starter.test.js index 1f63dd13b5..f2ce45c703 100644 --- a/packages/mobile/e2e/starter.test.js +++ b/packages/mobile/e2e/starter.test.js @@ -21,7 +21,7 @@ describe('User', () => { test('should see join community screen', async () => { await waitFor(element(by.text('Join community'))) .toBeVisible() - .withTimeout(LONG) + .withTimeout(STARTUP) const componentName = 'join-community-component' await checkVisualRegression(componentName) diff --git a/packages/mobile/e2e/utils/press.js b/packages/mobile/e2e/utils/press.js index dfd392a3f1..01189a95e6 100644 --- a/packages/mobile/e2e/utils/press.js +++ b/packages/mobile/e2e/utils/press.js @@ -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 diff --git a/packages/mobile/e2e/utils/write.js b/packages/mobile/e2e/utils/write.js index 0d6014f509..0c2af647d0 100644 --- a/packages/mobile/e2e/utils/write.js +++ b/packages/mobile/e2e/utils/write.js @@ -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