Skip to content

test: logs feature tests#5561

Open
ActiveChooN wants to merge 38 commits intodevelopfrom
dkalinin/logs-feature-tests
Open

test: logs feature tests#5561
ActiveChooN wants to merge 38 commits intodevelopfrom
dkalinin/logs-feature-tests

Conversation

@ActiveChooN
Copy link
Contributor

Summary

Added e2e and component tests for the log feature

Depends on #5547

How to test

Checklist

  • The PR title and description are clear and descriptive
  • I have manually tested the changes
  • All changes are covered by automated tests
  • All related issues are linked to this PR (if applicable)
  • Documentation has been updated (if applicable)

Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
@github-actions github-actions bot added TEST Any changes in tests Geti Tune UI Issues related to Geti Tune UI labels Feb 18, 2026
@github-actions
Copy link

github-actions bot commented Feb 18, 2026

Docker Image Sizes

CPU

Image Size
geti-tune-cpu:pr-5561 1.01G
geti-tune-cpu:sha-5f4cda1 1.01G

GPU

Image Size
geti-tune-gpu:pr-5561 5.54G
geti-tune-gpu:sha-5f4cda1 5.54G

XPU

Image Size
geti-tune-xpu:pr-5561 3.33G
geti-tune-xpu:sha-5f4cda1 3.33G

Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
@github-actions
Copy link

github-actions bot commented Feb 19, 2026

📊 Test coverage report

Metric Coverage
Lines 38.4%
Functions 73.0%
Branches 87.4%
Statements 38.4%

Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
@ActiveChooN ActiveChooN marked this pull request as ready for review February 26, 2026 13:18
@ActiveChooN ActiveChooN requested a review from a team as a code owner February 26, 2026 13:18
Copilot AI review requested due to automatic review settings February 26, 2026 13:18
Copy link
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

Adds automated coverage for the new Training Logs feature introduced in #5547, spanning Playwright e2e flows (jobs + models) and React component tests for the log viewer UI.

Changes:

  • Add Playwright e2e specs for streaming (job) logs and historical (model) logs dialogs.
  • Add component tests for LogViewer and LogEntry, plus test infra updates (router render wrapper + missing DOM observer mock).
  • Extend MSW/fixture defaults and log-entry mocks to support logs endpoints and realistic log payloads.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
application/ui/tests/training-logs/training-logs-dialog.spec.ts New e2e coverage for training logs dialog (SSE + REST cases).
application/ui/tests/models/models.spec.ts Adds e2e coverage for opening/closing model training logs and error handling.
application/ui/tests/models/models-page.ts Adds page-object helpers for targeting a specific model and interacting with logs dialog.
application/ui/tests/jobs/jobs.spec.ts Updates jobs e2e coverage to include “View logs” button and dialog open/close flow.
application/ui/tests/jobs/jobs-page.ts Adds page-object helpers for “View logs” button and logs dialog controls.
application/ui/tests/fixtures.ts Adds default MSW handlers for job logs SSE and model logs REST endpoints.
application/ui/src/test-utils/render.tsx Changes RTL render to enable rerendering by recreating the router via a wrapper.
application/ui/src/setup-tests.ts Adds a jsdom IntersectionObserver mock.
application/ui/src/features/models/training-logs/log-viewer.component.test.tsx New component tests for filtering, search, empty states, and connection status.
application/ui/src/features/models/training-logs/log-entry.component.test.tsx New component tests for formatting and display of individual log entries.
application/ui/src/features/models/training-logs/hooks/use-model-logs.hook.ts Tweaks error handling to throw based on response.ok.
application/ui/mocks/mock-log-entry.ts Adds createMockLogs() helper to generate realistic test log arrays.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 54 to 64
export const render = (ui: ReactNode, options: RenderOptions = {}) => {
const testQueryClient = options.queryClient ?? createQueryClient();
const router = createTestRouter(ui, options, testQueryClient);

return rtlRender(<RouterProvider router={router} />);
const Wrapper = ({ children }: { children: ReactNode }) => {
const router = createTestRouter(children, options, testQueryClient);

return <RouterProvider router={router} />;
};

return rtlRender(ui, { wrapper: Wrapper, ...options });
};
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

{ wrapper: Wrapper, ...options } allows options.wrapper to override the required router/TestProviders wrapper, which can silently break tests if a caller passes a wrapper (or spreads an options object that includes one). Consider spreading options first and forcing wrapper: Wrapper last, and/or omitting non-RTL options (route/path/queryClient) from what you pass into rtlRender.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

merge conflicts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wdym?

Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Signed-off-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
@ActiveChooN ActiveChooN requested a review from jpggvilaca March 10, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Geti Tune UI Issues related to Geti Tune UI TEST Any changes in tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants