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:
Kian Eliasi
2022-09-02 06:05:27 -04:00
committed by GitHub
co-authored by joshhunt
parent ffdda9296a
commit 6e4900dc45
3 changed files with 64 additions and 29 deletions
+26 -20
View File
@@ -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();
});
});