Skip to content

Commit

Permalink
✨ feat: Synpress with metamask mock
Browse files Browse the repository at this point in the history
  • Loading branch information
matstyler committed Apr 8, 2024
1 parent 46390a6 commit 276fbf2
Show file tree
Hide file tree
Showing 23 changed files with 1,215 additions and 6 deletions.
20 changes: 20 additions & 0 deletions examples/new-dawn/test/e2e/00_mock.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { testWithMetaMaskMock, MetaMaskMock } from "@synthetixio/synpress";

const test = testWithMetaMaskMock;

const { expect } = test;

test("should work to the MetaMask Test Dapp", async ({ page }) => {
const metamask = new MetaMaskMock(page);

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note test

Unused variable metamask.

await page.goto("/");

await expect(page.locator("#accounts")).toHaveText(
"0xd73b04b0e696b0945283defa3eee453814758f1a"
);

await page.locator("#getAccounts").click();
await expect(page.locator("#getAccountsResult")).toHaveText(
"0xd73b04b0e696b0945283defa3eee453814758f1a"
);
});
2 changes: 1 addition & 1 deletion packages/tsconfig/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2022"],
"lib": ["ES2022", "DOM"],
"moduleResolution": "bundler",
"module": "ES2022",
"verbatimModuleSyntax": true,
Expand Down
Loading

0 comments on commit 276fbf2

Please sign in to comment.