Skip to content

Commit

Permalink
fix(queries): escape string in "When I find element by title"
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Oct 6, 2023
1 parent e5edd72 commit 8aa5860
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/queries/title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import { setCypressElement } from '../utils';
*/
export function When_I_find_element_by_title(title: string) {
const selector = [
`svg title:contains('${title}')`,
`[title='${title}']`,
`svg title:contains(${JSON.stringify(title)})`,
`[title=${JSON.stringify(title)}]`,
].join(',');
setCypressElement(cy.get(selector).first());
}
Expand Down

0 comments on commit 8aa5860

Please sign in to comment.