chore: rename 'Change dataset' action to 'Swap dataset' (#22197)

This commit is contained in:
Maxime Beauchemin
2022-11-23 10:19:59 -08:00
committed by GitHub
parent a77b2d6ebf
commit 888f43c6ad
3 changed files with 7 additions and 7 deletions

View File

@@ -94,17 +94,17 @@ test('Should open a menu', async () => {
render(<DatasourceControl {...props} />);
expect(screen.queryByText('Edit dataset')).not.toBeInTheDocument();
expect(screen.queryByText('Change dataset')).not.toBeInTheDocument();
expect(screen.queryByText('Swap dataset')).not.toBeInTheDocument();
expect(screen.queryByText('View in SQL Lab')).not.toBeInTheDocument();
userEvent.click(screen.getByTestId('datasource-menu-trigger'));
expect(await screen.findByText('Edit dataset')).toBeInTheDocument();
expect(screen.getByText('Change dataset')).toBeInTheDocument();
expect(screen.getByText('Swap dataset')).toBeInTheDocument();
expect(screen.getByText('View in SQL Lab')).toBeInTheDocument();
});
test('Click on Change dataset option', async () => {
test('Click on Swap dataset option', async () => {
const props = createProps();
SupersetClientGet.mockImplementation(
async ({ endpoint }: { endpoint: string }) => {
@@ -123,7 +123,7 @@ test('Click on Change dataset option', async () => {
userEvent.click(screen.getByTestId('datasource-menu-trigger'));
await act(async () => {
userEvent.click(screen.getByText('Change dataset'));
userEvent.click(screen.getByText('Swap dataset'));
});
expect(
screen.getByText(