Skip to content
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

FEAT: init detox and eas config for e2e tests #43

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MSzalowski
Copy link

Description

This PR introduces setup and initial e2e test (currently it tests signing in) on detox.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

iOS

On iOS simulator creates via script so to test it, you should only type:

  • yarn test:e2e:ios

Android

On Android creating an emulator via script will be provided in the future, so you have to create in Android Studio emulator that matches name with the name in config (pixel_4) and:

  • yarn test:e2e:android:emu

To test on the attached device

  • yarn test:e2e:android:att

Unfortunately Android provides flaky tests so check only if the emulator opens via script, installs the app, and runs the test (no matter if successful or not).

Also - android has issues with getting the views by id (which causes flaky tests) - detox team in their documentation proposes to use waitFor with withTimeout to treat it as a workaround. But - as it is in the documentation I think that it might be the final approach.
If tests are failing for you, you can deal with timeout in withTimeout function - increasing that might result in a successful test.

Screenshot(s)

Android

https://vimeo.com/861140200?share=copy

iOS

https://vimeo.com/861142368?share=copy

Test Configuration:

  • Firmware version:
    OS: macOS 13.4.1
    Node: version: 16.16.0
    Yarn: version: 1.22.19
    npm: version: 8.11.0
    Watchman: version: 2023.08.14.00
    CocoaPods: version: 1.12.1
  • Hardware:
    CPU: (8) arm64 Apple M1
    Memory: 349.56 MB / 16.00 GB
  • Toolchain:
  • SDK:
    iOS SDK:
    Platforms:
    - DriverKit 22.4
    - iOS 16.4
    - macOS 13.3
    - tvOS 16.4
    - watchOS 9.4
    Android SDK: Not Found
    IDEs:
    Android Studio: 2021.1 AI-211.7628.21.2111.8309675
    Xcode:
    version: 14.3.1/14E300c
    path: /usr/bin/xcodebuild

Checklist:

  • Add correct label to your pull request
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@MSzalowski MSzalowski added the enhancement New feature or request label Sep 5, 2023
type: 'ios.app',
binaryPath: 'ios/build/Build/Products/Release-iphonesimulator/Templateqa.app',
build:
'xcodebuild -workspace ios/Templateqa.xcworkspace -scheme Templateqa -configuration Release -sdk iphonesimulator -arch x86_64 -derivedDataPath ios/build',
Copy link
Author

Choose a reason for hiding this comment

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

TBD: needs to replace -scheme with a generic based on bootstrap script

@MSzalowski MSzalowski changed the title feat: init detox and eas config for e2e tests FEAT: init detox and eas config for e2e tests Sep 5, 2023
@MSzalowski MSzalowski linked an issue Sep 5, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

E2e tests on EAS build
1 participant