✨ (freeze.spec.ts): Add test for freezing a component feature in the frontend to ensure users can freeze components and verify expected behavior with different runs.
This commit is contained in:
parent
ac4b3dc740
commit
ff3c364916
1 changed files with 8 additions and 2 deletions
|
|
@ -304,9 +304,15 @@ test(
|
|||
.getByPlaceholder("Empty")
|
||||
.textContent();
|
||||
|
||||
expect(firstRunWithoutFreezing).toBe(firstTextFreezed);
|
||||
expect(firstTextFreezed).toContain("Lorem Ipsum");
|
||||
expect(secondRunWithoutFreezing).not.toBe(firstTextFreezed);
|
||||
expect(firstRunWithoutFreezing).not.toBe(secondRunWithoutFreezing);
|
||||
expect(thirdTextWithoutFreezing).toBe(firstTextFreezed);
|
||||
|
||||
expect(thirdTextWithoutFreezing).toContain("Lorem Ipsum");
|
||||
|
||||
const lengthDifference = Math.abs(
|
||||
thirdTextWithoutFreezing?.length! - firstTextFreezed?.length!,
|
||||
);
|
||||
expect(lengthDifference).toBeLessThan(100);
|
||||
},
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue