-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
initial maestro setup #49861
Draft
JKobrynski
wants to merge
3
commits into
Expensify:main
Choose a base branch
from
JKobrynski:maestro-setup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+160
−15
Draft
initial maestro setup #49861
Changes from all commits
Commits
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 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,34 @@ | ||
appId: ${APP_ID} | ||
name: Default native test flow | ||
onFlowStart: | ||
- startRecording: recording | ||
onFlowComplete: | ||
- stopRecording | ||
--- | ||
- launchApp | ||
- extendedWaitUntil: | ||
visible: | ||
id: "floatingActionButton" | ||
timeout: 30000 | ||
- tapOn: | ||
id: "floatingActionButton" | ||
- assertVisible: 'Start chat' | ||
- assertVisible: 'Track expense' | ||
- assertVisible: 'Submit expense' | ||
- tapOn: 'Start chat' | ||
- assertVisible: 'Name, email, or phone number' | ||
- inputText: 'juliankobrynski@gmail' | ||
- assertVisible: '[email protected]' | ||
- tapOn: '[email protected]' | ||
- assertVisible: 'Write something...' | ||
- assertVisible: | ||
id: "composer" | ||
- tapOn: | ||
id: "composer" | ||
- inputText: 'Hello from Maestro!' | ||
- assertVisible: 'Hello from Maestro!' | ||
- assertVisible: | ||
id: "sendButton" | ||
- tapOn: | ||
id: "sendButton" | ||
- killApp |
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,18 @@ | ||
appId: "https://dev.new.expensify.com:8082" | ||
# appId: ${APP_ID} | ||
--- | ||
- launchApp | ||
- assertVisible: 'Phone or email' | ||
- tapOn: 'Continue' | ||
- assertVisible: 'Please enter an email or phone number' | ||
- tapOn: 'Phone or email' | ||
- inputText: 'juliankobrynski@gmail' | ||
- tapOn: 'Continue' | ||
- assertVisible: 'The email entered is invalid. Please fix the format and try again.' | ||
- tapOn: 'juliankobrynski@gmail' | ||
- inputText: '.com' | ||
- tapOn: 'Continue' | ||
- assertVisible: 'Please enter the magic code sent to [email protected]. It should arrive within a minute or two.' | ||
- inputText: '123456' | ||
- assertVisible: 'Incorrect magic code. Please try again or request a new code.' | ||
- killApp |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,58 @@ | ||
#!/bin/bash | ||
|
||
trap 'exit' INT | ||
|
||
PLATFORM=${1:-} | ||
|
||
# Validate passed platform | ||
case $PLATFORM in | ||
ios | android | web ) | ||
;; | ||
|
||
*) | ||
echo "Error! You must pass either 'android', 'ios', or 'web'" | ||
echo "" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
if [ "$PLATFORM" == "ios" ]; then | ||
APPID="com.expensify.chat.dev" | ||
# allTestFiles=$(ls maestro-tests/*.yaml maestro-tests/basic_example/native.yaml) | ||
allTestFiles=$(ls maestro-tests/native/*.yaml) | ||
elif [ "$PLATFORM" == "android" ]; then | ||
APPID="com.expensify.chat.dev" | ||
# allTestFiles=$(ls maestro-tests/native/*.yaml) | ||
allTestFiles=$(ls maestro-tests/native/test.yaml) | ||
else | ||
APPID="https://dev.new.expensify.com:8082" | ||
# APPID="https://127.0.0.1:8082" | ||
allTestFiles=$(ls maestro-tests/web/*.yaml) | ||
fi | ||
|
||
failedTests=() | ||
for file in $allTestFiles | ||
do | ||
if ! maestro test "$file" -e APP_ID="$APPID"; | ||
then | ||
echo "Test ${file} failed. Retrying in 30 seconds..." | ||
sleep 30 | ||
if ! maestro test "$file" -e APP_ID="$APPID"; | ||
then | ||
echo "Test ${file} failed again. Retrying for the last time in 120 seconds..." | ||
sleep 120 | ||
if ! maestro test "$file" -e APP_ID="$APPID"; | ||
then | ||
failedTests+=("$file") | ||
fi | ||
fi | ||
fi | ||
done | ||
|
||
if [ ${#failedTests[@]} -eq 0 ]; then | ||
exit 0 | ||
else | ||
echo "These tests failed:" | ||
printf '%s\n' "${failedTests[@]}" | ||
exit 1 | ||
fi |
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 | ||||
---|---|---|---|---|---|---|
|
@@ -51,9 +51,11 @@ type FloatingActionButtonProps = { | |||||
|
||||||
/* An accessibility role for the button */ | ||||||
role: Role; | ||||||
|
||||||
testID?: string; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
}; | ||||||
|
||||||
function FloatingActionButton({onPress, isActive, accessibilityLabel, role}: FloatingActionButtonProps, ref: ForwardedRef<HTMLDivElement | View | Text>) { | ||||||
function FloatingActionButton({onPress, isActive, accessibilityLabel, role, testID}: FloatingActionButtonProps, ref: ForwardedRef<HTMLDivElement | View | Text>) { | ||||||
const {success, buttonDefaultBG, textLight, textDark} = useTheme(); | ||||||
const styles = useThemeStyles(); | ||||||
const borderRadius = styles.floatingActionButton.borderRadius; | ||||||
|
@@ -113,6 +115,9 @@ function FloatingActionButton({onPress, isActive, accessibilityLabel, role}: Flo | |||||
onLongPress={() => {}} | ||||||
role={role} | ||||||
shouldUseHapticsOnLongPress={false} | ||||||
testID={testID} | ||||||
id={testID} | ||||||
accessible | ||||||
> | ||||||
<Animated.View style={[styles.floatingActionButton, animatedStyle]}> | ||||||
<Svg | ||||||
|
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)