mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
Footer: Add release notes url to version label (#52909)
* Add release note url to footer's version label * Filter out pre-release versions in release notes link at the footer * correct links for beta/prerelease release notes * make all links target blank * Fix TeamPages test Co-authored-by: joshhunt <josh@trtr.co>
This commit is contained in:
@@ -40,6 +40,12 @@ jest.mock('@grafana/runtime', () => ({
|
||||
bootData: { navTree: [], user: {} },
|
||||
buildInfo: {
|
||||
edition: 'Open Source',
|
||||
version: '7.5.0',
|
||||
commit: 'abc123',
|
||||
env: 'production',
|
||||
latestVersion: '',
|
||||
hasUpdate: false,
|
||||
hideVersion: false,
|
||||
},
|
||||
appSubUrl: '',
|
||||
},
|
||||
@@ -93,7 +99,7 @@ const setup = (propOverrides?: object) => {
|
||||
);
|
||||
};
|
||||
|
||||
describe('Render', () => {
|
||||
describe('TeamPages', () => {
|
||||
it('should render member page if team not empty', async () => {
|
||||
setup({
|
||||
team: getMockTeam(),
|
||||
@@ -123,26 +129,26 @@ describe('Render', () => {
|
||||
|
||||
expect(await screen.findByText('Team group sync')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
describe('when feature toggle editorsCanAdmin is turned on', () => {
|
||||
it('should render settings page if user is team admin', async () => {
|
||||
setup({
|
||||
team: getMockTeam(),
|
||||
pageName: 'settings',
|
||||
preferences: {
|
||||
homeDashboardUID: 'home-dashboard',
|
||||
theme: 'Default',
|
||||
timezone: 'Default',
|
||||
},
|
||||
editorsCanAdmin: true,
|
||||
signedInUser: {
|
||||
id: 1,
|
||||
isGrafanaAdmin: false,
|
||||
orgRole: OrgRole.Admin,
|
||||
} as User,
|
||||
describe('when feature toggle editorsCanAdmin is turned on', () => {
|
||||
it('should render settings page if user is team admin', async () => {
|
||||
setup({
|
||||
team: getMockTeam(),
|
||||
pageName: 'settings',
|
||||
preferences: {
|
||||
homeDashboardUID: 'home-dashboard',
|
||||
theme: 'Default',
|
||||
timezone: 'Default',
|
||||
},
|
||||
editorsCanAdmin: true,
|
||||
signedInUser: {
|
||||
id: 1,
|
||||
isGrafanaAdmin: false,
|
||||
orgRole: OrgRole.Admin,
|
||||
} as User,
|
||||
});
|
||||
|
||||
expect(await screen.findByText('Team settings')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
expect(await screen.findByText('Team settings')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user