mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
* create storageState fixture * remove auth fixture * renaming * migrate bridge tokens and shibarium rollup tests * migrate to common app config * update screenshots * re-implement fixtures for mocking envs, features and auth state * update screenshot
19 lines
464 B
TypeScript
19 lines
464 B
TypeScript
import type { TestFixture, Page } from '@playwright/test';
|
|
|
|
import type { WalletProvider } from 'types/web3';
|
|
|
|
export type InjectMetaMaskProvider = () => Promise<void>;
|
|
|
|
const fixture: TestFixture<InjectMetaMaskProvider, { page: Page }> = async({ page }, use) => {
|
|
await use(async() => {
|
|
await page.evaluate(() => {
|
|
window.ethereum = {
|
|
isMetaMask: true,
|
|
_events: {},
|
|
} as WalletProvider;
|
|
});
|
|
});
|
|
};
|
|
|
|
export default fixture;
|