playwright
Advanced tools
Comparing version
@@ -253,2 +253,4 @@ "use strict"; | ||
if (jestError !== null && jestError !== void 0 && jestError.matcherResult.suggestedRebaseline) { | ||
// NOTE: this is a workaround for the fact that we can't pass the suggested rebaseline | ||
// for passing matchers. See toMatchAriaSnapshot for a counterpart. | ||
step.complete({ | ||
@@ -255,0 +257,0 @@ suggestedRebaseline: jestError === null || jestError === void 0 ? void 0 : jestError.matcherResult.suggestedRebaseline |
@@ -147,2 +147,10 @@ "use strict"; | ||
const suggestedRebaseline = `\`\n${(0, _utils.escapeTemplateString)(indent(typedReceived.regex, '{indent} '))}\n{indent}\``; | ||
if (updateSnapshots === 'missing') { | ||
const message = 'A snapshot is not provided, generating new baseline.'; | ||
testInfo._hasNonRetriableError = true; | ||
testInfo._failWithError(new Error(message)); | ||
} | ||
// TODO: ideally, we should return "pass: true" here because this matcher passes | ||
// when regenerating baselines. However, we can only access suggestedRebaseline in case | ||
// of an error, so we fail here and workaround it in the expect implementation. | ||
return { | ||
@@ -149,0 +157,0 @@ pass: false, |
{ | ||
"name": "playwright", | ||
"version": "1.50.0-beta-1738240825000", | ||
"version": "1.50.0-beta-1738267712000", | ||
"description": "A high-level API to automate web browsers", | ||
@@ -59,3 +59,3 @@ "repository": { | ||
"dependencies": { | ||
"playwright-core": "1.50.0-beta-1738240825000" | ||
"playwright-core": "1.50.0-beta-1738267712000" | ||
}, | ||
@@ -62,0 +62,0 @@ "optionalDependencies": { |
3178988
0.02%36357
0.03%+ Added
- Removed