[Metrics UI] Rename "Metrics" to "Infrastructure" in appropriate places (#135278)

Co-authored-by: Carlos Crespo <crespocarlos@users.noreply.github.com>
This commit is contained in:
Mat Schaffer 2022-06-29 22:20:03 +09:00 committed by GitHub
parent b590240d93
commit 7338acbc7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 14 deletions

View file

@ -98,7 +98,7 @@ export class Plugin implements InfraClientPluginClass {
...(capabilities.infrastructure.show
? [
{
label: 'Metrics',
label: 'Infrastructure',
sortKey: 300,
entries: [
{ label: 'Inventory', app: 'metrics', path: '/inventory' },
@ -169,7 +169,7 @@ export class Plugin implements InfraClientPluginClass {
core.application.register({
id: 'metrics',
title: i18n.translate('xpack.infra.metrics.pluginTitle', {
defaultMessage: 'Metrics',
defaultMessage: 'Infrastructure',
}),
euiIconType: 'logoObservability',
order: 8200,

View file

@ -61,9 +61,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
]);
});
it('shows metrics navlink', async () => {
it('shows infrastructure navlink', async () => {
const navLinks = (await appsMenu.readLinks()).map((link) => link.text);
expect(navLinks).to.eql(['Overview', 'Alerts', 'Metrics', 'Stack Management']);
expect(navLinks).to.eql(['Overview', 'Alerts', 'Infrastructure', 'Stack Management']);
});
describe('infrastructure landing page without data', () => {
@ -161,7 +161,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it('shows metrics navlink', async () => {
const navLinks = (await appsMenu.readLinks()).map((link) => link.text);
expect(navLinks).to.eql(['Overview', 'Alerts', 'Metrics', 'Stack Management']);
expect(navLinks).to.eql(['Overview', 'Alerts', 'Infrastructure', 'Stack Management']);
});
describe('infrastructure landing page without data', () => {
@ -359,7 +359,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it(`doesn't show metrics navlink`, async () => {
const navLinks = (await appsMenu.readLinks()).map((link) => link.text);
expect(navLinks).to.not.contain(['Metrics']);
expect(navLinks).to.not.contain(['Infrastructure']);
});
it(`metrics app is inaccessible and returns a 403`, async () => {

View file

@ -39,15 +39,15 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await spacesService.delete('custom_space');
});
it('shows Metrics navlink', async () => {
it('shows Infrastructure navlink', async () => {
await PageObjects.common.navigateToApp('home', {
basePath: '/s/custom_space',
});
const navLinks = (await appsMenu.readLinks()).map((link) => link.text);
expect(navLinks).to.contain('Metrics');
expect(navLinks).to.contain('Infrastructure');
});
it(`Metrics app is accessible`, async () => {
it(`Infrastructure app is accessible`, async () => {
await PageObjects.common.navigateToApp('infraOps', {
basePath: '/s/custom_space',
});
@ -72,15 +72,15 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
});
it(`doesn't show metrics navlink`, async () => {
it(`doesn't show infrastructure navlink`, async () => {
await PageObjects.common.navigateToApp('home', {
basePath: '/s/custom_space',
});
const navLinks = (await appsMenu.readLinks()).map((link) => link.text);
expect(navLinks).not.to.contain('Metrics');
expect(navLinks).not.to.contain('Infrastructure');
});
it(`metrics app is inaccessible and Application Not Found message is rendered`, async () => {
it(`infrastructure app is inaccessible and Application Not Found message is rendered`, async () => {
await PageObjects.common.navigateToActualUrl('infraOps', '', {
ensureCurrentUrl: false,
shouldLoginIfPrompted: false,
@ -114,7 +114,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
});
it(`Metrics app is accessible`, async () => {
it(`Infrastructure app is accessible`, async () => {
await PageObjects.common.navigateToApp('infraOps', {
basePath: '/s/custom_space',
});
@ -139,7 +139,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
});
it(`Metrics app is accessible`, async () => {
it(`Infrastructure app is accessible`, async () => {
await PageObjects.common.navigateToApp('infraOps', {
basePath: '/s/custom_space',
});