Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade EUI to 16.0.0 #50779

Merged
merged 22 commits into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"@elastic/charts": "^14.0.0",
"@elastic/datemath": "5.0.2",
"@elastic/ems-client": "1.0.5",
"@elastic/eui": "14.9.0",
"@elastic/eui": "16.0.0",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "8.1.1-kibana2",
"@elastic/numeral": "2.3.3",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions test/accessibility/apps/discover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@

import { FtrProviderContext } from '../ftr_provider_context';

const FROM_TIME = '2015-09-19 06:31:44.000';
const TO_TIME = '2015-09-23 18:31:44.000';

export default function({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['common', 'timePicker']);
const a11y = getService('a11y');
Expand All @@ -36,7 +33,7 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
defaultIndex: 'logstash-*',
});
await PageObjects.common.navigateToApp('discover');
await PageObjects.timePicker.setAbsoluteRange(FROM_TIME, TO_TIME);
await PageObjects.timePicker.setDefaultAbsoluteRange();
});

it('main view', async () => {
Expand Down
4 changes: 1 addition & 3 deletions test/functional/apps/context/_discover_navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

import expect from '@kbn/expect';

const TEST_DISCOVER_START_TIME = '2015-09-19 06:31:44.000';
const TEST_DISCOVER_END_TIME = '2015-09-23 18:31:44.000';
const TEST_COLUMN_NAMES = ['@message'];
const TEST_FILTER_COLUMN_NAMES = [['extension', 'jpg'], ['geo.src', 'IN']];

Expand All @@ -34,7 +32,7 @@ export default function ({ getService, getPageObjects }) {
this.tags('smoke');
before(async function () {
await PageObjects.common.navigateToApp('discover');
await PageObjects.timePicker.setAbsoluteRange(TEST_DISCOVER_START_TIME, TEST_DISCOVER_END_TIME);
await PageObjects.timePicker.setDefaultAbsoluteRange();
await Promise.all(TEST_COLUMN_NAMES.map((columnName) => (
PageObjects.discover.clickFieldListItemAdd(columnName)
)));
Expand Down
19 changes: 8 additions & 11 deletions test/functional/apps/dashboard/dashboard_time.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ import expect from '@kbn/expect';

const dashboardName = 'Dashboard Test Time';

const fromTime = '2015-09-19 06:31:44.000';
const toTime = '2015-09-23 18:31:44.000';

export default function ({ getPageObjects, getService }) {
const PageObjects = getPageObjects(['dashboard', 'header', 'timePicker']);
const browser = getService('browser');
Expand All @@ -46,31 +43,31 @@ export default function ({ getPageObjects, getService }) {
});

it('Does not set the time picker on open', async () => {
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
await PageObjects.timePicker.setDefaultAbsoluteRange();

await PageObjects.dashboard.loadSavedDashboard(dashboardName);

const time = await PageObjects.timePicker.getTimeConfig();
expect(time.start).to.equal('Sep 19, 2015 @ 06:31:44.000');
expect(time.end).to.equal('Sep 23, 2015 @ 18:31:44.000');
expect(time.start).to.equal(PageObjects.timePicker.defaultStartTime);
expect(time.end).to.equal(PageObjects.timePicker.defaultEndTime);
});
});

describe('dashboard with stored timed', function () {
it('is saved with time', async function () {
await PageObjects.dashboard.switchToEditMode();
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);
await PageObjects.timePicker.setDefaultAbsoluteRange();
await PageObjects.dashboard.saveDashboard(dashboardName, { storeTimeWithDashboard: true });
});

it('sets time on open', async function () {
await PageObjects.timePicker.setAbsoluteRange('2019-01-01 00:00:00.000', '2019-01-02 00:00:00.000');
await PageObjects.timePicker.setAbsoluteRange('Jan 1, 2019 @ 00:00:00.000', 'Jan 2, 2019 @ 00:00:00.000');

await PageObjects.dashboard.loadSavedDashboard(dashboardName);

const time = await PageObjects.timePicker.getTimeConfig();
expect(time.start).to.equal('Sep 19, 2015 @ 06:31:44.000');
expect(time.end).to.equal('Sep 23, 2015 @ 18:31:44.000');
expect(time.start).to.equal(PageObjects.timePicker.defaultStartTime);
expect(time.end).to.equal(PageObjects.timePicker.defaultEndTime);
});

// If time is stored with a dashboard, it's supposed to override the current time settings when opened.
Expand Down Expand Up @@ -99,7 +96,7 @@ export default function ({ getPageObjects, getService }) {
it('preserved during navigation', async function () {
await PageObjects.dashboard.loadSavedDashboard(dashboardName);

await PageObjects.timePicker.setAbsoluteRange('2019-01-01 00:00:00.000', '2019-01-02 00:00:00.000');
await PageObjects.timePicker.setAbsoluteRange('Jan 1, 2019 @ 00:00:00.000', 'Jan 2, 2019 @ 00:00:00.000');
await PageObjects.header.clickVisualize();
await PageObjects.header.clickDashboard();

Expand Down
14 changes: 13 additions & 1 deletion test/functional/apps/dashboard/dashboard_time_picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default function ({ getService, getPageObjects }) {
const dashboardVisualizations = getService('dashboardVisualizations');
const PageObjects = getPageObjects(['dashboard', 'header', 'visualize', 'timePicker']);
const browser = getService('browser');
const kibanaServer = getService('kibanaServer');

describe('dashboard time picker', function describeIndexTests() {
before(async function () {
Expand All @@ -49,7 +50,7 @@ export default function ({ getService, getPageObjects }) {
await dashboardExpect.docTableFieldCount(150);

// Set to time range with no data
await PageObjects.timePicker.setAbsoluteRange('2000-01-01 00:00:00.000', '2000-01-01 01:00:00.000');
await PageObjects.timePicker.setAbsoluteRange('Jan 1, 2000 @ 00:00:00.000', 'Jan 1, 2000 @ 01:00:00.000');
await dashboardExpect.docTableFieldCount(0);
});

Expand All @@ -72,5 +73,16 @@ export default function ({ getService, getPageObjects }) {
expect(time.end).to.be('Nov 17, 2015 @ 18:01:36.621');
expect(refresh.interval).to.be('2');
});

it('Timepicker respects dateFormat from UI settings', async () => {
await kibanaServer.uiSettings.replace({ 'dateFormat': 'YYYY-MM-DD HH:mm:ss.SSS', });
thompsongl marked this conversation as resolved.
Show resolved Hide resolved
await browser.refresh();
await PageObjects.dashboard.gotoDashboardLandingPage();
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.dashboard.addVisualizations([PIE_CHART_VIS_NAME]);
// Same date range as `setTimepickerInHistoricalDataRange`
await PageObjects.timePicker.setAbsoluteRange('2015-09-19 06:31:44.000', '2015-09-23 18:31:44.000');
await pieChart.expectPieSliceCount(10);
});
});
}
Loading