File tree 7 files changed +105
-16
lines changed
jsActions/mobile-resources-native/src/e2e/specs/maestro
pluggableWidgets/bar-chart-native/e2e/specs/maestro
7 files changed +105
-16
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ appId: "${APP_ID}"
7
7
clearState : true
8
8
permissions :
9
9
camera : allow
10
+ notifications : allow
10
11
- extendedWaitUntil :
11
12
visible : " Widgets menu"
12
13
timeout : 180000 # A long timeout since app startup is quite unstable due to resources when executed on Github runners
Original file line number Diff line number Diff line change @@ -45,5 +45,5 @@ if [ ${#failed_tests[@]} -gt 0 ]; then
45
45
exit 1 # Mark the workflow stage as failed if any tests fail
46
46
else
47
47
echo " All tests passed!"
48
- exit 0 # Mark the workflow stage as successful if no failed tests
48
+ exit 0 # Mark the workflow stage as successful only if all tests pass
49
49
fi
Original file line number Diff line number Diff line change 3
3
# Update DEVICE_ID and path to the yaml file according to needs
4
4
5
5
if [ " $1 " == " android" ]; then
6
- APP_ID=" com.mendix.nativetemplate "
6
+ APP_ID=" myapp.nativecomponentstestproject "
7
7
DEVICE_ID=" emulator-5554"
8
8
elif [ " $1 " == " ios" ]; then
9
- APP_ID=" com.mendix.native.template "
9
+ APP_ID=" myapp.nativecomponentstestproject "
10
10
DEVICE_ID=" 8006E26A-352B-4553-BA00-D8AE2DE23313"
11
11
else
12
12
echo " Usage: $0 [android|ios]"
13
13
exit 1
14
14
fi
15
15
16
- maestro --device $DEVICE_ID test --env APP_ID=$APP_ID ../packages/pluggableWidgets/safe-area-view- native/e2e/specs/maestro/SafeAreaViewMaps .yaml
16
+ maestro --device $DEVICE_ID test --env APP_ID=$APP_ID ../packages/pluggableWidgets/bar-chart- native/e2e/specs/maestro/Bar_Chart .yaml
Original file line number Diff line number Diff line change 34
34
"setup-android" : " node ./detox/scripts/setup-android.js" ,
35
35
"setup-ios" : " node ./detox/scripts/setup-ios.js" ,
36
36
"patch-package" : " sh ./scripts/patch/patch-package.sh" ,
37
- "build:widgets" : " node ./scripts/widget/buildWidgets.js"
37
+ "build:widgets" : " node ./scripts/widget/buildWidgets.js" ,
38
+ "test:maestro:ios" : " bash maestro/run_maestro_tests.sh ios" ,
39
+ "test:maestro:android" : " bash maestro/run_maestro_tests.sh android"
38
40
},
39
41
"workspaces" : {
40
42
"packages" : [
79
81
"lint-staged" : " ^10.5.4" ,
80
82
"mendix-client" : " ^7.15.8" ,
81
83
"patch-package" : " ^8.0.0" ,
84
+ "pixelmatch" : " ^5.2.1" ,
85
+ "pngjs" : " ^6.0.0" ,
82
86
"prettier" : " ^2.8.8" ,
83
87
"pretty-quick" : " ^3.3.1" ,
84
88
"react-dom" : " 18.2.0" ,
Original file line number Diff line number Diff line change
1
+ appId : " ${APP_ID}"
2
+ ---
3
+ - runFlow :
4
+ file : " ../../../../../../../maestro/Precondition.yaml"
5
+ - tapOn :
6
+ point : " 37%,94%"
7
+ # Authentication
8
+ - tapOn :
9
+ text : " Authentication"
10
+ - tapOn :
11
+ text : " Is biometric authentication supported?"
12
+ # - assertVisible:
13
+ # text: "Information"
14
+ - tapOn :
15
+ text : " OK"
16
+ - tapOn : " Go back"
17
+
18
+
19
+ # Clipboard
20
+ - tapOn :
21
+ text : " Clipboard"
22
+ - tapOn :
23
+ text : " Set clipboard content to 'Hi there'"
24
+ - tapOn :
25
+ text : " Get clipboard content"
26
+ - tapOn : " Go back"
27
+
28
+ # Network
29
+ - tapOn :
30
+ text : " Network"
31
+ - tapOn :
32
+ text : " Is connected?"
33
+ - assertVisible :
34
+ text : " Information"
35
+ - tapOn :
36
+ text : " OK"
37
+ - tapOn :
38
+ text : " Is wifi connected?"
39
+ - assertVisible :
40
+ text : " Information"
41
+ - tapOn :
42
+ text : " OK"
43
+ - tapOn :
44
+ text : " Is cellular connected?"
45
+ - assertVisible :
46
+ text : " Information"
47
+ - tapOn :
48
+ text : " OK"
49
+ - tapOn : " Go back"
50
+
51
+ # Notifications
52
+ - tapOn :
53
+ text : " Notifications"
54
+ - tapOn :
55
+ text : " Has permission?"
56
+ - assertVisible :
57
+ text : " Information"
58
+ - tapOn :
59
+ text : " OK"
60
+ - tapOn :
61
+ text : " Request permission"
62
+ - assertVisible :
63
+ text : " Permission was granted"
64
+ - tapOn :
65
+ text : " OK"
66
+ - tapOn :
67
+ text : " Display notification"
68
+ - assertVisible :
69
+ text : " Title"
70
+ - tapOn : " Go back"
71
+
72
+ # Mobile
73
+ - tapOn :
74
+ text : " Mobile"
75
+ - tapOn :
76
+ text : " Device info"
77
+ - assertVisible :
78
+ text : " Device info"
Original file line number Diff line number Diff line change 1
1
appId : " ${APP_ID}"
2
2
---
3
- - runFlow :
4
- file : " ../../../../../../maestro/Precondition.yaml"
5
- - tapOn :
6
- text : " B"
7
- - tapOn :
8
- text : " Bar chart"
9
- - assertVisible :
10
- id : " barChart"
11
- - assertVisible :
12
- text : " x-values"
3
+ # - runFlow:
4
+ # file: "../../../../../../maestro/Precondition.yaml"
5
+ # - tapOn:
6
+ # text: "B"
7
+ # - tapOn:
8
+ # text: "Bar chart"
9
+ # - assertVisible:
10
+ # text: "Bar chart"
11
+ - takeScreenshot :
12
+ path : " images/actual/bar_chart_actual"
13
+ - runScript :
14
+ file : " ../../../../../../maestro/compareScreenshots.js"
15
+ env :
16
+ expected : " bar_chart"
Original file line number Diff line number Diff line change @@ -14107,6 +14107,8 @@ __metadata:
14107
14107
lint-staged: "npm:^10.5.4"
14108
14108
mendix-client: "npm:^7.15.8"
14109
14109
patch-package: "npm:^8.0.0"
14110
+ pixelmatch: "npm:^5.2.1"
14111
+ pngjs: "npm:^6.0.0"
14110
14112
prettier: "npm:^2.8.8"
14111
14113
pretty-quick: "npm:^3.3.1"
14112
14114
react-dom: "npm:18.2.0"
@@ -14975,7 +14977,7 @@ __metadata:
14975
14977
languageName: node
14976
14978
linkType: hard
14977
14979
14978
- "pixelmatch@npm:^5.1.0":
14980
+ "pixelmatch@npm:^5.1.0, pixelmatch@npm:^5.2.1 ":
14979
14981
version: 5.3.0
14980
14982
resolution: "pixelmatch@npm:5.3.0"
14981
14983
dependencies:
You can’t perform that action at this time.
0 commit comments