From a63ebd1a9c93563f5aa295507ce7dfae88bc386d Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 16 Feb 2021 18:47:05 +0000 Subject: [PATCH] Fixing another cypress test. --- .../cypress/integration/createView.spec.js | 24 ++++--------------- .../backend/DataTable/ViewDataTable.svelte | 5 +++- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/packages/builder/cypress/integration/createView.spec.js b/packages/builder/cypress/integration/createView.spec.js index 06fac6da33..ba18368ecf 100644 --- a/packages/builder/cypress/integration/createView.spec.js +++ b/packages/builder/cypress/integration/createView.spec.js @@ -28,7 +28,7 @@ context("Create a View", () => { const headers = Array.from($headers).map(header => header.textContent.trim() ) - expect(headers).to.deep.eq(["group", "age", "rating"]) + expect(headers).to.deep.eq([ 'rating', 'age', 'group' ]) }) }) @@ -59,21 +59,13 @@ context("Create a View", () => { const headers = Array.from($headers).map(header => header.textContent.trim() ) - expect(headers).to.deep.eq([ - "field", - "sum", - "min", - "max", - "count", - "sumsqr", - "avg", - ]) + expect(headers).to.deep.eq([ 'avg', 'sumsqr', 'count', 'max', 'min', 'sum', 'field' ]) }) cy.get(".ag-cell").then($values => { const values = Array.from($values).map(header => header.textContent.trim() ) - expect(values).to.deep.eq(["age", "155", "20", "49", "5", "5347", "31"]) + expect(values).to.deep.eq([ '31', '5347', '5', '49', '20', '155', 'age' ]) }) }) @@ -92,15 +84,7 @@ context("Create a View", () => { .find(".ag-cell") .then($values => { const values = Array.from($values).map(value => value.textContent) - expect(values).to.deep.eq([ - "Students", - "70", - "20", - "25", - "3", - "1650", - "23.333333333333332", - ]) + expect(values).to.deep.eq([ 'Students', '23.333333333333332', '1650', '3', '25', '20', '70' ]) }) }) diff --git a/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte b/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte index f875fa8849..c1a75e4517 100644 --- a/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte @@ -7,8 +7,10 @@ import FilterButton from "./buttons/FilterButton.svelte" import ExportButton from "./buttons/ExportButton.svelte" import ManageAccessButton from "./buttons/ManageAccessButton.svelte" + import HideAutocolumnButton from "./buttons/HideAutocolumnButton.svelte" export let view = {} + let hideAutocolumns = true let data = [] let loading = false @@ -48,12 +50,13 @@ } - +
{#if view.calculation} {/if} +