|
| 1 | +describe("[handlers]", () => { |
| 2 | + before(() => { |
| 3 | + cy.visit("/test/index.html"); |
| 4 | + }); |
| 5 | + |
| 6 | + it('should show error if the iframe does not have a title', () => { |
| 7 | + cy.get(` |
| 8 | + [onclick]:not(a):not(button):not([onkeydown]):not([onkeyup]):not([onkeypress]), |
| 9 | + [onclick][onkeyup]:not([tabindex]):not(a):not(button), |
| 10 | + [onclick][onkeyup][tabindex="-1"]:not(a):not(button), |
| 11 | + [onclick][onkeydown]:not([tabindex]):not(a):not(button), |
| 12 | + [onclick][onkeydown][tabindex="-1"]:not(a):not(button), |
| 13 | + [onclick][onkeypress]:not([tabindex]):not(a):not(button), |
| 14 | + [onclick][onkeypress][tabindex="-1"]:not(a):not(button), |
| 15 | + [ondblclick]:not(a):not(button):not([onkeydown]):not([onkeyup]):not([onkeypress]), |
| 16 | + [ondblclick][onkeyup]:not([tabindex]):not(a):not(button), |
| 17 | + [ondblclick][onkeyup][tabindex="-1"]:not(a):not(button), |
| 18 | + [ondblclick][onkeydown]:not([tabindex]):not(a):not(button), |
| 19 | + [ondblclick][onkeydown][tabindex="-1"]:not(a):not(button), |
| 20 | + [ondblclick][onkeypress]:not([tabindex]):not(a):not(button), |
| 21 | + [ondblclick][onkeypress][tabindex="-1"]:not(a):not(button), |
| 22 | + [onmousedown]:not(a):not(button):not([onkeydown]):not([onkeyup]):not([onkeypress]), |
| 23 | + [onmousedown][onkeyup]:not([tabindex]):not(a):not(button), |
| 24 | + [onmousedown][onkeyup][tabindex="-1"]:not(a):not(button), |
| 25 | + [onmousedown][onkeydown]:not([tabindex]):not(a):not(button), |
| 26 | + [onmousedown][onkeydown][tabindex="-1"]:not(a):not(button), |
| 27 | + [onmousedown][onkeypress]:not([tabindex]):not(a):not(button), |
| 28 | + [onmousedown][onkeypress][tabindex="-1"]:not(a):not(button), |
| 29 | + [onmouseup]:not(a):not(button):not([onkeydown]):not([onkeyup]):not([onkeypress]), |
| 30 | + [onmouseup][onkeyup]:not([tabindex]):not(a):not(button), |
| 31 | + [onmouseup][onkeyup][tabindex="-1"]:not(a):not(button), |
| 32 | + [onmouseup][onkeydown]:not([tabindex]):not(a):not(button), |
| 33 | + [onmouseup][onkeydown][tabindex="-1"]:not(a):not(button), |
| 34 | + [onmouseup][onkeypress]:not([tabindex]):not(a):not(button), |
| 35 | + [onmouseup][onkeypress][tabindex="-1"]:not(a):not(button), |
| 36 | + [onmouseover]:not(a):not(button), |
| 37 | + [onmouseenter]:not(a):not(button), |
| 38 | + [onmouseleave]:not(a):not(button) |
| 39 | + `) |
| 40 | + .each(element => { |
| 41 | + cy.get(element) |
| 42 | + .after('content') |
| 43 | + .should('eq', "WARNING (W0002): Potentially inaccessible click event used on non-clickable element. Ensure you have an accessible alternative."); |
| 44 | + }); |
| 45 | + }); |
| 46 | +}); |
0 commit comments