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:
parent
cd02d42da1
commit
53ed7383c4
3 changed files with 18 additions and 2 deletions
|
|
@ -35,7 +35,7 @@ stages:
|
||||||
totalShards: 2
|
totalShards: 2
|
||||||
targetUrl: $(BASE_URL)
|
targetUrl: $(BASE_URL)
|
||||||
dockerFileName: 'Dockerfile.playwright'
|
dockerFileName: 'Dockerfile.playwright'
|
||||||
isRegression: false
|
isRegression: true
|
||||||
filterTags: ''
|
filterTags: ''
|
||||||
playwrightTestsPath: 'playwright-tests'
|
playwrightTestsPath: 'playwright-tests'
|
||||||
npmServePath: '.'
|
npmServePath: '.'
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,22 @@ stages:
|
||||||
npmLocation: $(Build.SourcesDirectory)
|
npmLocation: $(Build.SourcesDirectory)
|
||||||
testResultsFile: junit.xml
|
testResultsFile: junit.xml
|
||||||
summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.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 }}:
|
- ${{ else }}:
|
||||||
# Dev Build/Deploy
|
# Dev Build/Deploy
|
||||||
- stage: Dev
|
- stage: Dev
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,7 @@ jobs:
|
||||||
arguments: '--no-cache --pull'
|
arguments: '--no-cache --pull'
|
||||||
- bash: |
|
- bash: |
|
||||||
printenv > "${{ parameters.envFileName }}"
|
printenv > "${{ parameters.envFileName }}"
|
||||||
branch_name=$(System.PullRequest.SourceBranch)
|
branch_name=$(Build.SourceBranch) # TODO: Change back to PullRequest.SourceBranch
|
||||||
echo "Retrieved branch name: '$branch_name'"
|
echo "Retrieved branch name: '$branch_name'"
|
||||||
JIRA_CARD_NUMBER="${branch_name##*/}"
|
JIRA_CARD_NUMBER="${branch_name##*/}"
|
||||||
echo "Extracted JIRA Card number: '$JIRA_CARD_NUMBER'"
|
echo "Extracted JIRA Card number: '$JIRA_CARD_NUMBER'"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue