Skip to content

Commit

Permalink
fix: modify screenshot to be strict when comparing
Browse files Browse the repository at this point in the history
  • Loading branch information
ckrook authored and theJohnnyMe committed Oct 16, 2024
1 parent 940048c commit 905269f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test.describe.parallel('tds-table-expandable-row-autoCollapse', () => {
await expect(firstRow.locator('div[slot="expand-row"]')).toBeVisible();
await expect(secondRow.locator('div[slot="expand-row"]')).toBeHidden();
await expect(thirdRow.locator('div[slot="expand-row"]')).toBeHidden();
await expect(page).toHaveScreenshot({ maxDiffPixels: 0.05 });
await expect(page).toHaveScreenshot({ maxDiffPixels: 0 });

// Expand the second row by clicking on the label
const secondExpandLabel = secondRow.locator('td > label');
Expand All @@ -43,6 +43,6 @@ test.describe.parallel('tds-table-expandable-row-autoCollapse', () => {
await expect(secondRow.locator('div[slot="expand-row"]')).toBeHidden();
// The third row should be expanded
await expect(thirdRow.locator('div[slot="expand-row"]')).toBeVisible();
await expect(page).toHaveScreenshot({ maxDiffPixels: 0.05 });
await expect(page).toHaveScreenshot({ maxDiffPixels: 0 });
});
});

0 comments on commit 905269f

Please sign in to comment.