Skip to content

Commit

Permalink
Merge branch 'develop' into feature/9265-Binny-PushLoginFlowChanges
Browse files Browse the repository at this point in the history
  • Loading branch information
dumathane committed Oct 30, 2024
2 parents 0fa3be4 + 183cbef commit 2b4568f
Show file tree
Hide file tree
Showing 154 changed files with 2,238 additions and 1,907 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/onboarding-request-engineering.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Onboarding Request (Engineering)
description: Fill out this form to request initiation of engineering onboarding for
title: "Onboarding: [name]"
labels: [ onboarding ]
labels: [ user-onboarding ]
assignees: timwright12
body:
- type: markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/release_ticket.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release Review Template
about: Template for requesting a production release for VA mobile app
title: "{{ env.releaseDate }} Release Sign-Off: {{ env.versionNumber }}"
labels: release
assignees: timwright12, chrisj-usds, drjecker, dumathane, rachelhanster, kellylein, DonMcCaugheyUSDS, TKDickson
assignees: timwright12, chrisj-usds, dumathane, rachelhanster, kellylein, DonMcCaugheyUSDS, TKDickson

---

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/documentation_accessibility_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
run: npm cache clean --force
- name: Install Axe CLI globally
run: npm install -g @axe-core/cli@latest
- name: Update npm
- name: Update npm
run: npm install -g npm@latest
- uses: actions/setup-node@v3
with:
node-version-file: 'VAMobile/.nvmrc'
cache: yarn
cache-dependency-path: VAMobile/yarn.lock
- name: Install ChromeDriver
run: npm install -g chromedriver@126.0.0
- name: Install latest version of chromeDriver
run: npm install -g chromedriver@latest
- name: Test build
working-directory: VAMobile
run: |
Expand Down
76 changes: 70 additions & 6 deletions .github/workflows/e2e_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,20 @@ on:
description: 'Add results to testRail?'
type: boolean
required: false
device_specific:
description: 'Is your testRail run Android only? (only check if adding results to testRail)'
type: boolean
required: false
schedule:
- cron: '0 4 * * 1,2,3,4,5'
workflow_run:
workflows: ['[Release] New Release Issue']
types:
- in_progress
workflow_call:
secrets:
TEST_RAIL_USER:
description: "TestRail robot userid"
required: true
TEST_RAIL_KEY:
description: "TestRail api key"
required: true

concurrency:
group: android-detox-${{ github.ref }}
Expand Down Expand Up @@ -343,7 +347,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: create-issue

matrix-send_test_results_to_testrail:
matrix_send_test_results_to_testrail:
if: (!cancelled()) && github.event.inputs.run_testRail == 'true'
needs: [matrix-e2e-android, output_detox_tests_to_run]
strategy:
Expand All @@ -356,6 +360,66 @@ jobs:
with:
test_names: "${{matrix.testsuite}}"
testRail_name: ${{ inputs.testRail_name }}
test_specific_OS_needed: ${{ inputs.device_specific}}
test_OS_name: "Android"
secrets: inherit

