chore: filter expectations by the whole test or file name (#9503)

<!-- Thanks for submitting a pull request! Please provide enough
information so that others can review your pull request. -->

**What kind of change does this PR introduce?**

This is a change to a custom mocha runner to look for expectation of the
test case by the whole test name instead of by the part of the name.

**Summary**

Working on integration of the puppeteer expectation file in mozilla repo
and unskipping a lot of tests, I've noticed that some tests get wrong
statuses. For example, a test case with the name `navigation Page.goto
should fail when navigating to bad SSL` got the status of `navigation
Page.goto should fail when navigating to bad SSL after redirects` or
`ElementHandle specs ElementHandle.boundingBox should work` get the
status of `ElementHandle specs ElementHandle.boundingBox should work
with SVG nodes`. So it seems like checking for the whole name of the
test should be safer, but let me know if I'm missing something here.

**Does this PR introduce a breaking change?**
no
This commit is contained in:
Alexandra Borovova
2023-01-13 16:14:37 +01:00
committed by GitHub
parent f59bbf4014
commit 31ff55cc03
3 changed files with 26 additions and 21 deletions

View File

@@ -1236,10 +1236,10 @@
"expectations": ["SKIP"]
},
{
"testIdPattern": "[page.spec] Page ExecutionContext.queryObjects should work for non-blank page",
"testIdPattern": "[page.spec] Page ExecutionContext.queryObjects should work for non-trivial page",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox"],
"expectations": ["SKIP"]
"expectations": ["FAIL"]
},
{
"testIdPattern": "[page.spec] Page Page.addStyleTag should throw when added with content to the CSP page",