chore: Changes the dashboard properties modal to use the new select component (#16064)

This commit is contained in:
Michael S. Molina
2021-08-05 23:50:16 -03:00
committed by GitHub
parent 2bfc1c29c5
commit 423ff50768
2 changed files with 40 additions and 34 deletions

View File

@@ -165,7 +165,8 @@ test('should render - FeatureFlag disabled', async () => {
expect(screen.getByRole('button', { name: 'Save' })).toBeInTheDocument();
expect(screen.getAllByRole('button')).toHaveLength(4);
expect(screen.getAllByRole('textbox')).toHaveLength(3);
expect(screen.getAllByRole('textbox')).toHaveLength(2);
expect(screen.getByRole('combobox')).toBeInTheDocument();
expect(spyColorSchemeControlWrapper).toBeCalledTimes(4);
expect(spyColorSchemeControlWrapper).toBeCalledWith(
@@ -201,7 +202,8 @@ test('should render - FeatureFlag enabled', async () => {
expect(screen.getByRole('button', { name: 'Save' })).toBeInTheDocument();
expect(screen.getAllByRole('button')).toHaveLength(4);
expect(screen.getAllByRole('textbox')).toHaveLength(4);
expect(screen.getAllByRole('textbox')).toHaveLength(2);
expect(screen.getAllByRole('combobox')).toHaveLength(2);
expect(spyColorSchemeControlWrapper).toBeCalledTimes(4);
expect(spyColorSchemeControlWrapper).toBeCalledWith(
@@ -220,9 +222,11 @@ test('should open advance', async () => {
await screen.findByTestId('dashboard-edit-properties-form'),
).toBeInTheDocument();
expect(screen.getAllByRole('textbox')).toHaveLength(4);
expect(screen.getAllByRole('textbox')).toHaveLength(2);
expect(screen.getAllByRole('combobox')).toHaveLength(2);
userEvent.click(screen.getByRole('button', { name: 'Advanced' }));
expect(screen.getAllByRole('textbox')).toHaveLength(5);
expect(screen.getAllByRole('textbox')).toHaveLength(3);
expect(screen.getAllByRole('combobox')).toHaveLength(2);
});
test('should close modal', async () => {