* Don't use transforms * dismiss toasts so they don't interfere with the snapshot tests * try again * Fix styling during expanded panel mode * See if putting the sleep back fixes the build. * fix typo
This commit is contained in:
parent
b37282ef64
commit
65f7f638c4
|
@ -184,7 +184,10 @@ app.directive('dashboardApp', function ($injector) {
|
|||
$scope.addVis = function (hit, showToast = true) {
|
||||
dashboardStateManager.addNewPanel(hit.id, 'visualization');
|
||||
if (showToast) {
|
||||
toastNotifications.addSuccess('Visualization was added to your dashboard');
|
||||
toastNotifications.addSuccess({
|
||||
title: 'Visualization was added to your dashboard',
|
||||
'data-test-subj': 'addVisualizationToDashboardSuccess',
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -59,6 +59,9 @@ function ResponsiveGrid({
|
|||
className={classes}
|
||||
isDraggable={true}
|
||||
isResizable={true}
|
||||
// There is a bug with d3 + firefox + elements using transforms.
|
||||
// See https://github.com/elastic/kibana/issues/16870 for more context.
|
||||
useCSSTransforms={false}
|
||||
margin={[MARGINS, MARGINS]}
|
||||
cols={DASHBOARD_GRID_COLUMN_COUNT}
|
||||
rowHeight={DASHBOARD_GRID_HEIGHT}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
/**
|
||||
* 1. Need to override the react grid layout height when a single panel is expanded. Important is required because
|
||||
* otherwise the heigh is set inline.
|
||||
* otherwise the height is set inline.
|
||||
*/
|
||||
.layout-maximized-panel {
|
||||
height: 100% !important; /* 1. */
|
||||
|
@ -236,7 +236,8 @@ dashboard-viewport-provider {
|
|||
.grid-item--expanded {
|
||||
height: 100% !important; /* 1. */
|
||||
width: 100% !important; /* 1. */
|
||||
transform: none !important; /* 1. */
|
||||
top: 0 !important; /* 1. */
|
||||
left: 0 !important; /* 1. */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,6 +8,7 @@ export default function ({ getService, getPageObjects, updateBaselines }) {
|
|||
const PageObjects = getPageObjects(['dashboard', 'header', 'visualize', 'common']);
|
||||
const screenshot = getService('screenshots');
|
||||
const remote = getService('remote');
|
||||
const testSubjects = getService('testSubjects');
|
||||
|
||||
describe('dashboard snapshots', function describeIndexTests() {
|
||||
before(async function () {
|
||||
|
@ -31,7 +32,10 @@ export default function ({ getService, getPageObjects, updateBaselines }) {
|
|||
await PageObjects.dashboard.clickNewDashboard();
|
||||
await PageObjects.dashboard.setTimepickerInDataRange();
|
||||
await dashboardVisualizations.createAndAddTSVBVisualization('TSVB');
|
||||
await testSubjects.click('toastCloseButton');
|
||||
|
||||
await PageObjects.dashboard.saveDashboard('tsvb');
|
||||
await testSubjects.click('saveDashboardSuccess toastCloseButton');
|
||||
|
||||
await PageObjects.dashboard.clickFullScreenMode();
|
||||
await PageObjects.dashboard.toggleExpandPanel();
|
||||
|
@ -49,12 +53,17 @@ export default function ({ getService, getPageObjects, updateBaselines }) {
|
|||
await PageObjects.dashboard.clickNewDashboard();
|
||||
await PageObjects.dashboard.setTimepickerInDataRange();
|
||||
await PageObjects.dashboard.addVisualizations([AREA_CHART_VIS_NAME]);
|
||||
await testSubjects.click('addVisualizationToDashboardSuccess toastCloseButton');
|
||||
|
||||
await PageObjects.dashboard.saveDashboard('area');
|
||||
await testSubjects.click('saveDashboardSuccess toastCloseButton');
|
||||
|
||||
await PageObjects.dashboard.clickFullScreenMode();
|
||||
await PageObjects.dashboard.toggleExpandPanel();
|
||||
|
||||
await PageObjects.dashboard.waitForRenderComplete();
|
||||
// The need for this should have been removed with https://github.com/elastic/kibana/pull/15574 but the
|
||||
// test failed when removed because the visualization hadn't settled.
|
||||
await PageObjects.common.sleep(1000);
|
||||
|
||||
const percentSimilar = await screenshot.compareAgainstBaseline('area_chart', updateBaselines);
|
||||
|
|
Loading…
Reference in a new issue