test: Dashboard basic ui test + whitelisting
This commit is contained in:
parent
313605d328
commit
5d1d3564ef
1 changed files with 50 additions and 0 deletions
50
cypress/integration/dashboard.js
Normal file
50
cypress/integration/dashboard.js
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
describe("Dashboard view", { scrollBehavior: false }, () => {
|
||||
before(() => {
|
||||
cy.login();
|
||||
cy.visit("/app");
|
||||
});
|
||||
|
||||
it("should load", () => {
|
||||
const chart = "TODO-YEARLY-TRENDS";
|
||||
const dashboard = "TODO-TEST-DASHBOARD"; // check slash in name intentionally.
|
||||
|
||||
cy.insert_doc(
|
||||
"Dashboard Chart",
|
||||
{
|
||||
is_standard: 0,
|
||||
chart_name: chart,
|
||||
chart_type: "Count",
|
||||
document_type: "ToDo",
|
||||
parent_document_type: "",
|
||||
based_on: "creation",
|
||||
group_by_type: "Count",
|
||||
timespan: "Last Year",
|
||||
time_interval: "Yearly",
|
||||
timeseries: 1,
|
||||
type: "Line",
|
||||
filters_json: "[]",
|
||||
},
|
||||
true
|
||||
);
|
||||
|
||||
cy.insert_doc(
|
||||
"Dashboard",
|
||||
{
|
||||
name: dashboard,
|
||||
dashboard_name: dashboard,
|
||||
is_standard: 0,
|
||||
charts: [
|
||||
{
|
||||
chart: chart,
|
||||
},
|
||||
],
|
||||
},
|
||||
true
|
||||
);
|
||||
|
||||
cy.visit(`/app/dashboard-view/${dashboard}`);
|
||||
|
||||
// expect chart to be loaded
|
||||
cy.findByText(chart).should("be.visible");
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue