Fixed calculation of number of tests

This commit is contained in:
Chase King 2025-03-11 10:23:49 -04:00
parent 35f216207c
commit 1fa22cceef

View file

@ -89,9 +89,11 @@ stages:
-e CI=true \
-e NODE_ENV=$(NODE_ENV) \
$(dockerImageName):$(imageTag) \
bash -c "num_tests=$(npx playwright test --list --grep \"@$jira_card_number\")
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