Skip to content

Commit 6228bb1

Browse files
fortunatomaldonadobrianchandotcom
authored andcommitted
LPD-57867 Playwright test
1 parent af4fc92 commit 6228bb1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

modules/test/playwright/tests/portal-web/main/html/common/themes/bottom_js_script.spec.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,21 @@ test(
108108
expect(jsSnippetIIFE).toEqual(true);
109109
}
110110
);
111+
112+
test(
113+
'Check URL does not allow XSS injection',
114+
{tag: '@LPD-57867'},
115+
async ({page}) => {
116+
let capturedLogMessage = '';
117+
118+
page.on('console', (msg) => {
119+
if (msg.type() === 'log') {
120+
capturedLogMessage = msg.text();
121+
}
122+
});
123+
124+
await page.goto(`/?snippet=console.log("${getRandomString()}")`);
125+
126+
expect(capturedLogMessage).toBe('');
127+
}
128+
);

0 commit comments

Comments
 (0)