Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.nyc_output
/**/lib
/**/build
*.tsbuildinfo
/**/test/output
coverage
full_stack_test_results
Expand Down
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker",
"vitest.explorer"
],
}
19 changes: 0 additions & 19 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,6 @@
"${workspaceFolder}/packages/itwin/tree-widget/lib/**/*.js"
]
},
{
"name": "Tests: Property-grid",
"cwd": "${workspaceFolder}/packages/itwin/property-grid",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/packages/itwin/property-grid/node_modules/mocha/bin/_mocha",
"args": [
"--config",
"./.mocharc.json",
"--no-timeouts"
],
"env": {
"NODE_ENV": "development",
"NODE_OPTIONS": "--enable-source-maps --import ../../../node-hooks/ignore-styles/register.cjs"
},
"outFiles": [
"${workspaceFolder}/packages/itwin/property-grid/lib/**/*.js"
]
},
{
"name": "Tests: Breakdown-trees",
"cwd": "${workspaceFolder}/packages/itwin/breakdown-trees",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "",
"packageName": "@itwin/property-grid-react",
"email": "100586436+JonasDov@users.noreply.github.com",
"dependentChangeType": "none"
}
8 changes: 0 additions & 8 deletions packages/itwin/property-grid/.mocharc.json

This file was deleted.

6 changes: 0 additions & 6 deletions packages/itwin/property-grid/.nycrc

This file was deleted.

4 changes: 4 additions & 0 deletions packages/itwin/property-grid/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@ Running the tests in a non-CI environment automatically updates all the screensh
**Note:** The screenshots might have slight visual differences between platforms. To ensure we always get consistent results, the screenshots should always be generated by running the tests in a docker container (`npm run test:e2e` script).

**Another note:** E2E tests are run against a specific iModel in our QA environment. Contact repository maintainers to get access to that iModel, if needed. The required credentials must be specified in `.env.e2e` at the package root - see `.env.e2e.template` for an example.

### Debugging

Vitest does not provide a practical way to launch and debug a specific test via `launch.json`. Instead, use the [Vitest extension](https://marketplace.visualstudio.com/items?itemName=vitest.explorer) (`vitest.explorer`) for VS Code. It integrates with the Test Explorer panel, allowing you to run and debug individual tests directly from the editor with breakpoints.
21 changes: 6 additions & 15 deletions packages/itwin/property-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,15 @@
"copy:public": "cpx \"./public/**/*\" ./lib/public",
"copy:cjs": "cpx \"./src/**/*.scss\" ./lib/cjs",
"copy:esm": "cpx \"./src/**/*.scss\" ./lib/esm",
"cover": "c8 npm run test",
"cover": "vitest run --coverage",
"extract-api": "betools extract-api --entry=lib/esm/property-grid-react --apiReportFolder=./api --apiReportTempFolder=./api/temp --apiSummaryFolder=./api --includeUnexportedApis",
"check-internal": "node ../../../scripts/checkInternal.js --apiSummary ./api/property-grid-react.api.md",
"lint": "npm run lint:eslint && npm run lint:stylelint",
"lint:eslint": "eslint \"./src/**/*.{ts,tsx}\"",
"lint:stylelint": "stylelint \"./src/**/*.scss\"",
"lint:fix": "npm run lint:eslint -- --fix && npm run lint:stylelint -- --fix",
"pseudolocalize": "betools pseudolocalize --englishDir ./public/locales/en --out ./lib/public/locales/en-PSEUDO",
"test:dev": "cross-env NODE_OPTIONS=\"--import ../../../node-hooks/ignore-styles/register.cjs\" mocha --enable-source-maps --config ./.mocharc.json",
"test": "npm run test:dev -- --parallel --jobs=4",
"test": "vitest run",
"test:e2e": "node ../../../scripts/run-e2e-with-docker.js property-grid",
Comment thread
JonasDov marked this conversation as resolved.
Resolved
"test:e2e:local": "node ../../../scripts/run-e2e-tests.js",
"test:e2e:debug": "cross-env PWDEBUG=1 playwright test --ui",
Expand Down Expand Up @@ -106,16 +105,10 @@
"@testing-library/dom": "^10.4.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/chai": "^4.3.20",
"@types/jsdom": "^27.0.0",
"@types/mocha": "^10.0.10",
"@types/node": "^22.19.8",
"@types/react": "^18.3.27",
"@types/react-dom": "^18.3.7",
"@types/sinon": "^21.0.0",
"@types/sinon-chai": "^4.0.0",
"c8": "^10.1.3",
"chai": "^6.2.2",
"@vitest/coverage-v8": "^4.1.1",
"cpx2": "^8.0.0",
"cross-env": "^10.1.0",
"dotenv": "^17.2.3",
Expand All @@ -124,23 +117,21 @@
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-unused-imports": "^4.3.0",
"global-jsdom": "^28.0.0",
"happy-dom": "^20.8.9",
"http-server": "^14.1.1",
"ignore-styles": "^5.0.1",
"jsdom": "^28.0.0",
"mocha": "^11.7.5",
"postcss": "^8.5.6",
"raf": "^3.4.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-redux": "^7.2.9",
"redux": "^4.2.1",
"rimraf": "^6.1.2",
"sinon": "^21.0.1",
"sinon-chai": "^4.0.1",
"sass-embedded": "^1.93.3",
"stylelint": "^17.1.1",
"stylelint-config-standard-scss": "^17.0.0",
"typescript": "~5.8.2",
"vitest": "^4.1.2",
"xmlhttprequest": "^1.8.0"
}
}
Loading
Loading