Skip to content

Commit f0bb7b6

Browse files
committed
fix two tests
1 parent 50cf3ca commit f0bb7b6

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.test.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ jest.mock('react-router-dom', () => ({
3232
}),
3333
}));
3434

35+
jest.mock('src/explore/exploreUtils', () => ({
36+
...jest.requireActual('src/explore/exploreUtils'),
37+
getExploreUrl: jest.fn(
38+
({ formData }) =>
39+
`/explore/?dashboard_page_id=&slice_id=${formData.slice_id}`,
40+
),
41+
}));
42+
3543
const { id: chartId, form_data: formData } = chartQueries[sliceId];
3644
const { slice_name: chartName } = formData;
3745
const store = getMockStoreWithNativeFilters();

superset-frontend/src/features/datasets/AddDataset/Footer/Footer.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ describe('Footer', () => {
119119
const dropdownTrigger = screen.getByRole('button', { name: 'down' });
120120
userEvent.click(dropdownTrigger);
121121

122-
// Check that the dropdown menu option is visible
122+
// Check that the dropdown menu option is in the document
123123
await waitFor(() => {
124-
expect(screen.getByText('Create dataset')).toBeVisible();
124+
expect(screen.getByText('Create dataset')).toBeInTheDocument();
125125
});
126126
});
127127

0 commit comments

Comments
 (0)