-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(e2e): add e2e flow for checking visibility of custom address fie…
…lds on new case view
- Loading branch information
1 parent
72f997f
commit ffae09b
Showing
1 changed file
with
71 additions
and
0 deletions.
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,71 @@ | ||
name: New Case View | ||
appId: ${MAESTRO_APP_ID} | ||
tags: | ||
- development | ||
- staging | ||
- production | ||
- pull-request | ||
onFlowStart: | ||
- runFlow: ../auth-tests/login.yaml | ||
--- | ||
# wait for incidents to load | ||
- waitForAnimationToEnd: | ||
timeout: 5000 | ||
# start searching after loading spinner is invisible | ||
- assertNotVisible: | ||
id: workIncidentsLoadingIndicator | ||
- tapOn: | ||
id: "workNewCaseFab" | ||
- assertVisible: ".*new case.*" | ||
|
||
# Check address problems to show custom address fields | ||
- scrollUntilVisible: | ||
element: | ||
id: locationAddressProblemsCheckbox | ||
- tapOn: | ||
id: locationAddressProblemsCheckbox | ||
|
||
- evalScript: | | ||
"${ | ||
output.result = { | ||
testTags: [ | ||
'locationStreetAddressTextField', | ||
'locationPostalCodeTextField', | ||
'locationCountyTextField', | ||
'locationCityTextField', | ||
'locationStateTextField', | ||
'locationCrossStreetTextField', | ||
], | ||
} | ||
}" | ||
# Custom fields should be visible when address problems is checked | ||
- evalScript: ${output.i = 0} | ||
- repeat: | ||
while: | ||
'true': ${output.i < output.result.testTags.length} | ||
commands: | ||
- scrollUntilVisible: | ||
element: | ||
id: ${output.result.testTags[output.i]} | ||
direction: DOWN | ||
- assertVisible: | ||
id: ${output.result.testTags[output.i]} | ||
- evalScript: ${output.i = output.i + 1} | ||
|
||
# Uncheck address problems to hide custom address fields | ||
- scrollUntilVisible: | ||
element: | ||
id: locationAddressProblemsCheckbox | ||
- tapOn: | ||
id: locationAddressProblemsCheckbox | ||
|
||
# Custom fields should be visible when address problems is checked | ||
- evalScript: ${output.i = 0} | ||
- repeat: | ||
while: | ||
'true': ${output.i < output.result.testTags.length} | ||
commands: | ||
- assertNotVisible: | ||
id: ${output.result.testTags[output.i]} | ||
- evalScript: ${output.i = output.i + 1} |