Skip to content

Commit

Permalink
test(snapshot): added error page
Browse files Browse the repository at this point in the history
  • Loading branch information
GervinFung committed Mar 23, 2024
1 parent 1e21ce4 commit c6e111d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 1 deletion.
Binary file modified docs/element.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion script/test/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ const code = (
};

const main = () => {
const paths = generatePaths();
// concat error page because `generatePaths` is used for seo schema
// which should not include error page
const paths = generatePaths().concat('/error');

const numberOfParallelTests = 10;

Expand Down
6 changes: 6 additions & 0 deletions src/web/components/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ const Layout = (props: Readonly<PropsWithChildren>) => {
<GlobalStyles
styles={(theme) => {
return {
body: {
backgroundColor:
theme.palette.mode === 'dark'
? theme.palette.background.surface
: undefined,
},
'*::-webkit-scrollbar': {
width: 8,
},
Expand Down
Binary file added test/snapshot/snapshot-images/mobile/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/snapshot/snapshot-images/pc/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/snapshot/snapshot-images/tablet/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c6e111d

Please sign in to comment.