-
-
Notifications
You must be signed in to change notification settings - Fork 18
End-to-End Testing with Detox #95
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
Merged
Merged
Changes from 33 commits
Commits
Show all changes
320 commits
Select commit
Hold shift + click to select a range
26f9c6d
detox: cache-write-only
Maschga 49e9ff2
increase memory
Maschga 9add996
Revert "--info"
Maschga c17b7e3
Revert "detox: cache-write-only"
Maschga a2d6be1
add avd cache
Maschga 4c58777
use arm
Maschga fff4230
remove cache-read-only
Maschga 163c54d
setup android
Maschga 18e7054
use ubuntu-latest-arm
Maschga b126c72
use depot
Maschga 6613901
add avd cache
Maschga 397b109
use ubuntu-24.04-arm
Maschga cc64cb5
remove kvm
Maschga d84eb3e
use ubuntu-24.04
Maschga 9cd04d2
enable artifacts
Maschga 61c4bfc
debug
Maschga 7c80a52
debug
Maschga e831408
debug
Maschga 8ce00fa
debug depot
Maschga b987735
debug: depot
Maschga b5b799a
debug: depot
Maschga c307a1f
rerun
Maschga 6416111
add e2e/artifacts to .gitignore
Maschga 980e4a5
debug: depot
Maschga 4765201
split job in build an test
Maschga 58b956c
add prebuild
Maschga d95a406
fix path
Maschga 7a83756
debug
Maschga b1136e2
fix
Maschga 718efb5
fix
Maschga e5fb014
wait for webview
Maschga 8d898dc
lint
Maschga e7bf00f
one retry
Maschga 6e2e3fc
use headless
Maschga 140039b
try out depot-macos-15
Maschga e9fb97e
take screenshots
Maschga 7dfd8b5
Revert "try out depot-macos-15"
Maschga f2547c2
create helper folder
Maschga 05005aa
try out xcode cash
Maschga 923eb62
xcodebuild: add -quiet
Maschga d1199e4
remove avd cache
Maschga b4e6738
debug: add sleep
Maschga e9ceaa4
specify deriveddata-directory
Maschga 073e14f
Trigger Pipeline
Maschga cf83e70
update detox
Maschga faea9b5
fix path
Maschga 6776d18
add detoxPrintBusyIdleResources
Maschga 16befd6
check for topNavigatonDropdown
Maschga 1ad8d1c
Revert "add detoxPrintBusyIdleResources"
Maschga 6f44142
wip
Maschga dd70105
wip
Maschga 4427ecb
use depot-macos-15
Maschga 11b5ba1
use xcbeautify
Maschga 79b8b2a
add renderer
Maschga efbf9fd
remove xcode cache
Maschga 33a66c4
debug
Maschga bed8880
select xcode version 26.0.1
Maschga 1296d56
Setup Xcode
Maschga d5b4f9e
wip
Maschga f35d95f
wip
Maschga daec2ba
debug
Maschga 02d6c5a
specify sdk iphonesimulator26.0
Maschga 79f5bfb
Revert "debug"
Maschga c416d62
boot device
Maschga 9b8b604
specify destination
Maschga cc083ac
remove \
Maschga 5dae5e6
use iphoneos26.0
Maschga 7b35038
add destination
Maschga 663ac5e
fix
Maschga 36b0688
remove sdk param
Maschga d3cea94
debug
Maschga adbc55d
remove destination
Maschga 1a04f17
wip
Maschga 0db757b
revert
Maschga 2e3f2cf
Merge branch 'main' into setup-detox
Maschga c978225
skip ios job
Maschga d1b370c
add param webviewId
Maschga f350b2b
add evcc service
Maschga b724b5e
wip
Maschga 390d0a8
Merge branch 'setup-detox' of https://github.com/Maschga/app into set…
Maschga 980cf41
add health check
Maschga 861c736
expose port
Maschga c9eb44e
remove health check
Maschga 5832a79
set entrypoint
Maschga 073036b
setup evcc daemon
Maschga 0e5790b
wip
Maschga 035249f
setup caddy
Maschga f481333
deepLinking
Maschga 36f023b
enable uiHierarchy
Maschga 9f2dd3d
test: deepLinking
Maschga 708d475
caddy: disable admin
Maschga a9bd36d
install evcc
Maschga ffc878f
detox: enable bail
Maschga 1d579c2
don't use .local
Maschga f86daf5
rename
Maschga 5d0d128
debug
Maschga 4a72d4f
subdomains: *
Maschga 4430aa3
revert
Maschga b81312f
use 10.0.2.2
Maschga 124934c
add evcc*.*
Maschga c3a3f85
wip: test: serverDiscovery
Maschga b1c61e9
uncomment
Maschga 8298a1c
rename
Maschga dc87f07
outsource elements
Maschga f7e8bc4
Merge branch 'setup-detox' of https://github.com/Maschga/app into set…
Maschga 87e24bc
Revert "outsource elements"
Maschga 4c91e5d
test: manualEntry
Maschga 31afa89
switch: try out toHaveValue
Maschga 21e4b12
use resetAppState
Maschga 7493603
pass strings
Maschga 9a769aa
use toHaveToggleValue
Maschga a007da4
use beforeEach
Maschga 63ab85f
add todo
Maschga 7a0799c
macos local run
naltatis 36d3d27
temporary skipping tests requireing local evcc
naltatis eaca2aa
try ios build
naltatis f226f1e
simulator device
naltatis da22763
test
naltatis 1874822
test
naltatis c98dafd
test
naltatis e763db1
test
naltatis 922fc2a
create simulator instead of using an existing one
naltatis 1674735
create simulator instead of using an existing one
naltatis 3ceee69
test
naltatis a5aa3ae
test
naltatis 8a3464c
test
naltatis 9141389
test
naltatis 5cef41e
use github runner
naltatis 378f4af
smaller runner
naltatis 9f31216
next try
naltatis 3d2f5d1
enable android
naltatis 3695578
skip demo test, for now
naltatis 30ba149
documentation; npm run scripts
Maschga 5ac29ee
install evcc, caddy; add documentation; unskip tests
Maschga 4ad8cba
improve documentation
Maschga 1227fc9
increase timeout minutes
Maschga 8bfdd1d
revert: temporary skipping tests requireing local evcc
Maschga 8b5f31e
setup adb port forwarding
Maschga 93f34b8
install adb
Maschga 19fa6be
launch arguments: pass host ip
Maschga 9befdf6
fix
Maschga e2856f3
try out ten seconds
Maschga d90c17b
blacklist urls; use reversePorts
Maschga 17ac424
fix
Maschga 373223d
only run ios ci
Maschga 86964f6
Revert "try out ten seconds"
Maschga bb42618
debug
Maschga d4d6a5f
trigger build
Maschga abed179
Revert "debug"
Maschga c8f6d20
debug
Maschga 640b20e
Revert "debug"
Maschga 980668c
debug
Maschga 23fcfb0
loglevel trace
Maschga 88a59b5
fix
Maschga 9bf56a5
always upload artifacts
Maschga b74ca74
debug
Maschga 50ea3ac
increase timeouts
Maschga d4ff267
remove debug
Maschga 688211b
upload artifacts
Maschga 6a75735
run all checks
Maschga db4bff3
parallel execution
Maschga 857fb83
fix
Maschga 4882f1d
test depot
Maschga f67b796
wip
Maschga 4128980
wip
Maschga 9336e04
wip
Maschga eacf201
wip
Maschga 81536f4
use latest
Maschga 4eb87c5
wip
Maschga 9493e2c
use os 26.1
Maschga fecf0ad
test
Maschga 164df5b
use 26.1.1
Maschga 02fff4e
Trigger Build
Maschga 2530df9
use 26.0
Maschga 0adc46b
wip
Maschga 67077f3
use os 18.6
Maschga f5f2b22
wip
Maschga c46f5db
wip
Maschga a6f5d47
wip
Maschga 06c7492
setup xcode
Maschga 6b4ec99
use unspecific device
Maschga 35b1abd
create device
Maschga ff56a77
install 26.0 simulator
Maschga 4ecc8f4
wip
Maschga d1ffa51
wip
Maschga 71e0c4a
wip
Maschga e0e4513
wip
Maschga e79c624
wip
Maschga 8900a8c
wip
Maschga 5c662a9
wip
Maschga b5f78ea
wip
Maschga 14f4075
wip
Maschga 2d1def0
wip
Maschga 6dd45f5
25.0
Maschga 145ade5
use sudo
Maschga 72a014a
wip
Maschga 8fe8e0b
wip
Maschga 433c1c1
decrease timeouts
Maschga 6c2205a
don't install applesimutils
Maschga 9d76c7d
wip
Maschga 4edec84
remove old args
Maschga 8cf138b
use DTXDisableMainRunLoopSync
Maschga f3dc338
install applesimutils
Maschga b29c5cc
debug
Maschga 8e70338
Trigger Build
Maschga dcfce90
Revert "debug"
Maschga 79c5867
fix
Maschga b4aab6b
enable all jobs; use single macos depot runner
Maschga 82a3961
try out xcversion
Maschga 1be63d2
wip
Maschga dbe1773
specify os
Maschga bb0c266
fix
Maschga 487dbe0
enable
Maschga 6f04c47
try out maxWorkers
Maschga 7429dc2
cache
Maschga 3d990ee
Revert "cache"
Maschga 7d5ec6a
dont specify os
Maschga 8d3247d
remove maxWorkers
Maschga 9e9503e
add test: keep server after reopening
Maschga 8dd8e5c
refactor
Maschga c764873
expect formatted url
Maschga 2a87d0e
test evcc.local
Maschga 7ff4a4d
fix
Maschga cd06308
revert "test evcc.local"
Maschga 80b8f6e
use --demo
Maschga 12aabcb
stop evcc service
Maschga aeb7cdc
use --disable-auth
Maschga b61d744
add test: download file
Maschga 19826d0
fix android ci
Maschga 56084d1
waiting for merge
Maschga 0d4124e
use cssSelector
Maschga a3bcfd7
wip
Maschga 9d769a3
decrease timeout-minutes
Maschga 2c60232
wip
Maschga dc9633d
add retry mechanism to ios ci
Maschga 0fa8731
unskip
Maschga 655cae4
set retries to 2
Maschga d2e4489
use data-testid
Maschga 3df35c9
wip: add test: roundtrip
Maschga cbca939
wip
Maschga e605ab1
multiple taps on search button
Maschga 535d46c
use jest.retryTimes
Maschga a9b82ab
wip
Maschga 667725d
use retryImmediately
Maschga 9764088
serverDiscovery.test: use waitFor
Maschga 1780bc9
skip downloadFile test
Maschga 3d9747a
lint
Maschga c286918
remove debugging
Maschga 453e67b
update readme
naltatis dab824f
run pipeline manually
naltatis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,66 @@ | ||
| const launchArgs = { | ||
| disableAnimations: true, | ||
| }; | ||
|
|
||
| /** @type {Detox.DetoxConfig} */ | ||
| module.exports = { | ||
| testRunner: { | ||
| args: { | ||
| $0: "jest", | ||
| config: "e2e/jest.config.ts", | ||
| }, | ||
| jest: { | ||
| setupTimeout: 120000, | ||
| }, | ||
| }, | ||
| apps: { | ||
| "ios.release": { | ||
| launchArgs, | ||
| type: "ios.app", | ||
| binaryPath: | ||
| "ios/build/Build/Products/Release-iphonesimulator/evcc.app", | ||
| build: | ||
| "xcodebuild -workspace ios/evcc.xcworkspace -scheme evcc -configuration Release -sdk iphonesimulator -arch arm64 -derivedDataPath ios/build", | ||
| }, | ||
| "android.release": { | ||
| launchArgs, | ||
| type: "android.apk", | ||
| binaryPath: "android/app/build/outputs/apk/release/app-release.apk", | ||
| build: `cd android && "./gradlew" assembleRelease assembleAndroidTest -DtestBuildType=release`, | ||
| }, | ||
| }, | ||
| devices: { | ||
| simulator: { | ||
| type: "ios.simulator", | ||
| device: { | ||
| type: "iPhone 16", | ||
| }, | ||
| }, | ||
| attached: { | ||
| type: "android.attached", | ||
| device: { | ||
| adbName: ".*", | ||
| }, | ||
| }, | ||
| emulator: { | ||
| type: "android.emulator", | ||
| device: { | ||
| avdName: "test", | ||
| }, | ||
| }, | ||
| }, | ||
| configurations: { | ||
| "ios.sim.release": { | ||
| device: "simulator", | ||
| app: "ios.release", | ||
| }, | ||
| "android.att.release": { | ||
| device: "attached", | ||
| app: "android.release", | ||
| }, | ||
| "android.emu.release": { | ||
| device: "emulator", | ||
| app: "android.release", | ||
| }, | ||
| }, | ||
| }; |
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -6,3 +6,4 @@ android/ | |
| !fastlane/metadata/ios | ||
| caddy*.* | ||
| tsconfig.tsbuildinfo | ||
| .claude/ | ||
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,11 @@ | ||
| import { ActivityIndicatorProps, View } from "react-native"; | ||
| import { ActivityIndicator as RNActivityIndicator } from "react-native"; | ||
| import { disableAnimations } from "./launchArguments"; | ||
|
|
||
| export default function ActivityIndicator(props?: ActivityIndicatorProps) { | ||
| return ( | ||
| <View style={{ justifyContent: "center", alignItems: "center" }}> | ||
| <RNActivityIndicator {...props} animating={!disableAnimations()} /> | ||
| </View> | ||
| ); | ||
| } |
This file contains hidden or 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,11 @@ | ||
| import { View } from "react-native"; | ||
| import { SpinnerProps } from "@ui-kitten/components"; | ||
| import Spinner from "./Spinner"; | ||
|
|
||
| export default function LoadingIndicator(props?: SpinnerProps) { | ||
| return ( | ||
| <View style={{ justifyContent: "center", alignItems: "center" }}> | ||
| <Spinner {...props} /> | ||
| </View> | ||
| ); | ||
| } |
This file contains hidden or 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,9 @@ | ||
| import { | ||
| SpinnerProps, | ||
| Spinner as UIKittenSpinner, | ||
| } from "@ui-kitten/components"; | ||
| import { disableAnimations } from "./launchArguments"; | ||
|
|
||
| export default function Spinner(props: SpinnerProps) { | ||
| return <UIKittenSpinner {...props} animating={!disableAnimations()} />; | ||
| } |
This file contains hidden or 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,9 @@ | ||
| import { LaunchArguments } from "react-native-launch-arguments"; | ||
|
|
||
| interface LaunchArgs { | ||
| disableAnimations?: boolean; | ||
| } | ||
|
|
||
| export function disableAnimations(): boolean { | ||
| return !!LaunchArguments.value<LaunchArgs>().disableAnimations; | ||
| } |
This file contains hidden or 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,14 @@ | ||
| import { Config } from "@jest/types"; | ||
|
|
||
| module.exports = { | ||
| preset: "ts-jest", | ||
| rootDir: "..", | ||
| testMatch: ["<rootDir>/e2e/**/*.test.ts"], | ||
| testTimeout: 120000, | ||
| maxWorkers: 1, | ||
| globalSetup: "detox/runners/jest/globalSetup", | ||
| globalTeardown: "detox/runners/jest/globalTeardown", | ||
| reporters: ["detox/runners/jest/reporter"], | ||
| testEnvironment: "detox/runners/jest/testEnvironment", | ||
| verbose: true, | ||
| } satisfies Config.InitialOptions; |
This file contains hidden or 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,14 @@ | ||
| import "detox"; | ||
|
|
||
| describe("Example", () => { | ||
| beforeAll(async () => { | ||
| await device.launchApp(); | ||
| }); | ||
|
|
||
| it("open and leave demo server", async () => { | ||
| await element(by.id("useDemo")).tap(); | ||
|
|
||
| await web.element(by.web.id("topNavigatonDropdown")).tap(); | ||
| // await web.element(by.web.value("Change Server")).tap(); // TODO: use testID | ||
| }); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.