Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Wxh16144 committed Jan 23, 2025
1 parent 82ed0f5 commit 365edd5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 15 additions & 2 deletions cypress/e2e/image-diff.cy.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
describe('website', () => {
it('example', () => {
cy.visit('/example/source');
// 不需要样式,只需要内容视觉对比
cy.intercept(
{
url: '*.css',
method: 'GET',
},
{
statusCode: 200,
body: `* { font-family: "sans-serif" !important; }`,
headers: {
'content-type': 'text/css',
},
},
);

// cy.get('.markdown').invoke('css', 'font-family', 'unset');
cy.visit('/example/source');

// 隐藏头部,规避头部遮盖内容
cy.get('.dumi-default-header').hideElement();
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"moduleResolution": "bundler",
"jsx": "react-jsx",
"baseUrl": ".",
"types": ["vitest/globals"],
"types": ["vitest/globals", "cypress", "node"],
"paths": {
"@@/*": [".dumi/tmp/*"]
}
Expand Down

0 comments on commit 365edd5

Please sign in to comment.