Playwright Tests Failing Due to Multiple Targets
-
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.
-
Hello @neal-chambers
Once it's fixed, the PR will be available on the GitHub repo.
Regards
Team Bagisto