Commit 710e26e6 authored by tom's avatar tom

add pathname to default hooks config in pw tests

parent 028f12f8
...@@ -161,6 +161,26 @@ ...@@ -161,6 +161,26 @@
"instanceLimit": 1 "instanceLimit": 1
} }
}, },
{
"type": "shell",
"command": "npx playwright show-report",
"problemMatcher": [],
"label": "pw: report",
"detail": "serve test report",
"presentation": {
"reveal": "always",
"panel": "shared",
"close": true,
"revealProblems": "onProblem",
},
"icon": {
"color": "terminal.ansiBlue",
"id": "output"
},
"runOptions": {
"instanceLimit": 1
}
},
// JEST TESTS // JEST TESTS
{ {
......
...@@ -5,6 +5,7 @@ import * as router from 'next/router'; ...@@ -5,6 +5,7 @@ import * as router from 'next/router';
const NEXT_ROUTER_MOCK = { const NEXT_ROUTER_MOCK = {
query: {}, query: {},
pathname: '',
}; };
beforeMount(async({ hooksConfig }) => { beforeMount(async({ hooksConfig }) => {
......
...@@ -12,6 +12,7 @@ const hooksConfig = { ...@@ -12,6 +12,7 @@ const hooksConfig = {
router: { router: {
route: '/blocks', route: '/blocks',
query: { id: '0xd789a607CEac2f0E14867de4EB15b15C9FFB5859' }, query: { id: '0xd789a607CEac2f0E14867de4EB15b15C9FFB5859' },
pathname: '/blocks',
}, },
}; };
......
...@@ -12,6 +12,7 @@ test('no auth', async({ mount, page }) => { ...@@ -12,6 +12,7 @@ test('no auth', async({ mount, page }) => {
const hooksConfig = { const hooksConfig = {
router: { router: {
asPath: '/', asPath: '/',
pathname: '/',
}, },
}; };
const component = await mount( const component = await mount(
......
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