'Playwright pipeline endless loading

Hiall,

I developed a ui test with playwright. I run this in azure pipeline, when a test is pass, everything is OK, the steps: run test - pass publish artifact - pass post job - pass but when i add an error to the test - await expect(activitiesHeader).toHaveClass("goodclass badclass") I get an error in pipeline log, it is ok, and reach the timeout too but the pipeline is stuck in run test step (so the next steps never execute)

my yaml:

  • task: NodeTool@0 inputs: versionSpec: '14.x' displayName: 'Install Node.js'

  • script: npm install

  • script: npm ci

  • script: npm install @playwright/test

  • script: npx playwright install --with-deps displayName: "Install browser dependencies"

  • script: npm i playwright-chromium

    displayName: "run the test" condition: succeeded()

  • script: npm run azurelogin

  • task: CopyFiles@1 condition: succeededOrFailed() # Run task even if previous ones fail inputs: #leave it empty, the copying is done from the root folder #sourceFolder: '$(Build.SourcesDirectory)/_daniavander_hydro-test/playwright-report' contents: | playwright-report/** screenshot/** test-results/** targetFolder: '$(Build.ArtifactStagingDirectory)'

  • task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: drop' inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)'



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source