Skip to content

Commit 441f3ca

Browse files
committed
test(replay): Test that blocking elements works as expected
1 parent 7f4c4ec commit 441f3ca

File tree

13 files changed

+1437
-94
lines changed

13 files changed

+1437
-94
lines changed

packages/integration-tests/suites/replay/privacy/template.html renamed to packages/integration-tests/suites/replay/default-privacy/template.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<!DOCTYPE html>
22
<html>
3-
<head><meta charset="utf-8" /></head>
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" type="image/png" href="file://assets/icon/favicon.png"/>
6+
</head>
47
<body>
58
<button aria-label="Click me" onclick="console.log('Test log')">Click me</button>
69
<div>This should be masked by default</div>

packages/integration-tests/suites/replay/privacy/test.ts-snapshots/privacy-chromium.json renamed to packages/integration-tests/suites/replay/default-privacy/test.ts-snapshots/privacy-chromium.json

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,25 @@
2727
},
2828
"childNodes": [],
2929
"id": 5
30+
},
31+
{
32+
"type": 2,
33+
"tagName": "link",
34+
"attributes": {
35+
"rel": "icon",
36+
"type": "image/png",
37+
"href": "file://assets/icon/favicon.png"
38+
},
39+
"childNodes": [],
40+
"id": 6
3041
}
3142
],
3243
"id": 4
3344
},
3445
{
3546
"type": 3,
3647
"textContent": "\n ",
37-
"id": 6
48+
"id": 7
3849
},
3950
{
4051
"type": 2,
@@ -44,7 +55,7 @@
4455
{
4556
"type": 3,
4657
"textContent": "\n ",
47-
"id": 8
58+
"id": 9
4859
},
4960
{
5061
"type": 2,
@@ -57,15 +68,15 @@
5768
{
5869
"type": 3,
5970
"textContent": "***** **",
60-
"id": 10
71+
"id": 11
6172
}
6273
],
63-
"id": 9
74+
"id": 10
6475
},
6576
{
6677
"type": 3,
6778
"textContent": "\n ",
68-
"id": 11
79+
"id": 12
6980
},
7081
{
7182
"type": 2,
@@ -75,15 +86,15 @@
7586
{
7687
"type": 3,
7788
"textContent": "**** ****** ** ****** ** *******",
78-
"id": 13
89+
"id": 14
7990
}
8091
],
81-
"id": 12
92+
"id": 13
8293
},
8394
{
8495
"type": 3,
8596
"textContent": "\n ",
86-
"id": 14
97+
"id": 15
8798
},
8899
{
89100
"type": 2,
@@ -95,15 +106,15 @@
95106
{
96107
"type": 3,
97108
"textContent": "This should be unmasked due to data attribute",
98-
"id": 16
109+
"id": 17
99110
}
100111
],
101-
"id": 15
112+
"id": 16
102113
},
103114
{
104115
"type": 3,
105116
"textContent": "\n ",
106-
"id": 17
117+
"id": 18
107118
},
108119
{
109120
"type": 2,
@@ -112,12 +123,12 @@
112123
"placeholder": "*********** ****** ** ******"
113124
},
114125
"childNodes": [],
115-
"id": 18
126+
"id": 19
116127
},
117128
{
118129
"type": 3,
119130
"textContent": "\n ",
120-
"id": 19
131+
"id": 20
121132
},
122133
{
123134
"type": 2,
@@ -129,15 +140,15 @@
129140
{
130141
"type": 3,
131142
"textContent": "***** ****** ** ******",
132-
"id": 21
143+
"id": 22
133144
}
134145
],
135-
"id": 20
146+
"id": 21
136147
},
137148
{
138149
"type": 3,
139150
"textContent": "\n ",
140-
"id": 22
151+
"id": 23
141152
},
142153
{
143154
"type": 2,
@@ -148,12 +159,12 @@
148159
},
149160
"childNodes": [],
150161
"isSVG": true,
151-
"id": 23
162+
"id": 24
152163
},
153164
{
154165
"type": 3,
155166
"textContent": "\n ",
156-
"id": 24
167+
"id": 25
157168
},
158169
{
159170
"type": 2,
@@ -172,32 +183,32 @@
172183
},
173184
"childNodes": [],
174185
"isSVG": true,
175-
"id": 26
186+
"id": 27
176187
},
177188
{
178189
"type": 2,
179190
"tagName": "area",
180191
"attributes": {},
181192
"childNodes": [],
182193
"isSVG": true,
183-
"id": 27
194+
"id": 28
184195
},
185196
{
186197
"type": 2,
187198
"tagName": "rect",
188199
"attributes": {},
189200
"childNodes": [],
190201
"isSVG": true,
191-
"id": 28
202+
"id": 29
192203
}
193204
],
194205
"isSVG": true,
195-
"id": 25
206+
"id": 26
196207
},
197208
{
198209
"type": 3,
199210
"textContent": "\n ",
200-
"id": 29
211+
"id": 30
201212
},
202213
{
203214
"type": 2,
@@ -207,12 +218,12 @@
207218
"rr_height": "100px"
208219
},
209220
"childNodes": [],
210-
"id": 30
221+
"id": 31
211222
},
212223
{
213224
"type": 3,
214225
"textContent": "\n ",
215-
"id": 31
226+
"id": 32
216227
},
217228
{
218229
"type": 2,
@@ -223,12 +234,12 @@
223234
"src": "file:///none.png"
224235
},
225236
"childNodes": [],
226-
"id": 32
237+
"id": 33
227238
},
228239
{
229240
"type": 3,
230241
"textContent": "\n ",
231-
"id": 33
242+
"id": 34
232243
},
233244
{
234245
"type": 2,
@@ -238,20 +249,20 @@
238249
"rr_height": "30px"
239250
},
240251
"childNodes": [],
241-
"id": 34
252+
"id": 35
242253
},
243254
{
244255
"type": 3,
245256
"textContent": "\n ",
246-
"id": 35
257+
"id": 36
247258
},
248259
{
249260
"type": 3,
250261
"textContent": "\n\n",
251-
"id": 36
262+
"id": 37
252263
}
253264
],
254-
"id": 7
265+
"id": 8
255266
}
256267
],
257268
"id": 3

0 commit comments

Comments
 (0)