Skip to content

Commit

Permalink
馃柤 E2E test Ambire click SVG (#1015)
Browse files Browse the repository at this point in the history
  • Loading branch information
yivlad committed Oct 31, 2022
1 parent 85cc201 commit cd47856
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/example/playwright/with-metamask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export const withMetamaskTest = (baseUrl: string) => {

const ambirePage = context.pages()[context.pages().length - 1]
pagesNumber = context.pages().length
await ambirePage.click(XPath.text('button', 'Metamask'))
await ambirePage.click(XPath.svgWithClass('AddAccount_metamask'))

// waiting for the metamask page to open
await waitForExpect(() => {
Expand Down
4 changes: 4 additions & 0 deletions packages/playwright/src/xpath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ export class XPath {
static class(element: keyof HTMLElementTagNameMap, text: string) {
return `//${element}[contains(@class, ${text})]`
}

static svgWithClass(text: string) {
return `//*[local-name()="svg" and contains(@class, "${text}")]`
}
}

2 comments on commit cd47856

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃帀 Published on https://usedapp.io as production
馃殌 Deployed on https://635fe916802d905bda3e71a3--usedapp-website.netlify.app

Please sign in to comment.