File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
tests/cypress/integration/plugins Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ test.csp('throws when parsing a property assignment',
6464 < button x-data x-on:click ="$el.innerHTML = 'evil' "> </ button >
6565 ` ] ,
6666 ( cy ) => {
67- cy . on ( 'uncaught:exception' , ( { message} ) => message . includes ( 'Object assignments are prohibited' ) ? false : true )
67+ cy . on ( 'uncaught:exception' , ( { message} ) => message . includes ( 'Property assignments are prohibited' ) ? false : true )
6868 cy . get ( 'button' ) . click ( )
6969 cy . get ( 'button' ) . should ( notContain ( 'evil' ) )
7070 } ,
@@ -216,15 +216,20 @@ test.csp('throws when using x-html directive',
216216test . csp ( 'throws when non-enumerable global is accessed' ,
217217 [ html `
218218 < div x-data ="app ">
219- < span x-text ="obj() ? 'evil' : '' "> </ span >
219+ < button x-on:click ="show = true "> </ button >
220+ < template x-if ="show ">
221+ < span x-text ="obj() ? 'evil' : '' "> </ span >
222+ </ template >
220223 </ div >
221224 ` , `
222225 Alpine.data('app', () => ({
226+ show: true,
223227 obj() { return Object },
224228 }))
225229 ` ] ,
226230 ( cy ) => {
227231 cy . on ( 'uncaught:exception' , ( { message} ) => message . includes ( 'Accessing global variables is prohibited' ) ? false : true )
232+ cy . get ( 'button' ) . click ( )
228233 cy . get ( 'span' ) . should ( notContain ( 'evil' ) )
229234 } ,
230235)
You can’t perform that action at this time.
0 commit comments