update-test-names:
if: (!cancelled()) && github.event.inputs.run_testRail == 'true'
needs: [matrix-e2e-android, output_detox_tests_to_run, matrix_send_test_results_to_testrail]
continue-on-error: false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: update-test-names
run: |
for ((i=0; ; i+=250)); do
echo "i = $i"
getTestCaseNewName=$(curl -X GET -H 'Content-Type: application/json' \
-u "${{secrets.TEST_RAIL_USER}}:${{secrets.TEST_RAIL_KEY}}" \
"https://dsvavsp.testrail.io//index.php?/api/v2/get_tests/${{ needs.matrix_send_test_results_to_testrail.outputs.test_run_id_number }}&offset=$i")
echo $(jq --compact-output '[.tests[] | .title |= sub("(]).*$"; "]")]' <<< "$getTestCaseNewName") >> input.json
if [[ $(jq '._links.next == null' <<< "$getTestCaseNewName") == 'true' ]];
then
break
fi
done
getTestCaseNewName=$(jq --compact-output -s 'add' input.json)
groupTestCasesByTitle=$(echo $getTestCaseNewName | jq --compact-output '[group_by(.title)[] | [.[0].title, .[0].status_id, map(.id)[]]]')
getFirstTestNewName=$(echo $groupTestCasesByTitle | jq --compact-output '[.[] | .[0]]')
getCasesID=$(curl -X GET -H 'Content-Type: application/json' \
-u "${{secrets.TEST_RAIL_USER}}:${{secrets.TEST_RAIL_KEY}}" \
"https://dsvavsp.testrail.io//index.php?/api/v2/get_cases/29")
updateRunWithNewCases=$(curl -X POST -H 'Content-Type: application/json' \
-u "${{secrets.TEST_RAIL_USER}}:${{secrets.TEST_RAIL_KEY}}" \
-d '{"suite_id": 92, "include_all": false, "case_ids": '$(echo $getCasesID | jq --argjson testRailNames "$getFirstTestNewName" --compact-output '.cases | map(select(.title == $testRailNames[])) | map(.id)')'}' \
"https://dsvavsp.testrail.io//index.php?/api/v2/update_run/${{needs.matrix_send_test_results_to_testrail.outputs.test_run_id_number}}")
getTestCases=$(curl -X GET -H 'Content-Type: application/json' \
-u "${{secrets.TEST_RAIL_USER}}:${{secrets.TEST_RAIL_KEY}}" \
"https://dsvavsp.testrail.io//index.php?/api/v2/get_tests/${{needs.matrix_send_test_results_to_testrail.outputs.test_run_id_number}}")
for i in $(echo $getTestCases | jq -r '.tests[].id'); do
getTestName=$(echo $getTestCases | jq --argjson testIDs "$i" -r '.tests | map(select(.id == $testIDs)) | .[0].title')
getFailedTests=$(echo $getTestCaseNewName | jq --compact-output 'map(select(.status_id == 5)) | map(.title)')
isTestFailed=$(echo $getFailedTests | jq 'any(. == "'"$getTestName"'")')
getRetestTests=$(echo $getTestCaseNewName | jq --compact-output 'map(select(.status_id == 4)) | map(.title)')
isTestRetest=$(echo $getRetestTests | jq 'any(. == "'"$getTestName"'")')
getPassedTests=$(echo $getTestCaseNewName | jq --compact-output 'map(select(.status_id == 1)) | map(.title)')
isTestPassed=$(echo $getPassedTests | jq 'any(. == "'"$getTestName"'")')
if [[ "$isTestFailed" == "true" ]]; then
resp5=$(curl -X POST -H 'Content-Type: application/json' \
-u "${{secrets.TEST_RAIL_USER}}:${{secrets.TEST_RAIL_KEY}}" \
-d '{"status_id": 5}' \
"https://dsvavsp.testrail.io//index.php?/api/v2/add_result/"$i"")
elif [[ "$isTestRetest" == "true" ]]; then
resp5=$(curl -X POST -H 'Content-Type: application/json' \
-u "${{secrets.TEST_RAIL_USER}}:${{secrets.TEST_RAIL_KEY}}" \
-d '{"status_id": 4}' \
"https://dsvavsp.testrail.io//index.php?/api/v2/add_result/"$i"")
elif [[ "$isTestPassed" == "true" ]]; then
resp5=$(curl -X POST -H 'Content-Type: application/json' \
-u "${{secrets.TEST_RAIL_USER}}:${{secrets.TEST_RAIL_KEY}}" \
-d '{"status_id": 1}' \
"https://dsvavsp.testrail.io//index.php?/api/v2/add_result/"$i"")
fi
done
20 changes: 10 additions & 10 deletions .github/workflows/e2e_detox_mapping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,32 +68,32 @@ jobs:
id: testing_matrix
run: |
resp=$(echo ${{steps.changed_files_dir.outputs.all_changed_and_modified_files}} |
jq 'select(contains(["Login"])) += ["LoginScreen"] |
select(contains(["AppealsDetailsScreen"])) += ["Appeals", "AppealsExpanded"] |
jq 'select(contains(["LoginScreen"])) += ["LoginScreen"] |
select(contains(["AppealDetailsScreen"])) += ["Appeals", "AppealsExpanded"] |
select(contains(["NeedHelpData"]) or contains(["NoClaimsAndAppeals"]) or contains(["NoClaimsAndAppealsAccess"]) or contains(["ClaimsAndAppealsListView"]) or contains(["claimsAndAppeals"])) += ["Appeals", "AppealsExpanded", "Claims"] |
select(contains(["ClaimsDetailsScreen"]) or contains(["ClaimsLettersScreen"]) or contains(["SubmitEvidence"]) or contains(["ClaimsHistoryScreen"])) += ["Claims"] |
select(contains(["ClaimsLettersScreen"]) or contains(["decisionLetters"])) += ["DecisionLetters"] |
select(contains(["ClaimDetailsScreen"]) or contains(["ClaimLettersScreen"]) or contains(["SubmitEvidence"]) or contains(["ClaimsHistoryScreen"])) += ["Claims"] |
select(contains(["ClaimLettersScreen"]) or contains(["decisionLetters"])) += ["DecisionLetters"] |
select(contains(["DisabilityRatingsScreen"]) or contains(["disabilityRating"])) += ["DisabilityRatings", "VeteranStatusCard"] |
select(contains(["Letters"]) or contains(["letters"])) += ["VALetters"] |
select(contains(["Appointments"]) or contains(["appointments"])) += ["Appointments", "AppointmentsExpanded"] |
select(contains(["Cerner"]) or contains(["Facilities"])) += ["Cerner"] |
select(contains(["CernerAlert"]) or contains(["Facilities"])) += ["Cerner"] |
select(contains(["Pharmacy"]) or contains(["prescriptions"])) += ["Prescriptions"] |
select(contains(["SecureMessaging"]) or contains(["secureMessaging"])) += ["Messages"] |
select(contains(["Vaccines"]) or contains(["vaccines"])) += ["VaccineRecords"] |
select(contains(["ContactVAScreen"])) += ["HomeScreen"] |
select(contains(["MilitaryInformationScreen"]) or contains(["militaryService"]) or contains(["Nametag"])) += ["MilitaryInformation", "VeteranStatusCard"] |
select(contains(["PersonalInformationScreen"]) or contains(["demographics"]) or contains(["personalInformation"])) += ["PeronsalInformationScreen", "VeteranStatusCard", "HomeScreen", "ProfileScreen"] |
select(contains(["PersonalInformationScreen"]) or contains(["demographics"]) or contains(["personalInformation"])) += ["PersonalInformationScreen", "VeteranStatusCard", "HomeScreen", "ProfileScreen"] |
select(contains(["SettingsScreen"])) += ["SettingsScreen"] |
select(contains(["VeteranCrisisLineScreen"])) += ["VeteransCrisisLine", "SignIn"] |
select(contains(["VeteransCrisisLineScreen"])) += ["VeteransCrisisLine", "SignIn"] |
select(contains(["VeteranStatusScreen"])) += ["VeteranStatusCard"] |
select(contains(["OnboardingCarousel"])) += ["Onboarding"] |
select(contains(["PaymentHistory"]) or contains(["payments"])) += ["Payments"] |
select(contains(["DirectDepositScreen"]) or contains(["directDeposit"])) += ["DirectDeposit"] |
select(contains(["SplashScreen"])) += ["Onboarding", "LoginScreen"] |
select(contains(["Auth"])) += ["SignIn"] |
select(contains(["auth"])) += ["SignIn"] |
select(contains(["authorizedServices"])) += ["Appeals", "AppealsExpanded", "Appointments", "AppointmentsExpanded", "Claims", "DirectDeposit", "DisabilityRatings", "PersonalInformationScreen", "VALetters", "MilitaryInformation", "Payments", "Prescriptions", "Messages", "VeteranStatusCard"] |
select(contains(["contactInformation"]) or contains(["ContactInformationScreen"])) += ["ContactInformation", "VALetters"] |
select(contains(["NotificationManager"])) += ["SettingsScreen", "PushNotifications"] |
select(contains(["OnboardingCarousel"])) += ["Onboarding"] |
select(contains(["Types"]) or contains(["VAImage"])) +=
["AvailabilityFramework", "Cerner", "ContactInformation", "VALetters", "LoginScreen", "Onboarding", "ProfileScreen", "PushNotifications", "SettingsScreen", "SignIn", "VaccineRecords", "Claims", "Appeals", "AppealsExpanded", "DisabilityRatings", "Appointments", "AppointmentsExpanded", "Prescriptions", "Messages", "MilitaryInformation", "HomeScreen", "VeteransCrisisLine", "VeteranStatusCard", "DirectDeposit", "Payments", "PersonalInformationScreen"]
| unique')
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
or contains(["TextArea"]) or contains(["TextLines"]) or contains(["TextView"]) or contains(["backButtonLabels"]) or contains(["common.ts"])) +=
["AvailabilityFramework", "Cerner", "ContactInformation", "VALetters", "LoginScreen", "Onboarding", "ProfileScreen", "PushNotifications", "SettingsScreen", "SignIn", "VaccineRecords", "Claims", "Appeals", "AppealsExpanded", "DisabilityRatings", "Appointments", "AppointmentsExpanded", "Prescriptions", "Messages", "MilitaryInformation", "HomeScreen", "VeteransCrisisLine", "VeteranStatusCard", "DirectDeposit", "Payments", "PersonalInformationScreen"]
| unique ')
test_matrix=$(echo "$resp" | jq --argjson a "${resp_file}" --argjson b "${resp}" --compact-output '$a + $b | unique')
echo "$test_matrix"
test_matrix=$(echo $test_matrix | jq --compact-output 'map(select(. == ("Appeals", "AppealsExpanded", "Appointments", "AppointmentExpanded", "AvailabilityFramework", "Cerner", "Claims",
Expand Down
77 changes: 71 additions & 6 deletions .github/workflows/e2e_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,21 @@ on:
description: 'Add results to testRail?'
type: boolean
required: false
device_specific:
description: 'Is your testRail run iOS only? (only check if adding results to testRail)'
type: boolean
required: false
schedule:
- cron: '0 4 * * 1,2,3,4,5'
workflow_run:
workflows: ['[Release] New Release Issue']
types:
- in_progress
workflow_call:
secrets:
TEST_RAIL_USER:
description: "TestRail robot userid"
required: true
TEST_RAIL_KEY:
description: "TestRail api key"
required: true


concurrency:
group: ios-detox-${{ github.ref }}
Expand Down Expand Up @@ -321,7 +326,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: create-issue

matrix-send_test_results_to_testrail:
matrix_send_test_results_to_testrail:
if: (!cancelled()) && github.event.inputs.run_testRail == 'true'
needs: [matrix-e2e-ios, output_detox_tests_to_run]
strategy:
Expand All @@ -334,6 +339,66 @@ jobs:
with:
test_names: "${{matrix.testsuite}}"
testRail_name: ${{ inputs.testRail_name }}
test_specific_OS_needed: ${{ inputs.device_specific}}
test_OS_name: "iOS"
secrets: inherit

update-test-names:
if: (!cancelled()) && github.event.inputs.run_testRail == 'true'
needs: [matrix-e2e-ios, output_detox_tests_to_run, matrix_send_test_results_to_testrail]
runs-on: ubuntu-latest
continue-on-error: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: update-test-names
run: |
for ((i=0; ; i+=250)); do
echo "i = $i"
getTestCaseNewName=$(curl -X GET -H 'Content-Type: application/json' \
-u "${{secrets.TEST_RAIL_USER}}:${{secrets.TEST_RAIL_KEY}}" \
"https://dsvavsp.testrail.io//index.php?/api/v2/get_tests/${{ needs.matrix_send_test_results_to_testrail.outputs.test_run_id_number }}&offset=$i")
echo $(jq --compact-output '[.tests[] | .title |= sub("(]).*$"; "]")]' <<< "$getTestCaseNewName") >> input.json
if [[ $(jq '._links.next == null' <<< "$getTestCaseNewName") == 'true' ]];
then
break
fi
done
getTestCaseNewName=$(jq --compact-output -s 'add' input.json)
groupTestCasesByTitle=$(echo $getTestCaseNewName | jq --compact-output '[group_by(.title)[] | [.[0].title, .[0].status_id, map(.id)[]]]')
getFirstTestNewName=$(echo $groupTestCasesByTitle | jq --compact-output '[.[] | .[0]]')
getCasesID=$(curl -X GET -H 'Content-Type: application/json' \
-u "${{secrets.TEST_RAIL_USER}}:${{secrets.TEST_RAIL_KEY}}" \
"https://dsvavsp.testrail.io//index.php?/api/v2/get_cases/29")
updateRunWithNewCases=$(curl -X POST -H 'Content-Type: application/json' \
-u "${{secrets.TEST_RAIL_USER}}:${{secrets.TEST_RAIL_KEY}}" \
-d '{"suite_id": 92, "include_all": false, "case_ids": '$(echo $getCasesID | jq --argjson testRailNames "$getFirstTestNewName" --compact-output '.cases | map(select(.title == $testRailNames[])) | map(.id)')'}' \
"https://dsvavsp.testrail.io//index.php?/api/v2/update_run/${{needs.matrix_send_test_results_to_testrail.outputs.test_run_id_number}}")
getTestCases=$(curl -X GET -H 'Content-Type: application/json' \
-u "${{secrets.TEST_RAIL_USER}}:${{secrets.TEST_RAIL_KEY}}" \
"https://dsvavsp.testrail.io//index.php?/api/v2/get_tests/${{needs.matrix_send_test_results_to_testrail.outputs.test_run_id_number}}")
for i in $(echo $getTestCases | jq -r '.tests[].id'); do
getTestName=$(echo $getTestCases | jq --argjson testIDs "$i" -r '.tests | map(select(.id == $testIDs)) | .[0].title')
getFailedTests=$(echo $getTestCaseNewName | jq --compact-output 'map(select(.status_id == 5)) | map(.title)')
isTestFailed=$(echo $getFailedTests | jq 'any(. == "'"$getTestName"'")')
getRetestTests=$(echo $getTestCaseNewName | jq --compact-output 'map(select(.status_id == 4)) | map(.title)')
isTestRetest=$(echo $getRetestTests | jq 'any(. == "'"$getTestName"'")')
getPassedTests=$(echo $getTestCaseNewName | jq --compact-output 'map(select(.status_id == 1)) | map(.title)')
isTestPassed=$(echo $getPassedTests | jq 'any(. == "'"$getTestName"'")')
if [[ "$isTestFailed" == "true" ]]; then
resp5=$(curl -X POST -H 'Content-Type: application/json' \
-u "${{secrets.TEST_RAIL_USER}}:${{secrets.TEST_RAIL_KEY}}" \
-d '{"status_id": 5}' \
"https://dsvavsp.testrail.io//index.php?/api/v2/add_result/"$i"")
elif [[ "$isTestRetest" == "true" ]]; then
resp5=$(curl -X POST -H 'Content-Type: application/json' \
-u "${{secrets.TEST_RAIL_USER}}:${{secrets.TEST_RAIL_KEY}}" \
-d '{"status_id": 4}' \
"https://dsvavsp.testrail.io//index.php?/api/v2/add_result/"$i"")
elif [[ "$isTestPassed" == "true" ]]; then
resp5=$(curl -X POST -H 'Content-Type: application/json' \
-u "${{secrets.TEST_RAIL_USER}}:${{secrets.TEST_RAIL_KEY}}" \
-d '{"status_id": 1}' \
"https://dsvavsp.testrail.io//index.php?/api/v2/add_result/"$i"")
fi
done
10 changes: 5 additions & 5 deletions .github/workflows/label_pull_request_onReview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- name: Remove old labels and add FE-Changes Requested
run: |
gh pr edit ${{ github.event.pull_request.number }} --remove-label "FE-Needs Review,FE-With QA" --add-label "FE-Changes Requested"
gh pr edit ${{ github.event.pull_request.number }} --remove-label "FE-With QA" --add-label "FE-Changes Requested"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -29,9 +29,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Remove old labels and add FE-Needs Review
- name: Remove old labels
run: |
gh pr edit ${{ github.event.pull_request.number }} --remove-label "FE-Changes Requested" --add-label "FE-Needs Review"
gh pr edit ${{ github.event.pull_request.number }} --remove-label "FE-Changes Requested"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -59,10 +59,10 @@ jobs:
if [[ $(jq '[.[] | select(. | IN("timwright12", "rbontrager", "DJUltraTom", "TKDickson"))] | length' <<< "$approvals") -gt 0 ]]
then
echo 'This PR has QA approval and one other'
gh pr edit ${{ github.event.pull_request.number }} --remove-label "FE-Needs Review,FE-With QA" --add-label "FE-Ready to Merge"
gh pr edit ${{ github.event.pull_request.number }} --remove-label "FE-With QA" --add-label "FE-Ready to Merge"
else
echo 'This PR requires QA approval'
gh pr edit ${{ github.event.pull_request.number }} --remove-label "FE-Needs Review" --add-label "FE-With QA"
gh pr edit ${{ github.event.pull_request.number }} --add-label "FE-With QA"
fi
else
echo 'This PR requires 2 approvals, including one QA approval'
Expand Down
Loading

0 comments on commit 2b4568f

Please sign in to comment.