Skip to content

Commit

Permalink
MWPW-146763 : Enable @NoPr tag to skip running selected tests on PR b…
Browse files Browse the repository at this point in the history
…ranch (#326)

enable @NoPr tag

Co-authored-by: nateekar <[email protected]>
  • Loading branch information
skumar09 and nateekar authored Apr 17, 2024
1 parent d87a14d commit be417d1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions features/milo/georouting.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
cookieName: 'international',
cookieValue: 'de',
},
tags: '@georouting @smoke @regression @milo ',
tags: '@georouting @smoke @regression @milo @nopr',
},
{
tcid: '1',
Expand Down Expand Up @@ -98,7 +98,7 @@ module.exports = {
cookieName: 'international',
cookieValue: 'de',
},
tags: '@georouting @georouting-close @regression @milo ',
tags: '@georouting @georouting-close @regression @milo @nopr',
},
],
};
21 changes: 11 additions & 10 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
TAGS=""
REPORTER=""
APPS=""
EXCLUDE_TAGS="--grep-invert '@nopr'"

PR_NUMBER=$(echo "$GITHUB_REF" | awk -F'/' '{print $3}')
echo "PR Number: $PR_NUMBER"
Expand Down Expand Up @@ -50,7 +51,7 @@ REPORTER=$reporter
echo "*** Running Nala on $FEATURE_BRANCH ***"
echo "Tags : $TAGS"
echo "APPS : $APPS"
echo "npx playwright test ${TAGS} ${REPORTER}"
echo "npx playwright test ${TAGS} ${EXCLUDE_TAGS} ${REPORTER}"

cd "$GITHUB_ACTION_PATH" || exit
npm ci
Expand All @@ -73,26 +74,26 @@ if [[ -n "$APPS" ]];then
if [[ "$conf_name" == "nala" && -z "$project_name" ]]; then
# Run default run-nala execution
echo "*** Default nala-run config ***"
echo "npx playwright test ${TAGS} ${REPORTER}"
npx playwright test ${TAGS} ${REPORTER}
echo "npx playwright test ${TAGS} ${EXCLUDE_TAGS} ${REPORTER}"
npx playwright test ${TAGS} ${EXCLUDE_TAGS} ${REPORTER}

elif [ ! -f "$config_file" ]; then
echo "Config file : $config_file is not found"
continue
else
if [[ -n "$project_name" ]];then
# Run on all three browsers, configured as projects in corresponding .config.js file
echo "*** npx playwright test --config=./configs/${conf_name}.config.js ${TAGS} --project=${app_name} ***"
npx playwright test --config=./configs/${conf_name}.config.js ${TAGS} --project=${app_name}-chrome ${REPORTER}
npx playwright test --config=./configs/${conf_name}.config.js ${TAGS} --project=${app_name}-firefox ${REPORTER}
# npx playwright test --config=./configs/${conf_name}.config.js ${TAGS} --project=${app_name}-webkit ${REPORTER}
echo "*** npx playwright test --config=./configs/${conf_name}.config.js ${TAGS} ${EXCLUDE_TAGS} --project=${app_name} ***"
npx playwright test --config=./configs/${conf_name}.config.js ${TAGS} ${EXCLUDE_TAGS} --project=${app_name}-chrome ${REPORTER}
npx playwright test --config=./configs/${conf_name}.config.js ${TAGS} ${EXCLUDE_TAGS} --project=${app_name}-firefox ${REPORTER}
# npx playwright test --config=./configs/${conf_name}.config.js ${TAGS} ${EXCLUDE_TAGS} --project=${app_name}-webkit ${REPORTER}
else
# Run all the projects from config file for all projects
echo "*** npx playwright test --config="$config_file" ${TAGS} ${REPORTER} ***"
npx playwright test --config="$config_file" ${TAGS} ${REPORTER}
echo "*** npx playwright test --config="$config_file" ${TAGS} ${EXCLUDE_TAGS} ${REPORTER} ***"
npx playwright test --config="$config_file" ${TAGS} ${EXCLUDE_TAGS} ${REPORTER}
fi
fi
done
else
npx playwright test ${TAGS} ${REPORTER}
npx playwright test ${TAGS} ${EXCLUDE_TAGS} ${REPORTER}
fi
1 change: 1 addition & 0 deletions tests/milo/marquee.block.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const knownConsoleErrors = [
'Failed to load resource: net::ERR_FAILED',
'adobeid-na1-stg1.services',
'Attestation check for Topics',
'Access to fetch at',
];

test.describe('Milo Marquee Block test suite', () => {
Expand Down

0 comments on commit be417d1

Please sign in to comment.