Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion resources/images/missing.snap

This file was deleted.

14 changes: 0 additions & 14 deletions src/Playwright/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -549,20 +549,6 @@ public function expectScreenshot(bool $fullPage, bool $openDiff): void
);
}
}

$this->createImageDiffView(
$snapshotName,
$expectedImageBlob,
$actualImageBlob,
ImageDiffView::missingImage(),
$openDiff,
);

throw new ExpectationFailedException(<<<'EOT'
Screenshot does not match the last one.
- Expected? Update the snapshots with [--update-snapshots].
EOT,
);
}
}

Expand Down
9 changes: 0 additions & 9 deletions src/Support/ImageDiffView.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,4 @@ public static function generate(string $expected, string $actual, string $diff,
</html>
HTML;
}

/**
* Create a fake image for when Playwright does not return a diff.
*/
public static function missingImage(): string
{
/** @phpstan-ignore-next-line */
return file_get_contents(__DIR__.'/../../resources/images/missing.snap');
}
}