|
1 | | -import { MASK_ALL_TEXT_SELECTOR } from '../../src/constants'; |
2 | 1 | import { mockSdk } from '../index'; |
3 | 2 |
|
4 | 3 | describe('Integration | integrationSettings', () => { |
@@ -191,33 +190,28 @@ describe('Integration | integrationSettings', () => { |
191 | 190 | it('works with default value', async () => { |
192 | 191 | const { replay } = await mockSdk({ replayOptions: {} }); |
193 | 192 |
|
194 | | - // Default is true |
195 | | - expect(replay['_recordingOptions'].maskTextSelector).toBe(MASK_ALL_TEXT_SELECTOR); |
| 193 | + expect(replay['_recordingOptions'].maskAllText).toBe(true); |
196 | 194 | }); |
197 | 195 |
|
198 | 196 | it('works with true', async () => { |
199 | 197 | const { replay } = await mockSdk({ replayOptions: { maskAllText: true } }); |
200 | 198 |
|
201 | | - expect(replay['_recordingOptions'].maskTextSelector).toBe(MASK_ALL_TEXT_SELECTOR); |
| 199 | + expect(replay['_recordingOptions'].maskAllText).toBe(true); |
202 | 200 | }); |
203 | 201 |
|
204 | 202 | it('works with false', async () => { |
205 | 203 | const { replay } = await mockSdk({ replayOptions: { maskAllText: false } }); |
206 | 204 |
|
207 | | - expect(replay['_recordingOptions'].maskTextSelector).toBe('.sentry-mask,[data-sentry-mask]'); |
| 205 | + expect(replay['_recordingOptions'].maskAllText).toBe(false); |
208 | 206 | }); |
| 207 | + }); |
209 | 208 |
|
210 | | - it('maskTextSelector takes precedence over maskAllText when not specifiying maskAllText:true', async () => { |
| 209 | + describe('maskTextSelector', () => { |
| 210 | + it('can have custom mask selector', async () => { |
211 | 211 | const { replay } = await mockSdk({ replayOptions: { maskTextSelector: '[custom]' } }); |
212 | 212 |
|
213 | 213 | expect(replay['_recordingOptions'].maskTextSelector).toBe('[custom],.sentry-mask,[data-sentry-mask]'); |
214 | 214 | }); |
215 | | - |
216 | | - it('maskAllText takes precedence over maskTextSelector when specifiying maskAllText:true', async () => { |
217 | | - const { replay } = await mockSdk({ replayOptions: { maskAllText: true, maskTextSelector: '[custom]' } }); |
218 | | - |
219 | | - expect(replay['_recordingOptions'].maskTextSelector).toBe(MASK_ALL_TEXT_SELECTOR); |
220 | | - }); |
221 | 215 | }); |
222 | 216 |
|
223 | 217 | describe('_experiments', () => { |
|
0 commit comments