-
Notifications
You must be signed in to change notification settings - Fork 124
/
Copy pathdashboardTigerWithCharts.spec.ts
46 lines (39 loc) · 1.91 KB
/
dashboardTigerWithCharts.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// (C) 2021-2025 GoodData Corporation
import * as Navigation from "../../tools/navigation";
import { Dashboard } from "../../tools/dashboards";
import { Widget } from "../../tools/widget";
describe("Dashboard with charts", { tags: ["pre-merge_isolated_tiger"] }, () => {
describe("rendering", () => {
beforeEach(() => {
Navigation.visit("dashboard/dashboard-tiger-charts");
});
it("should render charts", () => {
const dashboard = new Dashboard();
dashboard.getWidgetList().should("contain", "Funnel chart");
dashboard.getWidgetList().should("contain", "Pyramid chart");
dashboard.getWidgetList().should("contain", "Sankey chart");
dashboard.getWidgetList().should("contain", "Dependency wheel chart");
dashboard.getWidgetList().should("contain", "Waterfall chart");
// the internals are already covered in storybook,
// let's just check charts were rendered
new Widget(0, 0).getChart().isHighchartsChart();
new Widget(1, 0).getChart().isHighchartsChart();
new Widget(2, 0).getChart().isHighchartsChart();
new Widget(3, 0).getChart().isHighchartsChart();
new Widget(0, 1).getChart().isHighchartsChart();
});
});
});
describe("Dashboard with pyramid and funnel charts", { tags: ["checklist_integrated_tiger"] }, () => {
beforeEach(() => {
Navigation.visit("dashboard/dashboard-tiger-charts");
});
it("should render default color legend of funnel and pyramid chart correctly", () => {
const funnelChart = new Widget(0).getChart();
funnelChart.hasLegendColorCount(4);
funnelChart.hasMatchingColorLegend("rgb(20, 178, 226)");
const pyramidChart = new Widget(2).getChart();
pyramidChart.hasLegendColorCount(3);
pyramidChart.hasMatchingColorLegend("rgb(20, 178, 226)");
});
});