mirror of
https://github.com/apache/superset.git
synced 2026-05-08 01:15:46 +00:00
chore(frontend): comprehensive TypeScript quality improvements (#37625)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -41,7 +41,6 @@ beforeEach(() => {
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
// @ts-ignore
|
||||
window.location = originalLocation;
|
||||
fetchMock.clearHistory().removeRoutes();
|
||||
jest.clearAllMocks(); // Clears mock history but keeps spy in place
|
||||
@@ -524,9 +523,9 @@ test('should show missing params state', () => {
|
||||
});
|
||||
|
||||
test('should show missing dataset state', () => {
|
||||
// @ts-ignore
|
||||
// @ts-expect-error - overriding window.location for test
|
||||
delete window.location;
|
||||
// @ts-ignore
|
||||
// @ts-expect-error - overriding window.location for test
|
||||
window.location = { search: '?slice_id=152' };
|
||||
const props = createProps({ datasource: fallbackExploreInitialData.dataset });
|
||||
render(<DatasourceControl {...props} />, { useRedux: true, useRouter: true });
|
||||
@@ -539,9 +538,9 @@ test('should show missing dataset state', () => {
|
||||
});
|
||||
|
||||
test('should show forbidden dataset state', () => {
|
||||
// @ts-ignore
|
||||
// @ts-expect-error - overriding window.location for test
|
||||
delete window.location;
|
||||
// @ts-ignore
|
||||
// @ts-expect-error - overriding window.location for test
|
||||
window.location = { search: '?slice_id=152' };
|
||||
const error = {
|
||||
error_type: 'TABLE_SECURITY_ACCESS_ERROR',
|
||||
|
||||
Reference in New Issue
Block a user