Skip to content

Commit d640cee

Browse files
ctw-joao-luisrodrigo-p-rodriguesdependabot[bot]gabriela-almeida-ctwaneuwald-ctw
authored
Release 1.26.0 (#1155)
## Description Release 1.26.0 ## Checklist - [ ] The web version was tested and it is running ok - [ ] The desktop version was tested and it is running ok - [ ] This change is covered by unit tests - [ ] Files constants.ts, types.ts and *.style.ts have been checked and relevant code snippets have been relocated <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added session-based MCAP URL resolution via deep links. * Enhanced remote file caching with configurable read-ahead optimization. * **Tests** * Expanded E2E test suite with smoke and regression test automation. * Improved test infrastructure with structured page-object patterns. * **Documentation** * Updated contributor guidelines with AI-assisted development workflows. * Added E2E testing documentation with best practices. * **Chores** * Updated dependencies including Playwright, Babel, and Jest. * Enhanced CI/CD workflows with parallel test execution. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Bezerra Luiz, (Luiz.Bezerra@ctw.bmwgroup.com) <luiz.bezerra+QCOM@ctw.bmwgroup.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: ctw-joao-luis <Joao.Luis@ctw.bmwgroup.com> Signed-off-by: Thomas Sedlmayer <tsedlmayer@pmsfit.de> Signed-off-by: Taeseung Sohn <paulsohnjp@gmail.com> Signed-off-by: Gabriela Almeida <gabriela.almeida@criticaltechworks.com> Signed-off-by: Bezerra Luiz, (Luiz.Bezerra@ctw.bmwgroup.com) <198787532+luiz-bezerra-ctw-bmwgroup-com_QCOM@users.noreply.github.com> Signed-off-by: joao-oliveira-ctw <joao.alves.oliveira@criticaltechworks.com> Signed-off-by: Bezerra Luiz, (Luiz.Bezerra@ctw.bmwgroup.com) <luiz.bezerra@ctw.bmwgroup.com> Co-authored-by: Rodrigo CTW <rodrigo.PE.rodrigues@ctw.bmwgroup.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gabriela Almeida <gabriela.almeida@criticaltechworks.com> Co-authored-by: Alexandre Neuwald CTW <Alexandre.Neuwald@ctw.bmwgroup.com> Co-authored-by: Luiz Bezerra <luiz.bezerra@ctw.bmwgroup.com> Co-authored-by: Bezerra Luiz, (Luiz.Bezerra@ctw.bmwgroup.com) <luiz.bezerra+QCOM@ctw.bmwgroup.com> Co-authored-by: Alexandre Neuwald <alexandre.neuwald@criticaltechworks.com> Co-authored-by: Bruno Abreu <bmachadorj@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Bezerra Luiz, (Luiz.Bezerra@ctw.bmwgroup.com) <198787532+luiz-bezerra-ctw-bmwgroup-com_QCOM@users.noreply.github.com> Co-authored-by: Thomas Sedlmayer <tsedlmayer@pmsfit.de> Co-authored-by: Taeseung Sohn <paulsohnjp@gmail.com> Co-authored-by: Planck-Ho <wenloong.he@gmail.com> Co-authored-by: lichtblick-bot <lichtblick@bmwgroup.com> Co-authored-by: andremarques94 <90326088+andremarques94@users.noreply.github.com> Co-authored-by: Taeseung Sohn <taeseung.sohn@tier4.jp> Co-authored-by: joao-oliveira-ctw <joao.alves.oliveira@criticaltechworks.com> Co-authored-by: cadkin <adkinscv@ornl.gov> Co-authored-by: udovonbmw <udo.rietschel@bmw.de> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: xucheng.zhang <xucheng.zhang@vbot.cn> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4cc9b39 commit d640cee

101 files changed

Lines changed: 5852 additions & 2907 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.coderabbit.yaml‎

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# CodeRabbit configuration for Lichtblick
2+
# https://docs.coderabbit.ai/guides/configure-coderabbit
3+
4+
language: "en-US"
5+
6+
reviews:
7+
profile: "chill"
8+
request_changes_workflow: false
9+
high_level_summary: true
10+
high_level_summary_placeholder: "@coderabbitai summary"
11+
auto_title_placeholder: "@coderabbitai"
12+
poem: false
13+
review_status: true
14+
collapse_walkthrough: false
15+
sequence_diagrams: true
16+
17+
path_filters:
18+
- "!node_modules/**"
19+
- "!yarn.lock"
20+
- "!blob-report/**"
21+
- "!test-results/**"
22+
- "!**/*.snap"
23+
- "!patches/**"
24+
25+
path_instructions:
26+
- path: "packages/**"
27+
instructions: |
28+
This is a shared package used by both the desktop (Electron) and web app.
29+
Ensure changes are compatible with both targets and do not introduce platform-specific APIs.
30+
Pay attention to exports — breaking changes affect all consumers.
31+
32+
- path: "desktop/**"
33+
instructions: |
34+
Electron desktop app code. Check for security issues common in Electron (contextIsolation,
35+
nodeIntegration, remote module usage). Ensure IPC communication is properly validated.
36+
37+
- path: "web/**"
38+
instructions: |
39+
Web app code. Flag any Node.js-only APIs or Electron-specific imports.
40+
41+
- path: "e2e/**"
42+
instructions: |
43+
Playwright end-to-end tests. Ensure tests follow the GWT (Given/When/Then) pattern,
44+
use stable selectors (data-testid or accessible roles), and avoid arbitrary timeouts.
45+
46+
- path: "**/*.test.ts"
47+
instructions: |
48+
Jest unit tests. Ensure tests are meaningful, not just coverage padding.
49+
Avoid mocking internals — prefer testing behavior over implementation.
50+
Ensure tests follow the GWT pattern and use descriptive test names.
51+
52+
- path: "**/*.style.ts"
53+
instructions: |
54+
Style files using MUI/emotion. Verify no hardcoded colors that bypass the theme system.
55+
56+
- path: "**/*.constants.ts"
57+
instructions: |
58+
Constants files. Ensure no sensitive information (API keys, secrets) is hardcoded.
59+
60+
- path: "**/*.types.ts"
61+
instructions: |
62+
Type definition files. Check for accurate and comprehensive type definitions.
63+
Ensure no `any` types are used without justification.
64+
65+
auto_review:
66+
enabled: true
67+
ignore_title_keywords:
68+
- "WIP"
69+
- "Draft"
70+
- "[SKIP CI]"
71+
drafts: false
72+
base_branches:
73+
- "develop"
74+
- "main"
75+
labels: ["!dependabot"]
76+
ignore_usernames: ["lichtblick-bot", "dependabot"] # ignore bot PRs
77+
78+
chat:
79+
auto_reply: true
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
---
2+
name: Lichtblick E2E Test
3+
description: Creates Playwright E2E tests for the Lichtblick desktop (Electron) and web apps. Uses source code reading and existing test files to discover selectors, generates accurate tests with GWT pattern. MCP browser is for web tests only.
4+
argument-hint: A feature or flow to test, e.g., "loop playback toggle" or "opening a panel via the sidebar".
5+
tools: [read, edit, search, browser, todo]
6+
---
7+
8+
# E2E Test Agent — Lichtblick (`e2e/`)
9+
10+
You create Playwright E2E tests for the Lichtblick desktop (Electron) and web apps.
11+
12+
**Before writing any test**, always:
13+
14+
1. **Ask the user to start the application** before proceeding. For web tests, confirm that `yarn web:serve` is running at `http://localhost:8080`. For desktop tests, confirm that the desktop build exists (`yarn desktop:build:dev`). Do not proceed until the user confirms the app is running.
15+
2. Read the **test-conventions** skill — `read_file(".github/skills/test-conventions/SKILL.md")`
16+
3. Read the **e2e-playwright-mcp** skill — `read_file(".github/skills/e2e-playwright-mcp/SKILL.md")`
17+
4. Read at least one **existing sibling spec file** in the same `e2e/tests/desktop/` subdirectory to match the exact style
18+
19+
> **Critical Rules:**
20+
> - **Tagging (mandatory)**: Every test **must** include `{ tag: "@smoke" }` or `{ tag: "@regression" }` as the second argument. Use `@smoke` for tests that cover the primary happy-path a user encounters immediately (opening files, basic player controls, primary layout and menu actions). Use `@regression` for edge cases, secondary interactions (e.g., keyboard shortcut variants), extended scenarios (e.g., speed changes, timestamp switching), or slower workflows (e.g., extensions, remote data). **Never emit a test without a tag.**
21+
> - **Menu items**: ALWAYS use `getByRole("menuitem", { name: "..." })`, NEVER `getByTestId(...)` for menu items — even if `data-testid` exists on the `<MenuItem>` in source code. This is a codebase convention.
22+
> - **Hidden action buttons**: Some UI elements have `visibility: hidden` and only appear on hover (e.g., layout row action buttons). You MUST `hover()` the parent element before clicking. Read the source component's `.style.ts` file to check for CSS visibility rules.
23+
24+
---
25+
26+
## Workflow
27+
28+
### For Web Tests
29+
30+
1. Ensure `yarn web:serve` is running at `http://localhost:8080`
31+
2. Use Playwright MCP to navigate and explore the UI
32+
3. Take accessibility snapshots to discover stable selectors
33+
4. Interact with elements to verify behavior before coding
34+
5. Extract `data-testid`, role-based, or `aria-*` selectors
35+
6. Write the test following GWT pattern
36+
7. Run `yarn test:e2e:web:debug <filter>` to verify
37+
38+
### For Desktop Tests
39+
40+
> **DO NOT open a browser or use Playwright MCP tools for desktop tests.**
41+
> MCP controls Chromium (web), not Electron. Desktop tests run headless
42+
> (`headless: true` in `playwright.config.ts`) via a custom Electron fixture.
43+
> Selectors may behave differently in Electron vs Chrome. Using MCP adds
44+
> overhead and produces unreliable results for desktop tests.
45+
46+
1. **Discover selectors by reading code, not by browsing:**
47+
- Read existing desktop spec files in `e2e/tests/desktop/` to find proven selector patterns
48+
- Read Page Object Models in `e2e/page-objects/` for reusable methods
49+
- Read source components (e.g., `packages/suite-base/src/components/`) to find `data-testid` attributes, role-based elements, and CSS visibility rules
50+
2. Check source components for existing `data-testid` attributes
51+
3. If no stable selector exists, add `data-testid` (and `aria-pressed` for toggles) to the source component
52+
4. Write the test following GWT pattern
53+
5. Run `yarn test:e2e:desktop:debug <filter>` to verify
54+
55+
---
56+
57+
## File Naming & Placement
58+
59+
```
60+
e2e/tests/desktop/<category>/<feature-name>.desktop.spec.ts
61+
e2e/tests/web/<category>/<feature-name>.web.spec.ts
62+
```
63+
64+
**Platform choice**: Default to desktop. Use web only when the behavior is web-specific.
65+
66+
**Category directories** (desktop): `open-files/`, `sidebar/`, `layout/`, `extension/`, `panel/`, `player/`, `settings/`, `topics/`, `variables/`, `menu/`, `remote-data/`
67+
68+
---
69+
70+
## Required File Header
71+
72+
All spec files must include the MPL-2.0 SPDX header:
73+
74+
```typescript
75+
// SPDX-FileCopyrightText: Copyright (C) 2023-2026 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<lichtblick@bmwgroup.com>
76+
// SPDX-License-Identifier: MPL-2.0
77+
```
78+
79+
---
80+
81+
## Test Structure Template
82+
83+
### Desktop
84+
85+
```typescript
86+
// SPDX-FileCopyrightText: Copyright (C) 2023-2026 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<lichtblick@bmwgroup.com>
87+
// SPDX-License-Identifier: MPL-2.0
88+
89+
import { changeToEpochFormat } from "../../../fixtures/change-to-epoch-format";
90+
import { test, expect } from "../../../fixtures/electron";
91+
import { loadFiles } from "../../../fixtures/load-files";
92+
93+
/**
94+
* GIVEN <precondition>
95+
* WHEN <action>
96+
* THEN <expected outcome>
97+
*/
98+
test("should <outcome> when <condition>", { tag: "@smoke" }, async ({ mainWindow }) => {
99+
// Given
100+
await loadFiles({ mainWindow, filenames: "example.mcap" });
101+
102+
// When
103+
await mainWindow.getByTestId("some-button").click();
104+
105+
// Then
106+
await expect(mainWindow.getByTestId("some-button")).toHaveAttribute("aria-pressed", "true");
107+
});
108+
```
109+
110+
### Web
111+
112+
```typescript
113+
// SPDX-FileCopyrightText: Copyright (C) 2023-2026 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<lichtblick@bmwgroup.com>
114+
// SPDX-License-Identifier: MPL-2.0
115+
116+
import { test, expect } from "@playwright/test";
117+
118+
/**
119+
* GIVEN <precondition>
120+
* WHEN <action>
121+
* THEN <expected outcome>
122+
*/
123+
test("should <outcome> when <condition>", { tag: "@smoke" }, async ({ page }) => {
124+
// Given
125+
await page.goto("http://localhost:8080");
126+
await page.getByTestId("DataSourceDialog").getByTestId("CloseIcon").click();
127+
128+
// When
129+
await page.getByTestId("some-button").click();
130+
131+
// Then
132+
await expect(page.getByTestId("some-button")).toHaveAttribute("aria-pressed", "true");
133+
});
134+
```
135+
136+
---
137+
138+
## Source Instrumentation
139+
140+
When a source component lacks a stable selector, you **must** add `data-testid` (and `aria-pressed` for toggle buttons) directly to the source component. You have `edit` tool access for this purpose. Keep changes minimal — only add attributes needed for testability.
141+
142+
### Rules
143+
144+
- Add `data-testid` only when: no existing `data-testid`, `getByRole` is ambiguous, and MUI class names are the only alternative.
145+
- Place the attribute on the outermost interactive element (the actual `<button>`, `<input>`, etc.).
146+
- For toggle buttons, also add `aria-pressed={booleanState}` for state assertions.
147+
- **Do not** add `data-testid` to wrapper `<div>` elements — target the element that receives focus/click.
148+
149+
### Example — IconButton with toggle state
150+
151+
```tsx
152+
<HoverableIconButton
153+
data-testid="loop-playback-button"
154+
aria-pressed={repeat}
155+
onClick={toggleRepeat}
156+
// ... other props
157+
/>
158+
```
159+
160+
### Example — Regular Button with on/off state
161+
162+
```tsx
163+
<Button
164+
data-testid="sync-toggle-button"
165+
aria-pressed={syncInstances}
166+
onClick={toggleSync}
167+
>
168+
Sync
169+
</Button>
170+
```
171+
172+
See the **e2e-playwright-mcp** skill for full instrumentation rules and examples.
173+
174+
---
175+
176+
## Running Tests
177+
178+
```bash
179+
# Desktop
180+
yarn test:e2e:desktop:debug <filename-fragment> # Debug single test
181+
yarn test:e2e:desktop # All desktop tests
182+
183+
# Web
184+
yarn test:e2e:web:debug <filename-fragment> # Debug single test
185+
yarn test:e2e:web # All web tests
186+
```

0 commit comments

Comments
 (0)