-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support native chart title and description (#2002)
- Loading branch information
Showing
398 changed files
with
1,939 additions
and
1,145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-10.9 KB
...st.ts-snapshots/baselines/interactions/multi-chart-cursor-sync-chrome-linux.png
Binary file not shown.
Binary file added
BIN
+32.1 KB
...screenshots/all.test.ts-snapshots/baselines/legend/positioning-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24 KB
...apshots/chart/sizing/should-accommodate-chart-description-only-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.5 KB
...izing/should-accommodate-chart-title-and-description-cartesian-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+57.2 KB
.../sizing/should-accommodate-chart-title-and-description-heatmap-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25 KB
...g/should-accommodate-chart-title-and-description-legend-bottom-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+35.1 KB
...ing/should-accommodate-chart-title-and-description-legend-left-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+34.8 KB
...ng/should-accommodate-chart-title-and-description-legend-right-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25 KB
...zing/should-accommodate-chart-title-and-description-legend-top-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+51 KB
...izing/should-accommodate-chart-title-and-description-metric-sm-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+84.9 KB
...izing/should-accommodate-chart-title-and-description-partition-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+170 KB
...zing/should-accommodate-chart-title-and-description-word-cloud-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23.6 KB
....ts-snapshots/chart/sizing/should-accommodate-chart-title-only-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+40.2 KB
...apshots/chart/sizing/should-render-multiple-charts-with-titles-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { test } from '@playwright/test'; | ||
|
||
import { Position } from '../constants'; | ||
import { pwEach } from '../helpers'; | ||
import { common } from '../page_objects/common'; | ||
|
||
test.describe('Chart', () => { | ||
test.describe('Sizing', () => { | ||
test('should accommodate chart title only', async ({ page }) => { | ||
await common.expectChartAtUrlToMatchScreenshot(page)( | ||
'http://localhost:9002/?path=/story/legend--positioning&knob-position=bottom&globals=toggles.showChartTitle:true', | ||
); | ||
}); | ||
|
||
test('should accommodate chart description only', async ({ page }) => { | ||
await common.expectChartAtUrlToMatchScreenshot(page)( | ||
'http://localhost:9002/?path=/story/legend--positioning&knob-position=bottom&globals=toggles.showChartDescription:true', | ||
); | ||
}); | ||
|
||
test('should render multiple charts with titles', async ({ page }) => { | ||
await common.expectChartAtUrlToMatchScreenshot(page)( | ||
'http://localhost:9001/?path=/story/interactions--multi-chart-cursor-sync', | ||
{ screenshotSelector: '#story-root' }, | ||
); | ||
}); | ||
|
||
pwEach.test<Position>(['bottom', 'left', 'right', 'top'])( | ||
(position) => `should accommodate chart title and description - legend ${position}`, | ||
async (page, position) => { | ||
await common.expectChartAtUrlToMatchScreenshot(page)( | ||
`http://localhost:9002/?path=/story/legend--positioning&globals=toggles.showChartTitle:true;toggles.showChartDescription:true&knob-position=${position}`, | ||
); | ||
}, | ||
); | ||
|
||
pwEach.test<[type: string, url: string]>([ | ||
['Cartesian', 'http://localhost:9001/?path=/story/mixed-charts--areas-and-bars'], | ||
['Partition', 'http://localhost:9001/?path=/story/sunburst--sunburst-with-three-layers'], | ||
['Heatmap', 'http://localhost:9001/?path=/story/heatmap-alpha--basic'], | ||
['WordCloud', 'http://localhost:9001/?path=/story/wordcloud-alpha--simple-wordcloud'], | ||
['Metric SM', 'http://localhost:9001/?path=/story/metric-alpha--grid'], | ||
])( | ||
([type]) => `should accommodate chart title and description - ${type}`, | ||
async (page, [, url]) => { | ||
await common.expectChartAtUrlToMatchScreenshot(page)( | ||
`${url}&globals=toggles.showChartTitle:true;toggles.showChartDescription:true`, | ||
); | ||
}, | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.