feat(inspect): e2e tests#3277
Conversation
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
There was a problem hiding this comment.
Pull request overview
This PR adds end-to-end (e2e) testing infrastructure for the Geti Inspect application, transitioning from component tests to comprehensive workflow testing.
Changes:
- Replaced mock-based component tests with real API-backed e2e tests
- Added test fixtures for project management, dataset operations, and full workflow testing
- Updated Playwright configuration to support serial test execution and multiple test projects
Reviewed changes
Copilot reviewed 12 out of 33 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| application/ui/tests/tsconfig.json | Removed path alias configuration for test fixtures |
| application/ui/tests/main.spec.ts | Updated import to use relative path instead of path alias |
| application/ui/tests/fixtures.ts | Replaced MSW-based mocking with real API fixtures and helper functions |
| application/ui/tests/e2e/test-assets/exports/.gitignore | Added gitignore to preserve empty exports directory |
| application/ui/tests/e2e/project-management.spec.ts | Added e2e tests for project creation, renaming, deletion, and switching |
| application/ui/tests/e2e/full-workflow.spec.ts | Added comprehensive workflow test covering project setup, training, export, and pipeline configuration |
| application/ui/tests/e2e/dataset-management.spec.ts | Added e2e test for image upload functionality |
| application/ui/src/features/inspect/models/model-detail/model-detail.component.tsx | Added aria-label to export format radio buttons for better test selection |
| application/ui/serve.json | Added serve configuration with SPA rewrites and no-cache headers |
| application/ui/playwright.config.ts | Updated configuration for e2e testing with serial execution and backend auto-start support |
| application/ui/package.json | Updated test scripts from component to e2e naming |
| .github/workflows/geti-inspect.yaml | Disabled old component tests and added new e2e test job with backend auto-start |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
ashwinvaidya17
left a comment
There was a problem hiding this comment.
I am concerned about increasing the repo size by adding test images to it. Can we download a toy dataset on fly? https://github.com/open-edge-platform/anomalib/releases/download/hazelnut_toy_dataset/hazelnut_toy.zip
https://github.com/open-edge-platform/anomalib/releases/tag/hazelnut_toy_dataset
I don't think it's a big deal since all 20 images together is ~100KB. |
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 33 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 33 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| await test.step('upload training images', async () => { | ||
| const normalImages = Array.from({ length: 20 }, (_, i) => | ||
| path.join(TEST_ASSETS_DIR, 'normal', `${String(i + 1).padStart(3, '0')}.png`) |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal Warning test
| expect(filename).toMatch(/.*_patchcore_openvino.*\.zip$/i); | ||
|
|
||
| // Save the file to verify it | ||
| const downloadPath = path.join(TEST_EXPORT_DIR, filename); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal Warning test
|
|
||
| await page.goto(`/projects/${project1.id}`); | ||
| await page.waitForLoadState('domcontentloaded'); | ||
| await expect(page).toHaveURL(new RegExp(project1.id)); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.detect-non-literal-regexp.detect-non-literal-regexp Warning test
| await expect(page.getByRole('dialog')).toBeVisible(); | ||
|
|
||
| await page.getByRole('list').locator('li').filter({ hasText: 'Project Beta' }).click(); | ||
| await expect(page).toHaveURL(new RegExp(project2.id)); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.detect-non-literal-regexp.detect-non-literal-regexp Warning test
| await page.getByRole('button', { name: /Selected project Project Beta/i }).click(); | ||
| await expect(page.getByRole('dialog')).toBeVisible(); | ||
| await page.getByRole('list').locator('li').filter({ hasText: 'Project Alpha' }).click(); | ||
| await expect(page).toHaveURL(new RegExp(project1.id)); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.detect-non-literal-regexp.detect-non-literal-regexp Warning test
📝 Description
Added minimal e2e tests
✨ Changes
Select what type of change your PR is:
✅ Checklist
Before you submit your pull request, please make sure you have completed the following steps:
For more information about code review checklists, see the Code Review Checklist.