feat: View all fav charts and dashboards (#12060)

* Add fav filter - tentative

* Closes #11984

* Fix tests

* Delete trailing spaces

* Fix spec btns length

* Fix mock test

* Add urlDisplay option

* Redirect with history

* Catch initial fav filter
This commit is contained in:
Geido
2020-12-18 22:16:07 +01:00
committed by GitHub
parent 2a23744223
commit f4ce831a10
9 changed files with 84 additions and 27 deletions

View File

@@ -96,7 +96,7 @@ describe('SavedQueries', () => {
expect(wrapper.find(SavedQueries)).toExist();
});
it('fetches queries favorites and renders listviewcard cards', async () => {
it('fetches queries mine and renders listviewcard cards', async () => {
clickTab(0);
await waitForComponentToPaint(wrapper);
expect(fetchMock.calls(/saved_query\/\?q/)).toHaveLength(1);
@@ -105,9 +105,9 @@ describe('SavedQueries', () => {
it('it renders a submenu with clickable tables and buttons', async () => {
expect(wrapper.find(SubMenu)).toExist();
expect(wrapper.find('li')).toHaveLength(2);
expect(wrapper.find('li')).toHaveLength(1);
expect(wrapper.find('button')).toHaveLength(2);
clickTab(1);
clickTab(0);
await waitForComponentToPaint(wrapper);
expect(fetchMock.calls(/saved_query\/\?q/)).toHaveLength(2);
});