Adds Playwright test stage for pull requests

Introduces a new stage in the pipeline to run Playwright tests specifically for pull requests.
This ensures that UI tests are executed and pass before merging pull requests, preventing regressions.

The automated testing is now configured to run regression tests.

Uses the source branch from the build context to extract the JIRA card number.
This commit is contained in:
maguire-arman 2025-07-09 14:20:17 -04:00
parent cd02d42da1
commit 53ed7383c4
3 changed files with 18 additions and 2 deletions

View file

@ -35,7 +35,7 @@ stages:
totalShards: 2
targetUrl: $(BASE_URL)
dockerFileName: 'Dockerfile.playwright'
isRegression: false
isRegression: true
filterTags: ''
playwrightTestsPath: 'playwright-tests'
npmServePath: '.'

View file

@ -59,6 +59,22 @@ stages:
npmLocation: $(Build.SourcesDirectory)
testResultsFile: junit.xml
summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml
- stage: TestPrPlaywright
displayName: Run Playwright Tests For PullRequest
jobs:
- template: temp/playwright-test.yml
parameters:
totalShards: 4
targetUrl: $(BASE_URL)
dockerFileName: 'Dockerfile.playwright'
isRegression: false
filterTags: ''
playwrightTestsPath: 'playwright-tests'
npmServePath: '.'
npmrcPath: 'playwright-tests/.npmrc'
secrets:
CCIS_API_AUTH: $(CCIS_API_AUTH)
JIRA_API_KEY: $(JIRA_API_KEY)
- ${{ else }}:
# Dev Build/Deploy
- stage: Dev

View file

@ -240,7 +240,7 @@ jobs:
arguments: '--no-cache --pull'
- bash: |
printenv > "${{ parameters.envFileName }}"
branch_name=$(System.PullRequest.SourceBranch)
branch_name=$(Build.SourceBranch) # TODO: Change back to PullRequest.SourceBranch
echo "Retrieved branch name: '$branch_name'"
JIRA_CARD_NUMBER="${branch_name##*/}"
echo "Extracted JIRA Card number: '$JIRA_CARD_NUMBER'"