diff --git a/package.json b/package.json index e3ef30cc3aff6..817e2b82ebe6a 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "url": "https://github.com/elastic/kibana.git" }, "dependencies": { - "@elastic/eui": "v0.0.52", + "@elastic/eui": "0.0.53", "@elastic/filesaver": "1.1.2", "@elastic/numeral": "2.3.2", "@elastic/ui-ace": "0.2.3", diff --git a/src/core_plugins/input_control_vis/public/components/editor/controls_tab.js b/src/core_plugins/input_control_vis/public/components/editor/controls_tab.js index f17d6cff1eda5..ed5bd5436b4ae 100644 --- a/src/core_plugins/input_control_vis/public/components/editor/controls_tab.js +++ b/src/core_plugins/input_control_vis/public/components/editor/controls_tab.js @@ -17,7 +17,6 @@ * under the License. */ -import './controls_tab.less'; import _ from 'lodash'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; diff --git a/src/core_plugins/input_control_vis/public/components/editor/controls_tab.less b/src/core_plugins/input_control_vis/public/components/editor/controls_tab.less deleted file mode 100644 index c7a2c4118c047..0000000000000 --- a/src/core_plugins/input_control_vis/public/components/editor/controls_tab.less +++ /dev/null @@ -1,3 +0,0 @@ -.euiAccordion__childWrapper { - overflow: visible; -} diff --git a/src/core_plugins/kibana/public/dashboard/top_nav/__snapshots__/add_panel.test.js.snap b/src/core_plugins/kibana/public/dashboard/top_nav/__snapshots__/add_panel.test.js.snap index b968f50a3a5ae..52709245b93aa 100644 --- a/src/core_plugins/kibana/public/dashboard/top_nav/__snapshots__/add_panel.test.js.snap +++ b/src/core_plugins/kibana/public/dashboard/top_nav/__snapshots__/add_panel.test.js.snap @@ -4,6 +4,7 @@ exports[`render 1`] = ` - - - Add Panels - - - diff --git a/src/core_plugins/kibana/public/dashboard/top_nav/add_panel.test.js b/src/core_plugins/kibana/public/dashboard/top_nav/add_panel.test.js index fa414a15555f4..6af26997acc8b 100644 --- a/src/core_plugins/kibana/public/dashboard/top_nav/add_panel.test.js +++ b/src/core_plugins/kibana/public/dashboard/top_nav/add_panel.test.js @@ -19,10 +19,7 @@ import React from 'react'; import sinon from 'sinon'; -import { mount, shallow } from 'enzyme'; -import { - findTestSubject, -} from '@elastic/eui/lib/test'; +import { shallow } from 'enzyme'; import { DashboardAddPanel, @@ -49,14 +46,3 @@ test('render', () => { />); expect(component).toMatchSnapshot(); }); - -test('onClose', () => { - const component = mount( {}} - addNewPanel={() => {}} - addNewVis={() => {}} - />); - findTestSubject(component, 'closeAddPanelBtn', false).simulate('click'); - sinon.assert.calledOnce(onClose); -}); diff --git a/src/core_plugins/kibana/public/management/sections/objects/components/objects_table/components/flyout/__tests__/__snapshots__/flyout.test.js.snap b/src/core_plugins/kibana/public/management/sections/objects/components/objects_table/components/flyout/__tests__/__snapshots__/flyout.test.js.snap index d476d6422a3a1..d4f67b3c260f8 100644 --- a/src/core_plugins/kibana/public/management/sections/objects/components/objects_table/components/flyout/__tests__/__snapshots__/flyout.test.js.snap +++ b/src/core_plugins/kibana/public/management/sections/objects/components/objects_table/components/flyout/__tests__/__snapshots__/flyout.test.js.snap @@ -2,10 +2,14 @@ exports[`Flyout conflicts should allow conflict resolution 1`] = ` - + @@ -157,10 +161,14 @@ exports[`Flyout conflicts should handle errors 1`] = ` exports[`Flyout should render import step 1`] = ` - + diff --git a/src/core_plugins/kibana/public/management/sections/objects/components/objects_table/components/relationships/__tests__/__snapshots__/relationships.test.js.snap b/src/core_plugins/kibana/public/management/sections/objects/components/objects_table/components/relationships/__tests__/__snapshots__/relationships.test.js.snap index 1f358b9355eee..266803ef7e398 100644 --- a/src/core_plugins/kibana/public/management/sections/objects/components/objects_table/components/relationships/__tests__/__snapshots__/relationships.test.js.snap +++ b/src/core_plugins/kibana/public/management/sections/objects/components/objects_table/components/relationships/__tests__/__snapshots__/relationships.test.js.snap @@ -2,10 +2,14 @@ exports[`Relationships should render dashboards normally 1`] = ` - + @@ -127,10 +131,14 @@ exports[`Relationships should render dashboards normally 1`] = ` exports[`Relationships should render errors 1`] = ` - + @@ -190,10 +198,14 @@ exports[`Relationships should render errors 1`] = ` exports[`Relationships should render index patterns normally 1`] = ` - + @@ -371,10 +383,14 @@ exports[`Relationships should render index patterns normally 1`] = ` exports[`Relationships should render searches normally 1`] = ` - + @@ -550,10 +566,14 @@ exports[`Relationships should render searches normally 1`] = ` exports[`Relationships should render visualizations normally 1`] = ` - + diff --git a/test/functional/apps/visualize/_input_control_vis.js b/test/functional/apps/visualize/_input_control_vis.js index 57797f72333fc..b0fb79a9c25da 100644 --- a/test/functional/apps/visualize/_input_control_vis.js +++ b/test/functional/apps/visualize/_input_control_vis.js @@ -183,7 +183,7 @@ export default function ({ getService, getPageObjects }) { }); }); - describe('nested controls', () => { + describe('chained controls', () => { before(async () => { await PageObjects.common.navigateToUrl('visualize', 'new'); diff --git a/test/functional/config.js b/test/functional/config.js index 4625f42269915..d0236a0b7a002 100644 --- a/test/functional/config.js +++ b/test/functional/config.js @@ -48,6 +48,7 @@ import { VisualizeListingTableProvider, DashboardAddPanelProvider, DashboardPanelActionsProvider, + FlyoutProvider, } from './services'; export default async function ({ readConfigFile }) { @@ -101,6 +102,7 @@ export default async function ({ readConfigFile }) { visualizeListingTable: VisualizeListingTableProvider, dashboardAddPanel: DashboardAddPanelProvider, dashboardPanelActions: DashboardPanelActionsProvider, + flyout: FlyoutProvider, }, servers: commonConfig.get('servers'), diff --git a/test/functional/page_objects/visualize_page.js b/test/functional/page_objects/visualize_page.js index 84fcf6cc25637..48fe7d0332088 100644 --- a/test/functional/page_objects/visualize_page.js +++ b/test/functional/page_objects/visualize_page.js @@ -261,14 +261,15 @@ export function VisualizePageProvider({ getService, getPageObjects }) { async clearComboBox(comboBoxSelector) { const comboBox = await testSubjects.find(comboBoxSelector); - const clearBtn = await comboBox.findByCssSelector('button.euiFormControlLayoutClearButton'); + const clearBtn = await comboBox.findByCssSelector('[data-test-subj="comboBoxClearButton"]'); await clearBtn.click(); + await this.closeComboBoxOptionsList(comboBox); } async closeComboBoxOptionsList(comboBoxElement) { const isOptionsListOpen = await testSubjects.exists('comboBoxOptionsList'); if (isOptionsListOpen) { - const closeBtn = await comboBoxElement.findByCssSelector('button.euiFormControlLayoutCustomIcon'); + const closeBtn = await comboBoxElement.findByCssSelector('[data-test-subj="comboBoxToggleListButton"]'); await closeBtn.click(); } } diff --git a/test/functional/services/dashboard/add_panel.js b/test/functional/services/dashboard/add_panel.js index 1277e5fad2a1e..64df0bf612e17 100644 --- a/test/functional/services/dashboard/add_panel.js +++ b/test/functional/services/dashboard/add_panel.js @@ -22,6 +22,7 @@ export function DashboardAddPanelProvider({ getService, getPageObjects }) { const log = getService('log'); const retry = getService('retry'); const testSubjects = getService('testSubjects'); + const flyout = getService('flyout'); const PageObjects = getPageObjects(['header', 'common']); return new class DashboardAddPanel { @@ -93,11 +94,11 @@ export function DashboardAddPanelProvider({ getService, getPageObjects }) { } async closeAddPanel() { - log.debug('closeAddPanel'); + log.debug('DashboardAddPanel.closeAddPanel'); const isOpen = await this.isAddPanelOpen(); if (isOpen) { await retry.try(async () => { - await testSubjects.click('closeAddPanelBtn'); + await flyout.close('dashboardAddPanel'); const isOpen = await this.isAddPanelOpen(); if (isOpen) { throw new Error('Add panel still open, trying again.'); diff --git a/test/functional/services/flyout.js b/test/functional/services/flyout.js new file mode 100644 index 0000000000000..bbf33735a8fe8 --- /dev/null +++ b/test/functional/services/flyout.js @@ -0,0 +1,43 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export function FlyoutProvider({ getService }) { + const testSubjects = getService('testSubjects'); + const find = getService('find'); + + class Flyout { + + async getFlyout(testSubj) { + if (testSubj) { + return await testSubjects.find(testSubj); + } else { + return await find.byCssSelector('.euiFlyout'); + } + } + + async close(panelTestSubj) { + const panelElement = await this.getFlyout(panelTestSubj); + const closeBtn = await panelElement.findByCssSelector('[aria-label*="Close"]'); + await closeBtn.click(); + } + + } + + return new Flyout(); +} diff --git a/test/functional/services/index.js b/test/functional/services/index.js index c637a46e46722..f60a276f093a0 100644 --- a/test/functional/services/index.js +++ b/test/functional/services/index.js @@ -26,5 +26,6 @@ export { DocTableProvider } from './doc_table'; export { ScreenshotsProvider } from './screenshots'; export { FailureDebuggingProvider } from './failure_debugging'; export { VisualizeListingTableProvider } from './visualize_listing_table'; +export { FlyoutProvider } from './flyout'; export * from './dashboard'; diff --git a/x-pack/package.json b/x-pack/package.json index 81b6697207caf..8380123c26c43 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -76,7 +76,7 @@ "yargs": "4.7.1" }, "dependencies": { - "@elastic/eui": "0.0.52", + "@elastic/eui": "0.0.53", "@elastic/node-crypto": "0.1.2", "@elastic/node-phantom-simple": "2.2.4", "@elastic/numeral": "2.3.2", diff --git a/x-pack/plugins/monitoring/public/components/logstash/pipeline_viewer/views/__test__/__snapshots__/detail_drawer.test.js.snap b/x-pack/plugins/monitoring/public/components/logstash/pipeline_viewer/views/__test__/__snapshots__/detail_drawer.test.js.snap index 337b7738fd924..88984a824f7ec 100644 --- a/x-pack/plugins/monitoring/public/components/logstash/pipeline_viewer/views/__test__/__snapshots__/detail_drawer.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/logstash/pipeline_viewer/views/__test__/__snapshots__/detail_drawer.test.js.snap @@ -2,10 +2,14 @@ exports[`DetailDrawer component If vertices shows basic info and no stats for if 1`] = ` - + - + - + - + - +