Skip to content

feat(inspect): e2e tests#3277

Open
ActiveChooN wants to merge 7 commits into
open-edge-platform:mainfrom
ActiveChooN:e2e-base-tests
Open

feat(inspect): e2e tests#3277
ActiveChooN wants to merge 7 commits into
open-edge-platform:mainfrom
ActiveChooN:e2e-base-tests

Conversation

@ActiveChooN
Copy link
Copy Markdown
Contributor

📝 Description

Added minimal e2e tests

✨ Changes

Select what type of change your PR is:

  • 🚀 New feature (non-breaking change which adds functionality)
  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🔄 Refactor (non-breaking change which refactors the code base)
  • ⚡ Performance improvements
  • 🎨 Style changes (code style/formatting)
  • 🧪 Tests (adding/modifying tests)
  • 📚 Documentation update
  • 📦 Build system changes
  • 🚧 CI/CD configuration
  • 🔧 Chore (general maintenance)
  • 🔒 Security update
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)

✅ Checklist

Before you submit your pull request, please make sure you have completed the following steps:

  • 📚 I have made the necessary updates to the documentation (if applicable).
  • 🧪 I have written tests that support my changes and prove that my fix is effective or my feature works (if applicable).
  • 🏷️ My PR title follows conventional commit format.

For more information about code review checklists, see the Code Review Checklist.

Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Copilot AI review requested due to automatic review settings January 19, 2026 18:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Copy Markdown
Contributor

@ashwinvaidya17 ashwinvaidya17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ActiveChooN
Copy link
Copy Markdown
Contributor Author

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>
Copilot AI review requested due to automatic review settings January 26, 2026 14:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread application/ui/tests/e2e/project-management.spec.ts
Comment thread application/ui/tests/e2e/project-management.spec.ts
Comment thread application/ui/tests/e2e/full-workflow.spec.ts Outdated
Comment thread application/ui/tests/e2e/full-workflow.spec.ts Outdated
Comment thread application/ui/tests/e2e/full-workflow.spec.ts Outdated
Comment thread application/ui/tests/e2e/full-workflow.spec.ts Outdated
Comment thread application/ui/tests/fixtures.ts
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Copilot AI review requested due to automatic review settings January 27, 2026 14:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread application/ui/tests/e2e/project-management.spec.ts
Comment thread application/ui/playwright.config.ts
@ActiveChooN ActiveChooN marked this pull request as ready for review January 27, 2026 15:18
@ActiveChooN ActiveChooN requested review from a team and MarkRedeman as code owners January 27, 2026 15:18
@ActiveChooN ActiveChooN requested a review from maxxgx as a code owner January 28, 2026 09:54
Comment thread application/ui/tests/e2e/dataset-management.spec.ts Dismissed

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

Detected possible user input going into a path.join or path.resolve function. This could possibly lead to a path traversal vulnerability, where the attacker can access arbitrary files stored in the file system. Instead, be sure to sanitize or validate user input first.
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

Detected possible user input going into a path.join or path.resolve function. This could possibly lead to a path traversal vulnerability, where the attacker can access arbitrary files stored in the file system. Instead, be sure to sanitize or validate user input first.

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

RegExp() called with a { page, createProject } function argument, this might allow an attacker to cause a Regular Expression Denial-of-Service (ReDoS) within your application as RegExP blocks the main thread. For this reason, it is recommended to use hardcoded regexes instead. If your regex is run on user-controlled input, consider performing input validation or use a regex checking/sanitization library such as https://www.npmjs.com/package/recheck to verify that the regex does not appear vulnerable to ReDoS.
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

RegExp() called with a { page, createProject } function argument, this might allow an attacker to cause a Regular Expression Denial-of-Service (ReDoS) within your application as RegExP blocks the main thread. For this reason, it is recommended to use hardcoded regexes instead. If your regex is run on user-controlled input, consider performing input validation or use a regex checking/sanitization library such as https://www.npmjs.com/package/recheck to verify that the regex does not appear vulnerable to ReDoS.
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

RegExp() called with a { page, createProject } function argument, this might allow an attacker to cause a Regular Expression Denial-of-Service (ReDoS) within your application as RegExP blocks the main thread. For this reason, it is recommended to use hardcoded regexes instead. If your regex is run on user-controlled input, consider performing input validation or use a regex checking/sanitization library such as https://www.npmjs.com/package/recheck to verify that the regex does not appear vulnerable to ReDoS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants