Skip to content

Feature/client test experiment#10069

Draft
eliandoran wants to merge 5 commits into
mainfrom
feature/client_test_experiment
Draft

Feature/client test experiment#10069
eliandoran wants to merge 5 commits into
mainfrom
feature/client_test_experiment

Conversation

@eliandoran

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

🖥️ App preview is ready!

🔗 Preview URL: https://pr-10069.trilium-app.pages.dev
📖 Production URL: https://app.triliumnotes.org

✅ All checks passed

This preview will be updated automatically with new commits.

@codecov

codecov Bot commented Jun 6, 2026

Copy link
Copy Markdown

Bundle Report

Changes will decrease total bundle size by 25.95kB (-0.03%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
client-esm* 39.85MB -56.52kB (-0.14%) ⬇️
standalone-esm 43.61MB 30.56kB (0.07%) ⬆️

ℹ️ *Bundle size includes cached data from a previous commit

Affected Assets, Files, and Routes:

view changes for bundle: client-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
src/src-*.js -741 bytes 530.86kB -0.14%
src/dist-*.js -26 bytes 56 bytes -31.71%
src/dist-*.js -5.58kB 921.78kB -0.6%
src/dist-*.js 26 bytes 82 bytes 46.43% ⚠️
src/ckeditor5-*.css -4.83kB 346.47kB -1.38%
src/content_renderer-*.js 13.44kB 332.98kB 4.2%
src/de-*.js -726 bytes 42.21kB -1.69%
src/de-*.js -190 bytes 38.26kB -0.49%
src/layout_commons-*.js -532 bytes 268.58kB -0.2%
src/src-*.css -1.01kB 247.31kB -0.41%
src/constants-*.js -1 bytes 208.83kB -0.0%
src/en-*.js -166 bytes 22.43kB -0.73%
src/en-*.js -647 bytes 29.32kB -2.16%
src/ru-*.js -295 bytes 54.77kB -0.54%
src/ru-*.js -1.07kB 57.87kB -1.82%
src/uk-*.js -1.1kB 57.31kB -1.89%
src/uk-*.js -287 bytes 52.12kB -0.55%
src/hi-*.js -319 bytes 45.28kB -0.7%
src/hi-*.js -1.25kB 63.95kB -1.92%
src/ckeditor5-*.js -49 bytes 62.45kB -0.08%
src/ar-*.js -969 bytes 54.27kB -1.75%
src/ar-*.js -242 bytes 48.57kB -0.5%
src/pl-*.js -742 bytes 41.97kB -1.74%
src/pl-*.js -206 bytes 37.85kB -0.54%
src/ja-*.js -800 bytes 45.78kB -1.72%
src/ja-*.js -203 bytes 40.45kB -0.5%
src/es-*.js -195 bytes 39.6kB -0.49%
src/es-*.js -749 bytes 41.94kB -1.75%
src/fr-*.js -203 bytes 36.03kB -0.56%
src/fr-*.js -749 bytes 43.62kB -1.69%
src/ro-*.js -776 bytes 43.25kB -1.76%
src/ro-*.js -219 bytes 39.01kB -0.56%
src/cs-*.js -743 bytes 42.46kB -1.72%
src/cs-*.js -198 bytes 37.25kB -0.53%
src/it-*.js -718 bytes 42.31kB -1.67%
src/it-*.js -189 bytes 39.08kB -0.48%
src/pt-*.js -725 bytes 41.46kB -1.72%
src/pt-*.js -230 bytes 38.77kB -0.59%
src/pt-*.js -764 bytes 42.06kB -1.78%
src/pt-*.js -189 bytes 38.06kB -0.49%
src/zh-*.js -635 bytes 36.04kB -1.73%
src/zh-*.js -672 bytes 36.05kB -1.83%
src/zh-*.js -156 bytes 34.04kB -0.46%
src/zh-*.js -162 bytes 33.84kB -0.48%
src/hooks-*.js -90 bytes 21.16kB -0.42%
src/ck-*.css -768 bytes 16.33kB -4.49%
src/calendar-*.js -1 bytes 13.66kB -0.01%
src/Attachment-*.js -439 bytes 7.38kB -5.62%
src/calendar-*.css -97 bytes 3.7kB -2.56%
src/Attachment-*.css -127 bytes 2.39kB -5.05%
src/Image-*.js -230 bytes 781 bytes -22.75%
src/Image-*.css 148 bytes 290 bytes 104.23% ⚠️
src/ImageViewer-*.js (Deleted) -37.62kB 0 bytes -100.0% 🗑️
src/ImageViewer-*.css (Deleted) -481 bytes 0 bytes -100.0% 🗑️
view changes for bundle: standalone-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/abstract_provider-D3DuWDcA.js (New) 2.14MB 2.14MB 100.0% 🚀
assets/parse_from_xlsx-DPyv7m3V.js (New) 937.62kB 937.62kB 100.0% 🚀
src/dist2.js 5.58kB 927.35kB 0.61%
src/src5.js 741 bytes 531.25kB 0.14%
src/ckeditor5-premium-features.css 4.83kB 351.3kB 1.4%
src/layout_commons.js 85 bytes 268.36kB 0.03%
src/src.css 1.01kB 247.98kB 0.41%
assets/src-DQGHCQ0-.js (New) 126.45kB 126.45kB 100.0% 🚀
assets/crypto_provider-BrKeifx0.js (New) 96.72kB 96.72kB 100.0% 🚀
assets/in_app_help_provider-DCDYdWH6.js (New) 71.14kB 71.14kB 100.0% 🚀
src/hi2.js 1.25kB 65.2kB 1.96%
src/ckeditor5-premium-features2.js 49 bytes 62.49kB 0.08%
src/ru2.js 1.07kB 58.94kB 1.85%
src/uk2.js 1.1kB 58.42kB 1.93%
src/ar2.js 969 bytes 55.23kB 1.79%
src/ru3.js 295 bytes 55.06kB 0.54%
src/uk3.js 287 bytes 52.41kB 0.55%
src/ar3.js 242 bytes 48.81kB 0.5%
src/ja2.js 800 bytes 46.58kB 1.75%
src/hi3.js 319 bytes 45.6kB 0.7%
src/fr2.js 749 bytes 44.37kB 1.72%
src/ro2.js 776 bytes 44.02kB 1.79%
src/cs2.js 743 bytes 43.2kB 1.75%
src/it2.js 718 bytes 43.03kB 1.7%
src/de2.js 726 bytes 42.94kB 1.72%
src/pt2.js 764 bytes 42.82kB 1.82%
src/pl2.js 742 bytes 42.71kB 1.77%
src/es2.js 749 bytes 42.69kB 1.79%
src/pt-br2.js 725 bytes 42.18kB 1.75%
src/ja3.js 203 bytes 40.66kB 0.5%
src/es3.js 195 bytes 39.79kB 0.49%
src/it3.js 189 bytes 39.27kB 0.48%
src/ro3.js 219 bytes 39.23kB 0.56%
src/pt3.js 230 bytes 39.0kB 0.59%
src/de3.js 190 bytes 38.45kB 0.5%
src/pt-br3.js 189 bytes 38.25kB 0.5%
src/pl3.js 206 bytes 38.05kB 0.54%
src/cs3.js 198 bytes 37.45kB 0.53%
src/zh.js 672 bytes 36.73kB 1.86%
src/zh-cn2.js 635 bytes 36.68kB 1.76%
src/fr3.js 203 bytes 36.23kB 0.56%
src/zh-cn3.js 156 bytes 34.2kB 0.46%
src/zh2.js 162 bytes 34.0kB 0.48%
assets/options_init-CT35dac1.js (New) 31.96kB 31.96kB 100.0% 🚀
src/en-gb2.js 647 bytes 29.97kB 2.21%
src/en-gb3.js 166 bytes 22.59kB 0.74%
src/ck-content.css 768 bytes 17.1kB 4.7%
assets/zip-CWvl5_0a.js (New) 11.33kB 11.33kB 100.0% 🚀
assets/browser_routes-DPavFRaG.js (New) 8.24kB 8.24kB 100.0% 🚀
assets/becca_loader-DdswPy5i.js (New) 5.66kB 5.66kB 100.0% 🚀
assets/local-server-worker-BPV2i3bC.js (New) 4.63kB 4.63kB 100.0% 🚀
assets/html-DXCCObgR.js (New) 2.88kB 2.88kB 100.0% 🚀
assets/ru-CcXJNyPh.js (New) 2.35kB 2.35kB 100.0% 🚀
assets/backup_provider-Dn9bRwh8.js (New) 2.3kB 2.3kB 100.0% 🚀
assets/uk-Bc7XOVGl.js (New) 2.27kB 2.27kB 100.0% 🚀
assets/log_provider-B2-EF44_.js (New) 1.96kB 1.96kB 100.0% 🚀
assets/0216__move_content_into_blobs-D-svscqG.js (New) 1.86kB 1.86kB 100.0% 🚀
assets/zip_export_provider_factory-COu3VnmF.js (New) 1.84kB 1.84kB 100.0% 🚀
assets/ar-w6PwnppA.js (New) 1.76kB 1.76kB 100.0% 🚀
assets/cs-C4N6V4cE.js (New) 1.74kB 1.74kB 100.0% 🚀
assets/pl-DmlNj2ZR.js (New) 1.7kB 1.7kB 100.0% 🚀
assets/hi-ClXeBr9d.js (New) 1.69kB 1.69kB 100.0% 🚀
assets/zh-cn-CGxS-ZdR.js (New) 1.5kB 1.5kB 100.0% 🚀
assets/de-CbgGBq5m.js (New) 1.48kB 1.48kB 100.0% 🚀
assets/zh-tw-DIwCf1uv.js (New) 1.47kB 1.47kB 100.0% 🚀
assets/ja-Di3ymppi.js (New) 1.3kB 1.3kB 100.0% 🚀
assets/pt-BXtbInyz.js (New) 1.26kB 1.26kB 100.0% 🚀
assets/ga-BBf2s2y5.js (New) 1.25kB 1.25kB 100.0% 🚀
assets/en-gb-nLynA8dT.js (New) 1.25kB 1.25kB 100.0% 🚀
assets/pt-br-B37dyXLe.js (New) 1.24kB 1.24kB 100.0% 🚀
assets/fr-DJ8I7kLC.js (New) 1.23kB 1.23kB 100.0% 🚀
assets/es-CV3avp3Y.js (New) 1.21kB 1.21kB 100.0% 🚀
assets/parse_from_csv-CFejNR3B.js (New) 1.21kB 1.21kB 100.0% 🚀
assets/it-B23KOjTi.js (New) 1.18kB 1.18kB 100.0% 🚀
assets/ro-Cp1cjlql.js (New) 1.18kB 1.18kB 100.0% 🚀
assets/0233__migrate_geo_map_to_collection-CCP8s4w2.js (New) 734 bytes 734 bytes 100.0% 🚀
assets/0220__migrate_images_to_attachments-ByIQLn8-.js (New) 629 bytes 629 bytes 100.0% 🚀
assets/en-DwEQII7J.js (New) 587 bytes 587 bytes 100.0% 🚀
assets/0234__migrate_ai_chat_to_code-BR5OxqHN.js (New) 400 bytes 400 bytes 100.0% 🚀
assets/markdown-DJI-wkA6.js (New) 305 bytes 305 bytes 100.0% 🚀
assets/abstract_provider-DmNoI9rS.js (Deleted) -2.14MB 0 bytes -100.0% 🗑️
assets/parse_from_xlsx-DcB8Fjr4.js (Deleted) -937.62kB 0 bytes -100.0% 🗑️
assets/src-DZmVQGjw.js (Deleted) -126.45kB 0 bytes -100.0% 🗑️
assets/crypto_provider-D_yrCq3v.js (Deleted) -96.72kB 0 bytes -100.0% 🗑️
assets/in_app_help_provider-DdjzzTNc.js (Deleted) -71.14kB 0 bytes -100.0% 🗑️
assets/options_init-C-fSdP4l.js (Deleted) -31.96kB 0 bytes -100.0% 🗑️
assets/zip-ClyQner8.js (Deleted) -11.33kB 0 bytes -100.0% 🗑️
assets/browser_routes-D4QGf0uJ.js (Deleted) -8.24kB 0 bytes -100.0% 🗑️
assets/becca_loader-BfF84CDI.js (Deleted) -5.66kB 0 bytes -100.0% 🗑️
assets/local-server-worker-_IaQhqDd.js (Deleted) -4.63kB 0 bytes -100.0% 🗑️
assets/html-Bq6He4lr.js (Deleted) -2.88kB 0 bytes -100.0% 🗑️
assets/ru-BVfS1nLb.js (Deleted) -2.35kB 0 bytes -100.0% 🗑️
assets/backup_provider-BTTr-ry3.js (Deleted) -2.3kB 0 bytes -100.0% 🗑️
assets/uk-BqHKGGeO.js (Deleted) -2.27kB 0 bytes -100.0% 🗑️
assets/log_provider-DHJM81y9.js (Deleted) -1.96kB 0 bytes -100.0% 🗑️
assets/0216__move_content_into_blobs-C31MAgBQ.js (Deleted) -1.86kB 0 bytes -100.0% 🗑️
assets/zip_export_provider_factory-BfBqpGRz.js (Deleted) -1.84kB 0 bytes -100.0% 🗑️
assets/ar-hbzVB5ct.js (Deleted) -1.76kB 0 bytes -100.0% 🗑️
assets/cs-ZCkXIgks.js (Deleted) -1.74kB 0 bytes -100.0% 🗑️
assets/pl-CVZ8bSn6.js (Deleted) -1.7kB 0 bytes -100.0% 🗑️
assets/hi-C4sbcvGd.js (Deleted) -1.69kB 0 bytes -100.0% 🗑️
assets/zh-cn-CdPAmAHs.js (Deleted) -1.5kB 0 bytes -100.0% 🗑️
assets/de-B1ur_bDQ.js (Deleted) -1.48kB 0 bytes -100.0% 🗑️
assets/zh-tw-C2Yd61dz.js (Deleted) -1.47kB 0 bytes -100.0% 🗑️
assets/ja-BHilBkHF.js (Deleted) -1.3kB 0 bytes -100.0% 🗑️
assets/pt-CfvFC8Hm.js (Deleted) -1.26kB 0 bytes -100.0% 🗑️
assets/ga-CF6NwOW7.js (Deleted) -1.25kB 0 bytes -100.0% 🗑️
assets/en-gb-DKdU57kR.js (Deleted) -1.25kB 0 bytes -100.0% 🗑️
assets/pt-br-DZ3RYjeF.js (Deleted) -1.24kB 0 bytes -100.0% 🗑️
assets/fr-B0Mhz4s6.js (Deleted) -1.23kB 0 bytes -100.0% 🗑️
assets/es-CClaqQQ0.js (Deleted) -1.21kB 0 bytes -100.0% 🗑️
assets/parse_from_csv-BgbFVHlR.js (Deleted) -1.21kB 0 bytes -100.0% 🗑️
assets/it-4kCng0ZU.js (Deleted) -1.18kB 0 bytes -100.0% 🗑️
assets/ro-DIWsZS2W.js (Deleted) -1.18kB 0 bytes -100.0% 🗑️
assets/0233__migrate_geo_map_to_collection-BPdNBibA.js (Deleted) -734 bytes 0 bytes -100.0% 🗑️
assets/0220__migrate_images_to_attachments-DjIYT-6F.js (Deleted) -629 bytes 0 bytes -100.0% 🗑️
assets/en-DkHl-K2P.js (Deleted) -587 bytes 0 bytes -100.0% 🗑️
assets/0234__migrate_ai_chat_to_code-BouZrMik.js (Deleted) -400 bytes 0 bytes -100.0% 🗑️
assets/markdown-DEpmA61S.js (Deleted) -305 bytes 0 bytes -100.0% 🗑️

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces comprehensive unit tests (*.spec.tsx) for various Preact widgets, collections, and dialogs in the client application, along with updated documentation and shared test helpers (mocks.ts, render.tsx, setup.ts) to streamline test writing. The feedback recommends importing createContext from from "preact" at the top level of column.spec.tsx and using it directly inside the hoisted vi.mock factory instead of require("preact") to prevent potential Preact instance mismatch and context resolution failures.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +1 to +2
import { act } from "preact/test-utils";
import { beforeEach, describe, expect, it, vi } from "vitest";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To support using createContext directly in the hoisted vi.mock factory (and avoid potential context mismatch issues from require("preact")), import createContext from "preact" at the top level.

Suggested change
import { act } from "preact/test-utils";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { createContext } from "preact";
import { act } from "preact/test-utils";
import { beforeEach, describe, expect, it, vi } from "vitest";

Comment on lines +13 to +15
vi.mock(".", () => {
const { createContext: cc } = require("preact");
const BoardViewContext = cc(undefined);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using require("preact") inside a hoisted vi.mock factory can lead to multiple instances of Preact being loaded or mismatched context objects, causing useContext(BoardViewContext) to silently fail (returning undefined instead of the provided value). To ensure context resolution works reliably and consistently with other test files (like card.spec.tsx), use the top-level imported createContext directly.

Suggested change
vi.mock(".", () => {
const { createContext: cc } = require("preact");
const BoardViewContext = cc(undefined);
vi.mock(".", () => {
const BoardViewContext = createContext(undefined);

@codecov

codecov Bot commented Jun 6, 2026

Copy link
Copy Markdown

❌ 31 Tests Failed:

Tests completed Failed Passed Skipped
4169 31 4138 0
View the top 3 failed test(s) by shortest run time
src/widgets/NoteDetail.spec.tsx > NoteDetail widget resolution branches > resolves a widget provided as a direct VNode
Stack Traces | 0.000883s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail printing > removes the iframe when its contentWindow is unavailable
Stack Traces | 0.000891s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail events > executeWithTypeWidget resolves the component for the active type
Stack Traces | 0.000899s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail events > executeInActiveNoteDetailWidget runs the callback only when active
Stack Traces | 0.000908s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail events > refreshes on readOnlyTemporarilyDisabled and noteTypeMimeChanged
Stack Traces | 0.000944s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail printing > skips printing for inactive context, missing note, and PDF files
Stack Traces | 0.000949s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail events > ignores activeNoteChanged for a different context
Stack Traces | 0.000954s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail events > focuses the detail on activeNoteChanged when nothing relevant is focused
Stack Traces | 0.000967s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail electronApi printing > renders an error print report without a stack (no button)
Stack Traces | 0.000971s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail electronApi printing > renders an error print report with a stack-trace button
Stack Traces | 0.000988s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail electronApi printing > renders a collection report with ignored notes and opens details
Stack Traces | 0.000997s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail printing > delegates to showPrintPreview under Electron with a note path
Stack Traces | 0.00101s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail printing > drives the browser iframe onload flow (progress + note-ready + print)
Stack Traces | 0.00102s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail widget resolution branches > activates a deferred tab via the isActive effect when a new active context arrives
Stack Traces | 0.00102s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail render > keeps an inactive deferred tab from loading until activated
Stack Traces | 0.00103s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail events > ignores entitiesReloaded when nothing affects the note
Stack Traces | 0.00104s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail electronApi printing > ignores an empty/undefined print report and a collection with no ignored notes
Stack Traces | 0.00107s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail render > resolves a full-height web-view widget
Stack Traces | 0.00107s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail events > triggers noteTypeMimeChanged for an affecting label/relation change
Stack Traces | 0.00111s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail render > renders the fixed tree on mobile for launchbar config notes
Stack Traces | 0.00118s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail events > triggers noteTypeMimeChanged when the resolved type changes
Stack Traces | 0.00121s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail printing > uses the browser iframe fallback when not on Electron
Stack Traces | 0.00124s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail electronApi printing > subscribes to print progress/done and cleans up on unmount
Stack Traces | 0.00128s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail render > resolves a widget exposed as a plain function (not a module default)
Stack Traces | 0.00135s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail events > triggers noteTypeMimeChanged on a content reload via handleEvent
Stack Traces | 0.00149s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail render > applies full-height class for a note-map view
Stack Traces | 0.00154s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/NoteDetail.spec.tsx > NoteDetail render > renders the empty widget for a null note (new tab)
Stack Traces | 0.00162s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/type_widgets/Attachment.spec.tsx > AttachmentActions > copies an image reference to clipboard for an image attachment
Stack Traces | 0.00988s run time
AssertionError: expected "vi.fn()" to be called at least once
 ❯ .../widgets/type_widgets/Attachment.spec.tsx:367:53
src/widgets/dialogs/PopupEditor.spec.tsx > PopupEditor — initial structure > filters the popup-hidden floating buttons out of the desktop list
Stack Traces | 0.0119s run time
AssertionError: expected '16' to be '15' // Object.is equality

Expected: "15"
Received: "16"

 ❯ .../widgets/dialogs/PopupEditor.spec.tsx:120:48
src/widgets/NoteDetail.spec.tsx > NoteDetail render > renders the root container and resolves a text widget for the active tab
Stack Traces | 0.012s run time
TypeError: Cannot read properties of undefined (reading 'getActiveMainContext')
 ❯ isInActiveTab src/widgets/NoteDetail.tsx:51:65
 ❯ src/widgets/NoteDetail.tsx:52:90
 ❯ f ../...../hooks/src/index.js:554:33
 ❯ invokeOrReturn ../...../hooks/src/index.js:188:11
 ❯ useReducer ../...../hooks/src/index.js:171:8
 ❯ C.NoteDetail [as constructor] src/widgets/NoteDetail.tsx:52:55
 ❯ constructor ../...../src/diff/index.js:677:13
 ❯ render ../...../src/diff/index.js:235:13
 ❯ diff ../...../src/diff/children.js:94:15
 ❯ diffChildren ../...../src/diff/index.js:258:12
src/widgets/collections/geomap/map.spec.tsx > Map (geomap) > loads a vector layer from a resolver function (importing maplibre)
Stack Traces | 0.178s run time
AssertionError: expected "vi.fn()" to be called with arguments: [ { handlers: { …(2) }, …(8) } ]

Number of calls: 0

 ❯ .../collections/geomap/map.spec.tsx:216:49

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant