Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pwt static image accepter #596

Merged
merged 2 commits into from
Aug 29, 2024
Merged

Conversation

KuznetsovRoman
Copy link
Member

No description provided.

Comment on lines +113 to +115
const trueResultStatus = isImageError(result.error) && finalStatus === ERROR ? FAIL : finalStatus;

if (isAssertViewError(result.error) && trueResultStatus !== result.status) {
if (isImageError(result.error) && trueResultStatus !== result.status) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Testplane, we have a contract: if test result has image errors, test result has "AssertViewError", and images can have either ImageDiffError or NoRefImageError.

In Playwright adapter, though, we can have ImageDiffError or NoRefImageError as result.error. Looks like we could encounter other issues because of that.

@@ -34,6 +34,8 @@ export type PwtImageDiffError = ExtendedError<{snapshotName: string, diffCluster

export type PwtNoRefImageError = ExtendedError<{snapshotName: string}>;

export type PlaywrightImageFile = ImageFile & { relativePath: string };
Copy link
Member Author

@KuznetsovRoman KuznetsovRoman Aug 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to pollute ImageFile type, which is used in Testplane and generally has no guaranteed "relativePath" property

@KuznetsovRoman KuznetsovRoman merged commit 32d4694 into master Aug 29, 2024
4 checks passed
@KuznetsovRoman KuznetsovRoman deleted the INFRADUTY-27678.g_pwt branch August 29, 2024 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants