fix(tests): resolve flakey SouthPane extension test caused by nwsapi (#38832)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Joe Li
2026-03-25 09:54:44 -07:00
committed by GitHub
parent 3506773f51
commit 04e07acf98

View File

@@ -172,8 +172,6 @@ test('should remove tab', async () => {
const totalTabs = mockState.sqlLab.tables.length + 2;
expect(tabs).toHaveLength(totalTabs);
console.log(tabs[2].parentElement?.innerHTML); // debug
const removeButton = tabs[2].parentElement?.querySelector(
'button[aria-label="remove"]',
);
@@ -226,9 +224,7 @@ test('renders slot-wide toolbar actions via PanelToolbar', () => {
initialState: mockState,
});
expect(
screen.getByRole('button', { name: 'Panels Action' }),
).toBeInTheDocument();
expect(screen.getByLabelText('Panels Action')).toBeInTheDocument();
});
test('renders per-view toolbar actions for contributed tab', () => {
@@ -251,8 +247,5 @@ test('renders per-view toolbar actions for contributed tab', () => {
});
// Content is rendered via forceRender: true even when tab is not active.
// Use { hidden: true } to find button in non-active tab pane.
expect(
screen.getByRole('button', { name: 'Per-View Action', hidden: true }),
).toBeInTheDocument();
expect(screen.getByLabelText('Per-View Action')).toBeInTheDocument();
});