This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: add playwright support (#167)
* feat!: add playwright support * fix: lint * fix: ci matrix * don't run snap tests on non flask * address PR comments
- Loading branch information
Showing
57 changed files
with
936 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ build | |
dist | ||
.vscode/ | ||
/metamask | ||
/.metamask | ||
.idea | ||
*.log | ||
test/dapp/data.js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { EventEmitter } from "events"; | ||
import { DappeteerPage } from "./page"; | ||
|
||
export interface DappeteerBrowser<Browser = unknown, Page = unknown> | ||
extends EventEmitter { | ||
isMetaMaskFlask(): boolean; | ||
|
||
pages(): Promise<DappeteerPage<Page>[]>; | ||
|
||
newPage(): Promise<DappeteerPage<Page>>; | ||
|
||
getSource(): Browser; | ||
|
||
close(): Promise<void>; | ||
|
||
wsEndpoint(): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export interface DappeteerElementHandle< | ||
Source = unknown, | ||
Element = HTMLElement | ||
> { | ||
$$(selector: string): Promise<DappeteerElementHandle[]>; | ||
evaluate(fn: (e: Element) => void | Promise<void>): Promise<void>; | ||
type(value: string): Promise<void>; | ||
click(): Promise<void>; | ||
hover(): Promise<void>; | ||
getSource(): Source; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
import { Browser, Page } from "puppeteer"; | ||
|
||
import { Dappeteer, LaunchOptions, MetaMaskOptions } from ".."; | ||
import { Dappeteer, DappeteerLaunchOptions, MetaMaskOptions } from ".."; | ||
import { DappeteerBrowser } from "../browser"; | ||
import { DappeteerPage } from "../page"; | ||
|
||
declare global { | ||
// eslint-disable-next-line @typescript-eslint/no-namespace | ||
namespace NodeJS { | ||
interface Global { | ||
page: Page; | ||
browser: Browser; | ||
page: DappeteerPage; | ||
browser: DappeteerBrowser; | ||
metaMask: Dappeteer; | ||
} | ||
} | ||
} | ||
|
||
export type DapeteerJestConfig = Partial<{ | ||
dappeteer: LaunchOptions; | ||
dappeteer: DappeteerLaunchOptions; | ||
metaMask: MetaMaskOptions; | ||
}>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.