Skip to content

Commit

Permalink
Merge branch 'develop' into featue/9779-MoreIconMigrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparowhawk authored Oct 23, 2024
2 parents 760a3b5 + 1edd172 commit 765efc3
Show file tree
Hide file tree
Showing 42 changed files with 530 additions and 373 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
71 changes: 70 additions & 1 deletion .github/workflows/e2e_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ on:
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 +351,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 @@ -359,3 +367,64 @@ jobs:
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
72 changes: 71 additions & 1 deletion .github/workflows/e2e_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ on:
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 +330,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 @@ -337,3 +346,64 @@ jobs:
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
8 changes: 7 additions & 1 deletion .github/workflows/start_test_rail_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,18 @@ jobs:
echo "TICKET_NUMBER: ${{inputs.ticketNumber}}"
echo "MILESTONE_ID: ${{inputs.milestoneId}}"
echo "" >> input.json
resp=$(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&section_id=3239")
length=$(echo $resp | jq '.cases | map(select(.custom_release_candidate_test_case == true )) | map(.id) | length')
randomNumber=$(((RANDOM % ${length})))
getID=$(echo $resp | jq --argjson random $randomNumber --compact-output '.cases | map(select(.custom_release_candidate_test_case == true )) | map(.id) | .[$random]')
for ((i=0; ; i+=250)); do
echo "i = $i"
resp=$(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&offset=$i")
echo $(jq --compact-output '.cases | map(select(.custom_release_candidate_test_case == true)) | map(.id)' <<< "$resp") >> input.json
echo $(jq --argjson testID $getID --compact-output '.cases | map(select(.custom_release_candidate_test_case == true and (.section_id != 3239 or .id == $testID))) | map(.id)' <<< "$resp") >> input.json
if [[ $(jq '._links.next == null' <<< "$resp") == 'true' ]];
then
break
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/update_testrail_results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ on:
test_OS_name:
type: string
default: ''

outputs:
test_run_id_number:
description: "The id number for the test run"
value: ${{ jobs.send_test_results_to_testrail.outputs.output1 }}

defaults:
run:
working-directory: VAMobile

jobs:
send_test_results_to_testrail:
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.run-id-selection.outputs.TEST_RUN_ID }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -100,4 +106,3 @@ jobs:
--run-id ${{steps.run-id-selection.outputs.TEST_RUN_ID}} \
--section-id ${{steps.section-id-selection.outputs.SECTION_RUN_ID}} \
-f "/home/runner/work/va-mobile-app/va-mobile-app/e2e-junit.xml"
16 changes: 8 additions & 8 deletions VAMobile/android/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.991.0)
aws-sdk-core (3.209.1)
aws-partitions (1.993.0)
aws-sdk-core (3.211.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.94.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-kms (1.95.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.167.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-s3 (1.169.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.10.0)
aws-sigv4 (1.10.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
Expand Down
Loading

0 comments on commit 765efc3

Please sign in to comment.