mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: fixed permission list caching issue, fixes #10750
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { Component } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import { toJS } from 'mobx';
|
||||
import IContainerProps from 'app/containers/IContainerProps';
|
||||
@@ -8,6 +8,7 @@ import Tooltip from 'app/core/components/Tooltip/Tooltip';
|
||||
import PermissionsInfo from 'app/core/components/Permissions/PermissionsInfo';
|
||||
import AddPermissions from 'app/core/components/Permissions/AddPermissions';
|
||||
import SlideDown from 'app/core/components/Animations/SlideDown';
|
||||
|
||||
@inject('nav', 'folder', 'view', 'permissions')
|
||||
@observer
|
||||
export class FolderPermissions extends Component<IContainerProps, any> {
|
||||
|
||||
@@ -14,6 +14,7 @@ describe('FolderSettings', () => {
|
||||
dashboard: {
|
||||
id: 1,
|
||||
title: 'Folder Name',
|
||||
uid: 'uid-str',
|
||||
},
|
||||
meta: {
|
||||
url: '/dashboards/f/uid/folder-name',
|
||||
@@ -23,19 +24,27 @@ describe('FolderSettings', () => {
|
||||
);
|
||||
|
||||
const store = RootStore.create(
|
||||
{},
|
||||
{
|
||||
view: {
|
||||
path: 'asd',
|
||||
query: {},
|
||||
routeParams: {
|
||||
uid: 'uid-str',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
backendSrv: backendSrv,
|
||||
}
|
||||
);
|
||||
|
||||
wrapper = shallow(<FolderSettings backendSrv={backendSrv} {...store} />);
|
||||
return wrapper
|
||||
.dive()
|
||||
page = wrapper.dive();
|
||||
return page
|
||||
.instance()
|
||||
.loadStore()
|
||||
.then(() => {
|
||||
page = wrapper.dive();
|
||||
page.update();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user