Commit 66320d00 authored by tom's avatar tom

inline fonts and mock date globally

parent 736e6bf2
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -4,38 +4,6 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Testing Page</title>
<style>
@font-face {
font-family: Poppins;
src: url(/playwright/fonts/Poppins/Poppins-SemiBold.ttf);
font-weight: 600;
}
@font-face {
font-family: Poppins;
src: url(/playwright/fonts/Poppins/Poppins-Medium.ttf);
font-weight: 500;
}
@font-face {
font-family: Poppins;
src: url(/playwright/fonts/Poppins/Poppins-Regular.ttf);
font-weight: 400;
}
@font-face {
font-family: Inter;
src: url(/playwright/fonts/Inter/Inter-SemiBold.ttf);
font-weight: 600;
}
@font-face {
font-family: Inter;
src: url(/playwright/fonts/Inter/Inter-Medium.ttf);
font-weight: 500;
}
@font-face {
font-family: Inter;
src: url(/playwright/fonts/Inter/Inter-Regular.ttf);
font-weight: 400;
}
</style>
</head>
<body>
<div id="root"></div>
......
// Import styles, initialize component theme here.
// import '../src/common.css';
import './fonts.css';
import { beforeMount } from '@playwright/experimental-ct-react/hooks';
import MockDate from 'mockdate';
import * as router from 'next/router';
beforeMount(async({ hooksConfig }) => {
// Before mount, redefine useRouter to return mock value from test.
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: I really want to redefine this property :)
router.useRouter = () => hooksConfig.router;
// set current date
MockDate.set('2022-11-11');
});
export {};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment