Repository navigation
test: update ViewIT selectors for fc-applayout shadow DOM - #151
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Update integration test selectors src/test/java/com/flowingcode/addons/applayout/integration/ViewIT.java |
The test opens applayout-full, scopes header and drawer queries to fc-applayout, and locates title, toolbar, and menu elements through their slots. |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix · Severity of issue fixed: Low
Merge Risk: 
Minimal · up to 2e35a
-
The change is limited to updating integration-test selectors to the current demo DOM, with no identified merge-blocking risk.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Linked Issues check
-
Explanation
Linked issue
#149has one active coding requirement: update ViewIT to the current fc-applayout and applayout-full DOM. The diff changes only src/test/java/com/flowingcode/addons/applayout/integration/ViewIT.java, and it covers each point in#149:
(1) Open the page directly: the new constructor calls super("applayout-full"), so the test no longer starts at the root route that forwards to the iframe-based tabbed demo.
(2) Shadow DOM:$("fc-applayout") is located and checked for upgrade. app-header and app-drawer are then looked up inside that layout (layout.$ (...)).
(3) Slotted children: the logo is checked as img.applogo[slot='title'], the title as div[slot='title'], and the settings button as paper-icon-button[slot='toolbar'][role='button'][icon='settings'], all searched on the layout. This matches the slot names used in fc-fusion-layout.ts and the#149description.
(4) Menu items: the non-empty check and the upgrade loop now use layout.findElements(By.cssSelector("[slot='menu']")) instead of all children of paper-listbox. The menu-icon button check is kept, as#149states.
Limits of this review: the run result (mvn verify -Pintegration-tests passing) is the author's reported local result. This review did not execute the test. The [slot='menu'] check counts the elements assigned to the menu slot. If an item is wrapped in a slot='menu' container, the check counts the wrapper. The change matches the selector that#149requests, so no concrete gap was found.
Full details: Out of Scope Changes check
-
Explanation
The whole-PR diff against the merge base touches one file: ViewIT.java. Every hunk changes a selector, a slot query, the constructor view path, or a related assertion in componentWorks. Each change serves the
#149requirement to update ViewIT to the current DOM. No unrelated production code, build configuration, or other test was changed. No out-of-scope change was found.
-
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- 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.
Comment @coderabbitai help to get the list of available commands.
|



ViewITwas written for the 2.x/3.x DOM and has failed since the component moved tofc-applayout(see #149).applayout-fulldirectly. The root route now forwards to the tabbed demo, which shows the layout in an iframe.app-headerandapp-drawerinsidefc-applayout, which renders them in its shadow root.fc-applayout([slot='title'],[slot='toolbar']), not insideapp-toolbar.[slot='menu']children offc-applayout, so the non-empty check counts real items again, not just the<slot>element.mvn verify -Pintegration-testspasses locally:ViewITandSerializationTesteach ran 1 test.Close #149
🤖 Generated with Claude Code
Summary by CodeRabbit