mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
20 lines
548 B
TypeScript
20 lines
548 B
TypeScript
import type { TestFixture, Page } from '@playwright/test';
|
|
|
|
import * as chainDataMock from 'mocks/multichain/chains';
|
|
|
|
export type MockEssentialDappsChainsConfigFixture = () => Promise<void>;
|
|
|
|
const fixture: TestFixture<MockEssentialDappsChainsConfigFixture, { page: Page }> = async({ page }, use) => {
|
|
await use(async() => {
|
|
await page.evaluate(([ chainDataMock ]) => {
|
|
window.__essentialDappsChains = {
|
|
chains: [
|
|
chainDataMock.chainA,
|
|
],
|
|
};
|
|
}, [ chainDataMock ]);
|
|
});
|
|
};
|
|
|
|
export default fixture;
|