refactor(Modal): Upgrade Modal component to Antd5 (#31420)

Co-authored-by: Diego Pucci <diegopucci.me@gmail.com>
This commit is contained in:
alexandrusoare
2024-12-19 18:22:11 +02:00
committed by GitHub
parent 7458c4bbd5
commit f362c6f508
45 changed files with 286 additions and 244 deletions

View File

@@ -314,6 +314,15 @@ test('Click on Save as dataset', async () => {
useRouter: true,
});
userEvent.click(screen.getByTestId('datasource-menu-trigger'));
expect(
screen.queryByRole('button', { name: /save/i }),
).not.toBeInTheDocument();
expect(
screen.queryByRole('button', { name: /close/i }),
).not.toBeInTheDocument();
expect(
screen.queryByText(/select or type dataset name/i),
).not.toBeInTheDocument();
userEvent.click(screen.getByText('Save as dataset'));
// Renders a save dataset modal
@@ -324,11 +333,11 @@ test('Click on Save as dataset', async () => {
name: /overwrite existing/i,
});
const dropdownField = screen.getByText(/select or type dataset name/i);
expect(saveRadioBtn).toBeVisible();
expect(overwriteRadioBtn).toBeVisible();
expect(screen.getByRole('button', { name: /save/i })).toBeVisible();
expect(screen.getByRole('button', { name: /close/i })).toBeVisible();
expect(dropdownField).toBeVisible();
expect(saveRadioBtn).toBeInTheDocument();
expect(overwriteRadioBtn).toBeInTheDocument();
expect(screen.getByRole('button', { name: /save/i })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /close/i })).toBeInTheDocument();
expect(dropdownField).toBeInTheDocument();
});
test('should set the default temporal column', async () => {