mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* operation lifecycle accordion * operation entity * adapt layout to mobile device * basic operations view * pass response data to operation details * update types package * tac operation status and links to tx on ton * feature config, docs and operation badge * add info to tx page * add operations to search * search input on operations page * tests * update tooltips and temporary fix of ts * add InterFallback typeface with → glyph * design and api updates * support new API version * add time format toggle * add shield to entity icon * minor fixes * update screenshots * clean up * fix screenshot
30 lines
779 B
TypeScript
30 lines
779 B
TypeScript
import './fonts.css';
|
|
import './index.css';
|
|
import '../nextjs/global.css';
|
|
import { beforeMount } from '@playwright/experimental-ct-react/hooks';
|
|
import MockDate from 'mockdate';
|
|
import * as router from 'next/router';
|
|
|
|
const NEXT_ROUTER_MOCK = {
|
|
query: {},
|
|
pathname: '',
|
|
push: () => Promise.resolve(),
|
|
replace: () => Promise.resolve(),
|
|
};
|
|
|
|
beforeMount(async({ hooksConfig }: { hooksConfig?: { router: typeof router } }) => {
|
|
// Before mount, redefine useRouter to return mock value from test.
|
|
|
|
// @ts-ignore: I really want to redefine this property :)
|
|
// eslint-disable-next-line no-import-assign
|
|
router.useRouter = () => ({
|
|
...NEXT_ROUTER_MOCK,
|
|
...hooksConfig?.router,
|
|
});
|
|
|
|
// set current date
|
|
MockDate.set('2022-11-11T12:00:00Z');
|
|
});
|
|
|
|
export {};
|