sadpandajoe commented on code in PR #38776:
URL: https://github.com/apache/superset/pull/38776#discussion_r2968200641


##########
superset-frontend/src/SqlLab/components/AppLayout/AppLayout.test.tsx:
##########
@@ -94,10 +99,20 @@ test('calls setWidth on sidebar resize when not hidden', 
async () => {
   await waitFor(() => expect(setWidth).toHaveBeenCalled());
 });
 
+test('right sidebar is hidden when no extensions registered', () => {
+  const { queryByText } = render(<AppLayout {...defaultProps} />, {
+    useRedux: true,
+    initialState,
+  });
+  // No right sidebar content — the third Splitter.Panel is conditionally 
omitted
+  expect(queryByText('Right Sidebar Content')).not.toBeInTheDocument();

Review Comment:
   The panel count assertion was intentionally removed — the existing 
`test('renders two panels', ...)` already asserts `toHaveLength(2)` when no 
extensions are registered. Adding it here would duplicate that test. The 
`queryByText` absence check is the contract-specific assertion: "no contributed 
right-sidebar content renders when nothing is registered."



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to