Rayrun
← Back to Discord Forum

Test not working in Bitbucket pipeline

Hi everyone! I'm working on a project in VueJS 2.7 and I just added Playwright to start writing tests to get confident with a lot of refactoring that the application needs.

The problem is that there is one simple test that is not working in the Bitbucket pipeline and it's working in my local docker container, and they're using the same docker image.

Playwright Version: v1.35.1 (latest) Operating System: macOS 13.2.1 Browser: Chromium Node: 20.2.0 VueJS: 2.7 Other info: Docker image node:20.2.0 locally and in the pipeline. I know that Playwright recommends using their docker image, but this is not something that I can change now. I managed to use the docker image node:20.2.0 to install the dependencies that Playwright needs using 'npx playwright install-deps' and 'npx playwright install'

The Playwright configuration is the basic one and I'm only using Chromium.

The test that is failing in the Bitbucket pipeline is the one in line 39 of the Photo1.png. The error is the next:

Error: Timed out 5000ms waiting for expect(received).toHaveTitle(expected) Expected pattern: /Home/ Received string: "undefined | Title test - EN"

I'm using the library vue-meta to manage the title of the pages. So, the weird thing is that the word "Home" is hard coded.

metaInfo () { return { title: 'Home', titleTemplate: '%s | ' + ((this.pageTitle) ? this.pageTitle : '') } }

this.pageTitle ('Title test - EN') is a computed property.

I think that is something related to the Bitbucket pipeline because in the docker image that I use locally, it's working perfectly. Did you experience something similar or weird in the Bitbucket pipeline using VueJS and Playwright?

Thank you so much in advance, I appreciate it.<:playwright:1054714813638516757>

Photo1.png

This thread is trying to answer question "Why is the test not working in the Bitbucket pipeline but working in the local docker container?"

0 replies
TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].