Skip to content

Commit 9932c44

Browse files
committed
Add a testcase with allowed standard attribute string
1 parent 71674a9 commit 9932c44

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/rum-core/src/domain/action/getActionNameFromElement.spec.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,17 @@ describe('getActionNameFromElement', () => {
653653
expectedName: 'Masked Element',
654654
expectedNameSource: 'standard_attribute',
655655
},
656+
{
657+
html: `
658+
<div data-dd-privacy="mask-unless-allowlisted" aria-label="foo" target>
659+
<span>bar</span>
660+
</div>
661+
`,
662+
defaultPrivacyLevel: NodePrivacyLevel.MASK_UNLESS_ALLOWLISTED,
663+
allowlist: ['foo'],
664+
expectedName: 'foo',
665+
expectedNameSource: 'standard_attribute',
666+
},
656667
]
657668
testCases.forEach(({ html, defaultPrivacyLevel, allowlist, expectedName, expectedNameSource }) => {
658669
mockExperimentalFeatures([ExperimentalFeature.USE_TREE_WALKER_FOR_ACTION_NAME])

0 commit comments

Comments
 (0)