Skip to content

test(node): pin Message first in the node menu - #7967

Merged
jamesarich merged 1 commit into
mainfrom
test/message-first-node-menu-order
Nov 8, 2026
Merged

jamesarich merged 1 commit into
mainfrom
test/message-first-node-menu-order

Conversation

@jamesarich

@jamesarich jamesarich commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Pins the node menu order from #7965 so a later edit cannot quietly move Message back down (meshtastic/design#171).

🧪 Testing Performed

  • NodeContextMenuOrderTest checks Message sits above favorite, mute and trace route, with and without Mute offered. Both cases fail with the old order and pass on main.

Summary by CodeRabbit

  • Tests
    • Added UI test coverage for node context menu item ordering across firmware versions, including the presence or absence of Mute.

@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

Added Compose UI tests that check node context menu item order and Mute visibility for local firmware versions 2.7.18 and 2.7.15.

Changes: Node context menu tests

Layer / File(s) Summary
Menu order coverage
feature/node/src/jvmTest/kotlin/org/meshtastic/feature/node/component/NodeContextMenuOrderTest.kt
Added helpers to display an expanded context menu and read item positions. Tests check that Message appears before the specified items for firmware 2.7.18 and 2.7.15. The 2.7.15 test also checks that Mute is absent.
Merge Risk: Low · up to e8e32

The tests protect both firmware variants but do not fully enforce Message appearing first. This is a bounded coverage improvement and does not block merging.

Pre-merge checks: Passed 8

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "test(node): pin Message first in the node menu" matches the changeset. The PR adds NodeContextMenuOrderTest, a Compose UI test that checks Message appears before Favorite, Mute, and Trace R…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Sibling Call Sites And Presence Semantics Passed The PR only adds menu-order tests. It does not change absence semantics or add a measurement field with a zero default.
Tests Prove The Path, Not The End State Passed Both tests check the rendered menu order. The earlier production order placed Favorite before Message, which would fail both tests. The tests do not use a fake backing store, size-only assertions, or …
Regression Coverage For Changed Behavior Passed The diff adds only NodeContextMenuOrderTest. It does not change production behavior, so the regression-coverage check is not applicable.
Moved Code Diffed Against Its Original Passed The diff adds one test file. It does not delete, move, or extract existing code, so this check does not apply.
Full details: Title check

Explanation

The title "test(node): pin Message first in the node menu" matches the changeset. The PR adds NodeContextMenuOrderTest, a Compose UI test that checks Message appears before Favorite, Mute, and Trace Route. The title names the test scope (node menu) and the asserted behavior (Message first). It is short, specific, and uses a conventional commit prefix. It does not list every case, such as firmware 2.7.15 without Mute, but that detail is not required.

Full details: Tests Prove The Path, Not The End State

Explanation

Both tests check the rendered menu order. The earlier production order placed Favorite before Message, which would fail both tests. The tests do not use a fake backing store, size-only assertions, or Unconfined emission ordering.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added the testing Test additions or modifications label Nov 8, 2026
@jamesarich
jamesarich enabled auto-merge November 8, 2026 22:10

@coderabbitai coderabbitai 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.

Nitpick comments: 1

feature/node/src/jvmTest/kotlin/org/meshtastic/feature/node/component/NodeContextMenuOrderTest.kt: 1

69-71: Trivial · Maintainability & Code Quality · Low value

Assert that Message precedes the other rendered actions.

Moving the Ignore/Remove group above Message can leave both tests passing. Add comparisons with Set Display Name, Ignore, and Remove.

Suggested test changes

 import org.meshtastic.core.resources.getString
+import org.meshtastic.core.resources.ignore
 import org.meshtastic.core.resources.message
 import org.meshtastic.core.resources.mute_notifications
+import org.meshtastic.core.resources.remove
+import org.meshtastic.core.resources.set_display_name
 import org.meshtastic.core.resources.trace_route
         assertTrue(message < top(Res.string.mute_notifications))
         assertTrue(message < top(Res.string.trace_route))
+        assertTrue(message < top(Res.string.set_display_name))
+        assertTrue(message < top(Res.string.ignore))
+        assertTrue(message < top(Res.string.remove))
         assertTrue(message < top(Res.string.add_favorite))
         assertTrue(message < top(Res.string.trace_route))
+        assertTrue(message < top(Res.string.set_display_name))
+        assertTrue(message < top(Res.string.ignore))
+        assertTrue(message < top(Res.string.remove))
Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 4ed637e and e8e3288.

Files selected for processing: 1

  • feature/node/src/jvmTest/kotlin/org/meshtastic/feature/node/component/NodeContextMenuOrderTest.kt

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

@jamesarich
jamesarich added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit 3a7198a Nov 8, 2026
14 checks passed
@jamesarich
jamesarich deleted the test/message-first-node-menu-order branch November 8, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Test additions or modifications

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant