-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 1.1.0 into mainline, which has 1.0.6 (#625)
* Gtt 1535 (#601) * off by one error in index * prettier write * changing this to map because this assumes that the same number of formatted columns and data columns * added integration test for checking chart render * prettier write * GTT-1418: Add version dropdown to view dashboard admin (#602) * Editor access to view previous dashboards versions * Set auto width to versions dropdown * Delete unused styles and fix labels * Move missing translations to the bottom Co-authored-by: Triet <triet05@gmail.com> * GTT-1475: Option to display Sections in tabs (#603) * Option to display Sections in tabs * Add scroll and arrows to horizontal tabs Co-authored-by: Triet <triet05@gmail.com> * Gtt 1530 (#604) * added in compute percentage * computedPercentage goes through the stack * simplified pie chart data render * replicated changes over to donut chart * removed it from part of whole chart * added unit tests and updated snapshots * prettier write * fixed display of number type * added tests and needs * prettier write * fixed unit tests for backend * pr comments. * dont need that Co-authored-by: Miguel Pavon Diaz <71112226+miguelpdiaz8@users.noreply.github.com> * Option to display bar and column charts as stacked (#605) Co-authored-by: Triet <triet05@gmail.com> * Fix Vertical tabs width and mobile issues (#606) * Significant data labels need to be applied when currency is used (#607) * Fix scroll and bad data issues (#610) * changed property used in the url matcher (#612) * small quality of life changes (#613) * small quality of life changes * udpated snap shots * Add mobile style and layout changes (#614) * Add mobile style and layout changes * Update mobile buttons in tab pages Co-authored-by: Triet <triet05@gmail.com> * add new translation files (#617) * upgrade to version 1.1.0 * upgraded to v1.1.0 Co-authored-by: Phil Dettorre <89091415+PhilTower@users.noreply.github.com> Co-authored-by: Miguel Pavon Diaz <71112226+miguelpdiaz8@users.noreply.github.com>
- Loading branch information
1 parent
b70b010
commit 82e22b2
Showing
112 changed files
with
4,985 additions
and
3,178 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Drink,Spent Per Year | ||
Coffee,4300 | ||
Tea,5000 | ||
Water,1020 |
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,4 @@ | ||
Year,Target,Achieved | ||
"2,017",80,95 | ||
"2,018",80,95 | ||
"2,019",85,94 |
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,179 @@ | ||
import * as Chance from "chance"; | ||
import EditDashboardPage from "../pages/EditDashboard"; | ||
import CreateDashboardPage from "../pages/CreateDashboard"; | ||
import AddMetricsPage from "../pages/AddMetrics"; | ||
import AddTextPage from "../pages/AddText"; | ||
import AddChartPage from "../pages/AddChart"; | ||
import AddTablePage from "../pages/AddTable"; | ||
import LoginPage from "../pages/Login"; | ||
import EditTextPage from "../pages/EditText"; | ||
import EditMetricsPage from "../pages/EditMetrics"; | ||
import EditChartPage from "../pages/EditChart"; | ||
import EditTablePage from "../pages/EditTable"; | ||
|
||
const random = new Chance(); | ||
let dashboardName: string; | ||
let editDashboardPage: EditDashboardPage; | ||
|
||
describe("Admin user", () => { | ||
beforeEach(() => { | ||
const loginPage = new LoginPage(); | ||
loginPage.visit(); | ||
loginPage.loginAsAdmin(); | ||
|
||
const createDashboardPage = new CreateDashboardPage(); | ||
createDashboardPage.visit(); | ||
|
||
dashboardName = random.company(); | ||
createDashboardPage.fillName(dashboardName); | ||
createDashboardPage.fillDescription(random.sentence()); | ||
editDashboardPage = createDashboardPage.submit(); | ||
|
||
cy.contains(`"${dashboardName}" draft dashboard successfully created.`); | ||
}); | ||
|
||
it("can add a Bar Chart content item to a dashboard", () => { | ||
const addContentItemPage = editDashboardPage.goToAddContentItem(); | ||
addContentItemPage.selectChartContentItem(); | ||
const addChartPage = addContentItemPage.clickContinue() as AddChartPage; | ||
|
||
// Choose static dataset | ||
addChartPage.selectStaticDataset(); | ||
|
||
addChartPage.uploadDataset("samplebar.csv"); | ||
|
||
// Select columns to display/hide | ||
cy.get("label[for='checkbox-header-1']").click(); | ||
cy.get("#dataType").select("Number"); | ||
cy.get("#numberType").select("Currency"); | ||
cy.get("#currencyType").select("Euro €"); | ||
cy.get("label[for='checkbox-header-1']").click(); | ||
|
||
cy.get("label[for='checkbox-header-2']").click(); | ||
cy.get("#dataType").select("Number"); | ||
cy.get("#numberType").select("Currency"); | ||
cy.get("#currencyType").select("Euro €"); | ||
cy.get("label[for='checkbox-header-2']").click(); | ||
|
||
//Continue | ||
cy.get('button:contains(Continue)').last().click(); | ||
|
||
// Enter chart details | ||
const chartTitle = random.word(); | ||
addChartPage.fillTitle(chartTitle); | ||
|
||
const chartSummary = random.sentence(); | ||
addChartPage.fillSummary(chartSummary); | ||
|
||
cy.get("label[for='BarChart']").click(); | ||
cy.get("label[for='dataLabels']").click(); | ||
|
||
|
||
cy.get(".recharts-surface").contains("€80.00"); | ||
cy.get(".recharts-surface").contains("€85.00"); | ||
cy.get(".recharts-surface").contains("€94.00"); | ||
cy.get(".recharts-surface").contains("€95.00"); | ||
// Submit form | ||
editDashboardPage = addChartPage.submit(); | ||
|
||
// Delete the dashboard | ||
const dashboardListingPage = editDashboardPage.goToDashboardListing(); | ||
dashboardListingPage.deleteDashboard(dashboardName); | ||
}); | ||
|
||
it("can add a Column Chart content item to a dashboard", () => { | ||
const addContentItemPage = editDashboardPage.goToAddContentItem(); | ||
addContentItemPage.selectChartContentItem(); | ||
const addChartPage = addContentItemPage.clickContinue() as AddChartPage; | ||
|
||
// Choose static dataset | ||
addChartPage.selectStaticDataset(); | ||
|
||
addChartPage.uploadDataset("samplebar.csv"); | ||
|
||
// Select columns to display/hide | ||
cy.get("label[for='checkbox-header-1']").click(); | ||
cy.get("#dataType").select("Number"); | ||
cy.get("#numberType").select("Currency"); | ||
cy.get("#currencyType").select("Euro €"); | ||
cy.get("label[for='checkbox-header-1']").click(); | ||
|
||
cy.get("label[for='checkbox-header-2']").click(); | ||
cy.get("#dataType").select("Number"); | ||
cy.get("#numberType").select("Currency"); | ||
cy.get("#currencyType").select("Euro €"); | ||
cy.get("label[for='checkbox-header-2']").click(); | ||
|
||
//Continue | ||
cy.get('button:contains(Continue)').last().click(); | ||
|
||
// Enter chart details | ||
const chartTitle = random.word(); | ||
addChartPage.fillTitle(chartTitle); | ||
|
||
const chartSummary = random.sentence(); | ||
addChartPage.fillSummary(chartSummary); | ||
|
||
cy.get("label[for='ColumnChart']").click(); | ||
cy.get("label[for='dataLabels']").click(); | ||
|
||
|
||
cy.get(".recharts-surface").contains("€80.00"); | ||
cy.get(".recharts-surface").contains("€85.00"); | ||
cy.get(".recharts-surface").contains("€94.00"); | ||
cy.get(".recharts-surface").contains("€95.00"); | ||
// Submit form | ||
editDashboardPage = addChartPage.submit(); | ||
|
||
// Delete the dashboard | ||
const dashboardListingPage = editDashboardPage.goToDashboardListing(); | ||
dashboardListingPage.deleteDashboard(dashboardName); | ||
}); | ||
|
||
it("can add a Pie Chart content item to a dashboard", () => { | ||
const addContentItemPage = editDashboardPage.goToAddContentItem(); | ||
addContentItemPage.selectChartContentItem(); | ||
const addChartPage = addContentItemPage.clickContinue() as AddChartPage; | ||
|
||
// Choose static dataset | ||
addChartPage.selectStaticDataset(); | ||
|
||
addChartPage.uploadDataset("sample_piechart.csv"); | ||
|
||
// Select columns to display/hide | ||
cy.get("label[for='checkbox-header-1']").click(); | ||
cy.get("#dataType").select("Number"); | ||
cy.get("#numberType").select("Currency"); | ||
cy.get("#currencyType").select("Euro €"); | ||
cy.get("label[for='checkbox-header-1']").click(); | ||
|
||
//Continue | ||
cy.get('button:contains(Continue)').last().click(); | ||
|
||
// Enter chart details | ||
const chartTitle = random.word(); | ||
addChartPage.fillTitle(chartTitle); | ||
|
||
const chartSummary = random.sentence(); | ||
addChartPage.fillSummary(chartSummary); | ||
|
||
cy.get("label[for='PieChart']").click(); | ||
cy.get("label[for='dataLabels']").click(); | ||
cy.get("label[for='computePercentages']").click(); | ||
|
||
|
||
cy.get(".recharts-pie").contains("€5,000.00 (48.45%)"); | ||
cy.get(".recharts-pie").contains("€4,300.00 (41.67%)"); | ||
cy.get(".recharts-pie").contains("€1,020.00 (9.88%)"); | ||
|
||
cy.get(".recharts-default-legend").contains("€5,000.00"); | ||
cy.get(".recharts-default-legend").contains("€4,300.00"); | ||
cy.get(".recharts-default-legend").contains("€1,020.00"); | ||
// Submit form | ||
editDashboardPage = addChartPage.submit(); | ||
|
||
// Delete the dashboard | ||
const dashboardListingPage = editDashboardPage.goToDashboardListing(); | ||
dashboardListingPage.deleteDashboard(dashboardName); | ||
}); | ||
}); |
Oops, something went wrong.