Skip to content

Commit bf154f9

Browse files
committed
ref: Use fill instead of type
1 parent 7d73dbb commit bf154f9

File tree

2 files changed

+10
-10
lines changed
  • packages/integration-tests/suites/replay

2 files changed

+10
-10
lines changed

packages/integration-tests/suites/replay/privacyInput/test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ sentryTest(
4545

4646
const text = 'test';
4747

48-
await page.locator('#input').type(text);
48+
await page.locator('#input').fill(text);
4949
await forceFlushReplay();
5050
const snapshots = getIncrementalRecordingSnapshots(await reqPromise1).filter(isInputMutation);
5151
const lastSnapshot = snapshots[snapshots.length - 1];
5252
expect(lastSnapshot.data.text).toBe(text);
5353

54-
await page.locator('#input-masked').type(text);
54+
await page.locator('#input-masked').fill(text);
5555
await forceFlushReplay();
5656
const snapshots2 = getIncrementalRecordingSnapshots(await reqPromise2).filter(isInputMutation);
5757
const lastSnapshot2 = snapshots2[snapshots2.length - 1];
5858
expect(lastSnapshot2.data.text).toBe('*'.repeat(text.length));
5959

60-
await page.locator('#input-ignore').type(text);
60+
await page.locator('#input-ignore').fill(text);
6161
await forceFlushReplay();
6262
const snapshots3 = getIncrementalRecordingSnapshots(await reqPromise3).filter(isInputMutation);
6363
expect(snapshots3.length).toBe(0);
@@ -91,19 +91,19 @@ sentryTest(
9191
await reqPromise0;
9292

9393
const text = 'test';
94-
await page.locator('#textarea').type(text);
94+
await page.locator('#textarea').fill(text);
9595
await forceFlushReplay();
9696
const snapshots = getIncrementalRecordingSnapshots(await reqPromise1).filter(isInputMutation);
9797
const lastSnapshot = snapshots[snapshots.length - 1];
9898
expect(lastSnapshot.data.text).toBe(text);
9999

100-
await page.locator('#textarea-masked').type(text);
100+
await page.locator('#textarea-masked').fill(text);
101101
await forceFlushReplay();
102102
const snapshots2 = getIncrementalRecordingSnapshots(await reqPromise2).filter(isInputMutation);
103103
const lastSnapshot2 = snapshots2[snapshots2.length - 1];
104104
expect(lastSnapshot2.data.text).toBe('*'.repeat(text.length));
105105

106-
await page.locator('#textarea-ignore').type(text);
106+
await page.locator('#textarea-ignore').fill(text);
107107
await forceFlushReplay();
108108
const snapshots3 = getIncrementalRecordingSnapshots(await reqPromise3).filter(isInputMutation);
109109
expect(snapshots3.length).toBe(0);

packages/integration-tests/suites/replay/privacyInputMaskAll/test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ sentryTest(
4444

4545
const text = 'test';
4646

47-
await page.locator('#input').type(text);
47+
await page.locator('#input').fill(text);
4848
await forceFlushReplay();
4949
const snapshots = getIncrementalRecordingSnapshots(await reqPromise1).filter(isInputMutation);
5050
const lastSnapshot = snapshots[snapshots.length - 1];
5151
expect(lastSnapshot.data.text).toBe('*'.repeat(text.length));
5252

53-
await page.locator('#input-unmasked').type(text);
53+
await page.locator('#input-unmasked').fill(text);
5454
await forceFlushReplay();
5555
const snapshots2 = getIncrementalRecordingSnapshots(await reqPromise2).filter(isInputMutation);
5656
const lastSnapshot2 = snapshots2[snapshots2.length - 1];
@@ -86,13 +86,13 @@ sentryTest(
8686

8787
const text = 'test';
8888

89-
await page.locator('#textarea').type(text);
89+
await page.locator('#textarea').fill(text);
9090
await forceFlushReplay();
9191
const snapshots = getIncrementalRecordingSnapshots(await reqPromise1).filter(isInputMutation);
9292
const lastSnapshot = snapshots[snapshots.length - 1];
9393
expect(lastSnapshot.data.text).toBe('*'.repeat(text.length));
9494

95-
await page.locator('#textarea-unmasked').type(text);
95+
await page.locator('#textarea-unmasked').fill(text);
9696
await forceFlushReplay();
9797
const snapshots2 = getIncrementalRecordingSnapshots(await reqPromise2).filter(isInputMutation);
9898
const lastSnapshot2 = snapshots2[snapshots2.length - 1];

0 commit comments

Comments
 (0)