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

feat: add pwt toMatchScreenshot diff bubbles support #514

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

KuznetsovRoman
Copy link
Member

No description provided.

@@ -252,6 +256,16 @@ export class PlaywrightTestAdapter implements ReporterTestResult {
return '';
}

private getDiffClusters(state: string): CoordBounds[] {
const snapshotName = state + '.png';
Copy link
Member

Choose a reason for hiding this comment

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

у нас в state здесь точно не может быть названия с .png? чтобы не получилось plain.png.png

Copy link
Member Author

@KuznetsovRoman KuznetsovRoman Oct 17, 2023

Choose a reason for hiding this comment

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

Этот стейт - от html-reporter.

playwright использует snapshotName, который всегда кончается на .png. Затем добавляет к имени файла суффиксы -expected, -actual, -diff так, что получаются -expected.png, -actual.png, -diff.png.

html-reporter создает свой state путем отбрасывания таких суффиксов вместе с .png

UPD: но в pwt-utils я в name у attachment прокидывал чистый snapshotName, без .png. Сейчас пофикшу

@KuznetsovRoman KuznetsovRoman merged commit 4c1fb93 into master Oct 17, 2023
5 checks passed
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