@cappa/core 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @cappa/core
2
2
 
3
+ ## 0.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 4068bca: fix: correct screenshot handling logic in ScreenshotTool
8
+
3
9
  ## 0.2.2
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cappa/core",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Core Playwright screenshot functionality for Cappa",
5
5
  "author": "Tim Richter",
6
6
  "license": "MIT",
package/src/screenshot.ts CHANGED
@@ -519,6 +519,8 @@ class ScreenshotTool {
519
519
  `Expected image not found for ${filename}, taking screenshot`,
520
520
  );
521
521
 
522
+ result.filepath = await this.takeScreenshot(page, filename, options);
523
+ } else {
522
524
  const { screenshotPath, comparisonResult, diffImagePath } =
523
525
  await this.takeScreenshotWithComparison(
524
526
  page,
@@ -534,8 +536,6 @@ class ScreenshotTool {
534
536
  result.filepath = screenshotPath;
535
537
  result.comparisonResult = comparisonResult;
536
538
  result.diffImagePath = diffImagePath;
537
- } else {
538
- result.filepath = await this.takeScreenshot(page, filename, options);
539
539
  }
540
540
 
541
541
  return result;