Fixing another cypress test.
This commit is contained in:
parent
1e39a873b2
commit
a63ebd1a9c
|
@ -28,7 +28,7 @@ context("Create a View", () => {
|
||||||
const headers = Array.from($headers).map(header =>
|
const headers = Array.from($headers).map(header =>
|
||||||
header.textContent.trim()
|
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 =>
|
const headers = Array.from($headers).map(header =>
|
||||||
header.textContent.trim()
|
header.textContent.trim()
|
||||||
)
|
)
|
||||||
expect(headers).to.deep.eq([
|
expect(headers).to.deep.eq([ 'avg', 'sumsqr', 'count', 'max', 'min', 'sum', 'field' ])
|
||||||
"field",
|
|
||||||
"sum",
|
|
||||||
"min",
|
|
||||||
"max",
|
|
||||||
"count",
|
|
||||||
"sumsqr",
|
|
||||||
"avg",
|
|
||||||
])
|
|
||||||
})
|
})
|
||||||
cy.get(".ag-cell").then($values => {
|
cy.get(".ag-cell").then($values => {
|
||||||
const values = Array.from($values).map(header =>
|
const values = Array.from($values).map(header =>
|
||||||
header.textContent.trim()
|
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")
|
.find(".ag-cell")
|
||||||
.then($values => {
|
.then($values => {
|
||||||
const values = Array.from($values).map(value => value.textContent)
|
const values = Array.from($values).map(value => value.textContent)
|
||||||
expect(values).to.deep.eq([
|
expect(values).to.deep.eq([ 'Students', '23.333333333333332', '1650', '3', '25', '20', '70' ])
|
||||||
"Students",
|
|
||||||
"70",
|
|
||||||
"20",
|
|
||||||
"25",
|
|
||||||
"3",
|
|
||||||
"1650",
|
|
||||||
"23.333333333333332",
|
|
||||||
])
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,10 @@
|
||||||
import FilterButton from "./buttons/FilterButton.svelte"
|
import FilterButton from "./buttons/FilterButton.svelte"
|
||||||
import ExportButton from "./buttons/ExportButton.svelte"
|
import ExportButton from "./buttons/ExportButton.svelte"
|
||||||
import ManageAccessButton from "./buttons/ManageAccessButton.svelte"
|
import ManageAccessButton from "./buttons/ManageAccessButton.svelte"
|
||||||
|
import HideAutocolumnButton from "./buttons/HideAutocolumnButton.svelte"
|
||||||
|
|
||||||
export let view = {}
|
export let view = {}
|
||||||
|
let hideAutocolumns = true
|
||||||
|
|
||||||
let data = []
|
let data = []
|
||||||
let loading = false
|
let loading = false
|
||||||
|
@ -48,12 +50,13 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Table title={decodeURI(name)} schema={view.schema} {data} {loading}>
|
<Table title={decodeURI(name)} schema={view.schema} {data} {loading} bind:hideAutocolumns>
|
||||||
<FilterButton {view} />
|
<FilterButton {view} />
|
||||||
<CalculateButton {view} />
|
<CalculateButton {view} />
|
||||||
{#if view.calculation}
|
{#if view.calculation}
|
||||||
<GroupByButton {view} />
|
<GroupByButton {view} />
|
||||||
{/if}
|
{/if}
|
||||||
<ManageAccessButton resourceId={decodeURI(name)} />
|
<ManageAccessButton resourceId={decodeURI(name)} />
|
||||||
|
<HideAutocolumnButton bind:hideAutocolumns/>
|
||||||
<ExportButton {view} />
|
<ExportButton {view} />
|
||||||
</Table>
|
</Table>
|
||||||
|
|
Loading…
Reference in New Issue