From f6de29e9fd5289912e0915dcce746582cc4fd5c3 Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 11 Mar 2025 13:46:31 -0400 Subject: [PATCH] New strategy --- azure-pipelines-automated-testing.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index f36128d1..ffc143f8 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -87,20 +87,11 @@ stages: -e ADMIN_SERVICE_API_URL=$(ADMIN_SERVICE_API_URL) \ -e SHARD=$(shardNumber) \ -e CI=true \ + -e NODE_ENV=$(NODE_ENV) \ $(dockerImageName):$(imageTag) \ - bash -c "num_tests=$(npx playwright test playwright-tests --list --grep \"@$jira_card_number\") - echo $num_tests - num_tests=${num_tests#*Total: } - num_tests=${num_tests%% test*} - echo \"Extracted number of tests: $num_tests\" - if [[ $num_tests -lt $(shardNumber) ]]; then - echo 'There are fewer tests than shards. Skipping this shard.' - else - npx concurrently -k -n \"server,playwright\" - \"sed -i \\\"s|^process\.env\.VUE_APP_CONSUMER_CF_DISTRO = .*|process\.env\.VUE_APP_CONSUMER_CF_DISTRO='https://digitalapi.test.safelite.io'|\\\" \\\"./vue.config.js\\\" && echo \\\"Updated config file to use TEST APIs\\\" && npm run serve -- --port=8080\" - \"npx wait-on http://localhost:8080 && npm run test:playwright -- --shard=$(shardNumber)/$(totalShards) --reporter=list,blob --grep \\\"@$jira_card_number\\\"\" - fi - ") + npx concurrently -k -n "server,playwright"\ + "sed -i \"s|^process\.env\.VUE_APP_CONSUMER_CF_DISTRO = .*|process\.env\.VUE_APP_CONSUMER_CF_DISTRO='https://digitalapi.test.safelite.io'|\" \"./vue.config.js\" && echo \"Updated config file to use TEST APIs\" && npm run serve -- --port=8080"\ + "npx wait-on http://localhost:8080 && npm run test:playwright -- --shard=$(shardNumber)/$(totalShards) --reporter=list,blob --grep \"@$jira_card_number\"") # Start container and stream logs echo "Starting tests for shard $(shardNumber)..."