From 5f22af740b65f6dc5d261affd1f6005a81f1a215 Mon Sep 17 00:00:00 2001 From: Siraj Shaik Date: Tue, 18 Feb 2025 16:10:11 -0500 Subject: [PATCH 01/63] Updates on report, order confirmation --- playwright-tests/impl/utils/ReportUtils.ts | 27 ++++++++++++++++++- .../pages/OrderConfirmationPage.ts | 8 +++--- playwright-tests/pages/WelcomePage.ts | 22 --------------- playwright-tests/playwright.config.ts | 4 +-- 4 files changed, 32 insertions(+), 29 deletions(-) diff --git a/playwright-tests/impl/utils/ReportUtils.ts b/playwright-tests/impl/utils/ReportUtils.ts index 078ebcaf..79aac63a 100644 --- a/playwright-tests/impl/utils/ReportUtils.ts +++ b/playwright-tests/impl/utils/ReportUtils.ts @@ -61,6 +61,21 @@ export function consolidateJsonReport() { } function generateSummaryTable(existingIssues: { [key: string]: any[] }): string { + let totalCritical = 0; + let totalSerious = 0; + let totalModerate = 0; + let totalMinor = 0; + let totalTotal = 0; + + Object.keys(existingIssues).forEach(pageName => { + const issues = existingIssues[pageName]; + totalCritical += issues.filter(issue => issue.impact === 'critical').length; + totalSerious += issues.filter(issue => issue.impact === 'serious').length; + totalModerate += issues.filter(issue => issue.impact === 'moderate').length; + totalMinor += issues.filter(issue => issue.impact === 'minor').length; + totalTotal += issues.length; + }); + return ` @@ -94,6 +109,16 @@ function generateSummaryTable(existingIssues: { [key: string]: any[] }): string `; }).join('')} + + + + + + + + + +
Total${totalCritical}${totalSerious}${totalModerate}${totalMinor}${totalTotal}
`; } @@ -334,4 +359,4 @@ function isDuplicateIssue(existingIssues: any[], newIssue: any): boolean { return existingIssues.some(issue => { return issue.id === newIssue.id && issue.pageName === newIssue.pageName; }); -} \ No newline at end of file +} diff --git a/playwright-tests/pages/OrderConfirmationPage.ts b/playwright-tests/pages/OrderConfirmationPage.ts index 0426a94e..6f0ed1dc 100644 --- a/playwright-tests/pages/OrderConfirmationPage.ts +++ b/playwright-tests/pages/OrderConfirmationPage.ts @@ -35,7 +35,7 @@ export class OrderConfirmationPage extends BasePage { async validateOrderConfirmationPage(testData: Partial) { // Destructure data we use const { vehicleDetails, customerDetails, servicePackage, isItac, - isNoComp, isPolicyFound, claimDetails, paymentDetails, isUseVehicleOnPolicy } = testData; + isNoComp, isPolicyFound, claimDetails, paymentDetails, isUseVehicleOnPolicy } = testData; await this.serviceText.waitFor({ state: "visible" }); await this.logOrderNumber(); @@ -45,7 +45,7 @@ export class OrderConfirmationPage extends BasePage { const emailTextValue = await this.emailText.textContent(); const servicePackageValue = await this.cartServicePackageText.textContent(); const amountDueValue = await this.amountDueText.textContent(); - const deductibleTextValue = (isItac || isNoComp)? null: await this.deductibleText.textContent(); + const deductibleTextValue = (isItac || isNoComp) ? null : await this.deductibleText.textContent(); const subtotalTextValue = await this.subtotalText.textContent(); const finalAmountDueValue = await this.finalAmountDue.textContent(); @@ -59,7 +59,7 @@ export class OrderConfirmationPage extends BasePage { // Service package validations await expect.soft(this.cartServicePackageText).toContainText(`${servicePackage}`) - if (servicePackage === ServicePackage.Premium || servicePackage === ServicePackage.Standard) { + if ((servicePackage === ServicePackage.Premium && testData.isReplace === true) || servicePackage === ServicePackage.Standard) { expect.soft(servicePackageValue).toContain('New wiper blades'); } if (servicePackage === ServicePackage.Premium) { @@ -76,7 +76,7 @@ export class OrderConfirmationPage extends BasePage { if (isPolicyFound && (isUseVehicleOnPolicy ?? true)) { // Extract numbers const amountDueAmt = Number.parseFloat(amountDueValue!.split('$')[1].replaceAll(',', '')); - const deductibleAmt = deductibleTextValue? Number.parseFloat(deductibleTextValue.split('$')[1].replaceAll(',', '')): 0; + const deductibleAmt = deductibleTextValue ? Number.parseFloat(deductibleTextValue.split('$')[1].replaceAll(',', '')) : 0; const subtotalAmt = Number.parseFloat(subtotalTextValue!.split('$')[1].replaceAll(',', '')); subtotalTextValue?.replaceAll(',', '') const finalAmountDueAmt = Number.parseFloat(finalAmountDueValue!.split('$')[1].replaceAll(',', '')); diff --git a/playwright-tests/pages/WelcomePage.ts b/playwright-tests/pages/WelcomePage.ts index 80dcbadb..1a38f9b4 100644 --- a/playwright-tests/pages/WelcomePage.ts +++ b/playwright-tests/pages/WelcomePage.ts @@ -79,27 +79,5 @@ export class WelcomePage extends BasePage { await this.city.fill(customerDetails.address.city); await this.state.selectOption(customerDetails.address.state); } - await this.logReferralNumber(); - } - - async logReferralNumber() { - let mainLocalStorage = JSON.parse(await this.page.evaluate('localStorage.getItem(\'main\')')); - let referralNumber = mainLocalStorage.order.referralNumber as number; - let referralSequenceNumber = mainLocalStorage.order.referralSequenceNumber as number; - if (referralNumber == null) { - for (let i = 1; i <= 20; i++) { - if (!referralNumber == null) break; - await this.page.waitForTimeout(500); - mainLocalStorage = JSON.parse(await this.page.evaluate('localStorage.getItem(\'main\')')); - referralNumber = mainLocalStorage.order.referralNumber as number; - referralSequenceNumber = mainLocalStorage.order.referralSequenceNumber as number; - } - } - - await test.step(`Referral Number:${referralNumber} Referral Sequence Number:${referralSequenceNumber}`, async () => { - console.log(`Referral Number:${referralNumber}`); - console.log(`Referral Sequence Number:${referralSequenceNumber}`); - }); - } } \ No newline at end of file diff --git a/playwright-tests/playwright.config.ts b/playwright-tests/playwright.config.ts index 59a42657..598cb9b5 100644 --- a/playwright-tests/playwright.config.ts +++ b/playwright-tests/playwright.config.ts @@ -39,8 +39,8 @@ const reportConfig: OrtoniReportConfig = { base64Image: true, }; -export const reportFilePath = path.resolve(__dirname, './test-results/accessibility-report.html'); -export const jsonReportFilePath = path.resolve(__dirname, './test-results/accessibility-report.json'); +export const reportFilePath = path.resolve(__dirname, './../test-results/accessibility-report.html'); +export const jsonReportFilePath = path.resolve(__dirname, './../test-results/accessibility-report.json'); export default defineConfig({ testDir: './tests', From e7284d44341a231a96a10e93b782953827345086 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 09:55:51 -0500 Subject: [PATCH 02/63] Jira writeback integration --- azure-pipelines-automated-testing.yml | 434 ++++++++++++++++++++++++++ devops/scripts/jira_writeback.sh | 144 +++++++++ 2 files changed, 578 insertions(+) create mode 100644 azure-pipelines-automated-testing.yml create mode 100755 devops/scripts/jira_writeback.sh diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml new file mode 100644 index 00000000..31b34b58 --- /dev/null +++ b/azure-pipelines-automated-testing.yml @@ -0,0 +1,434 @@ +trigger: + branches: + include: [ develop, release/* ] + paths: + exclude: + - deployment/* + include: + - "*" +pr: + branches: + include: [ '*' ] + paths: + exclude: + - deployment/* + include: + - "*" + +resources: + containers: + - container: node + image: packagerepository.sagaws.net:8082/safelite/node-build:18 + - container: awscli + image: packagerepository.sagaws.net:8082/safelite/awscli2-build:3.9 + repositories: + - repository: AzureDevOps + type: github + name: Safelite/AzureDevOps + endpoint: Safelite + ref: refs/tags/t5.5.40 + +variables: + - group: Digital-Infrastructure + - group: ISS-BuildBranches + - name: dockerImageName + value: 'playwright-tests' + - name: imageTag + value: '$(Build.BuildId)' + - name: totalShards + value: 40 # TODO: Temporarily changed to 40, change back to 4 + +stages: + # PR's + - ${{ if or(eq(variables['Build.Reason'], 'PullRequest'), eq(1,1)) }}: # TODO: Temporarily changed to always be true, change back + - stage: TestPr + displayName: Run Tests For PullRequest + jobs: + - template: templates/digital/vue-jest-run-unit-tests.yml@AzureDevOps + parameters: + nodeContainer: node + npmLocation: $(Build.SourcesDirectory) + testResultsFile: junit.xml + summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml + - job: playwright_tests + continueOnError: true + strategy: + matrix: + shard1: + shardNumber: 1 + shard2: + shardNumber: 2 + shard3: + shardNumber: 3 + shard4: + shardNumber: 4 + + steps: + - task: Docker@2 + displayName: 'Build Docker Image' + inputs: + command: build + dockerfile: Dockerfile.playwright + repository: $(dockerImageName) + tags: $(imageTag) + arguments: '--no-cache --pull' + + - script: | + # Create container and run tests + container_id=$(docker create \ + --ipc=host \ + -e CCIS_API_AUTH=$(CCIS_API_AUTH) \ + -e BASE_URL=$(BASE_URL) \ + -e CCIS_API_URL=$(CCIS_API_URL) \ + -e ADMIN_SERVICE_API_URL=$(ADMIN_SERVICE_API_URL) \ + -e SHARD=$(shardNumber) \ + -e CI=true \ + -e NODE_ENV=$(NODE_ENV) \ + $(dockerImageName):$(imageTag) \ + 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 \"@smoke | @Advanced\"") + + # Start container and stream logs + + echo "Starting tests for shard $(shardNumber)..." + docker start -a $container_id + + # Create directory for test results + echo "Creating test results directory..." + mkdir -p $(System.DefaultWorkingDirectory)/blob-reports/shard-$(shardNumber) + + # Copy test results from container + echo "Copying test results..." + docker cp $container_id:/app/blob-report/. $(System.DefaultWorkingDirectory)/blob-reports/shard-$(shardNumber)/ + + # Remove container + echo "Cleaning up container..." + docker rm $container_id + + # Check if tests failed + if [ $? -ne 0 ]; then + echo "Tests failed in shard $(shardNumber)!" + exit 1 + fi + displayName: 'Run Playwright Tests - Shard $(shardNumber)' + + - task: PublishPipelineArtifact@1 + displayName: 'Publish Test Reports - Shard $(shardNumber)' + condition: always() + inputs: + targetPath: '$(System.DefaultWorkingDirectory)/blob-reports/shard-$(shardNumber)' + artifact: 'playwright-report-shard-$(shardNumber)' + publishLocation: 'pipeline' + + - script: | + docker rmi $(dockerImageName):$(imageTag) -f + displayName: 'Cleanup Docker Image' + condition: always() + + - job: download_and_merge_reports + container: + image: mcr.microsoft.com/playwright:v1.48.0-noble + dependsOn: playwright_tests + steps: + - task: DownloadPipelineArtifact@2 + inputs: + targetPath: '$(System.DefaultWorkingDirectory)/playwright-reports' + - script: | + npm i ortoni-report && + for dir in $(System.DefaultWorkingDirectory)/playwright-reports/*/; do + if [ -d "$dir" ]; then + mv "$dir"* $(System.DefaultWorkingDirectory)/playwright-reports/ + rmdir "$dir" + fi + done + npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports + ls + displayName: merge_reports + env: + PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" + - script: | + $(System.DefaultWorkingDirectory)/jira_writeback.sh + add_comment() $(Build.SourceBranchName) "AUTOMATED TEST RUN: $(date)" $(System.DefaultWorkingDirectory)/ortoni-report/index.html + displayName: publish_results_to_jira + env: + JIRA_API_KEY: $(JIRA_API_KEY) + + # TODO: Enable later when working on PR gate + # - task: PublishTestResults@2 + # displayName: 'Publish test results' + # inputs: + # searchFolder: 'test-results' + # testResultsFormat: 'JUnit' + # testResultsFiles: 'results.xml' + # mergeTestResults: true + # failTaskOnFailedTests: false + # testRunTitle: 'Playwright Tests' + # condition: succeededOrFailed() + + - task: PublishPipelineArtifact@1 + displayName: 'Publish Merged Report' + condition: always() + inputs: + targetPath: '$(System.DefaultWorkingDirectory)/ortoni-report' + artifact: 'playwright-merged-report' + publishLocation: 'pipeline' + + - ${{ else }}: + # Dev Build/Deploy + - stage: Dev + condition: eq(variables['Build.SourceBranch'], variables['dev-branch'] ) + variables: + - group: ISS-Dev + jobs: + - deployment: devBuildDeployment + displayName: Build and Deploy ISS - Dev + environment: digitalCloud-dev + container: node + workspace: + clean: all + strategy: + runOnce: + deploy: + steps: + - checkout: self + clean: true + - task: CopyFiles@2 + inputs: + SourceFolder: 'public/apple-pay/dev' + Contents: '**' + TargetFolder: 'public/.well-known' + CleanTargetFolder: true + - task: DeleteFiles@1 + inputs: + SourceFolder: 'public/apple-pay' + Contents: '**' + RemoveSourceFolder: true + - template: templates/digital/step-build-vue.yml@AzureDevOps + parameters: + buildOutputDir: dist + environment: Dev + - template: templates/digital/step-deploy-vue.yml@AzureDevOps + parameters: + artifactName: vueDistDev + awsProfile: $(devDeploymentProfile) + deployBuckets: + safelite-dev-iss-us-east-2: + clearFolder: true + deployFolder: '' + region: us-east-2 + safelite-dev-iss-us-east-1: + clearFolder: true + deployFolder: '' + region: us-east-1 + appDeployVariables: + __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) + __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) + __VUE_APP_CUSTOMER_PORTAL_URL__: $(__VUE_APP_CUSTOMER_PORTAL_URL__) + __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) + __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) + indexDeployVariables: + __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) + __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) + __VUE_APP_GOOGLE_MAPS_API_SCRIPT__: $(__VUE_APP_GOOGLE_MAPS_API_SCRIPT__) + - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps + parameters: + awsCliContainer: awscli + distributionId: $(cfDistributionId) + paths: /* + awsProfile: $(devDeploymentProfile) + + # Test Build/Deploy + - stage: Test + condition: eq(variables['Build.SourceBranch'], variables['test-branch'] ) + variables: + - group: ISS-Test + jobs: + - deployment: testBuildDeployment + displayName: Build and Deploy ISS - Test + environment: NoApproval-All + container: node + workspace: + clean: all + strategy: + runOnce: + deploy: + steps: + - checkout: self + clean: true + - task: CopyFiles@2 + inputs: + SourceFolder: 'public/apple-pay/test' + Contents: '**' + TargetFolder: 'public/.well-known' + CleanTargetFolder: true + - task: DeleteFiles@1 + inputs: + SourceFolder: 'public/apple-pay' + Contents: '**' + RemoveSourceFolder: true + - template: templates/digital/step-build-vue.yml@AzureDevOps + parameters: + buildOutputDir: dist + environment: Test + - template: templates/digital/step-deploy-vue.yml@AzureDevOps + parameters: + artifactName: vueDistTest + awsProfile: $(sysDeploymentProfile) + deployBuckets: + safelite-sys-iss-us-east-1: + clearFolder: true + deployFolder: "" + region: us-east-1 + safelite-sys-iss-us-east-2: + clearFolder: true + deployFolder: "" + region: us-east-2 + appDeployVariables: + __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) + __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) + __VUE_APP_CUSTOMER_PORTAL_URL__: $(__VUE_APP_CUSTOMER_PORTAL_URL__) + __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) + __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) + indexDeployVariables: + __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) + __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) + __VUE_APP_GOOGLE_MAPS_API_SCRIPT__: $(__VUE_APP_GOOGLE_MAPS_API_SCRIPT__) + - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps + parameters: + awsCliContainer: awscli + distributionId: $(cfDistributionId) + paths: /* + awsProfile: $(sysDeploymentProfile) + + # QA Build/Deploy + - stage: QA + condition: eq(variables['Build.SourceBranch'], variables['qa-branch'] ) + variables: + - group: ISS-QA + jobs: + - deployment: qaBuildDeployment + displayName: Build and Deploy ISS - QA + environment: NoApproval-All + container: node + workspace: + clean: all + strategy: + runOnce: + deploy: + steps: + - checkout: self + clean: true + - task: CopyFiles@2 + inputs: + SourceFolder: 'public/apple-pay/qa' + Contents: '**' + TargetFolder: 'public/.well-known' + CleanTargetFolder: true + - task: DeleteFiles@1 + inputs: + SourceFolder: 'public/apple-pay' + Contents: '**' + RemoveSourceFolder: true + - template: templates/digital/step-build-vue.yml@AzureDevOps + parameters: + buildOutputDir: dist + environment: Qa + - template: templates/digital/step-deploy-vue.yml@AzureDevOps + parameters: + artifactName: vueDistQa + awsProfile: $(qaDeploymentProfile) + deployBuckets: + safelite-qa-iss-us-east-1: + clearFolder: true + deployFolder: "" + region: us-east-1 + safelite-qa-iss-us-east-2: + clearFolder: true + deployFolder: "" + region: us-east-2 + appDeployVariables: + __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) + __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) + __VUE_APP_CUSTOMER_PORTAL_URL__: $(__VUE_APP_CUSTOMER_PORTAL_URL__) + __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) + __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) + indexDeployVariables: + __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) + __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) + __VUE_APP_GOOGLE_MAPS_API_SCRIPT__: $(__VUE_APP_GOOGLE_MAPS_API_SCRIPT__) + - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps + parameters: + awsCliContainer: awscli + distributionId: $(cfDistributionId) + paths: /* + awsProfile: $(qaDeploymentProfile) + + # Prod Build/Deploy + - stage: Prod + condition: succeeded('QA') + variables: + - group: ISS-Prod + jobs: + - deployment: prodBuildDeployment + displayName: Build and Deploy ISS - Prod + environment: digitalCloud-prod + container: node + workspace: + clean: all + strategy: + runOnce: + deploy: + steps: + - checkout: self + clean: true + - task: CopyFiles@2 + inputs: + SourceFolder: 'public/apple-pay/prod' + Contents: '**' + TargetFolder: 'public/.well-known' + CleanTargetFolder: true + - task: DeleteFiles@1 + inputs: + SourceFolder: 'public/apple-pay' + Contents: '**' + RemoveSourceFolder: true + - template: templates/digital/step-build-vue.yml@AzureDevOps + parameters: + buildOutputDir: dist + environment: Prod + - template: templates/digital/step-deploy-vue.yml@AzureDevOps + parameters: + artifactName: vueDistProd + awsProfile: $(prodDeploymentProfile) + deployBuckets: + safelite-prod-iss-us-east-1: + clearFolder: true + deployFolder: "" + region: us-east-1 + safelite-prod-iss-us-east-2: + clearFolder: true + deployFolder: "" + region: us-east-2 + appDeployVariables: + __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) + __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) + __VUE_APP_CUSTOMER_PORTAL_URL__: $(__VUE_APP_CUSTOMER_PORTAL_URL__) + __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) + __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) + indexDeployVariables: + __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) + __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) + __VUE_APP_GOOGLE_MAPS_API_SCRIPT__: $(__VUE_APP_GOOGLE_MAPS_API_SCRIPT__) + - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps + parameters: + awsCliContainer: awscli + distributionId: $(cfDistributionId) + paths: /* + awsProfile: $(prodDeploymentProfile) + - template: templates/digital/auto-tag.yml@AzureDevOps + parameters: + dependsOn: prodBuildDeployment + userName: SafeliteAzureDevops + userEmail: githubazuredevops@safelite.com + diff --git a/devops/scripts/jira_writeback.sh b/devops/scripts/jira_writeback.sh new file mode 100755 index 00000000..896ee2a2 --- /dev/null +++ b/devops/scripts/jira_writeback.sh @@ -0,0 +1,144 @@ +create_issue() { + local title="$1" + local project_key="$2" + local issue_type="$3" + local parent_issue_key="$4" + + AUTH=$(echo -ne "$JIRA_USERNAME:$JIRA_API_KEY" | base64 --wrap 0) + + local parent_issue=$(curl -s -H "Authorization: Basic $AUTH" \ + "$JIRA_SERVER/rest/api/3/issue/$parent_issue_key") + + local parent_fix_versions=$(echo $parent_issue | jq -r '.fields.fixVersions') + + local created_issue=$(curl -X POST -H "Content-Type: application/json" \ + -H "Authorization: Basic $AUTH" \ + -d '{ + "fields": { + "summary": "'"$title"'", + "project": { + "key": "'"$project_key"'" + }, + "issuetype": { + "name": "'"$issue_type"'" + }, + "parent": { + "key": "'"$parent_issue_key"'" + }, + "fixVersions": '"$parent_fix_versions"' + } + }' \ + "$JIRA_SERVER/rest/api/3/issue") + + local created_issue_id=$(echo $created_issue | jq -r '.id') + + curl -X PUT -H "Content-Type: application/json" \ + -H "Authorization: Basic $AUTH" \ + -d '{ + "fields": { + "fixVersions": '"$parent_fix_versions"' + } + }' \ + "$JIRA_SERVER/rest/api/3/issue/$created_issue_id" +} + +extract_uuid() { + local url="$1" + local uuid_regex='[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}' + if [[ "$url" =~ $uuid_regex ]]; then + echo "${BASH_REMATCH}" + else + echo "No UUID found in the URL." + fi +} + +update_issue_status() { + local issue_key="$1" + local status_name="$2" + + AUTH=$(echo -ne "$JIRA_USERNAME:$JIRA_API_KEY" | base64 --wrap 0) + + local transitions=$(curl -s -H "Authorization: Basic $AUTH" \ + "$JIRA_SERVER/rest/api/3/issue/$issue_key/transitions") + + local transition_id=$(echo "$transitions" | jq -r --arg status_name "$status_name" ' + .transitions[] | select(.isAvailable == true and .to.name == $status_name) | .id + ') + + if [ -z "$transition_id" ]; then + echo "BadRequestError" + exit 1 + else + curl -X POST -H "Content-Type: application/json" \ + -H "Authorization: Basic $AUTH" \ + -d '{ + "transition": { + "id": "'"$transition_id"'" + } + }' \ + "$JIRA_SERVER/rest/api/3/issue/$issue_key/transitions" + fi +} + +add_attachments() { + AUTH=$(echo -ne "$JIRA_USERNAME:$JIRA_API_KEY" | base64 --wrap 0) + + local issue_key="$1" + shift + local attachments=("$@") + + echo $issue_key + echo $attachments + + local form_data="" + for attachment in "${attachments[@]}"; do + form_data+="--form file=@$attachment " + done + + echo $form_data + + echo $(curl -X POST $form_data \ + -H "X-Atlassian-Token: no-check" \ + -H "Authorization: Basic $AUTH" \ + "$JIRA_SERVER/rest/api/3/issue/$issue_key/attachments") +} + +add_comment() { + AUTH=$(echo -ne "$JIRA_USERNAME:$JIRA_API_KEY" | base64 --wrap 0) + local issue_key="$1" + shift + local comment_items_input=("$@") + local comment_json="[]" + + for item in "${comment_items_input[@]}"; do + if [ -e "$item" ]; then + # If it's a file path + local attachment=$(add_attachments "$issue_key" "$item") + local id=$(echo $attachment | grep -oP '"id":\s*"\K[^"]+') + + local attachment_content=$(curl -s -I -L -H "Authorization: Basic $AUTH" "$JIRA_SERVER/rest/api/3/attachment/content/$id" \ + | grep -i "Location:" | tail -1 | awk '{print $2}' | tr -d '\r') + echo "$JIRA_SERVER/rest/api/3/attachment/content/$id" + echo "$attachment_content" + + local uuid=$(extract_uuid "$attachment_content") + echo "$uuid" + + json_object=$(jq -n --arg uuid "$uuid" '{ type: "mediaSingle", attrs: { layout: "align-start" }, content: [{ type: "media", attrs: { type: "file", id: $uuid, width: 200, height: 200, collection: "", alt: "" } }]}') + + comment_json=$(echo "$comment_json" | jq --argjson obj "$json_object" '. += [$obj]') + else + # If it's a string + json_object=$(jq -n --arg text "$item" '{ type: "paragraph", content: [{ type: "text", text: $text }]}') + + comment_json=$(echo "$comment_json" | jq --argjson obj "$json_object" '. += [$obj]') + fi + done + + request=$(jq -n --argjson content "$comment_json" '{body: { type: "doc", version: 1, content: $content }}') + + curl -X POST -H "Content-Type: application/json" \ + -H "Authorization: Basic $AUTH" \ + -d "$request" \ + "$JIRA_SERVER/rest/api/3/issue/$issue_key/comment" +} \ No newline at end of file From 35ee6789a7f6b5cd065d6ffc420130717ecc4ec6 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 10:10:56 -0500 Subject: [PATCH 03/63] Attempt #2 --- azure-pipelines-automated-testing.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 31b34b58..473b745e 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -41,15 +41,16 @@ variables: stages: # PR's - ${{ if or(eq(variables['Build.Reason'], 'PullRequest'), eq(1,1)) }}: # TODO: Temporarily changed to always be true, change back - - stage: TestPr - displayName: Run Tests For PullRequest - jobs: - - template: templates/digital/vue-jest-run-unit-tests.yml@AzureDevOps - parameters: - nodeContainer: node - npmLocation: $(Build.SourcesDirectory) - testResultsFile: junit.xml - summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml + # TODO: Temporarily commented out + # - stage: TestPr + # displayName: Run Tests For PullRequest + # jobs: + # - template: templates/digital/vue-jest-run-unit-tests.yml@AzureDevOps + # parameters: + # nodeContainer: node + # npmLocation: $(Build.SourcesDirectory) + # testResultsFile: junit.xml + # summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml - job: playwright_tests continueOnError: true strategy: @@ -148,7 +149,7 @@ stages: env: PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" - script: | - $(System.DefaultWorkingDirectory)/jira_writeback.sh + $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment() $(Build.SourceBranchName) "AUTOMATED TEST RUN: $(date)" $(System.DefaultWorkingDirectory)/ortoni-report/index.html displayName: publish_results_to_jira env: From 464ac967630982243eb8acd715b298c8cebd8a8b Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 10:11:57 -0500 Subject: [PATCH 04/63] Attempt #3 --- azure-pipelines-automated-testing.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 473b745e..5ed9625e 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -42,9 +42,9 @@ stages: # PR's - ${{ if or(eq(variables['Build.Reason'], 'PullRequest'), eq(1,1)) }}: # TODO: Temporarily changed to always be true, change back # TODO: Temporarily commented out - # - stage: TestPr - # displayName: Run Tests For PullRequest - # jobs: + - stage: TestPr + displayName: Run Tests For PullRequest + jobs: # - template: templates/digital/vue-jest-run-unit-tests.yml@AzureDevOps # parameters: # nodeContainer: node From 0112d49d1258f06a737c576e73faa3d826ffe47c Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 10:25:21 -0500 Subject: [PATCH 05/63] Attempt #4 --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 5ed9625e..811168bb 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -150,7 +150,7 @@ stages: PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" - script: | $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh - add_comment() $(Build.SourceBranchName) "AUTOMATED TEST RUN: $(date)" $(System.DefaultWorkingDirectory)/ortoni-report/index.html + add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html" displayName: publish_results_to_jira env: JIRA_API_KEY: $(JIRA_API_KEY) From f8ea8106d2d141e0c7541e0228959b550f15b69b Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 10:35:08 -0500 Subject: [PATCH 06/63] Attempt #5 --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 811168bb..408a5304 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -149,7 +149,7 @@ stages: env: PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" - script: | - $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh + . $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html" displayName: publish_results_to_jira env: From 22454de11e7ea351d8a9b4b968dbedff289ea07b Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 10:57:35 -0500 Subject: [PATCH 07/63] Attempt #6 --- azure-pipelines-automated-testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 408a5304..ce0cc8ab 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -149,6 +149,7 @@ stages: env: PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" - script: | + apt-get install -y jq . $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html" displayName: publish_results_to_jira From 1a38f1dc7d15f7fd5a0c9840e838dc837305c797 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 11:29:16 -0500 Subject: [PATCH 08/63] Attempt #7 --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index ce0cc8ab..fe67704e 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -149,7 +149,7 @@ stages: env: PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" - script: | - apt-get install -y jq + sudo apt-get install -y jq . $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html" displayName: publish_results_to_jira From fa9920a56abc159d6a93dd187b78ed5331e18ddf Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 12:00:56 -0500 Subject: [PATCH 09/63] Moved docker build to its own job --- azure-pipelines-automated-testing.yml | 42 ++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index fe67704e..527ce7dd 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -51,7 +51,27 @@ stages: # npmLocation: $(Build.SourcesDirectory) # testResultsFile: junit.xml # summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml + - job: build_docker_image + steps: + - task: Docker@2 + displayName: 'Build Docker Image' + inputs: + command: build + dockerfile: Dockerfile.playwright + repository: $(dockerImageName) + tags: $(imageTag) + arguments: '--no-cache --pull' + - script: | + docker save -o docker_build.tar $(dockerImageName):$(imageTag) + - task: PublishPipelineArtifact@1 + displayName: 'Publish Docker Image' + condition: always() + inputs: + targetPath: '$(System.DefaultWorkingDirectory)/docker_build.tar' + artifact: 'docker_build' + publishLocation: 'pipeline' - job: playwright_tests + dependsOn: build_docker_image continueOnError: true strategy: matrix: @@ -65,14 +85,21 @@ stages: shardNumber: 4 steps: - - task: Docker@2 - displayName: 'Build Docker Image' + - task: DownloadPipelineArtifact@2 inputs: - command: build - dockerfile: Dockerfile.playwright - repository: $(dockerImageName) - tags: $(imageTag) - arguments: '--no-cache --pull' + targetPath: '$(System.DefaultWorkingDirectory)/docker_build' + displayName: Download docker image + - script: | + ls + for dir in $(System.DefaultWorkingDirectory)/docker_build/*/; do + if [ -d "$dir" ]; then + mv "$dir"* $(System.DefaultWorkingDirectory)/docker_build/ + rmdir "$dir" + fi + done + docker load -i $(System.DefaultWorkingDirectory)/docker_build/docker_build.tar + ls + displayName: Load docker image - script: | # Create container and run tests @@ -149,7 +176,6 @@ stages: env: PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" - script: | - sudo apt-get install -y jq . $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html" displayName: publish_results_to_jira From 895055124d219f2ccf91fbe2bc0862b53390d001 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 12:01:05 -0500 Subject: [PATCH 10/63] Update to docker file --- Dockerfile.playwright | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.playwright b/Dockerfile.playwright index 6271a937..939f3dac 100644 --- a/Dockerfile.playwright +++ b/Dockerfile.playwright @@ -14,8 +14,8 @@ RUN npm install # Install Playwright browsers RUN npx playwright install --with-deps +# Install jq +RUN apt-get install -y jq + # Copy the rest of the application code COPY . . - -# Run Playwright tests -CMD ["npx", "playwright", "test"] From d303a9dd3de4c9ea5045a7f0e8392e82ae655ed1 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 12:14:09 -0500 Subject: [PATCH 11/63] Attempt #8 --- azure-pipelines-automated-testing.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 527ce7dd..1e4f1f4d 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -62,7 +62,8 @@ stages: tags: $(imageTag) arguments: '--no-cache --pull' - script: | - docker save -o docker_build.tar $(dockerImageName):$(imageTag) + docker save -o docker_build.tar $(dockerImageName):$(imageTag) 2?&1 | tee error.log + displayName: Save docker image as tar - task: PublishPipelineArtifact@1 displayName: 'Publish Docker Image' condition: always() From c8f814948b2d7481fde1828da1b265fca1194a8b Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 12:20:54 -0500 Subject: [PATCH 12/63] Attempt #9 --- azure-pipelines-automated-testing.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 1e4f1f4d..4bed5b44 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -53,16 +53,9 @@ stages: # summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml - job: build_docker_image steps: - - task: Docker@2 - displayName: 'Build Docker Image' - inputs: - command: build - dockerfile: Dockerfile.playwright - repository: $(dockerImageName) - tags: $(imageTag) - arguments: '--no-cache --pull' - script: | - docker save -o docker_build.tar $(dockerImageName):$(imageTag) 2?&1 | tee error.log + docker build -t $(dockerImageName):$(imageTag) . --no-cache --pull + docker save -o docker_build.tar ./$(dockerImageName):$(imageTag) displayName: Save docker image as tar - task: PublishPipelineArtifact@1 displayName: 'Publish Docker Image' From 800b26b6b408683e5b63209518af8db451ecf982 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 12:22:38 -0500 Subject: [PATCH 13/63] Attempt #10 --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 4bed5b44..234c0d83 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -55,7 +55,7 @@ stages: steps: - script: | docker build -t $(dockerImageName):$(imageTag) . --no-cache --pull - docker save -o docker_build.tar ./$(dockerImageName):$(imageTag) + docker save -o docker_build.tar $(dockerImageName):$(imageTag) displayName: Save docker image as tar - task: PublishPipelineArtifact@1 displayName: 'Publish Docker Image' From 7f04af2a664a13f748d2b3e332205e3e8f60e465 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 12:24:36 -0500 Subject: [PATCH 14/63] Attempt #11 --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 234c0d83..fedfc344 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -54,7 +54,7 @@ stages: - job: build_docker_image steps: - script: | - docker build -t $(dockerImageName):$(imageTag) . --no-cache --pull + docker build -f Dockerfile.playwright -t $(dockerImageName):$(imageTag) . --no-cache --pull docker save -o docker_build.tar $(dockerImageName):$(imageTag) displayName: Save docker image as tar - task: PublishPipelineArtifact@1 From d464a0457379c440971bc33f8221cc789a4813e3 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 12:42:08 -0500 Subject: [PATCH 15/63] Attempt #11 --- azure-pipelines-automated-testing.yml | 28 ++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index fedfc344..e54b9efb 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -149,10 +149,23 @@ stages: condition: always() - job: download_and_merge_reports - container: - image: mcr.microsoft.com/playwright:v1.48.0-noble dependsOn: playwright_tests steps: + - task: DownloadPipelineArtifact@2 + inputs: + targetPath: '$(System.DefaultWorkingDirectory)/docker_build' + displayName: Download docker image + - script: | + ls + for dir in $(System.DefaultWorkingDirectory)/docker_build/*/; do + if [ -d "$dir" ]; then + mv "$dir"* $(System.DefaultWorkingDirectory)/docker_build/ + rmdir "$dir" + fi + done + docker load -i $(System.DefaultWorkingDirectory)/docker_build/docker_build.tar + ls + displayName: Load docker image - task: DownloadPipelineArtifact@2 inputs: targetPath: '$(System.DefaultWorkingDirectory)/playwright-reports' @@ -170,7 +183,16 @@ stages: env: PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" - script: | - . $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh + # Create container for jira writeback + container_id=$(docker create \ + --ipc=host \ + -e JIRA_SERVER=$(JIRA_SERVER) \ + -e JIRA_USERNAME=$(JIRA_USERNAME) \ + -e JIRA_API_KEY=$(JIRA_API_KEY) \ + -e CI=true \ + -e NODE_ENV=$(NODE_ENV) \ + $(dockerImageName):$(imageTag) \ + . $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html" displayName: publish_results_to_jira env: From 0763bc7601b78d670b829f27b07da37629821e03 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 12:44:08 -0500 Subject: [PATCH 16/63] Attempt #12 --- azure-pipelines-automated-testing.yml | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index e54b9efb..ea4e6a91 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -166,10 +166,10 @@ stages: docker load -i $(System.DefaultWorkingDirectory)/docker_build/docker_build.tar ls displayName: Load docker image - - task: DownloadPipelineArtifact@2 + - task: DownloadPipelineArtifact@2 inputs: targetPath: '$(System.DefaultWorkingDirectory)/playwright-reports' - - script: | + - script: | npm i ortoni-report && for dir in $(System.DefaultWorkingDirectory)/playwright-reports/*/; do if [ -d "$dir" ]; then @@ -179,21 +179,21 @@ stages: done npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports ls - displayName: merge_reports - env: - PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" - - script: | - # Create container for jira writeback - container_id=$(docker create \ - --ipc=host \ - -e JIRA_SERVER=$(JIRA_SERVER) \ - -e JIRA_USERNAME=$(JIRA_USERNAME) \ - -e JIRA_API_KEY=$(JIRA_API_KEY) \ - -e CI=true \ - -e NODE_ENV=$(NODE_ENV) \ - $(dockerImageName):$(imageTag) \ - . $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && - add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html" + displayName: merge_reports + env: + PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" + - script: | + # Create container for jira writeback + container_id=$(docker create \ + --ipc=host \ + -e JIRA_SERVER=$(JIRA_SERVER) \ + -e JIRA_USERNAME=$(JIRA_USERNAME) \ + -e JIRA_API_KEY=$(JIRA_API_KEY) \ + -e CI=true \ + -e NODE_ENV=$(NODE_ENV) \ + $(dockerImageName):$(imageTag) \ + . $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && + add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html" displayName: publish_results_to_jira env: JIRA_API_KEY: $(JIRA_API_KEY) @@ -210,13 +210,13 @@ stages: # testRunTitle: 'Playwright Tests' # condition: succeededOrFailed() - - task: PublishPipelineArtifact@1 - displayName: 'Publish Merged Report' - condition: always() - inputs: - targetPath: '$(System.DefaultWorkingDirectory)/ortoni-report' - artifact: 'playwright-merged-report' - publishLocation: 'pipeline' + - task: PublishPipelineArtifact@1 + displayName: 'Publish Merged Report' + condition: always() + inputs: + targetPath: '$(System.DefaultWorkingDirectory)/ortoni-report' + artifact: 'playwright-merged-report' + publishLocation: 'pipeline' - ${{ else }}: # Dev Build/Deploy From 16e883185b7b7ef24e04307a8a16dbb1ca034ccc Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 12:44:45 -0500 Subject: [PATCH 17/63] Attempt #13 --- azure-pipelines-automated-testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index ea4e6a91..99bb0667 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -167,8 +167,8 @@ stages: ls displayName: Load docker image - task: DownloadPipelineArtifact@2 - inputs: - targetPath: '$(System.DefaultWorkingDirectory)/playwright-reports' + inputs: + targetPath: '$(System.DefaultWorkingDirectory)/playwright-reports' - script: | npm i ortoni-report && for dir in $(System.DefaultWorkingDirectory)/playwright-reports/*/; do From 55e4211fe16c908ae6e41818729a9e2189a49a65 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 14:09:00 -0500 Subject: [PATCH 18/63] Attempt #14 --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 99bb0667..a7d4255c 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -193,7 +193,7 @@ stages: -e NODE_ENV=$(NODE_ENV) \ $(dockerImageName):$(imageTag) \ . $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && - add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html" + add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") displayName: publish_results_to_jira env: JIRA_API_KEY: $(JIRA_API_KEY) From 945befcfea4b9227253cd0cf8f6d5aa357bc9b28 Mon Sep 17 00:00:00 2001 From: Siraj Shaik Date: Wed, 19 Feb 2025 14:16:36 -0500 Subject: [PATCH 19/63] 0001a scenario mocked files and timeout changed --- playwright-tests/impl/utils/ReportUtils.ts | 3 + playwright-tests/pages/BasePage.ts | 2 +- playwright-tests/pages/ServiceLocationPage.ts | 3 +- playwright-tests/playwright.config.ts | 2 +- .../advanced/0001a_ReplaceInShopCredit.ts | 2 +- .../api/v1/analytics/initialize.json | 10 + .../api/v1/coverage/final-deductible.json | 18 + .../order/api/v1/order/save-session/iss.json | 18 + .../api/v1/coverage/policy-information.json | 36 +- .../api/v1/coverage/register-claim.json | 15 + .../experiments/api/v1/experiments/run.json | 19 + .../api/v1/location/alert-reasons/01824.json | 1 + .../true/CR00056707/DW01571GTNNOEM.json | 149 ++ .../100/550036/true/CR00069811/97230.json | 14 + .../550036/true/CR00069811/FW05419GTYN.json | 85 ++ .../location/api/v1/location/zip/97230.json | 8 + .../v1/parts/damage-options/CR00069811.json | 27 + .../damage-options/parts-or-questions.json | 33 + .../api/v1/parts/parts-or-questions.json | 32 + .../parts/api/v1/parts/rain-defense.json | 6 + .../DYNAMIC/550036/97230/ISS/10101599.json | 20 + .../DYNAMIC/550036/97230/ISS/1816993.json | 20 + .../api/v1/parts/wipers/CR00069811/75023.json | 12 + .../price/api/v1/price/combined-quote.json | 29 + .../price/order-items-with-itac-pricing.json | 8 + .../price/api/v1/price/taxed-order-items | 29 + .../api/v1/schedule/shop-time-slots.json | 1304 +++++++++++++++++ .../vehicle/api/v1/vehicle/lookup.json | 16 + .../mockResponses/mockResponsesConfig.json | 2 +- .../api/vi/coverage/policy-information.json | 82 -- 30 files changed, 1904 insertions(+), 101 deletions(-) create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/analytics/api/v1/analytics/initialize.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/final-deductible.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/order/api/v1/order/save-session/iss.json rename playwright-tests/tests/mockResponses/{scenario1 => 0001a_Advanced_Replace_Deductible_Client}/coverage/api/v1/coverage/policy-information.json (50%) create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/register-claim.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/experiments/api/v1/experiments/run.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/alert-reasons/01824.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/providers/75023/Replace/100/550036/true/CR00056707/DW01571GTNNOEM.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/providers/97230/Replace/100/550036/true/CR00069811/97230.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/providers/97230/Replace/100/550036/true/CR00069811/FW05419GTYN.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/zip/97230.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/damage-options/CR00069811.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/damage-options/parts-or-questions.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/parts-or-questions.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/rain-defense.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/recal-parts/CR00069811/FW05419GTYN/DYNAMIC/550036/97230/ISS/10101599.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/recal-parts/CR00069811/FW05419GTYN/DYNAMIC/550036/97230/ISS/1816993.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/wipers/CR00069811/75023.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/price/api/v1/price/combined-quote.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/price/api/v1/price/order-items-with-itac-pricing.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/price/api/v1/price/taxed-order-items create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/schedule/api/v1/schedule/shop-time-slots.json create mode 100644 playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/vehicle/api/v1/vehicle/lookup.json delete mode 100644 playwright-tests/tests/mockResponses/scenario2/coverage/api/vi/coverage/policy-information.json diff --git a/playwright-tests/impl/utils/ReportUtils.ts b/playwright-tests/impl/utils/ReportUtils.ts index 79aac63a..895c5643 100644 --- a/playwright-tests/impl/utils/ReportUtils.ts +++ b/playwright-tests/impl/utils/ReportUtils.ts @@ -310,6 +310,9 @@ export function createAccessibilityHtmlReport() { border: 1px solid #ddd; text-align: left; } + tfoot { + font-weight: bold; + } `; let reportContent = ` diff --git a/playwright-tests/pages/BasePage.ts b/playwright-tests/pages/BasePage.ts index 21d8874a..711a80e6 100644 --- a/playwright-tests/pages/BasePage.ts +++ b/playwright-tests/pages/BasePage.ts @@ -34,7 +34,7 @@ export class BasePage { //this causes the schedule page to fail //await expect(this.buttonLoadSpin).toHaveCount(0, {timeout: 180000}); expect(currentUrl).not.toEqual(startingUrl); - }).toPass({ timeout: 240_000 }); + }).toPass({ timeout: 180_000 }); } async validateURL(url: string) { diff --git a/playwright-tests/pages/ServiceLocationPage.ts b/playwright-tests/pages/ServiceLocationPage.ts index 0d777587..4b855602 100644 --- a/playwright-tests/pages/ServiceLocationPage.ts +++ b/playwright-tests/pages/ServiceLocationPage.ts @@ -54,7 +54,8 @@ export class ServiceLocationPage extends BasePage { // For in-shop and drop off this.selectAShopOptions = this.page.locator('[class="shop-question"]'); - this.firstAppointmentButton = this.page.locator('div').filter({ hasText: /Appts/}).first(); + // this.firstAppointmentButton = this.page.locator('div').filter({ hasText: /Appts/}).first(); + this.firstAppointmentButton = this.page.locator('#availabilityIndicator').first(); this.changeZipButton = this.page.locator('[id="serviceZipLinkPromptId"]'); this.updateZipTextBox = this.page.getByRole('textbox', { name: 'Update your service ZIP code'}); this.saveZipButton = this.page.getByRole('button', { name: 'Save ZIP code' }); diff --git a/playwright-tests/playwright.config.ts b/playwright-tests/playwright.config.ts index 598cb9b5..20bf301e 100644 --- a/playwright-tests/playwright.config.ts +++ b/playwright-tests/playwright.config.ts @@ -58,7 +58,7 @@ export default defineConfig({ ['junit'], ['list'] ], - timeout: 240_000, + timeout: 120_000, /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Base URL to use in actions like `await page.goto('/')`. */ diff --git a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts index 8f138abb..dc64aa11 100644 --- a/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts +++ b/playwright-tests/tests/advanced/0001a_ReplaceInShopCredit.ts @@ -70,7 +70,7 @@ for (const client of advancedClients) { const data = { ...advancedScenario0001Data }; data.clientTag = client.clientTag; const tc = new TestCase({ - name: `0001a Advanced Replace Deductible Client: "${client.accountName}"`, + name: `0001a_Advanced_Replace_Deductible_Client: "${client.accountName}"`, tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], testData: data }, undefined, '0001a'); diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/analytics/api/v1/analytics/initialize.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/analytics/api/v1/analytics/initialize.json new file mode 100644 index 00000000..2181b7de --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/analytics/api/v1/analytics/initialize.json @@ -0,0 +1,10 @@ +{ + "userKey": 2004417, + "sessionKey": 2419636, + "sessionId": "8967dbc4-5081-47c4-a896-03050353d9e2", + "userId": "2ea43842-440b-4362-a72f-105d987f4bc1", + "deviceId": "2ea43842-440b-4362-a72f-105d987f4bc1", + "version": 1, + "status": 1, + "error": null +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/final-deductible.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/final-deductible.json new file mode 100644 index 00000000..fd5f376c --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/final-deductible.json @@ -0,0 +1,18 @@ +{ + "accountNumber": "550036", + "detailedErrorMessage": null, + "notes": null, + "hasPolicies": false, + "deductible": 250, + "status": null, + "noCoverage": false, + "isOEMEndorsed": false, + "policyData": "AMjHAgrjFS8H8IiDcI9sC8DUxbkV/fm1HmxAnMOiIuk1OKL4a5gpqx3O8DmtryfvwcsjA1vAsxalx4t73Fukx0axtCS1cX6NopWRnLnxTPvL3Mv3IcgESaBqcEeWtSol8CN2tly7xvRHPjdQUzXictkVxtlYssRRoPt5V/QtPyydEDbeoHY0F3gTd9/bhxuRCZ5zvO2/jXvVMB2zznBzYfa44+Ywhl9T9ip7VMlcHxox1Wce6kWOGSZTLtf8Zkg+5uft2JspYryrQkhn8/bC3amYRChdfzE8kGL3jh2x1cYgGg1Ooyh7UaWbc/zEFrlt", + "referralCorrelationId": "02601141-4f2a-4fc9-9b72-a01c49a2f3fd", + "referralNumber": null, + "isSuccess": true, + "isError": false, + "errorCode": null, + "errorMessage": null, + "successMessage": null +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/order/api/v1/order/save-session/iss.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/order/api/v1/order/save-session/iss.json new file mode 100644 index 00000000..2287ef93 --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/order/api/v1/order/save-session/iss.json @@ -0,0 +1,18 @@ +{ + "referralNumber": "120916", + "referralSequenceNumber": "10101599", + "referralDate": "2025-02-19T10:33:17.68", + "referralCorrelationId": "02601141-4f2a-4fc9-9b72-a01c49a2f3fd", + "parentAccountNumber": 550036, + "billToAccountNumber": "214616", + "crmCustomerId": 857222, + "savedSessionId": "9da64bae-c2a0-4ef6-8477-74f42965c369", + "eon": "S10097450", + "workOrderNumber": "", + "workOrderId": "", + "workOrderStatus": "", + "customerPortalLoginToken": "00000000-0000-0000-0000-000000000000", + "lockToken": null, + "settledTenderAmount": 0.0, + "isRecalAckOptIn": false +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/scenario1/coverage/api/v1/coverage/policy-information.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/policy-information.json similarity index 50% rename from playwright-tests/tests/mockResponses/scenario1/coverage/api/v1/coverage/policy-information.json rename to playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/policy-information.json index f9a85a92..f6a1cdbc 100644 --- a/playwright-tests/tests/mockResponses/scenario1/coverage/api/v1/coverage/policy-information.json +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/policy-information.json @@ -5,18 +5,18 @@ "expirationDate": "0001-01-01T00:00:00", "type": null, "lineOfBusiness": null, - "policyNumber": "AOA23102736040", + "policyNumber": "~AutomatedScenario0001a1db71b", "status": null, "source": null, "insureds": [ { - "firstName": "JOHN", - "lastName": "SMITH", + "firstName": "Collin", + "lastName": "Collier", "businessName": null, - "address": "4372 SUNSHINE DR", - "city": "MONTGOMERY", - "state": "AL", - "zipCode": "36116", + "address": "601 Grove Lane", + "city": "PORTLAND", + "state": "OR", + "zipCode": "97230", "phones": null, "email": null, "driverLicenseState": null, @@ -28,25 +28,33 @@ "vehicles": [ { "id": 0, - "vehicleYear": "2006", - "vehicleMake": "SBRU", - "vehicleModel": "FORESTER", + "vehicleYear": "2020", + "vehicleMake": "BMW", + "vehicleModel": "740", "vehicleStyle": null, "licensePlate": "UNKNOWN", - "vin": "JF1SG63616B121212", + "vin": "WBA7T2C01LGL17632", "driver": null, "owner": null, - "coverages": [], + "coverages": [ + { + "code": "COMP", + "deductible": 250, + "individualLimit": 0, + "occurrenceLimit": 0, + "dayLimit": 0 + } + ], "fleetNumber": null, "fleetUnitNumber": "1", "endorsements": null } ], "taxExempt": "FALSE", - "policyData": "G+r99boRzfUExiJdE0IYp5w1bhP8AZ31Qy+HnTxiQ8sf9paDgwprrcJJ8b8Sd3khpFBwgGwA0ZDgZmLNcmlOiSRchEvJfrZ47XoMTYq4cRsYjrMqvGVKl2ihGDY5brfMc11Hj6h/iJyDyUTAF4CgkDGhtRTHRcaDnjNQtC3G5Mge5LnZwF1HZs6AI4iFm43O6ZFC1fviI00LoQ1JAiXRcDBDng9OFTkeHoyAiVbxyaUqT07sEKl7jHKXJGYletP2r+yMKdMPoN2fo48quSvoQA==" + "policyData": "AMjHAgrjFS8H8IiDcI9sC8DUxbkV/fm1HmxAnMOiIuk1OKL4a5gpqx3O8DmtryfvwcsjA1vAsxalx4t73Fukx0axtCS1cX6NopWRnLnxTPvL3Mv3IcgESaBqcEeWtSol8CN2tly7xvRHPjdQUzXictkVxtlYssRRoPt5V/QtPyydEDbeoHY0F3gTd9/bhxuRCZ5zvO2/jXvVMB2zznBzYfa44+Ywhl9T9ip7VMlcHxox1Wce6kWOGSZTLtf8Zkg+5uft2JspYryrQkhn8/bC3amYRChdfzE8kGL3jh2x1cYgGg1Ooyh7UaWbc/zEFrlt" } ], - "referralCorrelationId": "6a4e2176-b877-481a-ab13-01653ee4f224", + "referralCorrelationId": "02601141-4f2a-4fc9-9b72-a01c49a2f3fd", "referralNumber": null, "accountNumber": "550036", "isSuccess": true, diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/register-claim.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/register-claim.json new file mode 100644 index 00000000..3381cdb6 --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/coverage/api/v1/coverage/register-claim.json @@ -0,0 +1,15 @@ +{ + "claimantId": null, + "claimNumber": "0589139920001", + "notes": null, + "dispatchNumber": null, + "deductible": 0, + "referralCorrelationId": "02601141-4f2a-4fc9-9b72-a01c49a2f3fd", + "referralNumber": null, + "accountNumber": "550036", + "isSuccess": true, + "isError": false, + "errorCode": null, + "errorMessage": null, + "successMessage": "registered" +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/experiments/api/v1/experiments/run.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/experiments/api/v1/experiments/run.json new file mode 100644 index 00000000..38a3b7f8 --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/experiments/api/v1/experiments/run.json @@ -0,0 +1,19 @@ +{ + "experiments": [ + { + "universeName": "PIAInsurance", + "universeId": 640, + "testName": "PIAInsurance_V1", + "testId": 504, + "variationName": "YesShowPIAInsurance_TEST", + "variationId": 1430, + "isActive": true, + "isExposed": true, + "userPartitionNumber": 12, + "assignmentId": 14863748, + "settings": { + "DisplayPIAInsurance": "true" + } + } + ] +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/alert-reasons/01824.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/alert-reasons/01824.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/alert-reasons/01824.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/providers/75023/Replace/100/550036/true/CR00056707/DW01571GTNNOEM.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/providers/75023/Replace/100/550036/true/CR00056707/DW01571GTNNOEM.json new file mode 100644 index 00000000..8100d93b --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/providers/75023/Replace/100/550036/true/CR00056707/DW01571GTNNOEM.json @@ -0,0 +1,149 @@ +{ + "mobileProviderNumber": "001813", + "shopProviders": [ + { + "address": { + "city": "PLANO", + "country": "US", + "state": "TX", + "streetAddress": "1601 E PLANO PKWY", + "streetAddress2": "STE 150", + "zipCode": "75074", + "zipCodeCtu": "01813" + }, + "distanceInMiles": 4.187648412874978, + "providerNumber": "001813", + "companyName": "SAFELITE AUTOGLASS - DALLAS-FT.WO,TX SOR-CTU", + "phoneNumber": "9724237183", + "isSafeliteShop": true + }, + { + "address": { + "city": "MCKINNEY", + "country": "US", + "state": "TX", + "streetAddress": "417 POWER HOUSE ST.", + "streetAddress2": "STE A", + "zipCode": "75071", + "zipCodeCtu": "01813" + }, + "distanceInMiles": 13.220085913669747, + "providerNumber": "005318", + "companyName": "SAFELITE AUTOGLASS - MCKINNEY, TX", + "phoneNumber": "9725624492", + "isSafeliteShop": true + }, + { + "address": { + "city": "LEWISVILLE", + "country": "US", + "state": "TX", + "streetAddress": "2129 S STEMMONS FWY", + "streetAddress2": "", + "zipCode": "75067", + "zipCodeCtu": "01813" + }, + "distanceInMiles": 14.553951205638858, + "providerNumber": "004542", + "companyName": "SAFELITE AUTOGLASS - LEWISVILLE, TX", + "phoneNumber": "4694442057", + "isSafeliteShop": true + }, + { + "address": { + "city": "MESQUITE", + "country": "US", + "state": "TX", + "streetAddress": "2131 N TOWN EAST BLVD", + "streetAddress2": "", + "zipCode": "75150", + "zipCodeCtu": "01813" + }, + "distanceInMiles": 17.86005691117364, + "providerNumber": "004541", + "companyName": "SAFELITE AUTOGLASS - MESQUITE, TX", + "phoneNumber": "9722889891", + "isSafeliteShop": true + }, + { + "address": { + "city": "N RICHLAND HILLS", + "country": "US", + "state": "TX", + "streetAddress": "5649 RUFE SNOW DR", + "streetAddress2": "", + "zipCode": "76180", + "zipCodeCtu": "04544" + }, + "distanceInMiles": 32.558897054726366, + "providerNumber": "006504", + "companyName": "SAFELITE AUTOGLASS - FORT WORTH, TX RDU", + "phoneNumber": "8176569791", + "isSafeliteShop": true + }, + { + "address": { + "city": "ARLINGTON", + "country": "US", + "state": "TX", + "streetAddress": "2411 S COOPER ST", + "streetAddress2": "", + "zipCode": "76015", + "zipCodeCtu": "04544" + }, + "distanceInMiles": 33.065576901075474, + "providerNumber": "004540", + "companyName": "SAFELITE AUTOGLASS - ARLINGTON, TX", + "phoneNumber": "8175224300", + "isSafeliteShop": true + }, + { + "address": { + "city": "GREENVILLE", + "country": "US", + "state": "TX", + "streetAddress": "7907 TRADERS CIR", + "streetAddress2": "", + "zipCode": "75402", + "zipCodeCtu": "01813" + }, + "distanceInMiles": 36.369381330667089, + "providerNumber": "005317", + "companyName": "SAFELITE AUTOGLASS - GREENVILLE, TX", + "phoneNumber": "9034501771", + "isSafeliteShop": true + }, + { + "address": { + "city": "FORT WORTH", + "country": "US", + "state": "TX", + "streetAddress": "2751 NORTHERN CROSS BLVD", + "streetAddress2": "", + "zipCode": "76137", + "zipCodeCtu": "04544" + }, + "distanceInMiles": 36.676844951002508, + "providerNumber": "004544", + "companyName": "SAFELITE AUTOGLASS - FORT WORTH, TX", + "phoneNumber": "2143283111", + "isSafeliteShop": true + }, + { + "address": { + "city": "TYLER", + "country": "US", + "state": "TX", + "streetAddress": "4043 S BROADWAY AVE", + "streetAddress2": "", + "zipCode": "75701", + "zipCodeCtu": "01813" + }, + "distanceInMiles": 98.1186957553462, + "providerNumber": "000714", + "companyName": "SAFELITE AUTOGLASS - TYLER, TX", + "phoneNumber": "9035972059", + "isSafeliteShop": true + } + ] +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/providers/97230/Replace/100/550036/true/CR00069811/97230.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/providers/97230/Replace/100/550036/true/CR00069811/97230.json new file mode 100644 index 00000000..059f3391 --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/providers/97230/Replace/100/550036/true/CR00069811/97230.json @@ -0,0 +1,14 @@ +[ + { + "partNumber": "SBB19", + "description": "SAFELITE BEAM BLADE 19", + "partType": "FRONT WIPER", + "isInsurable": null + }, + { + "partNumber": "SBB26", + "description": "SAFELITE BEAM BLADE 26", + "partType": "FRONT WIPER", + "isInsurable": null + } +] \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/providers/97230/Replace/100/550036/true/CR00069811/FW05419GTYN.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/providers/97230/Replace/100/550036/true/CR00069811/FW05419GTYN.json new file mode 100644 index 00000000..a87dd6de --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/providers/97230/Replace/100/550036/true/CR00069811/FW05419GTYN.json @@ -0,0 +1,85 @@ +{ + "mobileProviderNumber": "001824", + "shopProviders": [ + { + "address": { + "city": "Portland", + "country": "US", + "state": "OR", + "streetAddress": "5119 NE 158th Ave", + "streetAddress2": "", + "zipCode": "97230", + "zipCodeCtu": "01824" + }, + "distanceInMiles": 1.2090846804646957, + "providerNumber": "001824", + "companyName": "SAFELITE AUTOGLASS - PORTLAND, OR WSR-CTU", + "phoneNumber": "5032260323", + "isSafeliteShop": true + }, + { + "address": { + "city": "Clackamas", + "country": "US", + "state": "OR", + "streetAddress": "11231 SE Highway 212", + "streetAddress2": "", + "zipCode": "97015", + "zipCodeCtu": "01824" + }, + "distanceInMiles": 9.5642605222286665, + "providerNumber": "003875", + "companyName": "SAFELITE AUTOGLASS - CLACKAMAS, OR", + "phoneNumber": "5037626330", + "isSafeliteShop": true + }, + { + "address": { + "city": "Beaverton", + "country": "US", + "state": "OR", + "streetAddress": "13227 SW Canyon Rd", + "streetAddress2": "STE F", + "zipCode": "97005", + "zipCodeCtu": "01824" + }, + "distanceInMiles": 15.594098490720718, + "providerNumber": "004762", + "companyName": "SAFELITE AUTOGLASS - BEAVERTON, OR", + "phoneNumber": "5036436601", + "isSafeliteShop": true + }, + { + "address": { + "city": "Tualatin", + "country": "US", + "state": "OR", + "streetAddress": "9606 SW Tualatin-Sherwood Rd", + "streetAddress2": "", + "zipCode": "97062", + "zipCodeCtu": "01824" + }, + "distanceInMiles": 17.548518168792196, + "providerNumber": "005919", + "companyName": "SAFELITE AUTOGLASS - TUALATIN, OR", + "phoneNumber": "5032822420", + "isSafeliteShop": true + }, + { + "address": { + "city": "Keizer", + "country": "US", + "state": "OR", + "streetAddress": "4229 River Rd N", + "streetAddress2": "STE 150", + "zipCode": "97303", + "zipCodeCtu": "01824" + }, + "distanceInMiles": 46.16399084140199, + "providerNumber": "004277", + "companyName": "SAFELITE AUTOGLASS - SALEM - KEIZER, OR", + "phoneNumber": "5033903030", + "isSafeliteShop": true + } + ] +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/zip/97230.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/zip/97230.json new file mode 100644 index 00000000..d1deb629 --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/location/api/v1/location/zip/97230.json @@ -0,0 +1,8 @@ +{ + "containsMilitaryBase": false, + "isServiceable": true, + "isValid": true, + "state": "OR", + "providerNumber": "01824", + "zipCodeCtu": "01824" +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/damage-options/CR00069811.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/damage-options/CR00069811.json new file mode 100644 index 00000000..9580a7e9 --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/damage-options/CR00069811.json @@ -0,0 +1,27 @@ +{ + "windshieldOptions": { + "availableReplacementOptions": [ + "Single" + ], + "isRepairAvailable": true + }, + "backGlassOptions": { + "availableReplacementOptions": [ + "Stationary" + ] + }, + "driverSideOptions": { + "availableReplacementOptions": [ + "Vent", + "Back", + "Front" + ] + }, + "passengerSideOptions": { + "availableReplacementOptions": [ + "Vent", + "Back", + "Front" + ] + } +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/damage-options/parts-or-questions.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/damage-options/parts-or-questions.json new file mode 100644 index 00000000..d51a4e84 --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/damage-options/parts-or-questions.json @@ -0,0 +1,33 @@ +{ + "partsOrQuestions": [ + { + "glassPiece": { + "name": "Single", + "location": "Windshield" + }, + "parts": [ + { + "childPartQuestions": [], + "basePartNumber": "FW05419", + "safelitePartNumber": "FW05419 GTY", + "color": "Green Tint", + "requiresRecalibration": true, + "recalibrationType": "DYNAMIC", + "canSafeliteRecalibrate": true, + "requiresCapabilityQuestions": false, + "childParts": [ + { + "partNumber": "RS 101 PAD", + "safelitePartNumber": "RS 101 PAD" + } + ], + "partNumber": "FW05419GTYN", + "description": "rain sensor, solar, soundproofing, lane departure warning system, forward collision alert w", + "partType": "WINDSHIELD", + "isInsurable": null + } + ], + "partQuestions": null + } + ] +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/parts-or-questions.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/parts-or-questions.json new file mode 100644 index 00000000..85badbb7 --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/parts-or-questions.json @@ -0,0 +1,32 @@ +{ + "partsOrQuestions": [ + { + "glassPiece": { + "name": "Single", + "location": "Windshield" + }, + "parts": [ + { + "childPartQuestions": [], + "basePartNumber": "DW01571", + "safelitePartNumber": "DW01571 GTNOEM", + "color": "Green Tint", + "requiresRecalibration": false, + "recalibrationType": null, + "canSafeliteRecalibrate": false, + "requiresCapabilityQuestions": false, + "childParts": [ + { + "partNumber": "GGG 1571", + "safelitePartNumber": "GGG 1571" + } + ], + "partNumber": "DW01571GTNNOEM", + "description": "", + "partType": "WINDSHIELD" + } + ], + "partQuestions": null + } + ] +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/rain-defense.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/rain-defense.json new file mode 100644 index 00000000..08a9ec4d --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/rain-defense.json @@ -0,0 +1,6 @@ +{ + "partNumber": "RAIN REPEL", + "description": null, + "partType": "RAIN DEFENSE", + "isInsurable": null +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/recal-parts/CR00069811/FW05419GTYN/DYNAMIC/550036/97230/ISS/10101599.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/recal-parts/CR00069811/FW05419GTYN/DYNAMIC/550036/97230/ISS/10101599.json new file mode 100644 index 00000000..4e66189a --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/recal-parts/CR00069811/FW05419GTYN/DYNAMIC/550036/97230/ISS/10101599.json @@ -0,0 +1,20 @@ +{ + "requiredProviderServices": [ + "ADAS Dynamic Calibration" + ], + "canProviderRecalibrate": true, + "allowMobileSchedule": true, + "recalibrationParts": [ + { + "partNumber": "RECAL DYNAMIC", + "description": "Adas Dynamic Recal Serv", + "recalibrationType": "DYNAMIC", + "ribCode": "RL", + "safelitePartNumber": "RECAL DYNAMIC", + "status": "ACTIVE", + "partType": "ADAS RECALIBRATION", + "childParts": [], + "recalibrationFees": [] + } + ] +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/recal-parts/CR00069811/FW05419GTYN/DYNAMIC/550036/97230/ISS/1816993.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/recal-parts/CR00069811/FW05419GTYN/DYNAMIC/550036/97230/ISS/1816993.json new file mode 100644 index 00000000..4e66189a --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/recal-parts/CR00069811/FW05419GTYN/DYNAMIC/550036/97230/ISS/1816993.json @@ -0,0 +1,20 @@ +{ + "requiredProviderServices": [ + "ADAS Dynamic Calibration" + ], + "canProviderRecalibrate": true, + "allowMobileSchedule": true, + "recalibrationParts": [ + { + "partNumber": "RECAL DYNAMIC", + "description": "Adas Dynamic Recal Serv", + "recalibrationType": "DYNAMIC", + "ribCode": "RL", + "safelitePartNumber": "RECAL DYNAMIC", + "status": "ACTIVE", + "partType": "ADAS RECALIBRATION", + "childParts": [], + "recalibrationFees": [] + } + ] +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/wipers/CR00069811/75023.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/wipers/CR00069811/75023.json new file mode 100644 index 00000000..6563794b --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/parts/api/v1/parts/wipers/CR00069811/75023.json @@ -0,0 +1,12 @@ +[ + { + "partNumber": "SBB22", + "description": "SAFELITE BEAM BLADE 22", + "partType": "FRONT WIPER" + }, + { + "partNumber": "SBB22", + "description": "SAFELITE BEAM BLADE 22", + "partType": "FRONT WIPER" + } +] \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/price/api/v1/price/combined-quote.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/price/api/v1/price/combined-quote.json new file mode 100644 index 00000000..91ddce12 --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/price/api/v1/price/combined-quote.json @@ -0,0 +1,29 @@ +{ + "lineItems": [ + { + "partNumber": "RAIN REPEL", + "promoCode": null, + "laborAmount": 0.0, + "sellingPrice": 44.99, + "kitPrice": 0, + "salesTax": null + }, + { + "partNumber": "SBB19", + "promoCode": null, + "laborAmount": 0.0, + "sellingPrice": 34.99, + "kitPrice": 0, + "salesTax": null + }, + { + "partNumber": "SBB26", + "promoCode": null, + "laborAmount": 0.0, + "sellingPrice": 34.99, + "kitPrice": 0, + "salesTax": null + } + ], + "serverData": "ZtCNOF1tCLQBAx2NRKHE/n/fqD8zUxRfYtDuTu7uUiPpeg7i6TmwXwggssX5KsXVenWi0X3mFSjdoyYq79ysxeknuFO2bNoXU8e+wTG2Qmoi4Hoby6pVzuJPTnJzIg75TMZI1cF/FRSffgKLp/Z3HXVAzL1MgvCVZLQgK7x5ILVuBrK6wGFgjfBdEp8qUG/9YKSsJMGYtsuEcJmg8WsxSa1AicmAXj9cXPROcJSocxXp8CDVa3AAqC3mKsD+Hk3uF3EPZ4peVDjGOochxKiN/DnJq1EuJrq/9dqAVnZBc83+j6tKXuYCqtSPciqH+yjOs+p+Qymg51/21cwgK4hWtSNwalc2rSB7xhFqwlK365tO7XmU+KeSdfoKa6co+EjJopr2e/NMb2Edd8bOp88llYtkIHL/HKfxqW8SFHAwazh1PqFd5R9MCC2jCDqaoEVd9awrYlLuvtGSW8WRRAGtLiIiuEhq4/bpfRaYLU2noFk=" +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/price/api/v1/price/order-items-with-itac-pricing.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/price/api/v1/price/order-items-with-itac-pricing.json new file mode 100644 index 00000000..33c9200d --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/price/api/v1/price/order-items-with-itac-pricing.json @@ -0,0 +1,8 @@ +{ + "isItac": false, + "isItacOptimized": null, + "primaryBillToNumber": null, + "partsWerePriced": true, + "lineItems": [], + "serverData": "KcYkmhhx3j2jfrKcPIai5c3vxIPezYw3algekZCIJ1nRzZHsoYWmD//QlA9cNAqo7E4vA4lcilhi/EbXZ5BfIlUjQng0T1GMzltEwIcGbNw=" +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/price/api/v1/price/taxed-order-items b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/price/api/v1/price/taxed-order-items new file mode 100644 index 00000000..6b04b08c --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/price/api/v1/price/taxed-order-items @@ -0,0 +1,29 @@ +{ + "taxedLineItems": [ + { + "partNumber": "SBB22", + "promoCode": null, + "laborAmount": 0, + "sellingPrice": 34.99, + "kitPrice": 0, + "salesTax": 2.89 + }, + { + "partNumber": "SBB22", + "promoCode": null, + "laborAmount": 0, + "sellingPrice": 34.99, + "kitPrice": 0, + "salesTax": 2.89 + }, + { + "partNumber": "RAIN REPEL", + "promoCode": null, + "laborAmount": 0, + "sellingPrice": 44.99, + "kitPrice": 0, + "salesTax": 3.71 + } + ], + "serverData": "KcYkmhhx3j2jfrKcPIai5c3vxIPezYw3algekZCIJ1nRzZHsoYWmD//QlA9cNAqo7E4vA4lcilhi/EbXZ5BfIvc9C7c7sl9TGGbrA2A3QUiVi9Q+eQQWUrGSlb5Te3PyfK8g5A+gvcXvn+YSjH0tie6XYRgOnhi6ArHjHJ3GTgCmWIhMUosEpnBrUg3/W5ci/3UF4sCnDpihiJPPiMCnOMjzvWp1/xTg5jaoE8N8otARbxQ73ObbvZCJndil/EaSbqYMvL+ymPvDJHPoAfbXUJc90Drlef4gvSV1d6HEZGR/zwoKYipecNPSXcXzRGKrfxgmViszg1d1PyncoyVQrokAIl1KPRmDPJso5CmGrdDjEYsTV0SXUd0NcphMKd8wVrx7QUCLiyW8Vee7cVjWFnqdhkeJ9PYb14WoNb4j1cLJv39ofMcTmaJMI/maAcA8XKPOuhdWTTqWBXOPq3ax1g==" +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/schedule/api/v1/schedule/shop-time-slots.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/schedule/api/v1/schedule/shop-time-slots.json new file mode 100644 index 00000000..8aa48663 --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/schedule/api/v1/schedule/shop-time-slots.json @@ -0,0 +1,1304 @@ +{ + "estimatedServiceMinutesMinimum": 120, + "estimatedServiceMinutesMaximum": 180, + "days": [ + { + "date": "2025-02-25", + "timeSlots": [ + { + "id": "01824-01824-S-B*20876*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20876*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20876*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20876*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20876*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20876*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20876*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20876*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20876*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20876*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-02-26", + "timeSlots": [ + { + "id": "01824-01824-S-B*20877*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20877*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20877*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20877*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20877*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20877*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20877*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20877*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20877*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20877*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20877*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20877*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-02-27", + "timeSlots": [ + { + "id": "01824-01824-S-B*20878*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20878*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20878*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20878*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20878*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20878*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20878*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20878*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20878*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20878*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20878*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20878*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-02-28", + "timeSlots": [ + { + "id": "01824-01824-S-B*20879*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20879*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20879*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20879*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20879*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20879*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20879*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20879*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20879*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20879*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20879*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20879*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-03-01", + "timeSlots": [ + { + "id": "01824-01824-S-B*20880*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20880*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20880*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20880*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20880*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20880*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20880*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20880*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20880*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20880*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20880*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20880*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-03-03", + "timeSlots": [ + { + "id": "01824-01824-S-B*20882*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20882*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20882*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20882*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20882*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20882*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20882*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20882*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20882*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20882*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20882*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20882*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-03-04", + "timeSlots": [ + { + "id": "01824-01824-S-B*20883*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20883*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20883*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20883*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20883*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20883*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20883*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20883*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20883*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20883*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20883*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20883*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-03-05", + "timeSlots": [ + { + "id": "01824-01824-S-B*20884*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20884*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20884*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20884*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20884*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20884*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20884*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20884*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20884*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20884*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20884*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20884*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-03-06", + "timeSlots": [ + { + "id": "01824-01824-S-B*20885*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20885*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20885*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20885*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20885*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20885*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20885*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20885*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20885*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20885*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20885*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20885*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-03-07", + "timeSlots": [ + { + "id": "01824-01824-S-B*20886*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20886*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20886*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20886*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20886*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20886*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20886*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20886*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20886*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20886*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20886*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20886*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-03-08", + "timeSlots": [ + { + "id": "01824-01824-S-B*20887*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20887*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20887*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20887*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20887*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20887*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20887*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20887*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20887*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20887*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20887*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20887*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-03-10", + "timeSlots": [ + { + "id": "01824-01824-S-B*20889*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20889*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20889*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20889*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20889*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20889*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20889*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20889*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20889*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20889*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20889*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20889*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-03-11", + "timeSlots": [ + { + "id": "01824-01824-S-B*20890*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20890*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20890*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20890*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20890*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20890*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20890*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20890*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20890*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20890*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20890*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20890*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-03-12", + "timeSlots": [ + { + "id": "01824-01824-S-B*20891*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20891*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20891*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20891*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20891*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20891*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20891*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20891*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20891*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20891*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20891*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20891*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-03-13", + "timeSlots": [ + { + "id": "01824-01824-S-B*20892*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20892*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20892*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20892*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20892*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20892*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20892*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20892*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20892*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20892*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20892*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20892*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-03-14", + "timeSlots": [ + { + "id": "01824-01824-S-B*20893*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20893*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20893*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20893*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20893*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20893*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20893*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20893*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20893*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20893*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20893*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20893*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + }, + { + "date": "2025-03-15", + "timeSlots": [ + { + "id": "01824-01824-S-B*20894*8 AM", + "startTime": "08:00", + "endTime": "09:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20894*830 AM", + "startTime": "08:30", + "endTime": "10:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20894*9 AM", + "startTime": "09:00", + "endTime": "10:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20894*930 AM", + "startTime": "09:30", + "endTime": "11:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20894*10 AM", + "startTime": "10:00", + "endTime": "11:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20894*1030 AM", + "startTime": "10:30", + "endTime": "12:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20894*1 PM", + "startTime": "13:00", + "endTime": "14:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20894*130 PM", + "startTime": "13:30", + "endTime": "15:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20894*2 PM", + "startTime": "14:00", + "endTime": "15:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20894*230 PM", + "startTime": "14:30", + "endTime": "16:00", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20894*3 PM", + "startTime": "15:00", + "endTime": "16:30", + "offerPremium": false + }, + { + "id": "01824-01824-S-B*20894*330 PM", + "startTime": "15:30", + "endTime": "17:00", + "offerPremium": false + } + ] + } + ], + "provisionalTriggers": [] +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/vehicle/api/v1/vehicle/lookup.json b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/vehicle/api/v1/vehicle/lookup.json new file mode 100644 index 00000000..3be2ff09 --- /dev/null +++ b/playwright-tests/tests/mockResponses/0001a_Advanced_Replace_Deductible_Client/vehicle/api/v1/vehicle/lookup.json @@ -0,0 +1,16 @@ +{ + "carId": "CR00069811", + "category": "CAR", + "year": 2020, + "make": "BMW", + "model": "740", + "style": "4 door sedan", + "imageUrl": "https://dbhdyzvm8lm25.cloudfront.net/color_0320_032/MY2020/13736/13736_cc0320_032_300.jpg", + "imageVifNumber": "13736", + "imageVifColor": "white", + "canSafeliteService": true, + "recalibrationServices": [ + "DYNAMIC" + ], + "isMobileStaticRecalibrationApplicable": false +} \ No newline at end of file diff --git a/playwright-tests/tests/mockResponses/mockResponsesConfig.json b/playwright-tests/tests/mockResponses/mockResponsesConfig.json index e37d452f..b0dc208d 100644 --- a/playwright-tests/tests/mockResponses/mockResponsesConfig.json +++ b/playwright-tests/tests/mockResponses/mockResponsesConfig.json @@ -2,7 +2,7 @@ "common": { "experiments/api/v1/experiments/run": "common/experiments/api/v1/experiments/run.json" }, - "scenario1": { + "0001a_Advanced_Replace_Deductible_Client": { "coverage/api/v1/coverage/policy-information": "scenario1/coverage/api/v1/coverage/policy-information.json" }, "0002a_Advanced_Replace_Deductible_Client": { diff --git a/playwright-tests/tests/mockResponses/scenario2/coverage/api/vi/coverage/policy-information.json b/playwright-tests/tests/mockResponses/scenario2/coverage/api/vi/coverage/policy-information.json deleted file mode 100644 index bd541df0..00000000 --- a/playwright-tests/tests/mockResponses/scenario2/coverage/api/vi/coverage/policy-information.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "policies": [ - { - "policyEffectiveDate": "0001-01-01T00:00:00", - "expirationDate": "0001-01-01T00:00:00", - "type": null, - "lineOfBusiness": null, - "policyNumber": "~550036ENDRSOEM", - "status": null, - "source": null, - "insureds": [ - { - "firstName": "LERNO", - "lastName": "REEB", - "businessName": null, - "address": "2817 BENGAL LN", - "city": "PLANO", - "state": "TX", - "zipCode": "75023", - "phones": null, - "email": null, - "driverLicenseState": null, - "relationToInsured": null, - "companyCode": "LIBERTY", - "customerId": null - }, - { - "firstName": "ISAAC", - "lastName": "ASIMOV", - "businessName": null, - "address": "2817 BENGAL LN", - "city": "PLANO", - "state": "TX", - "zipCode": "75023", - "phones": null, - "email": null, - "driverLicenseState": null, - "relationToInsured": null, - "companyCode": "LIBERTY", - "customerId": null - } - ], - "vehicles": [ - { - "id": 0, - "vehicleYear": "2006", - "vehicleMake": "CHRY", - "vehicleModel": "300", - "vehicleStyle": null, - "licensePlate": "UNKNOWN", - "vin": "2C3KA53G06H407823", - "driver": null, - "owner": null, - "coverages": [ - { - "code": "COMP", - "deductible": 50, - "individualLimit": 0, - "occurrenceLimit": 0, - "dayLimit": 0 - } - ], - "fleetNumber": null, - "fleetUnitNumber": "1", - "endorsements": [ - "OEM Approved" - ] - } - ], - "taxExempt": "FALSE", - "policyData": "G+r99boRzfUExiJdE0IYp/EeRyybEAPInOh4NEX8UesSGLZvquPGXqn9HRn/4zge7aj+HhRN6CkN21JKCMqw4cPrSHhJzQpb83TQMsj71r2fmpx7/2mxZskTaSu0UG48ye+7qQki7a3xTkE9V3aw8+xFLhEm3P6gkExFSRefeCBPH3+n//ypF0ZsawSni4wPyzpZ5KOSyTX4kDPPJUS3Ry2drjHpT/oDKm6Iro0WBaqj8mf7758UlaW1OsxO3JHZc2fi2+vnYB+nVjbDN0DnWZOayLLmjUKyHf09kp2gDCEc39Mb1mweI9OOl8GtW91078A7wnCEWrTITvc1+VLCN9n7mwf6WJ8m47qw5oBxv5s=" - } - ], - "referralCorrelationId": "3fd7b485-569a-4b4b-8d90-7b7bb49dbb01", - "referralNumber": null, - "accountNumber": "550036", - "isSuccess": true, - "isError": false, - "errorCode": null, - "errorMessage": null, - "successMessage": null -} \ No newline at end of file From 185e17a534e529bcfde667c76cec16d49b417ff8 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 15:13:12 -0500 Subject: [PATCH 20/63] Attempt #15 --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index a7d4255c..680cf954 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -194,7 +194,7 @@ stages: $(dockerImageName):$(imageTag) \ . $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") - displayName: publish_results_to_jira + displayName: publish_results_to_jira env: JIRA_API_KEY: $(JIRA_API_KEY) From 95508623a4c4bb50c9bb2bde34b5f8f15d6c1848 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 19 Feb 2025 15:13:44 -0500 Subject: [PATCH 21/63] Attempt #16 --- azure-pipelines-automated-testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 680cf954..2fc8111d 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -195,8 +195,8 @@ stages: . $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") displayName: publish_results_to_jira - env: - JIRA_API_KEY: $(JIRA_API_KEY) + env: + JIRA_API_KEY: $(JIRA_API_KEY) # TODO: Enable later when working on PR gate # - task: PublishTestResults@2 From cf2281e83814eb9778826b0b3ad3b52472714908 Mon Sep 17 00:00:00 2001 From: Chase King Date: Thu, 20 Feb 2025 15:17:40 -0500 Subject: [PATCH 22/63] Attempt #17 --- azure-pipelines-automated-testing.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 2fc8111d..a64f507c 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -112,7 +112,6 @@ stages: "npx wait-on http://localhost:8080 && npm run test:playwright -- --shard=$(shardNumber)/$(totalShards) --reporter=list,blob --grep \"@smoke | @Advanced\"") # Start container and stream logs - echo "Starting tests for shard $(shardNumber)..." docker start -a $container_id @@ -189,8 +188,6 @@ stages: -e JIRA_SERVER=$(JIRA_SERVER) \ -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ - -e CI=true \ - -e NODE_ENV=$(NODE_ENV) \ $(dockerImageName):$(imageTag) \ . $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") From 63aa0421d071361de74c7a3dcf65d516b3574a7c Mon Sep 17 00:00:00 2001 From: Chase King Date: Fri, 21 Feb 2025 10:22:01 -0500 Subject: [PATCH 23/63] Attempt #18 --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index a64f507c..0dae2029 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -189,7 +189,7 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ - . $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && + source $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") displayName: publish_results_to_jira env: From 8635a5f1cf173d98585c3eac4e8777e07a8205f5 Mon Sep 17 00:00:00 2001 From: Chase King Date: Fri, 21 Feb 2025 10:56:15 -0500 Subject: [PATCH 24/63] Moved docker build inside other steps to reduce runtime --- azure-pipelines-automated-testing.yml | 57 +++++++-------------------- 1 file changed, 15 insertions(+), 42 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 0dae2029..ebab438e 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -51,19 +51,6 @@ stages: # npmLocation: $(Build.SourcesDirectory) # testResultsFile: junit.xml # summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml - - job: build_docker_image - steps: - - script: | - docker build -f Dockerfile.playwright -t $(dockerImageName):$(imageTag) . --no-cache --pull - docker save -o docker_build.tar $(dockerImageName):$(imageTag) - displayName: Save docker image as tar - - task: PublishPipelineArtifact@1 - displayName: 'Publish Docker Image' - condition: always() - inputs: - targetPath: '$(System.DefaultWorkingDirectory)/docker_build.tar' - artifact: 'docker_build' - publishLocation: 'pipeline' - job: playwright_tests dependsOn: build_docker_image continueOnError: true @@ -79,21 +66,14 @@ stages: shardNumber: 4 steps: - - task: DownloadPipelineArtifact@2 + - task: Docker@2 + displayName: 'Build Docker Image' inputs: - targetPath: '$(System.DefaultWorkingDirectory)/docker_build' - displayName: Download docker image - - script: | - ls - for dir in $(System.DefaultWorkingDirectory)/docker_build/*/; do - if [ -d "$dir" ]; then - mv "$dir"* $(System.DefaultWorkingDirectory)/docker_build/ - rmdir "$dir" - fi - done - docker load -i $(System.DefaultWorkingDirectory)/docker_build/docker_build.tar - ls - displayName: Load docker image + command: build + dockerfile: Dockerfile.playwright + repository: $(dockerImageName) + tags: $(imageTag) + arguments: '--no-cache --pull' - script: | # Create container and run tests @@ -150,26 +130,18 @@ stages: - job: download_and_merge_reports dependsOn: playwright_tests steps: - - task: DownloadPipelineArtifact@2 + - task: Docker@2 + displayName: 'Build Docker Image' inputs: - targetPath: '$(System.DefaultWorkingDirectory)/docker_build' - displayName: Download docker image - - script: | - ls - for dir in $(System.DefaultWorkingDirectory)/docker_build/*/; do - if [ -d "$dir" ]; then - mv "$dir"* $(System.DefaultWorkingDirectory)/docker_build/ - rmdir "$dir" - fi - done - docker load -i $(System.DefaultWorkingDirectory)/docker_build/docker_build.tar - ls - displayName: Load docker image + command: build + dockerfile: Dockerfile.playwright + repository: $(dockerImageName) + tags: $(imageTag) + arguments: '--no-cache --pull' - task: DownloadPipelineArtifact@2 inputs: targetPath: '$(System.DefaultWorkingDirectory)/playwright-reports' - script: | - npm i ortoni-report && for dir in $(System.DefaultWorkingDirectory)/playwright-reports/*/; do if [ -d "$dir" ]; then mv "$dir"* $(System.DefaultWorkingDirectory)/playwright-reports/ @@ -192,6 +164,7 @@ stages: source $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") displayName: publish_results_to_jira + shell: bash env: JIRA_API_KEY: $(JIRA_API_KEY) From 4efd3c15f11547d535ddc2bd52fc33750898065c Mon Sep 17 00:00:00 2001 From: Chase King Date: Fri, 21 Feb 2025 11:01:08 -0500 Subject: [PATCH 25/63] Attempt #19 --- azure-pipelines-automated-testing.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index ebab438e..b2667ee1 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -153,6 +153,24 @@ stages: displayName: merge_reports env: PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" + - task: Bash@3 + inputs: + targetType: 'inline' + script: | + # Create container for jira writeback + container_id=$(docker create \ + --ipc=host \ + -e JIRA_SERVER=$(JIRA_SERVER) \ + -e JIRA_USERNAME=$(JIRA_USERNAME) \ + -e JIRA_API_KEY=$(JIRA_API_KEY) \ + $(dockerImageName):$(imageTag) \ + source $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && + add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") + env: + JIRA_API_KEY: $(JIRA_API_KEY) + displayName: publish_results_to_jira + + echo 'Hello world' - script: | # Create container for jira writeback container_id=$(docker create \ @@ -163,10 +181,7 @@ stages: $(dockerImageName):$(imageTag) \ source $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") - displayName: publish_results_to_jira - shell: bash - env: - JIRA_API_KEY: $(JIRA_API_KEY) + # TODO: Enable later when working on PR gate # - task: PublishTestResults@2 From c45be77c1c2b4fc81ca5e70adeba5281119ef7b3 Mon Sep 17 00:00:00 2001 From: Chase King Date: Fri, 21 Feb 2025 11:02:02 -0500 Subject: [PATCH 26/63] Removed unused code --- azure-pipelines-automated-testing.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index b2667ee1..52827211 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -169,19 +169,6 @@ stages: env: JIRA_API_KEY: $(JIRA_API_KEY) displayName: publish_results_to_jira - - echo 'Hello world' - - script: | - # Create container for jira writeback - container_id=$(docker create \ - --ipc=host \ - -e JIRA_SERVER=$(JIRA_SERVER) \ - -e JIRA_USERNAME=$(JIRA_USERNAME) \ - -e JIRA_API_KEY=$(JIRA_API_KEY) \ - $(dockerImageName):$(imageTag) \ - source $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && - add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") - # TODO: Enable later when working on PR gate # - task: PublishTestResults@2 From f64a603934fe99303e19b5e0ff1c932dd30cc007 Mon Sep 17 00:00:00 2001 From: Chase King Date: Fri, 21 Feb 2025 14:53:02 -0500 Subject: [PATCH 27/63] Removed dependency --- azure-pipelines-automated-testing.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 52827211..8aa9555f 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -52,7 +52,6 @@ stages: # testResultsFile: junit.xml # summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml - job: playwright_tests - dependsOn: build_docker_image continueOnError: true strategy: matrix: From 24fb5c3842767fca426de4146cc5021d85fec81e Mon Sep 17 00:00:00 2001 From: Chase King Date: Mon, 24 Feb 2025 09:27:45 -0500 Subject: [PATCH 28/63] Added bash annotation to script --- devops/scripts/jira_writeback.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/devops/scripts/jira_writeback.sh b/devops/scripts/jira_writeback.sh index 896ee2a2..95b23a0a 100755 --- a/devops/scripts/jira_writeback.sh +++ b/devops/scripts/jira_writeback.sh @@ -1,3 +1,4 @@ +#!/bin/bash create_issue() { local title="$1" local project_key="$2" From 35653ebd9948f5826dbcf8d7b215f2fbbfdb4543 Mon Sep 17 00:00:00 2001 From: Chase King Date: Mon, 24 Feb 2025 09:27:55 -0500 Subject: [PATCH 29/63] Attempt #20 --- azure-pipelines-automated-testing.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 8aa9555f..0edc6ad3 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -152,10 +152,7 @@ stages: displayName: merge_reports env: PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" - - task: Bash@3 - inputs: - targetType: 'inline' - script: | + - bash: | # Create container for jira writeback container_id=$(docker create \ --ipc=host \ From 8ead06e3a463c287fea857015fe86c0d7b6416ec Mon Sep 17 00:00:00 2001 From: Chase King Date: Mon, 24 Feb 2025 09:44:51 -0500 Subject: [PATCH 30/63] Specified to only install chromium for playwright --- Dockerfile.playwright | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.playwright b/Dockerfile.playwright index 939f3dac..a064c31e 100644 --- a/Dockerfile.playwright +++ b/Dockerfile.playwright @@ -12,7 +12,7 @@ COPY package*.json ./ RUN npm install # Install Playwright browsers -RUN npx playwright install --with-deps +RUN npx playwright install chromium --with-deps # Install jq RUN apt-get install -y jq From 0b0a8d6d0722a5f1f744eb8cd51a6e623e374547 Mon Sep 17 00:00:00 2001 From: Chase King Date: Mon, 24 Feb 2025 09:45:10 -0500 Subject: [PATCH 31/63] Attempt #21 --- azure-pipelines-automated-testing.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 0edc6ad3..5fa6792a 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -160,8 +160,7 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ - source $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && - add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") + $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") env: JIRA_API_KEY: $(JIRA_API_KEY) displayName: publish_results_to_jira From 49f7dddb5f2df886f34a4172ed669bf4e6c17cb6 Mon Sep 17 00:00:00 2001 From: Chase King Date: Mon, 24 Feb 2025 10:09:04 -0500 Subject: [PATCH 32/63] Attempt #22 --- devops/scripts/jira_writeback.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/devops/scripts/jira_writeback.sh b/devops/scripts/jira_writeback.sh index 95b23a0a..1d605072 100755 --- a/devops/scripts/jira_writeback.sh +++ b/devops/scripts/jira_writeback.sh @@ -142,4 +142,8 @@ add_comment() { -H "Authorization: Basic $AUTH" \ -d "$request" \ "$JIRA_SERVER/rest/api/3/issue/$issue_key/comment" -} \ No newline at end of file +} + +if [[ $# -gt 0 ]]; then # IF function call passed in + "$@" # Call function +fi \ No newline at end of file From 46984b1aa5471cc308f2aca2034d96dd1840e1a6 Mon Sep 17 00:00:00 2001 From: Chase King Date: Mon, 24 Feb 2025 11:10:48 -0500 Subject: [PATCH 33/63] Attempt #23 --- azure-pipelines-automated-testing.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 5fa6792a..306b818a 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -147,7 +147,7 @@ stages: rmdir "$dir" fi done - npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports + npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/ortoni-report ls displayName: merge_reports env: @@ -160,6 +160,7 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ + chmod +x $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") env: JIRA_API_KEY: $(JIRA_API_KEY) From bef1122005b97f4b103a1b3b2ec8c0ea7300e654 Mon Sep 17 00:00:00 2001 From: Siraj Shaik Date: Mon, 24 Feb 2025 15:00:29 -0500 Subject: [PATCH 34/63] Scenario 23a is added. --- .../business-logic/data/MockPolicyData.ts | 4 +- .../business-logic/types/ITestData.ts | 1 + .../business-logic/types/ITestPages.ts | 4 +- .../business-logic/types/TestCase.ts | 6 +- .../pages/MoldingQuestionsPage.ts | 18 ++++ playwright-tests/tests/0000__M.test.ts | 22 ++++- .../tests/advanced/0022a_VehicleByVIN.ts | 8 +- .../advanced/0023a_VehicleByVINPartsQns.ts | 84 +++++++++++++++++++ 8 files changed, 135 insertions(+), 12 deletions(-) create mode 100644 playwright-tests/pages/MoldingQuestionsPage.ts create mode 100644 playwright-tests/tests/advanced/0023a_VehicleByVINPartsQns.ts diff --git a/playwright-tests/business-logic/data/MockPolicyData.ts b/playwright-tests/business-logic/data/MockPolicyData.ts index 06f2386e..9d041e95 100644 --- a/playwright-tests/business-logic/data/MockPolicyData.ts +++ b/playwright-tests/business-logic/data/MockPolicyData.ts @@ -22,7 +22,9 @@ const policySoapByScenario: { [x: string]: string } = { '0018a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2023-12-11T21:27:05Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2023-12-11T21:27:05Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>df38d1a8-f583-4ee6-a23d-950c1930c150 <_xml:PolicyInqRs> <_xml:RqUID>df38d1a8-f583-4ee6-a23d-950c1930c150 <_xml:TransactionResponseDt>2023-12-11T21:27:05Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2023-01-01 <_xml:Requestor id= \"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id= \"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id= \"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>F <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>GRS <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>CT <_xml:ContractTerm> <_xml:EffectiveDt>2022-12-21 <_xml:ExpirationDt>2099-12-21 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>998281163922817 <_xml:Location> <_xml:ItemIdInfo id= \"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>SBRU <_xml:Model>Outback <_xml:ModelYear>2021 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>CT <_xml:VehIdentificationNumber>4S4BTAFC7M3163249 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:RemarkText id= \"endorsementId_1\" IdRef= \"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', '0019a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-01-13T18:01:11Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-01-13T18:01:11Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>5da3e764-374a-41e0-9baf-9fe76bbc4a6e <_xml:PolicyInqRs> <_xml:RqUID>5da3e764-374a-41e0-9baf-9fe76bbc4a6e <_xml:TransactionResponseDt>2025-01-13T18:01:11Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2023-01-01 <_xml:Requestor id=\"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>GRS <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>NH <_xml:ContractTerm> <_xml:EffectiveDt>2022-12-21 <_xml:ExpirationDt>2099-12-21 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>998411168732470 <_xml:Location> <_xml:ItemIdInfo id=\"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>SBRU <_xml:Model>WRX <_xml:ModelYear>2021 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>NH <_xml:VehIdentificationNumber>JF1VA1A63M9801802 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', '0020a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-01-13T18:01:11Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-01-13T18:01:11Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>5da3e764-374a-41e0-9baf-9fe76bbc4a6e <_xml:PolicyInqRs> <_xml:RqUID>5da3e764-374a-41e0-9baf-9fe76bbc4a6e <_xml:TransactionResponseDt>2025-01-13T18:01:11Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2023-01-01 <_xml:Requestor id=\"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>GRS <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>NH <_xml:ContractTerm> <_xml:EffectiveDt>2022-12-21 <_xml:ExpirationDt>2099-12-21 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>998411168732470 <_xml:Location> <_xml:ItemIdInfo id=\"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>SBRU <_xml:Model>WRX <_xml:ModelYear>2021 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>NH <_xml:VehIdentificationNumber>JF1VA1A63M9801802 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', - '0021a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-01-03T14:13:58Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-01-03T14:13:58Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:PolicyInqRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:TransactionResponseDt>2025-01-03T14:13:58Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2017-02-06 <_xml:Requestor id=\"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>STD <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>CA <_xml:ContractTerm> <_xml:EffectiveDt>2023-11-01 <_xml:ExpirationDt>2099-11-01 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3861415357665 <_xml:Location> <_xml:ItemIdInfo id=\"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>HOND <_xml:Model>ACCORD <_xml:ModelYear>2016 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>CA <_xml:VehIdentificationNumber>1HGCR2F31GA195371 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>500.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ' + '0021a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-01-03T14:13:58Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-01-03T14:13:58Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:PolicyInqRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:TransactionResponseDt>2025-01-03T14:13:58Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2017-02-06 <_xml:Requestor id=\"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>STD <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>CA <_xml:ContractTerm> <_xml:EffectiveDt>2023-11-01 <_xml:ExpirationDt>2099-11-01 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3861415357665 <_xml:Location> <_xml:ItemIdInfo id=\"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>HOND <_xml:Model>ACCORD <_xml:ModelYear>2016 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>CA <_xml:VehIdentificationNumber>1HGCR2F31GA195371 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>500.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', + '0022a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-01-03T14:13:58Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-01-03T14:13:58Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:PolicyInqRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:TransactionResponseDt>2025-01-03T14:13:58Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2017-02-06 <_xml:Requestor id=\"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>STD <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>CA <_xml:ContractTerm> <_xml:EffectiveDt>2023-11-01 <_xml:ExpirationDt>2099-11-01 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3861415357665 <_xml:Location> <_xml:ItemIdInfo id=\"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>HOND <_xml:Model>ACCORD <_xml:ModelYear>2016 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>CA <_xml:VehIdentificationNumber>1HGCR2F31GA195371 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>500.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', + '0023a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-01-03T14:13:58Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-01-03T14:13:58Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:PolicyInqRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:TransactionResponseDt>2025-01-03T14:13:58Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2017-02-06 <_xml:Requestor id=\"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>STD <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>CA <_xml:ContractTerm> <_xml:EffectiveDt>2023-11-01 <_xml:ExpirationDt>2099-11-01 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3861415357665 <_xml:Location> <_xml:ItemIdInfo id=\"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>HOND <_xml:Model>ACCORD <_xml:ModelYear>2016 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>CA <_xml:VehIdentificationNumber>1HGCR2F31GA195371 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>500.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ' } const claimRegistrationValue = "{\"claimNumber\":\"058913992\",\"reportedDate\":\"2023-11-01T18:56:08.264Z\",\"howReported\":\"digital\",\"status\":\"registered\",\"lossCategory\":\"glassOnly\",\"lossCause\":\"glassOnly\",\"lossCauseDetail\":null,\"lossDate\":\"2023-11-01\",\"lossTime\":\"00:00\",\"lossDescription\":\"ROCK FROM ROAD - NO ONE AT FAULT\",\"lossLocation\":{\"primary\":true,\"line1\":null,\"line2\":null,\"city\":\"Columbus\",\"county\":null,\"state\":\"OR\",\"postalCode\":\"\",\"country\":\"US\",\"type\":null,\"locationName\":null,\"subType\":null},\"_links\":{\"reporter\":{\"id\":\"65429f485e8cd37072a5bb5d\",\"href\":\"claims/058913992/contacts/65429f485e8cd37072a5bb5d\",\"title\":\"BRANDON JOHNSON\"},\"primaryContact\":null,\"insureds\":[{\"id\":\"65429f485e8cd37072a5bb5d\",\"href\":\"claims/058913992/contacts/65429f485e8cd37072a5bb5d\",\"title\":\"BRANDON JOHNSON\"}],\"pedestrianCyclists\":[],\"contacts\":{\"id\":null,\"href\":\"claims/058913992/contacts\"},\"claimDamage\":{\"id\":null,\"href\":\"claims/058913992/claim-damage\"},\"vehicleIncidents\":[{\"id\":\"65429f4b31209b23b788c38e\",\"href\":\"claims/058913992/vehicle-incidents/65429f4b31209b23b788c38e\",\"vehicle\":\"BMW740\"}],\"propertyIncidents\":{\"dwelling\":null,\"otherStructure\":null,\"personalProperty\":null,\"livingExpense\":null},\"injuryIncidents\":[]}}"; diff --git a/playwright-tests/business-logic/types/ITestData.ts b/playwright-tests/business-logic/types/ITestData.ts index dd6cb02d..4cbfe472 100644 --- a/playwright-tests/business-logic/types/ITestData.ts +++ b/playwright-tests/business-logic/types/ITestData.ts @@ -36,4 +36,5 @@ export interface ITestData { isRecalWarning: boolean, isSeparateApptsWarning: boolean, // IF true, check for the separate appts warning on VehicleDamagePage isAuthenticationRequired: boolean + isMoldingQuestion: boolean, } \ No newline at end of file diff --git a/playwright-tests/business-logic/types/ITestPages.ts b/playwright-tests/business-logic/types/ITestPages.ts index 58729752..46da9d0a 100644 --- a/playwright-tests/business-logic/types/ITestPages.ts +++ b/playwright-tests/business-logic/types/ITestPages.ts @@ -5,6 +5,7 @@ import { ContactDetailsPage } from "../../pages/ContactDetailsPage"; import { CoverageStatementPage } from "../../pages/CoverageStatementPage"; import { DuplicateCheckPage } from "../../pages/DuplicateCheckPage"; import { EndorsementsPage } from "../../pages/EndorsementsPage"; +import { MoldingQuestionsPage } from "../../pages/MoldingQuestionsPage"; import { OrderConfirmationPage } from "../../pages/OrderConfirmationPage"; import { PartQuestionsPage } from "../../pages/PartQuestionsPage"; import { PaymentMethodPage } from "../../pages/PaymentMethodPage"; @@ -57,5 +58,6 @@ export default interface ITestPages { vinLookupPage: VinLookupPage, vehicleLookupAddressPage: VehicleLookupAddressPage, vehicleLookupLicensePage: VehicleLookupLicensePage, - welcomePage: WelcomePage + welcomePage: WelcomePage, + moldingQuestionsPage: MoldingQuestionsPage } \ No newline at end of file diff --git a/playwright-tests/business-logic/types/TestCase.ts b/playwright-tests/business-logic/types/TestCase.ts index 2561de4d..94c68de8 100644 --- a/playwright-tests/business-logic/types/TestCase.ts +++ b/playwright-tests/business-logic/types/TestCase.ts @@ -43,6 +43,7 @@ import CcisApiUtil from "@impl/api/CcisApiUtil"; import MockPolicyData from "@business-logic/data/MockPolicyData"; import VehiclePartQuestionsPage from "../../pages/VehiclePartsPage"; import CapabilityQuestionsPage from "../../pages/CapabilityQuestionsPage"; +import { MoldingQuestionsPage } from "../../pages/MoldingQuestionsPage"; export default class TestCase extends DisposableBase implements ITestCase { public static FrameworkConfig: FrameworkConfig = { @@ -201,7 +202,8 @@ export default class TestCase extends DisposableBase implements ITestCase { vinLookupPage: new VinLookupPage(page), vehicleLookupAddressPage: new VehicleLookupAddressPage(page), vehicleLookupLicensePage: new VehicleLookupLicensePage(page), - welcomePage: new WelcomePage(page) + welcomePage: new WelcomePage(page), + moldingQuestionsPage: new MoldingQuestionsPage(page) }; } @@ -226,4 +228,4 @@ export default class TestCase extends DisposableBase implements ITestCase { console.log("Delete 'Fake Claim Registration policy' status: " + crDeleteRes.status); //For debug use console.dir(crDeleteRes); } } -} \ No newline at end of file +} diff --git a/playwright-tests/pages/MoldingQuestionsPage.ts b/playwright-tests/pages/MoldingQuestionsPage.ts new file mode 100644 index 00000000..ecb7fe7d --- /dev/null +++ b/playwright-tests/pages/MoldingQuestionsPage.ts @@ -0,0 +1,18 @@ +import { expect, type Locator, type Page } from '@playwright/test'; +import { BasePage } from './BasePage'; + +export class MoldingQuestionsPage extends BasePage { + readonly page: Page; + url = process.env['BASE_URL']! + '/?issPage=part-questions'; + readonly yesButton: Locator; + + constructor(page: Page) { + super(page); + this.page = page; + this.yesButton = page.locator('label').filter({ hasText: 'Yes' }).locator('div'); + } + + async answerYes() { + await this.yesButton.click(); + } +} \ No newline at end of file diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index 70d6ee3d..8b794b3a 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -49,6 +49,7 @@ import advancedScenario0009TestCases from "./advanced/0009a_NoDeductibleFlorida" import advancedScenario0010TestCases from "./advanced/0010a_RearGlass"; import advancedScenario0021TestCases from "./advanced/0021a_VehicleByPlate"; import advancedScenario0022TestCases from "./advanced/0022a_VehicleByVIN"; +import advancedScenario0023TestCases from "./advanced/0023a_VehicleByVINPartsQns"; import { createAccessibilityHtmlReport } from "@impl/utils/ReportUtils"; @@ -271,6 +272,11 @@ test.describe.parallel('ISS QA Automation Regression', () => { for (const testCase of advancedScenario0022TestCases) { test(...prepareTest(testCase, run, options, ruleEngine)); } + + // Scenario 0023a + for (const testCase of advancedScenario0023TestCases) { + test(...prepareTest(testCase, run, options, ruleEngine)); + } }); @@ -314,7 +320,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { partQuestions, paymentDetails, isNoComp, isItac, isRecalNotification, isRecalWarning, servicePackage, hasStateLawPopup, otherVehiclesOnPolicy, isSeparateApptsWarning, vehiclePartQuestions, editVehicleDetails, - hasMilitaryWarning, capabilityQuestions, isUseVehicleOnPolicy, isVehicleLookupValidations } = testCase.testData; + hasMilitaryWarning, capabilityQuestions, isUseVehicleOnPolicy, isVehicleLookupValidations, isMoldingQuestion } = testCase.testData; let { isPolicyFound } = testCase.testData; // Allow isPolicyFound to be re-assigned @@ -326,7 +332,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { endorsementsPage, vehicleLookupPage, partQuestionsPage, paymentMethodPage, vehicleLookupAddressPage, vehicleLookupLicensePage, vinLookupPage, bailoutPage, tpaSearchPage, tpaSubmitPage, tpaConfirmationPage, - vehiclePartQuestionsPage, capabilityQuestionsPage } = testCase.pages; + vehiclePartQuestionsPage, capabilityQuestionsPage, moldingQuestionsPage } = testCase.pages; // Destructure bailout flags const { isVehicleSelectBailout, isDoNotSeeMyShopBailout, isTpaNotEnabledBailout, @@ -512,7 +518,15 @@ async function runWorkflow(page: Page, testCase: TestCase) { break; } } - + if (isMoldingQuestion) { + await test.step('Molding Questions Page >> Select Yes', async () => { + if (!moldingQuestionsPage) { + console.error("moldingQuestionsPage is not initialized"); + } + await moldingQuestionsPage.answerYes(); + await moldingQuestionsPage.nextPage(); + }); + } if (capabilityQuestions && capabilityQuestions.length > 0) { await capabilityQuestionsPage.validatePartQuestions(capabilityQuestions); await capabilityQuestionsPage.selectPartQuestionResponses(capabilityQuestions); @@ -666,4 +680,4 @@ async function runWorkflow(page: Page, testCase: TestCase) { await test.step('OrderConfirmationPage >> Validate order', async () => { await orderConfirmationPage.validateOrderConfirmationPage(testCase.testData); }); -} \ No newline at end of file +} diff --git a/playwright-tests/tests/advanced/0022a_VehicleByVIN.ts b/playwright-tests/tests/advanced/0022a_VehicleByVIN.ts index 16e587ac..192fbd8d 100644 --- a/playwright-tests/tests/advanced/0022a_VehicleByVIN.ts +++ b/playwright-tests/tests/advanced/0022a_VehicleByVIN.ts @@ -23,10 +23,10 @@ const customerDetails: ICustomerDetails = { } } -const policyNumber = `~AutomatedScenario0021a${faker.string.uuid().substring(0, 6)}`; -const policySoap = MockPolicyData.getPolicySoapByScenario('0021a', customerDetails, policyNumber); +const policyNumber = `~AutomatedScenario0022a${faker.string.uuid().substring(0, 6)}`; +const policySoap = MockPolicyData.getPolicySoapByScenario('0022a', customerDetails, policyNumber); -const advancedScenario0021Data: Partial = { +const advancedScenario0022Data: Partial = { clientTag: '', isDuplicateClaim: false, isPolicyFound: true, @@ -73,7 +73,7 @@ const advancedScenario0021Data: Partial = { const advancedClients = ClientData.getAdvancedClients(); const advancedScenario0022TestCases: TestCase[] = []; for (const client of advancedClients) { - const data = { ...advancedScenario0021Data }; + const data = { ...advancedScenario0022Data }; data.clientTag = client.clientTag; const tc = new TestCase({ name: `0022a Advanced Client Vehicle By Vin: "${client.accountName}"`, diff --git a/playwright-tests/tests/advanced/0023a_VehicleByVINPartsQns.ts b/playwright-tests/tests/advanced/0023a_VehicleByVINPartsQns.ts new file mode 100644 index 00000000..9321fe38 --- /dev/null +++ b/playwright-tests/tests/advanced/0023a_VehicleByVINPartsQns.ts @@ -0,0 +1,84 @@ +import ClientData from "@business-logic/data/ClientData"; +import TestCase from "@business-logic/types/TestCase"; +import { DamageType, PartQuestionType, PaymentType, ServiceLocation, ServicePackage, VehicleDamage, VehicleLookupType } from "@business-logic/types/Enums"; +import { ITestData } from "@business-logic/types/ITestData" +import { faker } from "@faker-js/faker"; +import { getNextWeekday } from "@impl/utils/DateUtils"; +import MockPolicyData from "@business-logic/data/MockPolicyData"; +import { ICustomerDetails } from "@business-logic/types/CustomerDetails"; + +const nextWeekday = getNextWeekday(); +const customerDetails: ICustomerDetails = { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + email: 'itqatest@safelite.com', + phoneNumber: '614-531-0031', + notes: 'Automated Test', + address: { + street: faker.location.streetAddress(), + city: 'San Jose', + state: 'CA', + postalCode: '97230-6373', + country: 'United States' + } +} + +const policyNumber = `~AutomatedScenario0023a${faker.string.uuid().substring(0, 6)}`; +const policySoap = MockPolicyData.getPolicySoapByScenario('0023a', customerDetails, policyNumber); + +const advancedScenario0023Data: Partial = { + clientTag: '', + isDuplicateClaim: false, + isPolicyFound: true, + isNoComp: false, + hasStateLawPopup: true, + endorsements: undefined, + isUseVehicleOnPolicy: false, + isVehicleLookupValidations: true, + isMoldingQuestion: true, + isSafelite: true, + servicePackage: faker.helpers.enumValue(ServicePackage), + customerDetails: customerDetails, + claimDetails: { + policyNumber: policyNumber, + policyDeductible: 500, + damageDate: '2017-06-02', + damageCause: DamageType.Vandalism + }, + policySoap: policySoap, + vehicleDetails: { + year: '1999', + make: 'Buick', + model: 'LeSabre', + style: '4 door sedan', + vehicleLookupType: VehicleLookupType.Vin, + vin: '1G4HR52K2XH454648', + }, + vehicleDamage: [ + VehicleDamage.WindshieldCrack, + ], + appointmentDetails: { + serviceLocation: ServiceLocation.InShop, + shopAddress: undefined, + appointmentDate: nextWeekday + }, + paymentDetails: { + paymentType: PaymentType.PayAtService + } +} + +// TODO: Add validation for deductible/covered amount +const advancedClients = ClientData.getAdvancedClients(); +const advancedScenario0023TestCases: TestCase[] = []; +for (const client of advancedClients) { + const data = { ...advancedScenario0023Data }; + data.clientTag = client.clientTag; + const tc = new TestCase({ + name: `0023a Advanced client Unlisted Vehicle: "${client.accountName}"`, + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], + testData: data + }, undefined, '0023a'); + advancedScenario0023TestCases.push(tc); +} + +export default advancedScenario0023TestCases; \ No newline at end of file From 298ede9950d87bf8eb083b53dc03e4178c710c15 Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 09:14:45 -0500 Subject: [PATCH 35/63] Fixed path to reports --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 306b818a..31de05c6 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -147,7 +147,7 @@ stages: rmdir "$dir" fi done - npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/ortoni-report + npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports ls displayName: merge_reports env: From b23cc69da1065de71d4f50922222038736534bc3 Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 09:32:07 -0500 Subject: [PATCH 36/63] Changed position of commands --- azure-pipelines-automated-testing.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 31de05c6..64168191 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -147,11 +147,8 @@ stages: rmdir "$dir" fi done - npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports ls - displayName: merge_reports - env: - PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" + displayName: move_reports - bash: | # Create container for jira writeback container_id=$(docker create \ @@ -160,11 +157,13 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ + npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && chmod +x $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") env: JIRA_API_KEY: $(JIRA_API_KEY) - displayName: publish_results_to_jira + PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" + displayName: merge_and_publish_results_to_jira # TODO: Enable later when working on PR gate # - task: PublishTestResults@2 From 1aaaa205ea2067516b3688dde5f8dcd7cbab2891 Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 09:47:45 -0500 Subject: [PATCH 37/63] Upgraded to node 20 --- Dockerfile.playwright | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.playwright b/Dockerfile.playwright index a064c31e..46a2114a 100644 --- a/Dockerfile.playwright +++ b/Dockerfile.playwright @@ -1,4 +1,4 @@ -FROM node:16 +FROM node:20 FROM mcr.microsoft.com/playwright:v1.48.0-noble From 6dd1a4e6c0740f634186c4eb507b062657c6febc Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 09:48:54 -0500 Subject: [PATCH 38/63] Attempt #24 --- azure-pipelines-automated-testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 64168191..6197bb8e 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -158,6 +158,7 @@ stages: -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && + ls && # TODO: Debug. Remove later chmod +x $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") env: From e6e479cbd21f3512f78c2df5eb26bef164681207 Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 13:56:33 -0500 Subject: [PATCH 39/63] Attempt #25 --- azure-pipelines-automated-testing.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 6197bb8e..b913f15f 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -157,9 +157,9 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ - npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && - ls && # TODO: Debug. Remove later - chmod +x $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && + npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports; + ls; # TODO: Debug. Remove later + chmod +x $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh; $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") env: JIRA_API_KEY: $(JIRA_API_KEY) From d124fe8a81a87ea3d8bedc6ada6ffb909561b910 Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 14:08:45 -0500 Subject: [PATCH 40/63] Attempt #26 --- azure-pipelines-automated-testing.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index b913f15f..ae989a2d 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -161,6 +161,14 @@ stages: ls; # TODO: Debug. Remove later chmod +x $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh; $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") + + # Start container and stream logs + echo "Starting merge" + docker start -a $container_id + + # Remove container + echo "Cleaning up container..." + docker rm $container_id env: JIRA_API_KEY: $(JIRA_API_KEY) PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" From 19c180a55cc2f26a79ac398530ec4ab62c9f0351 Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 14:17:42 -0500 Subject: [PATCH 41/63] Added removal step --- azure-pipelines-automated-testing.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index ae989a2d..f7494d9c 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -169,6 +169,9 @@ stages: # Remove container echo "Cleaning up container..." docker rm $container_id + + # TODO: REMOVE Delete all playwright containers + docker rmi $(docker images | grep "playwright-tests") env: JIRA_API_KEY: $(JIRA_API_KEY) PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" @@ -193,6 +196,10 @@ stages: targetPath: '$(System.DefaultWorkingDirectory)/ortoni-report' artifact: 'playwright-merged-report' publishLocation: 'pipeline' + - script: | + docker rmi $(dockerImageName):$(imageTag) -f + displayName: 'Cleanup Docker Image' + condition: always() - ${{ else }}: # Dev Build/Deploy From 2fe6c33497486972555b2c5f502a8ea32d687dd8 Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 14:20:51 -0500 Subject: [PATCH 42/63] Attempt #26 --- azure-pipelines-automated-testing.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index f7494d9c..072fd13c 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -157,9 +157,9 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ - npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports; - ls; # TODO: Debug. Remove later - chmod +x $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh; + npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && + ls && # TODO: Debug. Remove later + chmod +x $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") # Start container and stream logs From ff6634f31254c84eeec8cd691813b0e56e7ff15b Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 14:43:05 -0500 Subject: [PATCH 43/63] Attempt #27 --- azure-pipelines-automated-testing.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 072fd13c..dcb91312 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -157,11 +157,7 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ - npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && - ls && # TODO: Debug. Remove later - chmod +x $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh && - $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment "$(Build.SourceBranchName)" "AUTOMATED TEST RUN: $(date)" "$(System.DefaultWorkingDirectory)/ortoni-report/index.html") - + /bin/sh "npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && ls && $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"$(System.DefaultWorkingDirectory)/ortoni-report/index.html\"" # Start container and stream logs echo "Starting merge" docker start -a $container_id @@ -169,9 +165,6 @@ stages: # Remove container echo "Cleaning up container..." docker rm $container_id - - # TODO: REMOVE Delete all playwright containers - docker rmi $(docker images | grep "playwright-tests") env: JIRA_API_KEY: $(JIRA_API_KEY) PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" From 04863068b14b5a68eacf03488b13afccbd30b379 Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 14:52:04 -0500 Subject: [PATCH 44/63] Added missing paren --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index dcb91312..6b700e16 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -157,7 +157,7 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ - /bin/sh "npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && ls && $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"$(System.DefaultWorkingDirectory)/ortoni-report/index.html\"" + /bin/sh "npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && ls && $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"$(System.DefaultWorkingDirectory)/ortoni-report/index.html\"") # Start container and stream logs echo "Starting merge" docker start -a $container_id From 036d351a947c89bdf5968a0cbb6c469c2ddf7742 Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 15:02:46 -0500 Subject: [PATCH 45/63] Attempt #28 --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 6b700e16..6830898e 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -157,7 +157,7 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ - /bin/sh "npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && ls && $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"$(System.DefaultWorkingDirectory)/ortoni-report/index.html\"") + bash -c "npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && ls && $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"$(System.DefaultWorkingDirectory)/ortoni-report/index.html\"") # Start container and stream logs echo "Starting merge" docker start -a $container_id From 739432fed022a08e04249c4c98c2994b45998471 Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 15:15:46 -0500 Subject: [PATCH 46/63] Attempt #29 --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 6830898e..3158222f 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -157,7 +157,7 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ - bash -c "npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && ls && $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"$(System.DefaultWorkingDirectory)/ortoni-report/index.html\"") + bash -c "pwd && ls && ls ./playwright-reports/; npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && ls && $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"$(System.DefaultWorkingDirectory)/ortoni-report/index.html\"") # Start container and stream logs echo "Starting merge" docker start -a $container_id From de317c127fb62f902b47b6cd4244783d255d5cd2 Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 15:27:06 -0500 Subject: [PATCH 47/63] Moved tasks around --- azure-pipelines-automated-testing.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 3158222f..b568320c 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -129,14 +129,6 @@ stages: - job: download_and_merge_reports dependsOn: playwright_tests steps: - - task: Docker@2 - displayName: 'Build Docker Image' - inputs: - command: build - dockerfile: Dockerfile.playwright - repository: $(dockerImageName) - tags: $(imageTag) - arguments: '--no-cache --pull' - task: DownloadPipelineArtifact@2 inputs: targetPath: '$(System.DefaultWorkingDirectory)/playwright-reports' @@ -149,6 +141,14 @@ stages: done ls displayName: move_reports + - task: Docker@2 + displayName: 'Build Docker Image' + inputs: + command: build + dockerfile: Dockerfile.playwright + repository: $(dockerImageName) + tags: $(imageTag) + arguments: '--no-cache --pull' - bash: | # Create container for jira writeback container_id=$(docker create \ From 2d6dc6ec29ca6569765efe60af0022d9c95d0744 Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 15:39:55 -0500 Subject: [PATCH 48/63] Attempt #30 --- azure-pipelines-automated-testing.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index b568320c..0cc673c1 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -132,15 +132,15 @@ stages: - task: DownloadPipelineArtifact@2 inputs: targetPath: '$(System.DefaultWorkingDirectory)/playwright-reports' - - script: | - for dir in $(System.DefaultWorkingDirectory)/playwright-reports/*/; do - if [ -d "$dir" ]; then - mv "$dir"* $(System.DefaultWorkingDirectory)/playwright-reports/ - rmdir "$dir" - fi - done - ls - displayName: move_reports + # - script: | + # for dir in $(System.DefaultWorkingDirectory)/playwright-reports/*/; do + # if [ -d "$dir" ]; then + # mv "$dir"* $(System.DefaultWorkingDirectory)/playwright-reports/ + # rmdir "$dir" + # fi + # done + # ls + # displayName: move_reports - task: Docker@2 displayName: 'Build Docker Image' inputs: @@ -157,7 +157,12 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ - bash -c "pwd && ls && ls ./playwright-reports/; npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && ls && $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"$(System.DefaultWorkingDirectory)/ortoni-report/index.html\"") + bash -c "for dir in $(System.DefaultWorkingDirectory)/playwright-reports/*/; do + if [ -d "$dir" ]; then + mv "$dir"* $(System.DefaultWorkingDirectory)/playwright-reports/ && + rmdir "$dir" + fi + done && pwd && ls && ls ./playwright-reports/; npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && ls && $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"$(System.DefaultWorkingDirectory)/ortoni-report/index.html\"") # Start container and stream logs echo "Starting merge" docker start -a $container_id From 8a0d78e6a6aaced3a640fb9d3c12a37a29699f28 Mon Sep 17 00:00:00 2001 From: Chase King Date: Tue, 25 Feb 2025 15:55:05 -0500 Subject: [PATCH 49/63] Attempt #31 --- azure-pipelines-automated-testing.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 0cc673c1..3ea70a6a 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -157,12 +157,12 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ - bash -c "for dir in $(System.DefaultWorkingDirectory)/playwright-reports/*/; do + bash -c "for dir in ./playwright-reports/*/; do if [ -d "$dir" ]; then - mv "$dir"* $(System.DefaultWorkingDirectory)/playwright-reports/ && + mv "$dir"* ./playwright-reports/ && rmdir "$dir" fi - done && pwd && ls && ls ./playwright-reports/; npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports && ls && $(System.DefaultWorkingDirectory)/devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"$(System.DefaultWorkingDirectory)/ortoni-report/index.html\"") + done && pwd && ls && ls ./playwright-reports/; npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports && ls && ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"./ortoni-report/index.html\"") # Start container and stream logs echo "Starting merge" docker start -a $container_id From 758ab0ba8ce28ee88e87bbb09e045ff68233dc5a Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 26 Feb 2025 10:19:56 -0500 Subject: [PATCH 50/63] Attempt #32 --- azure-pipelines-automated-testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 3ea70a6a..3424cc27 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -159,10 +159,10 @@ stages: $(dockerImageName):$(imageTag) \ bash -c "for dir in ./playwright-reports/*/; do if [ -d "$dir" ]; then - mv "$dir"* ./playwright-reports/ && + mv "$dir"* . && rmdir "$dir" fi - done && pwd && ls && ls ./playwright-reports/; npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports && ls && ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"./ortoni-report/index.html\"") + done; pwd && ls && ls ./playwright-reports/; npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports && ls && ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"./ortoni-report/index.html\"") # Start container and stream logs echo "Starting merge" docker start -a $container_id From 81eedbd61ed95ed09f8f04bfd1ae6d98fc84fce2 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 26 Feb 2025 10:43:42 -0500 Subject: [PATCH 51/63] Attempt #33 --- azure-pipelines-automated-testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 3424cc27..f6536d42 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -157,9 +157,9 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ - bash -c "for dir in ./playwright-reports/*/; do + bash -c "for dir in /app/playwright-reports/*/; do if [ -d "$dir" ]; then - mv "$dir"* . && + mv "$dir"* /app/playwright-reports && rmdir "$dir" fi done; pwd && ls && ls ./playwright-reports/; npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports && ls && ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"./ortoni-report/index.html\"") From d3ab5004304f4c248dcf7aa6768f31f6559b94e4 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 26 Feb 2025 11:22:22 -0500 Subject: [PATCH 52/63] Attempt #34 --- azure-pipelines-automated-testing.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index f6536d42..a8fd8ce3 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -157,12 +157,13 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ - bash -c "for dir in /app/playwright-reports/*/; do + bash -c "echo \"Contents of /app/playwright-reports/:\" && ls /app/playwright-reports/ && echo \"Moving subfolders of playwright-reports...\" + for dir in /app/playwright-reports/*/; do if [ -d "$dir" ]; then mv "$dir"* /app/playwright-reports && rmdir "$dir" fi - done; pwd && ls && ls ./playwright-reports/; npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports && ls && ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"./ortoni-report/index.html\"") + done; echo \"Current directory:\" pwd && echo \"Contents of current dir: \" && ls && echo \"Contents of playwright-reports:\" && ls ./playwright-reports/; echo \"Merging reports...\" && npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports; ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"./ortoni-report/index.html\"") # Start container and stream logs echo "Starting merge" docker start -a $container_id From 839d13c22f9888af2970c2bb6b6c7a0e049f3d70 Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 26 Feb 2025 16:00:57 -0500 Subject: [PATCH 53/63] Attempt #35 --- azure-pipelines-automated-testing.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index a8fd8ce3..ef902703 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -157,13 +157,8 @@ stages: -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ - bash -c "echo \"Contents of /app/playwright-reports/:\" && ls /app/playwright-reports/ && echo \"Moving subfolders of playwright-reports...\" - for dir in /app/playwright-reports/*/; do - if [ -d "$dir" ]; then - mv "$dir"* /app/playwright-reports && - rmdir "$dir" - fi - done; echo \"Current directory:\" pwd && echo \"Contents of current dir: \" && ls && echo \"Contents of playwright-reports:\" && ls ./playwright-reports/; echo \"Merging reports...\" && npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports; ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"./ortoni-report/index.html\"") + bash -c "echo \"Contents of /app/playwright-reports/:\" && ls /app/playwright-reports/ && echo \"Moving subfolders of playwright-reports...\" && + find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \;; echo \"Current directory:\" && pwd && echo \"Contents of current dir: \" && ls && echo \"Contents of playwright-reports:\" && ls ./playwright-reports/; echo \"Merging reports...\" && npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports; ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"./ortoni-report/index.html\"") # Start container and stream logs echo "Starting merge" docker start -a $container_id From 719890969a100901c806898d6ddef9ed2a761d9e Mon Sep 17 00:00:00 2001 From: Chase King Date: Wed, 26 Feb 2025 16:18:09 -0500 Subject: [PATCH 54/63] Attempt #36 --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index ef902703..ee4e1a64 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -158,7 +158,7 @@ stages: -e JIRA_API_KEY=$(JIRA_API_KEY) \ $(dockerImageName):$(imageTag) \ bash -c "echo \"Contents of /app/playwright-reports/:\" && ls /app/playwright-reports/ && echo \"Moving subfolders of playwright-reports...\" && - find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \;; echo \"Current directory:\" && pwd && echo \"Contents of current dir: \" && ls && echo \"Contents of playwright-reports:\" && ls ./playwright-reports/; echo \"Merging reports...\" && npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports; ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"./ortoni-report/index.html\"") + find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \;; echo \"Current directory:\" && pwd && echo \"Contents of current dir: \" && ls && echo \"Contents of playwright-reports:\" && ls ./playwright-reports/; echo \"Merging reports...\" && npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports; echo \"Contents of current dir: \" && ls && echo \"Contents of playwright-reports:\" && ls && ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"./ortoni-report/index.html\"") # Start container and stream logs echo "Starting merge" docker start -a $container_id From b0fe3c7e29d526fe886b04b9eb43526032158c4c Mon Sep 17 00:00:00 2001 From: Chase King Date: Thu, 27 Feb 2025 11:29:06 -0500 Subject: [PATCH 55/63] Attempt #37 --- azure-pipelines-automated-testing.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index ee4e1a64..230355d7 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -156,13 +156,23 @@ stages: -e JIRA_SERVER=$(JIRA_SERVER) \ -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ + -e PLAYWRIGHT_JUNIT_OUTPUT_FILE=$(PLAYWRIGHT_JUNIT_OUTPUT_FILE) \ $(dockerImageName):$(imageTag) \ bash -c "echo \"Contents of /app/playwright-reports/:\" && ls /app/playwright-reports/ && echo \"Moving subfolders of playwright-reports...\" && - find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \;; echo \"Current directory:\" && pwd && echo \"Contents of current dir: \" && ls && echo \"Contents of playwright-reports:\" && ls ./playwright-reports/; echo \"Merging reports...\" && npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports; echo \"Contents of current dir: \" && ls && echo \"Contents of playwright-reports:\" && ls && ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" \"AUTOMATED TEST RUN: $(date)\" \"./ortoni-report/index.html\"") + find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \;; echo \"Current directory:\" && pwd && echo \"Contents of current dir: \" && ls && echo \"Contents of playwright-reports:\" && ls ./playwright-reports/; echo \"Merging reports...\" && npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports; echo \"Contents of current dir: \" && ls && echo \"Contents of playwright-reports:\" && ls && ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" /app/ortoni-report/index.html \"AUTOMATED TEST RUN: $(date)\"") # Start container and stream logs echo "Starting merge" docker start -a $container_id + # Create directory for test results + echo "Creating test results directory..." + mkdir -p $(System.DefaultWorkingDirectory)/ortoni-report + + # Copy test results from container + echo "Copying test results..." + docker cp $container_id:/app/ortoni-report/. $(System.DefaultWorkingDirectory)/ortoni-report + # TODO: Update to include junit results if necessary + # Remove container echo "Cleaning up container..." docker rm $container_id From e49152c990813c1438905ad19c74d5a017f54b51 Mon Sep 17 00:00:00 2001 From: Chase King Date: Thu, 27 Feb 2025 12:58:00 -0500 Subject: [PATCH 56/63] Attempt #38 --- azure-pipelines-automated-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index 230355d7..af19f67b 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -159,7 +159,7 @@ stages: -e PLAYWRIGHT_JUNIT_OUTPUT_FILE=$(PLAYWRIGHT_JUNIT_OUTPUT_FILE) \ $(dockerImageName):$(imageTag) \ bash -c "echo \"Contents of /app/playwright-reports/:\" && ls /app/playwright-reports/ && echo \"Moving subfolders of playwright-reports...\" && - find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \;; echo \"Current directory:\" && pwd && echo \"Contents of current dir: \" && ls && echo \"Contents of playwright-reports:\" && ls ./playwright-reports/; echo \"Merging reports...\" && npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports; echo \"Contents of current dir: \" && ls && echo \"Contents of playwright-reports:\" && ls && ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" /app/ortoni-report/index.html \"AUTOMATED TEST RUN: $(date)\"") + find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \;; echo \"Current directory:\" && pwd && echo \"Contents of current dir: \" && ls && echo \"Contents of playwright-reports:\" && ls ./playwright-reports/; echo \"Merging reports...\" && npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports; echo \"Contents of current dir: \" && ls && echo \"Contents of ortoni-report:\" && ls ./ortoni-report && ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" /app/ortoni-report/ortoni-report.html \"AUTOMATED TEST RUN: $(date)\"") # Start container and stream logs echo "Starting merge" docker start -a $container_id From 131a47ebd62340246bdec026cacbd36c175a4190 Mon Sep 17 00:00:00 2001 From: Chase King Date: Thu, 27 Feb 2025 14:58:07 -0500 Subject: [PATCH 57/63] Added a message to Jira report --- azure-pipelines-automated-testing.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index af19f67b..a1503a3c 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -158,8 +158,17 @@ stages: -e JIRA_API_KEY=$(JIRA_API_KEY) \ -e PLAYWRIGHT_JUNIT_OUTPUT_FILE=$(PLAYWRIGHT_JUNIT_OUTPUT_FILE) \ $(dockerImageName):$(imageTag) \ - bash -c "echo \"Contents of /app/playwright-reports/:\" && ls /app/playwright-reports/ && echo \"Moving subfolders of playwright-reports...\" && - find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \;; echo \"Current directory:\" && pwd && echo \"Contents of current dir: \" && ls && echo \"Contents of playwright-reports:\" && ls ./playwright-reports/; echo \"Merging reports...\" && npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports; echo \"Contents of current dir: \" && ls && echo \"Contents of ortoni-report:\" && ls ./ortoni-report && ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" /app/ortoni-report/ortoni-report.html \"AUTOMATED TEST RUN: $(date)\"") + bash -c "echo \"Moving Playwright reports out of subfolders...\" && + find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; && + echo \"Merging reports...\" && + PLAYWRIGHT_JUNIT_OUTPUT_FILE=$PLAYWRIGHT_JUNIT_OUTPUT_FILE npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports + num_failures=$(sed -n 's/.*failures="\([^"]*\)".*/\1/p' $PLAYWRIGHT_JUNIT_OUTPUT_FILE | head -n 1) + echo \"Number of test failures: '$num_failures'\" + (($num_failures == 0)) && jira_message='Playwright tests passed! ✅' || jira_message=\"$num_failures Playwright tests failed. ❌\" + echo \"Contents of ortoni-report:\" && ls ./ortoni-report && + echo \"Writing report to Jira card '$(Build.SourceBranchName)'...\" && + ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" /app/ortoni-report/ortoni-report.html \"AUTOMATED TEST RUN: $(date)\" \"$jira_message\" ") + # Start container and stream logs echo "Starting merge" docker start -a $container_id @@ -171,6 +180,7 @@ stages: # Copy test results from container echo "Copying test results..." docker cp $container_id:/app/ortoni-report/. $(System.DefaultWorkingDirectory)/ortoni-report + docker cp $container_id:/app/junit-results.xml $(System.DefaultWorkingDirectory) # TODO: Update to include junit results if necessary # Remove container @@ -178,7 +188,7 @@ stages: docker rm $container_id env: JIRA_API_KEY: $(JIRA_API_KEY) - PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" + PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/junit_results.xml" displayName: merge_and_publish_results_to_jira # TODO: Enable later when working on PR gate @@ -187,7 +197,7 @@ stages: # inputs: # searchFolder: 'test-results' # testResultsFormat: 'JUnit' - # testResultsFiles: 'results.xml' + # testResultsFiles: 'junit_results.xml' # mergeTestResults: true # failTaskOnFailedTests: false # testRunTitle: 'Playwright Tests' From 86009a7c075315fb9dadd61c74b98b6b348a890e Mon Sep 17 00:00:00 2001 From: Chase King Date: Thu, 27 Feb 2025 15:30:16 -0500 Subject: [PATCH 58/63] Attempt #39 --- azure-pipelines-automated-testing.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index a1503a3c..b118c19a 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -161,10 +161,10 @@ stages: bash -c "echo \"Moving Playwright reports out of subfolders...\" && find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; && echo \"Merging reports...\" && - PLAYWRIGHT_JUNIT_OUTPUT_FILE=$PLAYWRIGHT_JUNIT_OUTPUT_FILE npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports - num_failures=$(sed -n 's/.*failures="\([^"]*\)".*/\1/p' $PLAYWRIGHT_JUNIT_OUTPUT_FILE | head -n 1) + PLAYWRIGHT_JUNIT_OUTPUT_FILE=$(PLAYWRIGHT_JUNIT_OUTPUT_FILE) npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports + num_failures=$(sed -n 's/.*failures="\([^"]*\)".*/\1/p' "/app/$PLAYWRIGHT_JUNIT_OUTPUT_FILE" | head -n 1) echo \"Number of test failures: '$num_failures'\" - (($num_failures == 0)) && jira_message='Playwright tests passed! ✅' || jira_message=\"$num_failures Playwright tests failed. ❌\" + (($num_failures -eq 0)) && jira_message='Playwright tests passed!' || jira_message=\"$num_failures Playwright tests failed.\" echo \"Contents of ortoni-report:\" && ls ./ortoni-report && echo \"Writing report to Jira card '$(Build.SourceBranchName)'...\" && ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" /app/ortoni-report/ortoni-report.html \"AUTOMATED TEST RUN: $(date)\" \"$jira_message\" ") @@ -180,7 +180,7 @@ stages: # Copy test results from container echo "Copying test results..." docker cp $container_id:/app/ortoni-report/. $(System.DefaultWorkingDirectory)/ortoni-report - docker cp $container_id:/app/junit-results.xml $(System.DefaultWorkingDirectory) + docker cp $container_id:/app/$(PLAYWRIGHT_JUNIT_OUTPUT_FILE) $(System.DefaultWorkingDirectory) # TODO: Update to include junit results if necessary # Remove container From 7e64e0eee4b12598025c037e53c8d8e321c6fbfa Mon Sep 17 00:00:00 2001 From: Chase King Date: Thu, 27 Feb 2025 16:05:14 -0500 Subject: [PATCH 59/63] Updated reporter config --- .gitignore | 1 + azure-pipelines-automated-testing.yml | 8 +++----- playwright-tests/playwright.config.ts | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index c859f2d5..57ddef5d 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ pnpm-debug.log* # Playwright /test-results/ +/ortoni-report/ /playwright-report/ /blob-report/ /playwright/.cache/ diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index b118c19a..a4469639 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -156,13 +156,12 @@ stages: -e JIRA_SERVER=$(JIRA_SERVER) \ -e JIRA_USERNAME=$(JIRA_USERNAME) \ -e JIRA_API_KEY=$(JIRA_API_KEY) \ - -e PLAYWRIGHT_JUNIT_OUTPUT_FILE=$(PLAYWRIGHT_JUNIT_OUTPUT_FILE) \ $(dockerImageName):$(imageTag) \ bash -c "echo \"Moving Playwright reports out of subfolders...\" && find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; && echo \"Merging reports...\" && - PLAYWRIGHT_JUNIT_OUTPUT_FILE=$(PLAYWRIGHT_JUNIT_OUTPUT_FILE) npx playwright merge-reports --reporter=ortoni-report,junit ./playwright-reports - num_failures=$(sed -n 's/.*failures="\([^"]*\)".*/\1/p' "/app/$PLAYWRIGHT_JUNIT_OUTPUT_FILE" | head -n 1) + npx playwright merge-reports --config=playwright-tests/playwright.config.ts ./playwright-reports + num_failures=$(sed -n 's/.*failures="\([^"]*\)".*/\1/p' /app/test-results/junit_results.xml | head -n 1) echo \"Number of test failures: '$num_failures'\" (($num_failures -eq 0)) && jira_message='Playwright tests passed!' || jira_message=\"$num_failures Playwright tests failed.\" echo \"Contents of ortoni-report:\" && ls ./ortoni-report && @@ -180,7 +179,7 @@ stages: # Copy test results from container echo "Copying test results..." docker cp $container_id:/app/ortoni-report/. $(System.DefaultWorkingDirectory)/ortoni-report - docker cp $container_id:/app/$(PLAYWRIGHT_JUNIT_OUTPUT_FILE) $(System.DefaultWorkingDirectory) + docker cp $container_id:/app/test-results/junit_results.xml $(System.DefaultWorkingDirectory) # TODO: Update to include junit results if necessary # Remove container @@ -188,7 +187,6 @@ stages: docker rm $container_id env: JIRA_API_KEY: $(JIRA_API_KEY) - PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/junit_results.xml" displayName: merge_and_publish_results_to_jira # TODO: Enable later when working on PR gate diff --git a/playwright-tests/playwright.config.ts b/playwright-tests/playwright.config.ts index 59a42657..bb5e6134 100644 --- a/playwright-tests/playwright.config.ts +++ b/playwright-tests/playwright.config.ts @@ -28,7 +28,7 @@ if (!process.env.CI) { const reportConfig: OrtoniReportConfig = { port: 1994, open: "never", - folderPath: "test-results", + folderPath: "ortoni-report", filename: "index.html", logo: "../business-logic/data/logo.png", title: "Test Report", @@ -55,7 +55,7 @@ export default defineConfig({ /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: [ ['ortoni-report', reportConfig], - ['junit'], + ['junit', {outputFile: '../test-results/junit_results.xml'}], ['list'] ], timeout: 240_000, From f246351b837db06e7bcde3dd90906e1f29aaab0b Mon Sep 17 00:00:00 2001 From: Chase King Date: Fri, 28 Feb 2025 14:52:37 -0500 Subject: [PATCH 60/63] Fixed to work the previous way --- azure-pipelines-automated-testing.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml index a4469639..bed6c877 100644 --- a/azure-pipelines-automated-testing.yml +++ b/azure-pipelines-automated-testing.yml @@ -160,13 +160,15 @@ stages: bash -c "echo \"Moving Playwright reports out of subfolders...\" && find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; && echo \"Merging reports...\" && - npx playwright merge-reports --config=playwright-tests/playwright.config.ts ./playwright-reports - num_failures=$(sed -n 's/.*failures="\([^"]*\)".*/\1/p' /app/test-results/junit_results.xml | head -n 1) - echo \"Number of test failures: '$num_failures'\" - (($num_failures -eq 0)) && jira_message='Playwright tests passed!' || jira_message=\"$num_failures Playwright tests failed.\" + npx playwright merge-reports --reporter=ortoni-report ./playwright-reports + # npx playwright merge-reports --config=playwright-tests/playwright.config.ts ./playwright-reports + # num_failures=$(sed -n 's/.*failures="\([^"]*\)".*/\1/p' /app/test-results/junit_results.xml | head -n 1) + # echo \"Number of test failures: '$num_failures'\" + # (($num_failures -eq 0)) && jira_message='Playwright tests passed!' || jira_message=\"$num_failures Playwright tests failed.\" + # TODO: Update to include test status message later echo \"Contents of ortoni-report:\" && ls ./ortoni-report && echo \"Writing report to Jira card '$(Build.SourceBranchName)'...\" && - ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" /app/ortoni-report/ortoni-report.html \"AUTOMATED TEST RUN: $(date)\" \"$jira_message\" ") + ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" /app/ortoni-report/ortoni-report.html \"AUTOMATED TEST RUN: $(date)\" ") # Start container and stream logs echo "Starting merge" @@ -179,7 +181,7 @@ stages: # Copy test results from container echo "Copying test results..." docker cp $container_id:/app/ortoni-report/. $(System.DefaultWorkingDirectory)/ortoni-report - docker cp $container_id:/app/test-results/junit_results.xml $(System.DefaultWorkingDirectory) + # docker cp $container_id:/app/test-results/junit_results.xml $(System.DefaultWorkingDirectory) # TODO: Update to include junit results if necessary # Remove container From 4aa67e43db1bbecec5e25b7c73b6808c1a077e12 Mon Sep 17 00:00:00 2001 From: Chase King Date: Fri, 28 Feb 2025 15:13:24 -0500 Subject: [PATCH 61/63] Moved changes to main pipeline --- azure-pipelines-automated-testing.yml | 475 -------------------------- azure-pipelines.yml | 91 +++-- 2 files changed, 64 insertions(+), 502 deletions(-) delete mode 100644 azure-pipelines-automated-testing.yml diff --git a/azure-pipelines-automated-testing.yml b/azure-pipelines-automated-testing.yml deleted file mode 100644 index bed6c877..00000000 --- a/azure-pipelines-automated-testing.yml +++ /dev/null @@ -1,475 +0,0 @@ -trigger: - branches: - include: [ develop, release/* ] - paths: - exclude: - - deployment/* - include: - - "*" -pr: - branches: - include: [ '*' ] - paths: - exclude: - - deployment/* - include: - - "*" - -resources: - containers: - - container: node - image: packagerepository.sagaws.net:8082/safelite/node-build:18 - - container: awscli - image: packagerepository.sagaws.net:8082/safelite/awscli2-build:3.9 - repositories: - - repository: AzureDevOps - type: github - name: Safelite/AzureDevOps - endpoint: Safelite - ref: refs/tags/t5.5.40 - -variables: - - group: Digital-Infrastructure - - group: ISS-BuildBranches - - name: dockerImageName - value: 'playwright-tests' - - name: imageTag - value: '$(Build.BuildId)' - - name: totalShards - value: 40 # TODO: Temporarily changed to 40, change back to 4 - -stages: - # PR's - - ${{ if or(eq(variables['Build.Reason'], 'PullRequest'), eq(1,1)) }}: # TODO: Temporarily changed to always be true, change back - # TODO: Temporarily commented out - - stage: TestPr - displayName: Run Tests For PullRequest - jobs: - # - template: templates/digital/vue-jest-run-unit-tests.yml@AzureDevOps - # parameters: - # nodeContainer: node - # npmLocation: $(Build.SourcesDirectory) - # testResultsFile: junit.xml - # summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml - - job: playwright_tests - continueOnError: true - strategy: - matrix: - shard1: - shardNumber: 1 - shard2: - shardNumber: 2 - shard3: - shardNumber: 3 - shard4: - shardNumber: 4 - - steps: - - task: Docker@2 - displayName: 'Build Docker Image' - inputs: - command: build - dockerfile: Dockerfile.playwright - repository: $(dockerImageName) - tags: $(imageTag) - arguments: '--no-cache --pull' - - - script: | - # Create container and run tests - container_id=$(docker create \ - --ipc=host \ - -e CCIS_API_AUTH=$(CCIS_API_AUTH) \ - -e BASE_URL=$(BASE_URL) \ - -e CCIS_API_URL=$(CCIS_API_URL) \ - -e ADMIN_SERVICE_API_URL=$(ADMIN_SERVICE_API_URL) \ - -e SHARD=$(shardNumber) \ - -e CI=true \ - -e NODE_ENV=$(NODE_ENV) \ - $(dockerImageName):$(imageTag) \ - 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 \"@smoke | @Advanced\"") - - # Start container and stream logs - echo "Starting tests for shard $(shardNumber)..." - docker start -a $container_id - - # Create directory for test results - echo "Creating test results directory..." - mkdir -p $(System.DefaultWorkingDirectory)/blob-reports/shard-$(shardNumber) - - # Copy test results from container - echo "Copying test results..." - docker cp $container_id:/app/blob-report/. $(System.DefaultWorkingDirectory)/blob-reports/shard-$(shardNumber)/ - - # Remove container - echo "Cleaning up container..." - docker rm $container_id - - # Check if tests failed - if [ $? -ne 0 ]; then - echo "Tests failed in shard $(shardNumber)!" - exit 1 - fi - displayName: 'Run Playwright Tests - Shard $(shardNumber)' - - - task: PublishPipelineArtifact@1 - displayName: 'Publish Test Reports - Shard $(shardNumber)' - condition: always() - inputs: - targetPath: '$(System.DefaultWorkingDirectory)/blob-reports/shard-$(shardNumber)' - artifact: 'playwright-report-shard-$(shardNumber)' - publishLocation: 'pipeline' - - - script: | - docker rmi $(dockerImageName):$(imageTag) -f - displayName: 'Cleanup Docker Image' - condition: always() - - - job: download_and_merge_reports - dependsOn: playwright_tests - steps: - - task: DownloadPipelineArtifact@2 - inputs: - targetPath: '$(System.DefaultWorkingDirectory)/playwright-reports' - # - script: | - # for dir in $(System.DefaultWorkingDirectory)/playwright-reports/*/; do - # if [ -d "$dir" ]; then - # mv "$dir"* $(System.DefaultWorkingDirectory)/playwright-reports/ - # rmdir "$dir" - # fi - # done - # ls - # displayName: move_reports - - task: Docker@2 - displayName: 'Build Docker Image' - inputs: - command: build - dockerfile: Dockerfile.playwright - repository: $(dockerImageName) - tags: $(imageTag) - arguments: '--no-cache --pull' - - bash: | - # Create container for jira writeback - container_id=$(docker create \ - --ipc=host \ - -e JIRA_SERVER=$(JIRA_SERVER) \ - -e JIRA_USERNAME=$(JIRA_USERNAME) \ - -e JIRA_API_KEY=$(JIRA_API_KEY) \ - $(dockerImageName):$(imageTag) \ - bash -c "echo \"Moving Playwright reports out of subfolders...\" && - find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; && - echo \"Merging reports...\" && - npx playwright merge-reports --reporter=ortoni-report ./playwright-reports - # npx playwright merge-reports --config=playwright-tests/playwright.config.ts ./playwright-reports - # num_failures=$(sed -n 's/.*failures="\([^"]*\)".*/\1/p' /app/test-results/junit_results.xml | head -n 1) - # echo \"Number of test failures: '$num_failures'\" - # (($num_failures -eq 0)) && jira_message='Playwright tests passed!' || jira_message=\"$num_failures Playwright tests failed.\" - # TODO: Update to include test status message later - echo \"Contents of ortoni-report:\" && ls ./ortoni-report && - echo \"Writing report to Jira card '$(Build.SourceBranchName)'...\" && - ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" /app/ortoni-report/ortoni-report.html \"AUTOMATED TEST RUN: $(date)\" ") - - # Start container and stream logs - echo "Starting merge" - docker start -a $container_id - - # Create directory for test results - echo "Creating test results directory..." - mkdir -p $(System.DefaultWorkingDirectory)/ortoni-report - - # Copy test results from container - echo "Copying test results..." - docker cp $container_id:/app/ortoni-report/. $(System.DefaultWorkingDirectory)/ortoni-report - # docker cp $container_id:/app/test-results/junit_results.xml $(System.DefaultWorkingDirectory) - # TODO: Update to include junit results if necessary - - # Remove container - echo "Cleaning up container..." - docker rm $container_id - env: - JIRA_API_KEY: $(JIRA_API_KEY) - displayName: merge_and_publish_results_to_jira - - # TODO: Enable later when working on PR gate - # - task: PublishTestResults@2 - # displayName: 'Publish test results' - # inputs: - # searchFolder: 'test-results' - # testResultsFormat: 'JUnit' - # testResultsFiles: 'junit_results.xml' - # mergeTestResults: true - # failTaskOnFailedTests: false - # testRunTitle: 'Playwright Tests' - # condition: succeededOrFailed() - - - task: PublishPipelineArtifact@1 - displayName: 'Publish Merged Report' - condition: always() - inputs: - targetPath: '$(System.DefaultWorkingDirectory)/ortoni-report' - artifact: 'playwright-merged-report' - publishLocation: 'pipeline' - - script: | - docker rmi $(dockerImageName):$(imageTag) -f - displayName: 'Cleanup Docker Image' - condition: always() - - - ${{ else }}: - # Dev Build/Deploy - - stage: Dev - condition: eq(variables['Build.SourceBranch'], variables['dev-branch'] ) - variables: - - group: ISS-Dev - jobs: - - deployment: devBuildDeployment - displayName: Build and Deploy ISS - Dev - environment: digitalCloud-dev - container: node - workspace: - clean: all - strategy: - runOnce: - deploy: - steps: - - checkout: self - clean: true - - task: CopyFiles@2 - inputs: - SourceFolder: 'public/apple-pay/dev' - Contents: '**' - TargetFolder: 'public/.well-known' - CleanTargetFolder: true - - task: DeleteFiles@1 - inputs: - SourceFolder: 'public/apple-pay' - Contents: '**' - RemoveSourceFolder: true - - template: templates/digital/step-build-vue.yml@AzureDevOps - parameters: - buildOutputDir: dist - environment: Dev - - template: templates/digital/step-deploy-vue.yml@AzureDevOps - parameters: - artifactName: vueDistDev - awsProfile: $(devDeploymentProfile) - deployBuckets: - safelite-dev-iss-us-east-2: - clearFolder: true - deployFolder: '' - region: us-east-2 - safelite-dev-iss-us-east-1: - clearFolder: true - deployFolder: '' - region: us-east-1 - appDeployVariables: - __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) - __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) - __VUE_APP_CUSTOMER_PORTAL_URL__: $(__VUE_APP_CUSTOMER_PORTAL_URL__) - __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) - __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) - indexDeployVariables: - __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) - __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) - __VUE_APP_GOOGLE_MAPS_API_SCRIPT__: $(__VUE_APP_GOOGLE_MAPS_API_SCRIPT__) - - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps - parameters: - awsCliContainer: awscli - distributionId: $(cfDistributionId) - paths: /* - awsProfile: $(devDeploymentProfile) - - # Test Build/Deploy - - stage: Test - condition: eq(variables['Build.SourceBranch'], variables['test-branch'] ) - variables: - - group: ISS-Test - jobs: - - deployment: testBuildDeployment - displayName: Build and Deploy ISS - Test - environment: NoApproval-All - container: node - workspace: - clean: all - strategy: - runOnce: - deploy: - steps: - - checkout: self - clean: true - - task: CopyFiles@2 - inputs: - SourceFolder: 'public/apple-pay/test' - Contents: '**' - TargetFolder: 'public/.well-known' - CleanTargetFolder: true - - task: DeleteFiles@1 - inputs: - SourceFolder: 'public/apple-pay' - Contents: '**' - RemoveSourceFolder: true - - template: templates/digital/step-build-vue.yml@AzureDevOps - parameters: - buildOutputDir: dist - environment: Test - - template: templates/digital/step-deploy-vue.yml@AzureDevOps - parameters: - artifactName: vueDistTest - awsProfile: $(sysDeploymentProfile) - deployBuckets: - safelite-sys-iss-us-east-1: - clearFolder: true - deployFolder: "" - region: us-east-1 - safelite-sys-iss-us-east-2: - clearFolder: true - deployFolder: "" - region: us-east-2 - appDeployVariables: - __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) - __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) - __VUE_APP_CUSTOMER_PORTAL_URL__: $(__VUE_APP_CUSTOMER_PORTAL_URL__) - __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) - __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) - indexDeployVariables: - __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) - __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) - __VUE_APP_GOOGLE_MAPS_API_SCRIPT__: $(__VUE_APP_GOOGLE_MAPS_API_SCRIPT__) - - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps - parameters: - awsCliContainer: awscli - distributionId: $(cfDistributionId) - paths: /* - awsProfile: $(sysDeploymentProfile) - - # QA Build/Deploy - - stage: QA - condition: eq(variables['Build.SourceBranch'], variables['qa-branch'] ) - variables: - - group: ISS-QA - jobs: - - deployment: qaBuildDeployment - displayName: Build and Deploy ISS - QA - environment: NoApproval-All - container: node - workspace: - clean: all - strategy: - runOnce: - deploy: - steps: - - checkout: self - clean: true - - task: CopyFiles@2 - inputs: - SourceFolder: 'public/apple-pay/qa' - Contents: '**' - TargetFolder: 'public/.well-known' - CleanTargetFolder: true - - task: DeleteFiles@1 - inputs: - SourceFolder: 'public/apple-pay' - Contents: '**' - RemoveSourceFolder: true - - template: templates/digital/step-build-vue.yml@AzureDevOps - parameters: - buildOutputDir: dist - environment: Qa - - template: templates/digital/step-deploy-vue.yml@AzureDevOps - parameters: - artifactName: vueDistQa - awsProfile: $(qaDeploymentProfile) - deployBuckets: - safelite-qa-iss-us-east-1: - clearFolder: true - deployFolder: "" - region: us-east-1 - safelite-qa-iss-us-east-2: - clearFolder: true - deployFolder: "" - region: us-east-2 - appDeployVariables: - __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) - __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) - __VUE_APP_CUSTOMER_PORTAL_URL__: $(__VUE_APP_CUSTOMER_PORTAL_URL__) - __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) - __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) - indexDeployVariables: - __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) - __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) - __VUE_APP_GOOGLE_MAPS_API_SCRIPT__: $(__VUE_APP_GOOGLE_MAPS_API_SCRIPT__) - - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps - parameters: - awsCliContainer: awscli - distributionId: $(cfDistributionId) - paths: /* - awsProfile: $(qaDeploymentProfile) - - # Prod Build/Deploy - - stage: Prod - condition: succeeded('QA') - variables: - - group: ISS-Prod - jobs: - - deployment: prodBuildDeployment - displayName: Build and Deploy ISS - Prod - environment: digitalCloud-prod - container: node - workspace: - clean: all - strategy: - runOnce: - deploy: - steps: - - checkout: self - clean: true - - task: CopyFiles@2 - inputs: - SourceFolder: 'public/apple-pay/prod' - Contents: '**' - TargetFolder: 'public/.well-known' - CleanTargetFolder: true - - task: DeleteFiles@1 - inputs: - SourceFolder: 'public/apple-pay' - Contents: '**' - RemoveSourceFolder: true - - template: templates/digital/step-build-vue.yml@AzureDevOps - parameters: - buildOutputDir: dist - environment: Prod - - template: templates/digital/step-deploy-vue.yml@AzureDevOps - parameters: - artifactName: vueDistProd - awsProfile: $(prodDeploymentProfile) - deployBuckets: - safelite-prod-iss-us-east-1: - clearFolder: true - deployFolder: "" - region: us-east-1 - safelite-prod-iss-us-east-2: - clearFolder: true - deployFolder: "" - region: us-east-2 - appDeployVariables: - __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) - __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) - __VUE_APP_CUSTOMER_PORTAL_URL__: $(__VUE_APP_CUSTOMER_PORTAL_URL__) - __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) - __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) - indexDeployVariables: - __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) - __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) - __VUE_APP_GOOGLE_MAPS_API_SCRIPT__: $(__VUE_APP_GOOGLE_MAPS_API_SCRIPT__) - - template: templates/digital/invalidate-cloudfront-cache.yml@AzureDevOps - parameters: - awsCliContainer: awscli - distributionId: $(cfDistributionId) - paths: /* - awsProfile: $(prodDeploymentProfile) - - template: templates/digital/auto-tag.yml@AzureDevOps - parameters: - dependsOn: prodBuildDeployment - userName: SafeliteAzureDevops - userEmail: githubazuredevops@safelite.com - diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cedebb5b..6bddeece 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -90,7 +90,6 @@ stages: "npx wait-on http://localhost:8080 && npm run test:playwright -- --shard=$(shardNumber)/$(totalShards) --reporter=list,blob --grep \"@smoke | @Advanced\"") # Start container and stream logs - echo "Starting tests for shard $(shardNumber)..." docker start -a $container_id @@ -127,26 +126,60 @@ stages: condition: always() - job: download_and_merge_reports - container: - image: mcr.microsoft.com/playwright:v1.48.0-noble dependsOn: playwright_tests steps: - - task: DownloadPipelineArtifact@2 - inputs: - targetPath: '$(System.DefaultWorkingDirectory)/playwright-reports' - - script: | - npm i ortoni-report && - for dir in $(System.DefaultWorkingDirectory)/playwright-reports/*/; do - if [ -d "$dir" ]; then - mv "$dir"* $(System.DefaultWorkingDirectory)/playwright-reports/ - rmdir "$dir" - fi - done - npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports - ls - displayName: merge_reports - env: - PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" + - task: DownloadPipelineArtifact@2 + inputs: + targetPath: '$(System.DefaultWorkingDirectory)/playwright-reports' + - task: Docker@2 + displayName: 'Build Docker Image' + inputs: + command: build + dockerfile: Dockerfile.playwright + repository: $(dockerImageName) + tags: $(imageTag) + arguments: '--no-cache --pull' + - bash: | + # Create container for jira writeback + container_id=$(docker create \ + --ipc=host \ + -e JIRA_SERVER=$(JIRA_SERVER) \ + -e JIRA_USERNAME=$(JIRA_USERNAME) \ + -e JIRA_API_KEY=$(JIRA_API_KEY) \ + $(dockerImageName):$(imageTag) \ + bash -c "echo \"Moving Playwright reports out of subfolders...\" && + find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; && + echo \"Merging reports...\" && + npx playwright merge-reports --reporter=ortoni-report ./playwright-reports + # npx playwright merge-reports --config=playwright-tests/playwright.config.ts ./playwright-reports + # num_failures=$(sed -n 's/.*failures="\([^"]*\)".*/\1/p' /app/test-results/junit_results.xml | head -n 1) + # echo \"Number of test failures: '$num_failures'\" + # (($num_failures -eq 0)) && jira_message='Playwright tests passed!' || jira_message=\"$num_failures Playwright tests failed.\" + # TODO: Update to include test status message later + echo \"Contents of ortoni-report:\" && ls ./ortoni-report && + echo \"Writing report to Jira card '$(Build.SourceBranchName)'...\" && + ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" /app/ortoni-report/ortoni-report.html \"AUTOMATED TEST RUN: $(date)\" ") + + # Start container and stream logs + echo "Starting merge" + docker start -a $container_id + + # Create directory for test results + echo "Creating test results directory..." + mkdir -p $(System.DefaultWorkingDirectory)/ortoni-report + + # Copy test results from container + echo "Copying test results..." + docker cp $container_id:/app/ortoni-report/. $(System.DefaultWorkingDirectory)/ortoni-report + # docker cp $container_id:/app/test-results/junit_results.xml $(System.DefaultWorkingDirectory) + # TODO: Update to include junit results if necessary + + # Remove container + echo "Cleaning up container..." + docker rm $container_id + env: + JIRA_API_KEY: $(JIRA_API_KEY) + displayName: merge_and_publish_results_to_jira # TODO: Enable later when working on PR gate # - task: PublishTestResults@2 @@ -154,19 +187,23 @@ stages: # inputs: # searchFolder: 'test-results' # testResultsFormat: 'JUnit' - # testResultsFiles: 'results.xml' + # testResultsFiles: 'junit_results.xml' # mergeTestResults: true # failTaskOnFailedTests: false # testRunTitle: 'Playwright Tests' # condition: succeededOrFailed() - - task: PublishPipelineArtifact@1 - displayName: 'Publish Merged Report' - condition: always() - inputs: - targetPath: '$(System.DefaultWorkingDirectory)/ortoni-report' - artifact: 'playwright-merged-report' - publishLocation: 'pipeline' + - task: PublishPipelineArtifact@1 + displayName: 'Publish Merged Report' + condition: always() + inputs: + targetPath: '$(System.DefaultWorkingDirectory)/ortoni-report' + artifact: 'playwright-merged-report' + publishLocation: 'pipeline' + - script: | + docker rmi $(dockerImageName):$(imageTag) -f + displayName: 'Cleanup Docker Image' + condition: always() - ${{ else }}: # Dev Build/Deploy From f664515c4635268447da5f7b1a98ca0e4cc70786 Mon Sep 17 00:00:00 2001 From: Siraj Shaik Date: Tue, 4 Mar 2025 16:21:08 -0500 Subject: [PATCH 62/63] Scenario 0024a is added --- .../business-logic/data/MockPolicyData.ts | 3 +- .../business-logic/types/ITestData.ts | 1 + .../business-logic/types/TestCase.ts | 4 +- playwright-tests/tests/0000__M.test.ts | 21 ++++- .../0024a_VehicleByVINUnverifiedBailout.ts | 83 +++++++++++++++++++ 5 files changed, 107 insertions(+), 5 deletions(-) create mode 100644 playwright-tests/tests/advanced/0024a_VehicleByVINUnverifiedBailout.ts diff --git a/playwright-tests/business-logic/data/MockPolicyData.ts b/playwright-tests/business-logic/data/MockPolicyData.ts index 9d041e95..213ca961 100644 --- a/playwright-tests/business-logic/data/MockPolicyData.ts +++ b/playwright-tests/business-logic/data/MockPolicyData.ts @@ -24,7 +24,8 @@ const policySoapByScenario: { [x: string]: string } = { '0020a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-01-13T18:01:11Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-01-13T18:01:11Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>5da3e764-374a-41e0-9baf-9fe76bbc4a6e <_xml:PolicyInqRs> <_xml:RqUID>5da3e764-374a-41e0-9baf-9fe76bbc4a6e <_xml:TransactionResponseDt>2025-01-13T18:01:11Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2023-01-01 <_xml:Requestor id=\"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>GRS <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>NH <_xml:ContractTerm> <_xml:EffectiveDt>2022-12-21 <_xml:ExpirationDt>2099-12-21 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>998411168732470 <_xml:Location> <_xml:ItemIdInfo id=\"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>SBRU <_xml:Model>WRX <_xml:ModelYear>2021 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>NH <_xml:VehIdentificationNumber>JF1VA1A63M9801802 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', '0021a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-01-03T14:13:58Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-01-03T14:13:58Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:PolicyInqRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:TransactionResponseDt>2025-01-03T14:13:58Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2017-02-06 <_xml:Requestor id=\"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>STD <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>CA <_xml:ContractTerm> <_xml:EffectiveDt>2023-11-01 <_xml:ExpirationDt>2099-11-01 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3861415357665 <_xml:Location> <_xml:ItemIdInfo id=\"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>HOND <_xml:Model>ACCORD <_xml:ModelYear>2016 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>CA <_xml:VehIdentificationNumber>1HGCR2F31GA195371 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>500.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', '0022a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-01-03T14:13:58Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-01-03T14:13:58Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:PolicyInqRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:TransactionResponseDt>2025-01-03T14:13:58Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2017-02-06 <_xml:Requestor id=\"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>STD <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>CA <_xml:ContractTerm> <_xml:EffectiveDt>2023-11-01 <_xml:ExpirationDt>2099-11-01 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3861415357665 <_xml:Location> <_xml:ItemIdInfo id=\"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>HOND <_xml:Model>ACCORD <_xml:ModelYear>2016 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>CA <_xml:VehIdentificationNumber>1HGCR2F31GA195371 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>500.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', - '0023a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-01-03T14:13:58Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-01-03T14:13:58Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:PolicyInqRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:TransactionResponseDt>2025-01-03T14:13:58Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2017-02-06 <_xml:Requestor id=\"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>STD <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>CA <_xml:ContractTerm> <_xml:EffectiveDt>2023-11-01 <_xml:ExpirationDt>2099-11-01 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3861415357665 <_xml:Location> <_xml:ItemIdInfo id=\"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>HOND <_xml:Model>ACCORD <_xml:ModelYear>2016 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>CA <_xml:VehIdentificationNumber>1HGCR2F31GA195371 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>500.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ' + '0023a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-01-03T14:13:58Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-01-03T14:13:58Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:PolicyInqRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:TransactionResponseDt>2025-01-03T14:13:58Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2017-02-06 <_xml:Requestor id=\"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>STD <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>CA <_xml:ContractTerm> <_xml:EffectiveDt>2023-11-01 <_xml:ExpirationDt>2099-11-01 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3861415357665 <_xml:Location> <_xml:ItemIdInfo id=\"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>HOND <_xml:Model>ACCORD <_xml:ModelYear>2016 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>CA <_xml:VehIdentificationNumber>1HGCR2F31GA195371 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>500.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', + '0024a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-01-03T14:13:58Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-01-03T14:13:58Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:PolicyInqRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:TransactionResponseDt>2025-01-03T14:13:58Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2017-02-06 <_xml:Requestor id=\"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>STD <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>CA <_xml:ContractTerm> <_xml:EffectiveDt>2023-11-01 <_xml:ExpirationDt>2099-11-01 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3861415357665 <_xml:Location> <_xml:ItemIdInfo id=\"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>HOND <_xml:Model>ACCORD <_xml:ModelYear>2016 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>CA <_xml:VehIdentificationNumber>1HGCR2F31GA195371 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>500.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ' } const claimRegistrationValue = "{\"claimNumber\":\"058913992\",\"reportedDate\":\"2023-11-01T18:56:08.264Z\",\"howReported\":\"digital\",\"status\":\"registered\",\"lossCategory\":\"glassOnly\",\"lossCause\":\"glassOnly\",\"lossCauseDetail\":null,\"lossDate\":\"2023-11-01\",\"lossTime\":\"00:00\",\"lossDescription\":\"ROCK FROM ROAD - NO ONE AT FAULT\",\"lossLocation\":{\"primary\":true,\"line1\":null,\"line2\":null,\"city\":\"Columbus\",\"county\":null,\"state\":\"OR\",\"postalCode\":\"\",\"country\":\"US\",\"type\":null,\"locationName\":null,\"subType\":null},\"_links\":{\"reporter\":{\"id\":\"65429f485e8cd37072a5bb5d\",\"href\":\"claims/058913992/contacts/65429f485e8cd37072a5bb5d\",\"title\":\"BRANDON JOHNSON\"},\"primaryContact\":null,\"insureds\":[{\"id\":\"65429f485e8cd37072a5bb5d\",\"href\":\"claims/058913992/contacts/65429f485e8cd37072a5bb5d\",\"title\":\"BRANDON JOHNSON\"}],\"pedestrianCyclists\":[],\"contacts\":{\"id\":null,\"href\":\"claims/058913992/contacts\"},\"claimDamage\":{\"id\":null,\"href\":\"claims/058913992/claim-damage\"},\"vehicleIncidents\":[{\"id\":\"65429f4b31209b23b788c38e\",\"href\":\"claims/058913992/vehicle-incidents/65429f4b31209b23b788c38e\",\"vehicle\":\"BMW740\"}],\"propertyIncidents\":{\"dwelling\":null,\"otherStructure\":null,\"personalProperty\":null,\"livingExpense\":null},\"injuryIncidents\":[]}}"; diff --git a/playwright-tests/business-logic/types/ITestData.ts b/playwright-tests/business-logic/types/ITestData.ts index 4cbfe472..d4ed42e2 100644 --- a/playwright-tests/business-logic/types/ITestData.ts +++ b/playwright-tests/business-logic/types/ITestData.ts @@ -10,6 +10,7 @@ export interface ITestData { isPolicyFound: boolean, // Effective difference between advanced and essential isUseVehicleOnPolicy: boolean, // Should we use the vehicle on the policy? isVehicleLookupValidations: boolean, // Should we validate vehicle lookup? + isVehicleSelectBailout: boolean, // Should we bailout on vehicle lookup? isNoComp: boolean, // Is this a NoComp policy? isItac: boolean, // Is this an ITAC scenario? hasStateLawPopup: boolean, // Are we expecting a state law pop-up on ProviderSelectionPage? diff --git a/playwright-tests/business-logic/types/TestCase.ts b/playwright-tests/business-logic/types/TestCase.ts index 94c68de8..3378b4af 100644 --- a/playwright-tests/business-logic/types/TestCase.ts +++ b/playwright-tests/business-logic/types/TestCase.ts @@ -137,7 +137,9 @@ export default class TestCase extends DisposableBase implements ITestCase { if (testInfo.testCase) if (!(testInfo.testCase.testData!.isMockTesting ?? false)) { - await testInfo.testCase.disposeAll(); + if (testInfo.testCase.testData?.isPolicyFound) { + await testInfo.testCase.disposeAll(); + } } const seconds: string = String(testInfo.duration / 1000); diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index 8b794b3a..11f110fe 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -51,6 +51,7 @@ import advancedScenario0021TestCases from "./advanced/0021a_VehicleByPlate"; import advancedScenario0022TestCases from "./advanced/0022a_VehicleByVIN"; import advancedScenario0023TestCases from "./advanced/0023a_VehicleByVINPartsQns"; import { createAccessibilityHtmlReport } from "@impl/utils/ReportUtils"; +import advancedScenario0024TestCases from "./advanced/0024a_VehicleByVINUnverifiedBailout"; @@ -277,6 +278,11 @@ test.describe.parallel('ISS QA Automation Regression', () => { for (const testCase of advancedScenario0023TestCases) { test(...prepareTest(testCase, run, options, ruleEngine)); } + + // Scenario 0024a + for (const testCase of advancedScenario0024TestCases) { + test(...prepareTest(testCase, run, options, ruleEngine)); + } }); @@ -290,7 +296,9 @@ test.afterAll(() => { async function run(page: Page, testInfo: TestInfo): Promise { if (!(testInfo.testCase.testData?.isMockTesting ?? false)) { - await testInfo.testCase.setup(); + if (testInfo.testCase.testData?.isPolicyFound) { + await testInfo.testCase.setup(); + } } testInfo.testCase.setupPages(page); if (testInfo.testCase.testData.isAuthenticationRequired) { @@ -481,12 +489,19 @@ async function runWorkflow(page: Page, testCase: TestCase) { }); - if (isVehicleSelectBailout) { - await test.step('BailoutPage >> Validate Bailout', async () => { + if (testCase.testData.isVehicleSelectBailout) { + await test.step('Lookup vehicle >> By VIN-' + vehicleDetails!.vin!, async () => { await vinLookupPage.enterVin(vehicleDetails!.vin!); + }); + + await test.step('Click Invalid vin Link', async () => { await vinLookupPage.triggerBailout(); + }); + + await test.step('BailoutPage >> Validate Bailout-' + BailoutCode.VehicleNotFound, async () => { await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.VehicleNotFound); }); + return; } switch (vehicleDetails!.vehicleLookupType!) { diff --git a/playwright-tests/tests/advanced/0024a_VehicleByVINUnverifiedBailout.ts b/playwright-tests/tests/advanced/0024a_VehicleByVINUnverifiedBailout.ts new file mode 100644 index 00000000..0307088b --- /dev/null +++ b/playwright-tests/tests/advanced/0024a_VehicleByVINUnverifiedBailout.ts @@ -0,0 +1,83 @@ +import ClientData from "@business-logic/data/ClientData"; +import TestCase from "@business-logic/types/TestCase"; +import { DamageType, PartQuestionType, PaymentType, ServiceLocation, ServicePackage, VehicleDamage, VehicleLookupType } from "@business-logic/types/Enums"; +import { ITestData } from "@business-logic/types/ITestData" +import { faker } from "@faker-js/faker"; +import { getNextWeekday } from "@impl/utils/DateUtils"; +import MockPolicyData from "@business-logic/data/MockPolicyData"; +import { ICustomerDetails } from "@business-logic/types/CustomerDetails"; + +const nextWeekday = getNextWeekday(); +const customerDetails: ICustomerDetails = { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + email: 'itqatest@safelite.com', + phoneNumber: '614-531-0031', + notes: 'Automated Test', + address: { + street: faker.location.streetAddress(), + city: 'Columbus', + state: 'OH', + postalCode: '43220', + country: 'United States' + } +} + +const policyNumber = `~AutomatedScenario0024a${faker.string.uuid().substring(0, 6)}`; +const policySoap = MockPolicyData.getPolicySoapByScenario('0024a', customerDetails, policyNumber); + +const advancedScenario0024Data: Partial = { + clientTag: '', + isDuplicateClaim: false, + isPolicyFound: false, + isNoComp: false, + hasStateLawPopup: false, + endorsements: undefined, + isUseVehicleOnPolicy: false, + isVehicleLookupValidations: false, + isVehicleSelectBailout: true, + isMoldingQuestion: true, + isSafelite: true, + servicePackage: faker.helpers.enumValue(ServicePackage), + customerDetails: customerDetails, + claimDetails: { + policyNumber: policyNumber, + policyDeductible: 0.00, + damageDate: '2017-06-02', + damageCause: DamageType.Vandalism + }, + policySoap: policySoap, + vehicleDetails: { + year: '2015', + make: 'Honda', + model: 'Accord', + style: '4 door sedan', + vehicleLookupType: VehicleLookupType.Vin, + vin: '0HGCR2E30FA099831', + }, + vehicleDamage: [ + VehicleDamage.WindshieldCrack, + ], + appointmentDetails: { + serviceLocation: ServiceLocation.InShop, + shopAddress: undefined, + appointmentDate: nextWeekday + }, + +} + +// TODO: Add validation for deductible/covered amount +const advancedClients = ClientData.getAdvancedClients(); +const advancedScenario0024TestCases: TestCase[] = []; +for (const client of advancedClients) { + const data = { ...advancedScenario0024Data }; + data.clientTag = client.clientTag; + const tc = new TestCase({ + name: `0024a Advanced client Unlisted Vehicle Bailout: "${client.accountName}"`, + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], + testData: data + }, undefined, '0024a'); + advancedScenario0024TestCases.push(tc); +} + +export default advancedScenario0024TestCases; \ No newline at end of file From 9c0ba15883cf9862e9d24642fa4ec5f24274b6b6 Mon Sep 17 00:00:00 2001 From: Siraj Shaik Date: Tue, 4 Mar 2025 16:27:02 -0500 Subject: [PATCH 63/63] Revert "Merge remote-tracking branch 'origin/feature/INSR-2140' into sshaik/develop" This reverts commit b053b535378749fd386a776d191041f29c115f9d, reversing changes made to bef1122005b97f4b103a1b3b2ec8c0ea7300e654. --- .gitignore | 1 - Dockerfile.playwright | 10 +- azure-pipelines.yml | 91 +++++----------- devops/scripts/jira_writeback.sh | 149 -------------------------- playwright-tests/playwright.config.ts | 4 +- 5 files changed, 34 insertions(+), 221 deletions(-) delete mode 100755 devops/scripts/jira_writeback.sh diff --git a/.gitignore b/.gitignore index 57ddef5d..c859f2d5 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,6 @@ pnpm-debug.log* # Playwright /test-results/ -/ortoni-report/ /playwright-report/ /blob-report/ /playwright/.cache/ diff --git a/Dockerfile.playwright b/Dockerfile.playwright index 46a2114a..6271a937 100644 --- a/Dockerfile.playwright +++ b/Dockerfile.playwright @@ -1,4 +1,4 @@ -FROM node:20 +FROM node:16 FROM mcr.microsoft.com/playwright:v1.48.0-noble @@ -12,10 +12,10 @@ COPY package*.json ./ RUN npm install # Install Playwright browsers -RUN npx playwright install chromium --with-deps - -# Install jq -RUN apt-get install -y jq +RUN npx playwright install --with-deps # Copy the rest of the application code COPY . . + +# Run Playwright tests +CMD ["npx", "playwright", "test"] diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6bddeece..cedebb5b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -90,6 +90,7 @@ stages: "npx wait-on http://localhost:8080 && npm run test:playwright -- --shard=$(shardNumber)/$(totalShards) --reporter=list,blob --grep \"@smoke | @Advanced\"") # Start container and stream logs + echo "Starting tests for shard $(shardNumber)..." docker start -a $container_id @@ -126,60 +127,26 @@ stages: condition: always() - job: download_and_merge_reports + container: + image: mcr.microsoft.com/playwright:v1.48.0-noble dependsOn: playwright_tests steps: - - task: DownloadPipelineArtifact@2 - inputs: - targetPath: '$(System.DefaultWorkingDirectory)/playwright-reports' - - task: Docker@2 - displayName: 'Build Docker Image' - inputs: - command: build - dockerfile: Dockerfile.playwright - repository: $(dockerImageName) - tags: $(imageTag) - arguments: '--no-cache --pull' - - bash: | - # Create container for jira writeback - container_id=$(docker create \ - --ipc=host \ - -e JIRA_SERVER=$(JIRA_SERVER) \ - -e JIRA_USERNAME=$(JIRA_USERNAME) \ - -e JIRA_API_KEY=$(JIRA_API_KEY) \ - $(dockerImageName):$(imageTag) \ - bash -c "echo \"Moving Playwright reports out of subfolders...\" && - find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; && - echo \"Merging reports...\" && - npx playwright merge-reports --reporter=ortoni-report ./playwright-reports - # npx playwright merge-reports --config=playwright-tests/playwright.config.ts ./playwright-reports - # num_failures=$(sed -n 's/.*failures="\([^"]*\)".*/\1/p' /app/test-results/junit_results.xml | head -n 1) - # echo \"Number of test failures: '$num_failures'\" - # (($num_failures -eq 0)) && jira_message='Playwright tests passed!' || jira_message=\"$num_failures Playwright tests failed.\" - # TODO: Update to include test status message later - echo \"Contents of ortoni-report:\" && ls ./ortoni-report && - echo \"Writing report to Jira card '$(Build.SourceBranchName)'...\" && - ./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" /app/ortoni-report/ortoni-report.html \"AUTOMATED TEST RUN: $(date)\" ") - - # Start container and stream logs - echo "Starting merge" - docker start -a $container_id - - # Create directory for test results - echo "Creating test results directory..." - mkdir -p $(System.DefaultWorkingDirectory)/ortoni-report - - # Copy test results from container - echo "Copying test results..." - docker cp $container_id:/app/ortoni-report/. $(System.DefaultWorkingDirectory)/ortoni-report - # docker cp $container_id:/app/test-results/junit_results.xml $(System.DefaultWorkingDirectory) - # TODO: Update to include junit results if necessary - - # Remove container - echo "Cleaning up container..." - docker rm $container_id - env: - JIRA_API_KEY: $(JIRA_API_KEY) - displayName: merge_and_publish_results_to_jira + - task: DownloadPipelineArtifact@2 + inputs: + targetPath: '$(System.DefaultWorkingDirectory)/playwright-reports' + - script: | + npm i ortoni-report && + for dir in $(System.DefaultWorkingDirectory)/playwright-reports/*/; do + if [ -d "$dir" ]; then + mv "$dir"* $(System.DefaultWorkingDirectory)/playwright-reports/ + rmdir "$dir" + fi + done + npx playwright merge-reports --reporter=ortoni-report,junit $(System.DefaultWorkingDirectory)/playwright-reports + ls + displayName: merge_reports + env: + PLAYWRIGHT_JUNIT_OUTPUT_FILE: "test-results/results.xml" # TODO: Enable later when working on PR gate # - task: PublishTestResults@2 @@ -187,23 +154,19 @@ stages: # inputs: # searchFolder: 'test-results' # testResultsFormat: 'JUnit' - # testResultsFiles: 'junit_results.xml' + # testResultsFiles: 'results.xml' # mergeTestResults: true # failTaskOnFailedTests: false # testRunTitle: 'Playwright Tests' # condition: succeededOrFailed() - - task: PublishPipelineArtifact@1 - displayName: 'Publish Merged Report' - condition: always() - inputs: - targetPath: '$(System.DefaultWorkingDirectory)/ortoni-report' - artifact: 'playwright-merged-report' - publishLocation: 'pipeline' - - script: | - docker rmi $(dockerImageName):$(imageTag) -f - displayName: 'Cleanup Docker Image' - condition: always() + - task: PublishPipelineArtifact@1 + displayName: 'Publish Merged Report' + condition: always() + inputs: + targetPath: '$(System.DefaultWorkingDirectory)/ortoni-report' + artifact: 'playwright-merged-report' + publishLocation: 'pipeline' - ${{ else }}: # Dev Build/Deploy diff --git a/devops/scripts/jira_writeback.sh b/devops/scripts/jira_writeback.sh deleted file mode 100755 index 1d605072..00000000 --- a/devops/scripts/jira_writeback.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/bin/bash -create_issue() { - local title="$1" - local project_key="$2" - local issue_type="$3" - local parent_issue_key="$4" - - AUTH=$(echo -ne "$JIRA_USERNAME:$JIRA_API_KEY" | base64 --wrap 0) - - local parent_issue=$(curl -s -H "Authorization: Basic $AUTH" \ - "$JIRA_SERVER/rest/api/3/issue/$parent_issue_key") - - local parent_fix_versions=$(echo $parent_issue | jq -r '.fields.fixVersions') - - local created_issue=$(curl -X POST -H "Content-Type: application/json" \ - -H "Authorization: Basic $AUTH" \ - -d '{ - "fields": { - "summary": "'"$title"'", - "project": { - "key": "'"$project_key"'" - }, - "issuetype": { - "name": "'"$issue_type"'" - }, - "parent": { - "key": "'"$parent_issue_key"'" - }, - "fixVersions": '"$parent_fix_versions"' - } - }' \ - "$JIRA_SERVER/rest/api/3/issue") - - local created_issue_id=$(echo $created_issue | jq -r '.id') - - curl -X PUT -H "Content-Type: application/json" \ - -H "Authorization: Basic $AUTH" \ - -d '{ - "fields": { - "fixVersions": '"$parent_fix_versions"' - } - }' \ - "$JIRA_SERVER/rest/api/3/issue/$created_issue_id" -} - -extract_uuid() { - local url="$1" - local uuid_regex='[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}' - if [[ "$url" =~ $uuid_regex ]]; then - echo "${BASH_REMATCH}" - else - echo "No UUID found in the URL." - fi -} - -update_issue_status() { - local issue_key="$1" - local status_name="$2" - - AUTH=$(echo -ne "$JIRA_USERNAME:$JIRA_API_KEY" | base64 --wrap 0) - - local transitions=$(curl -s -H "Authorization: Basic $AUTH" \ - "$JIRA_SERVER/rest/api/3/issue/$issue_key/transitions") - - local transition_id=$(echo "$transitions" | jq -r --arg status_name "$status_name" ' - .transitions[] | select(.isAvailable == true and .to.name == $status_name) | .id - ') - - if [ -z "$transition_id" ]; then - echo "BadRequestError" - exit 1 - else - curl -X POST -H "Content-Type: application/json" \ - -H "Authorization: Basic $AUTH" \ - -d '{ - "transition": { - "id": "'"$transition_id"'" - } - }' \ - "$JIRA_SERVER/rest/api/3/issue/$issue_key/transitions" - fi -} - -add_attachments() { - AUTH=$(echo -ne "$JIRA_USERNAME:$JIRA_API_KEY" | base64 --wrap 0) - - local issue_key="$1" - shift - local attachments=("$@") - - echo $issue_key - echo $attachments - - local form_data="" - for attachment in "${attachments[@]}"; do - form_data+="--form file=@$attachment " - done - - echo $form_data - - echo $(curl -X POST $form_data \ - -H "X-Atlassian-Token: no-check" \ - -H "Authorization: Basic $AUTH" \ - "$JIRA_SERVER/rest/api/3/issue/$issue_key/attachments") -} - -add_comment() { - AUTH=$(echo -ne "$JIRA_USERNAME:$JIRA_API_KEY" | base64 --wrap 0) - local issue_key="$1" - shift - local comment_items_input=("$@") - local comment_json="[]" - - for item in "${comment_items_input[@]}"; do - if [ -e "$item" ]; then - # If it's a file path - local attachment=$(add_attachments "$issue_key" "$item") - local id=$(echo $attachment | grep -oP '"id":\s*"\K[^"]+') - - local attachment_content=$(curl -s -I -L -H "Authorization: Basic $AUTH" "$JIRA_SERVER/rest/api/3/attachment/content/$id" \ - | grep -i "Location:" | tail -1 | awk '{print $2}' | tr -d '\r') - echo "$JIRA_SERVER/rest/api/3/attachment/content/$id" - echo "$attachment_content" - - local uuid=$(extract_uuid "$attachment_content") - echo "$uuid" - - json_object=$(jq -n --arg uuid "$uuid" '{ type: "mediaSingle", attrs: { layout: "align-start" }, content: [{ type: "media", attrs: { type: "file", id: $uuid, width: 200, height: 200, collection: "", alt: "" } }]}') - - comment_json=$(echo "$comment_json" | jq --argjson obj "$json_object" '. += [$obj]') - else - # If it's a string - json_object=$(jq -n --arg text "$item" '{ type: "paragraph", content: [{ type: "text", text: $text }]}') - - comment_json=$(echo "$comment_json" | jq --argjson obj "$json_object" '. += [$obj]') - fi - done - - request=$(jq -n --argjson content "$comment_json" '{body: { type: "doc", version: 1, content: $content }}') - - curl -X POST -H "Content-Type: application/json" \ - -H "Authorization: Basic $AUTH" \ - -d "$request" \ - "$JIRA_SERVER/rest/api/3/issue/$issue_key/comment" -} - -if [[ $# -gt 0 ]]; then # IF function call passed in - "$@" # Call function -fi \ No newline at end of file diff --git a/playwright-tests/playwright.config.ts b/playwright-tests/playwright.config.ts index 0e7eaecb..20bf301e 100644 --- a/playwright-tests/playwright.config.ts +++ b/playwright-tests/playwright.config.ts @@ -28,7 +28,7 @@ if (!process.env.CI) { const reportConfig: OrtoniReportConfig = { port: 1994, open: "never", - folderPath: "ortoni-report", + folderPath: "test-results", filename: "index.html", logo: "../business-logic/data/logo.png", title: "Test Report", @@ -55,7 +55,7 @@ export default defineConfig({ /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: [ ['ortoni-report', reportConfig], - ['junit', {outputFile: '../test-results/junit_results.xml'}], + ['junit'], ['list'] ], timeout: 120_000,