Skip to content

Commit

Permalink
Merge branch 'fix-ux-app' into ux-performance
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Jul 19, 2022
2 parents 4d41cd2 + fc085ab commit 162dbdc
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import React, { useCallback, useEffect, useState } from 'react';
import { EuiLoadingSpinner } from '@elastic/eui';
import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common';
import type { IUiSettingsClient } from '@kbn/core/public';
import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
import { LensPublicStart } from '@kbn/lens-plugin/public';
import { useFetcher } from '../../../..';
import type { CoreStart } from '@kbn/core/public';
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
import { EuiErrorBoundary } from '@elastic/eui';
import { ObservabilityPublicPluginsStart, useFetcher } from '../../../..';
import type { ExploratoryEmbeddableProps, ExploratoryEmbeddableComponentProps } from './embeddable';
import { ObservabilityDataViews } from '../../../../utils/observability_data_views';
import type { DataViewState } from '../hooks/use_app_data_view';
Expand All @@ -28,10 +28,12 @@ function ExploratoryViewEmbeddable(props: ExploratoryEmbeddableComponentProps) {
}

export function getExploratoryViewEmbeddable(
uiSettings?: IUiSettingsClient,
dataViews?: DataViewsPublicPluginStart,
lens?: LensPublicStart
coreStart: CoreStart,
pluginsStart: ObservabilityPublicPluginsStart
) {
const { lens, dataViews } = pluginsStart;
const { uiSettings } = coreStart;

return (props: ExploratoryEmbeddableProps) => {
if (!dataViews || !lens) {
return null;
Expand Down Expand Up @@ -80,14 +82,18 @@ export function getExploratoryViewEmbeddable(
}

return (
<EuiThemeProvider darkMode={isDarkMode}>
<ExploratoryViewEmbeddable
{...props}
indexPatterns={indexPatterns}
lens={lens}
lensFormulaHelper={lensHelper.formula}
/>
</EuiThemeProvider>
<EuiErrorBoundary>
<EuiThemeProvider darkMode={isDarkMode}>
<KibanaContextProvider services={{ ...coreStart, ...pluginsStart }}>
<ExploratoryViewEmbeddable
{...props}
indexPatterns={indexPatterns}
lens={lens}
lensFormulaHelper={lensHelper.formula}
/>
</KibanaContextProvider>
</EuiThemeProvider>
</EuiErrorBoundary>
);
};
}
6 changes: 1 addition & 5 deletions x-pack/plugins/observability/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,7 @@ export class Plugin
},
createExploratoryViewUrl,
getAppDataView: getAppDataView(pluginsStart.dataViews),
ExploratoryViewEmbeddable: getExploratoryViewEmbeddable(
coreStart.uiSettings,
pluginsStart.dataViews,
pluginsStart.lens
),
ExploratoryViewEmbeddable: getExploratoryViewEmbeddable(coreStart, pluginsStart),
useRulesLink: createUseRulesLink(),
};
}
Expand Down
14 changes: 8 additions & 6 deletions x-pack/test/accessibility/apps/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const retry = getService('retry');
const toasts = getService('toasts');
const kibanaServer = getService('kibanaServer');

// Failing: See https://github.com/elastic/kibana/issues/135339
describe.skip('Kibana Tags Page Accessibility', () => {
describe('Kibana Tags Page Accessibility', () => {
before(async () => {
await kibanaServer.savedObjects.cleanStandardList();
await PageObjects.common.navigateToUrl('home', '/tutorial_directory/sampleData', {
useActualUrl: true,
});
Expand All @@ -36,7 +33,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.home.removeSampleDataSet('flights');
await kibanaServer.savedObjects.cleanStandardList();
});

it('tags main page meets a11y validations', async () => {
Expand Down Expand Up @@ -75,17 +71,23 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await a11y.testAppSnapshot();
});

it('tag assignment panel meets a11y requirements', async () => {
// https://github.com/elastic/kibana/issues/135985 inconsistent test failure
it.skip('tag assignment panel meets a11y requirements', async () => {
await testSubjects.click('euiCollapsedItemActionsButton');
const actionOnTag = 'assign';
await PageObjects.tagManagement.clickActionItem(actionOnTag);
await a11y.testAppSnapshot();
});

it('tag management page with connections column populated meets a11y requirements', async () => {
await testSubjects.click('euiCollapsedItemActionsButton');
const actionOnTag = 'assign';
await PageObjects.tagManagement.clickActionItem(actionOnTag);
await testSubjects.click('assignFlyout-selectAllButton');

await testSubjects.click('assignFlyoutConfirmButton');
await toasts.dismissAllToasts();

await retry.try(async () => {
await a11y.testAppSnapshot();
});
Expand Down

0 comments on commit 162dbdc

Please sign in to comment.