-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(report): supports playwright test report generation (#15)
* chore: collect playwright test data * feat: init * feat(visualizer-report): add visualizer-report project * feat(visualizer-report): add visualizer-report project * chore: add report test data * chore: add report test data * chore: optimize generate playwright test data * chore: optimize report logic * chore: optimize report logic * chore: optimize report logic * chore: optimize report logic * chore: optimize report logic * chore(cd): ignore unless code * chore: modify test command * chore: optimize sidebar content * chore: optimize report logic
- Loading branch information
Showing
43 changed files
with
4,353 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
chrome >= 51 | ||
edge >= 15 | ||
firefox >= 54 | ||
safari >= 10 | ||
ios_saf >= 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Modern.js App | ||
|
||
## Setup | ||
|
||
Install the dependencies: | ||
|
||
```bash | ||
pnpm install | ||
``` | ||
|
||
## Get Started | ||
|
||
Start the dev server: | ||
|
||
```bash | ||
pnpm dev | ||
``` | ||
|
||
Enable optional features or add a new entry: | ||
|
||
```bash | ||
pnpm new | ||
``` | ||
|
||
Build the app for production: | ||
|
||
```bash | ||
pnpm build | ||
``` | ||
|
||
Preview the production build locally: | ||
|
||
```bash | ||
pnpm serve | ||
``` | ||
|
||
For more information, see the [Modern.js documentation](https://modernjs.dev/en). |
1 change: 1 addition & 0 deletions
1
...r-report/config/public/playwright-31de72c0afc13db9dc09-00e11f768b63da0c779a.web-dump.json
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...r-report/config/public/playwright-31de72c0afc13db9dc09-50c9ddc9a1d0c466547f.web-dump.json
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...r-report/config/public/playwright-45161835cecba6378a04-b2821fd5751102caa08c.web-dump.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"test-list":[{"testId":"45161835cecba6378a04-b2821fd5751102caa08c","title":"ai todo","status":"passed","duration":22204,"location":{"file":"/Users/bytedance/github/midscene/packages/web-integration/tests/e2e/ai-auto-todo.spec.ts","line":8,"column":5},"dumpPath":"/Users/bytedance/github/midscene/packages/web-integration/midscene_run/playwright-45161835cecba6378a04-b2821fd5751102caa08c.web-dump.json"},{"testId":"31de72c0afc13db9dc09-50c9ddc9a1d0c466547f","title":"ai order2","status":"passed","duration":40848,"location":{"file":"/Users/bytedance/github/midscene/packages/web-integration/tests/e2e/ai-xicha.spec.ts","line":36,"column":5},"dumpPath":"/Users/bytedance/github/midscene/packages/web-integration/midscene_run/playwright-31de72c0afc13db9dc09-50c9ddc9a1d0c466547f.web-dump.json"},{"testId":"31de72c0afc13db9dc09-00e11f768b63da0c779a","title":"ai order","status":"passed","duration":51045,"location":{"file":"/Users/bytedance/github/midscene/packages/web-integration/tests/e2e/ai-xicha.spec.ts","line":9,"column":5},"dumpPath":"/Users/bytedance/github/midscene/packages/web-integration/midscene_run/playwright-31de72c0afc13db9dc09-00e11f768b63da0c779a.web-dump.json"}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import path from 'path'; | ||
import { appTools, defineConfig } from '@modern-js/app-tools'; | ||
|
||
// https://modernjs.dev/en/configure/app/usage | ||
export default defineConfig({ | ||
source: { | ||
// Prevent pnpm workspace from causing dev dependencies on npm to take effect | ||
alias: { | ||
react: path.resolve(__dirname, 'node_modules/react'), | ||
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'), | ||
}, | ||
}, | ||
runtime: { | ||
router: true, | ||
}, | ||
output: { | ||
disableSourceMap: false, | ||
}, | ||
plugins: [ | ||
appTools({ | ||
bundler: 'experimental-rspack', | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"name": "@midscene/visualizer-report", | ||
"version": "0.0.1", | ||
"scripts": { | ||
"reset": "npx rimraf ./**/node_modules", | ||
"dev": "modern dev", | ||
"build": "MODERNJS_DEPLOY=node modern deploy", | ||
"start": "modern start", | ||
"serve": "modern serve", | ||
"new": "modern new", | ||
"lint": "modern lint", | ||
"upgrade": "modern upgrade" | ||
}, | ||
"files": [ | ||
"dist", | ||
".output", | ||
"README.md" | ||
], | ||
"engines": { | ||
"node": ">=16.18.1" | ||
}, | ||
"lint-staged": { | ||
"*.{js,jsx,ts,tsx,mjs,cjs}": [ | ||
"node --max_old_space_size=8192 ./node_modules/eslint/bin/eslint.js --fix --color --cache --quiet" | ||
] | ||
}, | ||
"eslintIgnore": [ | ||
"node_modules/", | ||
"dist/" | ||
], | ||
"dependencies": { | ||
"@modern-js/runtime": "2.56.2", | ||
"@midscene/visualizer": "workspace:*", | ||
"react": "~18.2.0", | ||
"react-dom": "~18.2.0", | ||
"antd": "5.19.3" | ||
}, | ||
"devDependencies": { | ||
"@modern-js/app-tools": "2.56.2", | ||
"@modern-js/eslint-config": "2.56.2", | ||
"@modern-js/tsconfig": "2.56.2", | ||
"@modern-js-app/eslint-config": "2.56.2", | ||
"typescript": "~5.0.4", | ||
"@types/jest": "~29.2.4", | ||
"@types/node": "~16.11.7", | ||
"@types/react": "18.3.3", | ||
"@types/react-dom": "18.3.0", | ||
"lint-staged": "~13.1.0", | ||
"prettier": "~2.8.1", | ||
"husky": "~8.0.1", | ||
"rimraf": "~3.0.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { BrowserRouter, Route, Routes } from '@modern-js/runtime/router'; | ||
import { Report } from './pages/Report'; | ||
import { Home } from './pages/Home'; | ||
|
||
export default () => { | ||
return ( | ||
<BrowserRouter> | ||
<Routes> | ||
<Route index element={<Home />} /> | ||
<Route path="report" element={<Report />} /> | ||
</Routes> | ||
</BrowserRouter> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/// <reference types='@modern-js/app-tools/types' /> | ||
/// <reference types='@modern-js/runtime/types' /> | ||
/// <reference types='@modern-js/runtime/types/router' /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { defineRuntimeConfig } from '@modern-js/runtime'; | ||
|
||
export default defineRuntimeConfig({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
.nav { | ||
/* display: flex; | ||
justify-content: center; */ | ||
max-width: 680px; | ||
margin: 20px 0; | ||
} | ||
|
||
.container { | ||
max-width: 980px; | ||
margin: 0 auto; | ||
} | ||
|
||
.test-result { | ||
margin-top: 40px; | ||
} | ||
|
||
|
||
.test-details { | ||
margin-top: -1px; | ||
cursor: pointer; | ||
padding: 20px; | ||
border-top: 1px solid #ccc; | ||
} | ||
.test-details:hover { | ||
background-color: #d3d3d3; | ||
} | ||
|
||
.test-info { | ||
display: flex; | ||
} | ||
.test-name{ | ||
flex-grow: 1; | ||
font-weight: bold; | ||
font-size: medium; | ||
} | ||
|
||
.failed{ | ||
font-size: small; | ||
} | ||
.test-file-path { | ||
color: #6e7781; | ||
margin-top: 10px; | ||
} |
Oops, something went wrong.