You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug]: Playwright HTML report does not clear project filter from localhost URL, and reuses this previously used project filter when another filter is applied
#33681
Open
apatelia opened this issue
Nov 19, 2024
· 1 comment
· May be fixed by #33754
Notice that all four tests are displayed as passed under example.spec.ts file.
Click on chromium project badge from any test where it is displayed.
Notice that p:chromium is applied as a search filter in search box at the top of the report, and the URL is updated with ?q=p:chromium querystring. Only two tests are displayed for chromium project.
Now, clear this p:chromium filter using x button that becomes available when mouse is hovered on the extreme right side of search box, as show below.
Notice that search box is empty now and all four tests (chromium + Firefox) are displayed correctly. However, URL still contains the ?q=p:chromium querystring.
Now, click on link badge displayed next to any of the get started link test.
Notice that p:chromium is reused along with @link as search filter even though it was not intended. Also, URL is updated with ?q=p:chromium%20@link querystring. Also, only one get started link test is displayed instead of two tests (chromium + Firefox).
Expected behavior
I expect to see two (chromium + Firefox) get started link tests filtered and displayed instead of only one from chromium project, as I applied only @link filter and not p:chromium filter.
Actual behavior
It seems that p:chromium filter is not cleared from the URL and then it is reused along with @link filter, when only @link filter is applied.
Additional context
This bug may be present in older versions as well, I noticed it only after upgrading to 1.49.
I am reporting this bug using Linux now, but I can reproduce this on Windows 11 as well.
Version
1.49.0
Steps to reproduce
Clone my repo at https://github.com/apatelia/simple-pw-test
Install dependencies -
npm install
Install browsers -
npx playwright install
Run tests -
npx playwright test
Open test report -
npx playwright show-report
Notice that all four tests are displayed as passed under
example.spec.ts
file.Click on
chromium
project badge from any test where it is displayed.Notice that
p:chromium
is applied as a search filter in search box at the top of the report, and the URL is updated with?q=p:chromium
querystring. Only two tests are displayed forchromium
project.Now, clear this
p:chromium
filter usingx
button that becomes available when mouse is hovered on the extreme right side of search box, as show below.Notice that search box is empty now and all four tests (chromium + Firefox) are displayed correctly. However, URL still contains the
?q=p:chromium
querystring.Now, click on
link
badge displayed next to any of theget started link
test.Notice that
p:chromium
is reused along with@link
as search filter even though it was not intended. Also, URL is updated with?q=p:chromium%20@link
querystring. Also, only oneget started link
test is displayed instead of two tests (chromium + Firefox).Expected behavior
I expect to see two (chromium + Firefox)
get started link
tests filtered and displayed instead of only one fromchromium
project, as I applied only@link
filter and notp:chromium
filter.Actual behavior
It seems that
p:chromium
filter is not cleared from the URL and then it is reused along with@link
filter, when only@link
filter is applied.Additional context
This bug may be present in older versions as well, I noticed it only after upgrading to 1.49.
I am reporting this bug using Linux now, but I can reproduce this on Windows 11 as well.
Environment
The text was updated successfully, but these errors were encountered: