Skip to content

Build/add tests to mobile#12

Draft
moodyjmz wants to merge 28 commits intomainfrom
build/add-tests-to-mobile
Draft

Build/add tests to mobile#12
moodyjmz wants to merge 28 commits intomainfrom
build/add-tests-to-mobile

Conversation

@moodyjmz
Copy link
Copy Markdown
Member

As per https://github.com/Euro-Office/fork/issues/58

There is a fair amount of detail there.

Essentially a limited PoC to see what is required to test mobile code.

309 tests across 23 test files

By layer

┌───────────────────┬───────┬───────────────────────────────────────────────────────────────────────────────────────────┐                         
│       Layer       │ Tests │                                      What's covered                                       │                         
├───────────────────┼───────┼───────────────────────────────────────────────────────────────────────────────────────────┤
│ Pure logic (lib/) │ 118   │ Extracted Main.jsx modules, editor helpers, init functions                                │
├───────────────────┼───────┼───────────────────────────────────────────────────────────────────────────────────────────┤
│ Stores            │ 106   │ focusObjects (doc+pres), textSettings, cellSettings, shapeSettings, sheets, slideSettings │
├───────────────────┼───────┼───────────────────────────────────────────────────────────────────────────────────────────┤
│ Controllers       │ 33    │ EditText, Toolbar                                                                         │
├───────────────────┼───────┼───────────────────────────────────────────────────────────────────────────────────────────┤
│ Views             │ 28    │ Toolbar, EditText                                                                         │
├───────────────────┼───────┼───────────────────────────────────────────────────────────────────────────────────────────┤
│ Infrastructure    │ 24    │ SDK adapter, SvgIcon, HighlightColorPalette                                               │
└───────────────────┴───────┴───────────────────────────────────────────────────────────────────────────────────────────┘

By editor

  ┌─────────────────┬───────┐
  │     Editor      │ Tests │
  ├─────────────────┼───────┤
  │ Common (shared) │ 24    │
  ├─────────────────┼───────┤
  │ Document        │ 189   │
  ├─────────────────┼───────┤
  │ Spreadsheet     │ 45    │
  ├─────────────────┼───────┤
  │ Presentation    │ 51    │
  └─────────────────┴───────┘

Strengths

  • Phase 6 (see issue linked) extractions are thoroughly tested — every branch of protection, licensing, download format, metric settings logic has coverage
  • Store reactivity is validated — observable state, computed properties, action methods
  • Cross-editor patterns established — spreadsheet and presentation stores follow the same testing pattern as document editor

Gaps

  • No controller integration tests — controllers are tested in isolation with mocked APIs, no end-to-end callback flows
  • No Main.jsx tests — the biggest file (~1600 lines) has zero direct tests; only the extracted modules are covered
  • No LongActions, Search, ContextMenu coverage
  • Most stores untested — imageSettings, chartSettings, shapeSettings (doc), appOptions, documentInfo
  • View tests are shallow — verify rendering and props, not user interaction flows

Quality

The tests we wrote are solid — they test real logic, not implementation details. The extracted pure functions are the highest-value targets
because they're decision logic that's hard to verify by eye. The main risk is everything around what we tested.

We don't need to run iecompat

Signed-off-by: James Manuel <[email protected]>
# Conflicts:
#	Readme.md
#	build/Gruntfile.js
Signed-off-by: James Manuel <[email protected]>
Removed PNG and IE compat from build process

Signed-off-by: James Manuel <[email protected]>
As a PoC I will test existing content without refactoring

Signed-off-by: James Manuel <[email protected]>
Framework7 uses a later webpack that is stricter, we have to match this

Signed-off-by: James Manuel <[email protected]>
@moodyjmz moodyjmz self-assigned this Feb 17, 2026
@moodyjmz moodyjmz marked this pull request as draft February 17, 2026 14:31
@moodyjmz
Copy link
Copy Markdown
Member Author

I put this as draft as I think some other changes need to go through first.

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.

1 participant