Merge pull request #2908 from althafh/catalog-name

Use organization name as the prefix for Service Catalog
This commit is contained in:
Fredrik Adelöw
2020-10-15 20:20:55 +02:00
committed by GitHub
3 changed files with 9 additions and 3 deletions
@@ -1,6 +1,6 @@
describe('App', () => {
it('should render the catalog', () => {
cy.visit('/');
cy.contains('Backstage Service Catalog');
cy.contains('Acme Corporation Service Catalog');
});
});
+5 -1
View File
@@ -301,7 +301,11 @@ async function testAppServe(pluginName: string, appDir: string) {
try {
const browser = new Browser();
await waitForPageWithText(browser, '/', 'Backstage Service Catalog');
await waitForPageWithText(
browser,
'/',
'Acme Corporation Service Catalog',
);
await waitForPageWithText(
browser,
`/${pluginName}`,
@@ -15,6 +15,7 @@
*/
import {
configApiRef,
Header,
HomepageTimer,
identityApiRef,
@@ -33,12 +34,13 @@ const CatalogLayout = ({ children }: Props) => {
const greeting = getTimeBasedGreeting();
const profile = useApi(identityApiRef).getProfile();
const userId = useApi(identityApiRef).getUserId();
const orgName = useApi(configApiRef).getOptionalString('organization.name');
return (
<Page theme={pageTheme.home}>
<Header
title={`${greeting.greeting}, ${profile.displayName || userId}!`}
subtitle="Backstage Service Catalog"
subtitle={`${orgName || 'Backstage'} Service Catalog`}
tooltip={greeting.language}
pageTitleOverride="Home"
>