mirror of
https://github.com/apache/superset.git
synced 2026-07-18 20:55:47 +00:00
test(sqllab,extensions): replace any casts with concrete types
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -576,7 +576,8 @@ test('getTabs leaves backendId undefined when the editor has no tabViewId', () =
|
||||
|
||||
test('getTabs surfaces the editor tabViewId as the tab backendId', () => {
|
||||
// Stamp a backend id onto the editor and confirm it flows through to the tab.
|
||||
(mockStore.getState().sqlLab.queryEditors[0] as any).tabViewId = 'backend-42';
|
||||
(mockStore.getState().sqlLab.queryEditors[0] as QueryEditor).tabViewId =
|
||||
'backend-42';
|
||||
|
||||
const tab = sqlLab.getCurrentTab();
|
||||
expect(tab).toBeDefined();
|
||||
|
||||
@@ -292,11 +292,11 @@ test('renders children and surfaces a warning toast when init fails', async () =
|
||||
// The failure must reach the user as a warning toast rather than being
|
||||
// swallowed silently.
|
||||
await waitFor(() => {
|
||||
const toasts = (store.getState() as any).messageToasts;
|
||||
const { messageToasts } = store.getState() as {
|
||||
messageToasts: { text: string }[];
|
||||
};
|
||||
expect(
|
||||
toasts.some((toast: { text: string }) =>
|
||||
/Extensions failed to load/.test(toast.text),
|
||||
),
|
||||
messageToasts.some(toast => /Extensions failed to load/.test(toast.text)),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ const ExtensionsStartup: React.FC<{ children?: React.ReactNode }> = ({
|
||||
'Extensions initialized successfully.',
|
||||
),
|
||||
)
|
||||
.catch(error => {
|
||||
.catch((error: unknown) => {
|
||||
supersetCore.utils.logging.error(
|
||||
'Error setting up extensions:',
|
||||
error,
|
||||
|
||||
Reference in New Issue
Block a user