Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Michail Yasonik committed Jan 15, 2020
1 parent f8564f8 commit 3d80243
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## AppBase.category property

The category the app lives in Default categories defined in
The category definition of the product See [AppCategory](./kibana-plugin-public.appcategory.md) See DEFAULT\_APP\_CATEGORIES for more reference

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface AppBase
| Property | Type | Description |
| --- | --- | --- |
| [capabilities](./kibana-plugin-public.appbase.capabilities.md) | <code>Partial&lt;Capabilities&gt;</code> | Custom capabilities defined by the app. |
| [category](./kibana-plugin-public.appbase.category.md) | <code>AppCategory</code> | The category the app lives in Default categories defined in |
| [category](./kibana-plugin-public.appbase.category.md) | <code>AppCategory</code> | The category definition of the product See [AppCategory](./kibana-plugin-public.appcategory.md) See DEFAULT\_APP\_CATEGORIES for more reference |
| [chromeless](./kibana-plugin-public.appbase.chromeless.md) | <code>boolean</code> | Hide the UI chrome when the application is mounted. Defaults to <code>false</code>. Takes precedence over chrome service visibility settings. |
| [euiIconType](./kibana-plugin-public.appbase.euiicontype.md) | <code>string</code> | A EUI iconType that will be used for the app's icon. This icon takes precendence over the <code>icon</code> property. |
| [icon](./kibana-plugin-public.appbase.icon.md) | <code>string</code> | A URL to an image file used as an icon. Used as a fallback if <code>euiIconType</code> is not provided. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## AppCategory.ariaLabel property

If the visual label isn't appropriate for screen readers, can override it here

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## AppCategory.euiIconType property

Define an icon to be used for the category If the category is only 1 item, and no icon is defined, will default to the product icon Defaults to initials if no icon is defined

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## AppCategory.label property

Label used for cateogry name. Also used as aria-label if one isn't set.

<b>Signature:</b>

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## AppCategory interface

A category definition for nav links to know where to sort them in the left hand nav

<b>Signature:</b>

Expand All @@ -15,8 +16,8 @@ export interface AppCategory

| Property | Type | Description |
| --- | --- | --- |
| [ariaLabel](./kibana-plugin-public.appcategory.arialabel.md) | <code>string</code> | |
| [euiIconType](./kibana-plugin-public.appcategory.euiicontype.md) | <code>string</code> | |
| [label](./kibana-plugin-public.appcategory.label.md) | <code>string</code> | |
| [order](./kibana-plugin-public.appcategory.order.md) | <code>number</code> | |
| [ariaLabel](./kibana-plugin-public.appcategory.arialabel.md) | <code>string</code> | If the visual label isn't appropriate for screen readers, can override it here |
| [euiIconType](./kibana-plugin-public.appcategory.euiicontype.md) | <code>string</code> | Define an icon to be used for the category If the category is only 1 item, and no icon is defined, will default to the product icon Defaults to initials if no icon is defined |
| [label](./kibana-plugin-public.appcategory.label.md) | <code>string</code> | Label used for cateogry name. Also used as aria-label if one isn't set. |
| [order](./kibana-plugin-public.appcategory.order.md) | <code>number</code> | The order that categories will be sorted in Prefer large steps between categories to allow for further editing (Default categories are in steps of 1000) |

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## AppCategory.order property

The order that categories will be sorted in Prefer large steps between categories to allow for further editing (Default categories are in steps of 1000)

<b>Signature:</b>

```typescript
Expand Down
2 changes: 1 addition & 1 deletion docs/development/core/public/kibana-plugin-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| --- | --- |
| [App](./kibana-plugin-public.app.md) | Extension of [common app properties](./kibana-plugin-public.appbase.md) with the mount function. |
| [AppBase](./kibana-plugin-public.appbase.md) | |
| [AppCategory](./kibana-plugin-public.appcategory.md) | |
| [AppCategory](./kibana-plugin-public.appcategory.md) | A category definition for nav links to know where to sort them in the left hand nav |
| [AppLeaveConfirmAction](./kibana-plugin-public.appleaveconfirmaction.md) | Action to return from a [AppLeaveHandler](./kibana-plugin-public.appleavehandler.md) to show a confirmation message when trying to leave an application.<!-- -->See |
| [AppLeaveDefaultAction](./kibana-plugin-public.appleavedefaultaction.md) | Action to return from a [AppLeaveHandler](./kibana-plugin-public.appleavehandler.md) to execute the default behaviour when leaving the application.<!-- -->See |
| [ApplicationSetup](./kibana-plugin-public.applicationsetup.md) | |
Expand Down
8 changes: 2 additions & 6 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,11 @@ export interface AppBase {
updater$?: Observable<AppUpdater>;
}

// @public (undocumented)
// @public
export interface AppCategory {
// (undocumented)
ariaLabel?: string;
// (undocumented)
euiIconType?: string;
// (undocumented)
label: string;
// (undocumented)
order?: number;
}

Expand Down Expand Up @@ -435,7 +431,7 @@ export const DEFAULT_APP_CATEGORIES: Readonly<{
label: string;
order: number;
};
administration: {
management: {
label: string;
euiIconType: string;
};
Expand Down
5 changes: 5 additions & 0 deletions src/core/types/app_category.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
*/

/** @public */

/**
* A category definition for nav links to know where to sort them in the left hand nav
* @public
*/
export interface AppCategory {
/**
* Label used for cateogry name.
Expand Down
4 changes: 2 additions & 2 deletions src/legacy/core_plugins/kibana/public/management/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function updateLandingPage(version) {
<h1>
<FormattedMessage
id="kbn.management.landing.header"
defaultMessage="Kibana {version} management"
defaultMessage="Welcome to Stack Management {version}"
values={{ version }}
/>
</h1>
Expand All @@ -93,7 +93,7 @@ export function updateLandingPage(version) {
<p>
<FormattedMessage
id="kbn.management.landing.text"
defaultMessage="A full list of tools can be found in the left menu"
defaultMessage="A complete list of apps is in the menu on the left."
/>
</p>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
name: 'custom_space',
disabledFeatures: [],
});
await PageObjects.settings.setNavType('individual');
});

after(async () => {
Expand All @@ -35,6 +34,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
await PageObjects.common.navigateToApp('home', {
basePath: '/s/custom_space',
});
await PageObjects.settings.setNavType('individual');
const navLinks = (await appsMenu.readLinks()).map(link => link.text);
expect(navLinks).to.contain('Graph');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
name: 'custom_space',
disabledFeatures: [],
});
await PageObjects.settings.setNavType('individual');
});

after(async () => {
Expand All @@ -54,6 +53,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
await PageObjects.common.navigateToApp('home', {
basePath: '/s/custom_space',
});
await PageObjects.settings.setNavType('individual');
const navLinks = (await appsMenu.readLinks()).map(link => link.text);
expect(navLinks).to.contain('Metrics');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
name: 'custom_space',
disabledFeatures: [],
});
await PageObjects.settings.setNavType('individual');
});

after(async () => {
Expand All @@ -31,6 +30,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
await PageObjects.common.navigateToApp('home', {
basePath: '/s/custom_space',
});
await PageObjects.settings.setNavType('individual');
const navLinks = (await appsMenu.readLinks()).map(link => link.text);
expect(navLinks).to.contain('Uptime');
});
Expand Down

0 comments on commit 3d80243

Please sign in to comment.