mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
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:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user