Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Playwright Tests Failing Due to Multiple Targets

    Bug Report
    2
    2
    123
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      neal.chambers last edited by

      I'm working with a fresh install of 2.3 and the bagisto-docker setup. I ran the playwright tests in order to ensure everything is setup properly and I keep running into errors because the selectors are not specific enough. Here is an example:

      Error: expect.toBeVisible: Error: strict mode violation: getByText('Category created successfully.') resolved to 2 elements:
          1) <p class="flex items-center break-all text-sm">…</p> aka locator('#app').getByText('Category created successfully.')
          2) <span class="sf-dump-str" title="30 characters">Category created successfully.</span> aka getByTitle('30 characters')
      

      These can be fixed by just adding more specific selectors (adding locator("#app")). I'd be happy to submit a PR to fix all of them if necessary.

      1 Reply Last reply Reply Quote 0
      • Rishabh-Webkul
        Rishabh-Webkul last edited by

        Hello @neal-chambers

        Once it's fixed, the PR will be available on the GitHub repo.

        Regards
        Team Bagisto

        1 Reply Last reply Reply Quote 0
        • First post
          Last post