playwright-mutation-gate 0.3.1 → 0.3.2
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/README.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -236,14 +236,14 @@ await page.route('**/*', async (route) => {
|
|
|
236
236
|
A test that reads fine on review but checks the wrong layer:
|
|
237
237
|
|
|
238
238
|
```ts
|
|
239
|
-
// The confirmation greeting is
|
|
240
|
-
// from
|
|
239
|
+
// The confirmation greeting is drawn on the client from a name cached at checkout
|
|
240
|
+
// (localStorage), not from this response. So the assertion checks the cache.
|
|
241
241
|
await expect(page.getByTestId('receipt-greeting')).toHaveText('Thanks, Ada!'); // @primary-assert
|
|
242
242
|
```
|
|
243
243
|
|
|
244
244
|
Inversion kills it (flip the text and the test goes red), so it clears the
|
|
245
245
|
standard gate. Behavior mutation corrupts `Thanks, Ada!` in the response; the
|
|
246
|
-
client rebuilds it from
|
|
246
|
+
client rebuilds it from the cached name, the assertion stays green:
|
|
247
247
|
|
|
248
248
|
```text
|
|
249
249
|
tests/receipt.spec.ts
|
package/package.json
CHANGED