| { |
| "Injected should get selectors for an element - 1": [ |
| [ |
| "#buttonNoARIA" |
| ], |
| [ |
| "xpath///*[@id=\"buttonNoARIA\"]" |
| ], |
| [ |
| "pierce/#buttonNoARIA" |
| ] |
| ], |
| "Injected should get selectors for elements with custom selector attributes - 1": [ |
| [ |
| [ |
| "[data-testid='unique']" |
| ], |
| [ |
| "xpath///*[@data-testid=\"unique\"]" |
| ], |
| [ |
| "pierce/[data-testid='unique']" |
| ] |
| ], |
| [ |
| [ |
| "[data-testid='\\31 23456789']" |
| ], |
| [ |
| "xpath///*[@data-testid=\"123456789\"]" |
| ], |
| [ |
| "pierce/[data-testid='\\31 23456789']" |
| ], |
| [ |
| "text/Custom selector (invalid" |
| ] |
| ], |
| [ |
| [ |
| "[data-qa='custom-id']", |
| "[data-testid='shadow\\ button']" |
| ], |
| [ |
| "xpath///*[@data-qa=\"custom-id\"]", |
| "xpath///*[@data-testid=\"shadow button\"]" |
| ], |
| [ |
| "pierce/[data-testid='shadow\\ button']" |
| ], |
| [ |
| "text/Shadow button" |
| ] |
| ] |
| ], |
| "Injected should get selectors for shadow root elements - 1": [ |
| [ |
| "main > shadow-css-selector-element", |
| "#insideShadowRoot" |
| ], |
| [ |
| "xpath//html/body/main/shadow-css-selector-element", |
| "xpath///*[@id=\"insideShadowRoot\"]" |
| ], |
| [ |
| "pierce/main > shadow-css-selector-element", |
| "pierce/#insideShadowRoot" |
| ] |
| ], |
| "Injected should get an ARIA selector for shadow root elements - 1": [ |
| [ |
| "aria/[role=\"main\"]", |
| "aria/login" |
| ], |
| [ |
| "div:nth-of-type(2) > shadow-aria-selector-element", |
| "button" |
| ], |
| [ |
| "xpath//html/body/div[2]/shadow-aria-selector-element", |
| "xpath//button" |
| ], |
| [ |
| "pierce/div:nth-of-type(2) > shadow-aria-selector-element", |
| "pierce/button" |
| ] |
| ], |
| "Injected should not get an ARIA selector if the target element has no name or role - 1": [ |
| [ |
| "#no-aria-name-or-role" |
| ], |
| [ |
| "xpath///*[@id=\"no-aria-name-or-role\"]" |
| ], |
| [ |
| "pierce/#no-aria-name-or-role" |
| ] |
| ], |
| "Injected CSS selectors should return not-optimized CSS selectors for duplicate elements - 1": [ |
| "div:nth-of-type(3) > div:nth-of-type(2)" |
| ], |
| "Injected Text selectors should return a text selector for elements < minimum length - 1": [ |
| "text/length a 11" |
| ], |
| "Injected Text selectors should return a text selector for elements == minimum length - 1": [ |
| "text/length aa 12" |
| ], |
| "Injected Text selectors should return a text selector for elements == maximum length - 1": [ |
| "text/length aaaaaaaaa aaaaaaaaa aaaaaaaaa aaaaaaaaa aaaaaaaaa aaaa 64" |
| ], |
| "Injected Text selectors should return a text selector correctly with same prefix elements - Smaller": [ |
| "text/length aaaaaaaaa aaaaaaaaa aa 32" |
| ], |
| "Injected Text selectors should return a text selector correctly with same prefix elements - Larger": [ |
| "text/length aaaaaaaaa aaaaaaaaa aaa 33" |
| ], |
| "Injected Text selectors should trim text selectors - 1": [ |
| "text/with newlines" |
| ] |
| } |