Skip to content

Add fixtures for test_action_menu_window coverage#946

Draft
Mearman wants to merge 11 commits intocoredevices:mainfrom
Mearman:fix/test-action-menu
Draft

Add fixtures for test_action_menu_window coverage#946
Mearman wants to merge 11 commits intocoredevices:mainfrom
Mearman:fix/test-action-menu

Conversation

@Mearman
Copy link
Copy Markdown
Contributor

@Mearman Mearman commented Mar 9, 2026

This pull request enables the test_action_menu_window unit test by adding the required PBI fixture files. The test was previously disabled in the BROKEN_TESTS list due to missing fixture dependencies.

Test Fixture Additions

  • Added 9 PBI fixture files for test_action_menu_window covering various action menu configurations:
    • thin_display_mode_one_item - Single item in thin mode
    • thin_display_mode_one_row - One row in thin mode
    • thin_display_mode_two_row - Two rows in thin mode
    • thin_display_mode_with_emoji - Thin mode with emoji icon
    • wide_display_mode_with_chevron - Wide mode with chevron indicator
    • wide_display_mode_with_chevron_and_long_labels - Wide mode with long text labels
    • wide_display_mode_with_chevron_and_long_labels_hyphenated - Wide mode with hyphenated long labels
    • wide_display_mode_with_just_titles - Wide mode showing only titles
    • wide_display_mode_with_separator - Wide mode with separator items

BROKEN_TESTS Update

  • Removed test_action_menu_window.c from the BROKEN_TESTS list in tests/wscript, allowing the test to compile and run as part of the standard test suite.

Impact

  • Increases test coverage for the action menu UI component
  • Ensures correct rendering across different display modes and edge cases
  • Validates menu layout with various content types (emoji, long text, separators)

@Mearman Mearman force-pushed the fix/test-action-menu branch 3 times, most recently from 4c6a19c to 2698a44 Compare March 9, 2026 20:15
Mearman added 4 commits March 9, 2026 21:53
Require commit messages to use path-based areas (e.g., fw/drivers/hrm)
or known short areas (e.g., ci, docs, treewide) rather than conventional
commit types like feat:, fix:, chore:.

Co-authored-by: Claude <claude@anthropic.com>

Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
Append -darwin suffix to fixture filenames on macOS to handle rendering
differences in font libraries. Linux (CI) uses standard ~platform naming
to match existing fixtures.

Co-authored-by: Claude <claude@anthropic.com>

Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
Use memcpy for BD_ADDR_t address fields instead of direct assignment,
which was causing incorrect address comparisons in whitelist operations.

Co-authored-by: Claude <claude@anthropic.com>

Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
Add run-tests-docker.sh to run tests in Docker matching CI environment,
and generate-linux-fixtures.sh to generate Linux-specific test fixtures.

Co-authored-by: Claude <claude@anthropic.com>

Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
@Mearman Mearman force-pushed the fix/test-action-menu branch 2 times, most recently from 82f046f to a1dd2a8 Compare March 9, 2026 22:12
Document the cross-platform fixture naming scheme, Docker testing
workflow, and troubleshooting for CI vs local test discrepancies.

Co-authored-by: Claude <claude@anthropic.com>

Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
@Mearman Mearman force-pushed the fix/test-action-menu branch from a1dd2a8 to 0f30376 Compare March 9, 2026 22:57
Restore platform suffix on Linux (e.g. ~spalding) while keeping the
additional -darwin suffix for macOS local development. This matches
the naming convention of the PNG fixture files in the repository.

Co-authored-by: Claude <claude@anthropic.com>

Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
@Mearman Mearman force-pushed the fix/test-action-menu branch 2 times, most recently from 6de9e3a to 85b3a2f Compare March 10, 2026 10:07
@Mearman Mearman marked this pull request as draft March 10, 2026 16:01
Mearman added 4 commits March 10, 2026 16:42
Replace sh.pip('freeze') with subprocess.check_output(['pip', 'freeze'])
to avoid OverflowError with sh library on Python 3.14+.

Co-authored-by: Claude <claude@anthropic.com>

Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
Replace sh.rm with subprocess.run to avoid Python 3.14 compatibility
issues with the sh library.

Co-authored-by: Claude <claude@anthropic.com>

Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
Remove test_action_menu_window.c from the exclusion list to enable
the test.

Co-authored-by: Claude <claude@anthropic.com>

Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
- Fix include path from settings_notifications_private.h to
  notifications_private.h
- Add stubs_vibes.h include to resolve linker errors

Co-authored-by: Claude <claude@anthropic.com>

Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
@Mearman Mearman force-pushed the fix/test-action-menu branch from e4fffc7 to 0df318e Compare March 10, 2026 16:43
838 test fixture images had incorrectly escaped tildes in their
filenames (e.g., '\~silk.png' instead of '~silk.png'). This caused
tests to fail because the PBI conversion and test lookup logic
expected the correct platform suffix format.

Co-authored-by: Claude <noreply@anthropic.com>

Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
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