chore: Update color scheme when deleted or changed (#20589)

* feat(explore): Use v1/explore endpoint data instead of bootstrapData

* Add tests

* Fix ci

* Remove redundant dependency

* Use form_data_key in cypress tests

* Add auth headers to for data request

* Address comments

* Remove displaying danger toast

* Conditionally add auth headers

* Address comments

* Fix typing bug

* fix

* Fix opening dataset

* Fix sqllab chart create

* Run queries in parallel

* Fallback to default color scheme

* Fix dashboard id autofill

* Fix lint

* Fix test

* Fix hydrate action

* Update dashboard colors

* Add color scheme domain

* Add check for default scheme

* Make me pretty

* Clean up

* Nit

* Clean up

* Pretty

* Fix missing sequential

* Lint

* Enhance test

* Lint

Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
This commit is contained in:
Geido
2022-07-26 01:50:49 +03:00
committed by GitHub
parent 3de641c3ae
commit 6b0c3032b2
11 changed files with 182 additions and 12 deletions

View File

@@ -262,6 +262,7 @@ test('submitting with onlyApply:false', async () => {
);
spyGetCategoricalSchemeRegistry.mockReturnValue({
keys: () => ['supersetColors'],
get: () => ['#FFFFFF', '#000000'],
} as any);
put.mockResolvedValue({
json: {
@@ -289,7 +290,6 @@ test('submitting with onlyApply:false', async () => {
userEvent.click(screen.getByRole('button', { name: 'Save' }));
await waitFor(() => {
expect(props.onHide).toBeCalledTimes(1);
expect(props.onSubmit).toBeCalledTimes(1);
expect(props.onSubmit).toBeCalledWith({
certificationDetails: 'Sample certification',
@@ -312,6 +312,7 @@ test('submitting with onlyApply:true', async () => {
);
spyGetCategoricalSchemeRegistry.mockReturnValue({
keys: () => ['supersetColors'],
get: () => ['#FFFFFF', '#000000'],
} as any);
spyIsFeatureEnabled.mockReturnValue(false);
const props = createProps();
@@ -328,7 +329,6 @@ test('submitting with onlyApply:true', async () => {
userEvent.click(screen.getByRole('button', { name: 'Apply' }));
await waitFor(() => {
expect(props.onHide).toBeCalledTimes(1);
expect(props.onSubmit).toBeCalledTimes(1);
});
});