Files
explore/playwright/fixtures/injectMetaMaskProvider.ts
T
0c5a297834 "Add chain" button in the header (#3084)
* redesign "add chain" button

* fix wallet detection

* [skip ci] update default value for ENV

* fix tests

* return button to the footer and add source to mixpanel event

* regcred from helmfile for review

* [skip ci] remove wallets env from values for demo stand

* use react-query to cache detection result

* add cookie to hide button in the topbar

* add prefix to svg ids to fix rabby icon

* update screenshot

* remove unnecessary comment

---------

Co-authored-by: Nick Zenchik <[email protected]>
2025-11-17 18:15:21 +01:00

20 lines
484 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: {},
_state: {},
} as WalletProvider;
});
});
};
export default fixture;