flexysnap 0.2.2-alpha.1 → 0.2.4-alpha.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flexysnap",
3
- "version": "0.2.2-alpha.1",
3
+ "version": "0.2.4-alpha.1",
4
4
  "description": "Flexible visual snapshot testing for Playwright, built for e-commerce.",
5
5
  "keywords": [
6
6
  "playwright",
@@ -49,4 +49,4 @@
49
49
  "devDependencies": {
50
50
  "eslint": "^9.9.0"
51
51
  }
52
- }
52
+ }
@@ -126,8 +126,7 @@ function compareTexts(baselineTexts, currentTexts, strictPosition = true, strict
126
126
  textsEqual = baselineText.text !== currentText.text;
127
127
  }
128
128
 
129
- if (baselineText.text !== currentText.text) {
130
- //expect.soft(currentText.text).toEqual(baselineText.text);
129
+ if (textsEqual) {
131
130
  currentText.differences.push({
132
131
  type: 'text_mismatch',
133
132
  baseline: baselineText.text,
@@ -244,4 +243,4 @@ function compareWireframes(baselineWireframe, currentWireframe) {
244
243
  return currentWireframe;
245
244
  }
246
245
 
247
- export { compareWireframes };
246
+ export { compareWireframes };
@@ -139,7 +139,8 @@ async function extractWireframe(page, elementGroups) {
139
139
  for (let groupIndex = 0; groupIndex < elementGroups.length; groupIndex++) {
140
140
  const elementGroup = elementGroups[groupIndex];
141
141
  elementGroup.strictPosition = elementGroup.strictPosition !== false;
142
- elementGroup.maskDigits = elementGroup.maskDigits === false;
142
+ elementGroup.strictSize = elementGroup.strictSize !== false;
143
+ elementGroup.maskDigits = elementGroup.maskDigits !== false;
143
144
  elementGroup.elements = [];
144
145
 
145
146
  let index = 0;