Updating cypress tests as well as changing the auto column icons a bit to improve the look.
This commit is contained in:
parent
c98e990a3d
commit
aa449e4729
|
@ -1,3 +1,11 @@
|
||||||
|
function removeSpacing(headers) {
|
||||||
|
let newHeaders = []
|
||||||
|
for (let header of headers) {
|
||||||
|
newHeaders.push(header.replace(/\s\s+/g, " "))
|
||||||
|
}
|
||||||
|
return newHeaders
|
||||||
|
}
|
||||||
|
|
||||||
context("Create a View", () => {
|
context("Create a View", () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.visit("localhost:4001/_builder")
|
cy.visit("localhost:4001/_builder")
|
||||||
|
@ -28,7 +36,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([ 'rating', 'age', 'group' ])
|
expect(removeSpacing(headers)).to.deep.eq([ "rating Number", "age Number", "group Text" ])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -60,13 +68,19 @@ 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([ 'avg', 'sumsqr', 'count', 'max', 'min', 'sum', 'field' ])
|
expect(removeSpacing(headers)).to.deep.eq([ "avg Number",
|
||||||
|
"sumsqr Number",
|
||||||
|
"count Number",
|
||||||
|
"max Number",
|
||||||
|
"min Number",
|
||||||
|
"sum Number",
|
||||||
|
"field Text" ])
|
||||||
})
|
})
|
||||||
cy.get(".ag-cell").then($values => {
|
cy.get(".ag-cell").then($values => {
|
||||||
let values = Array.from($values).map(header =>
|
let values = Array.from($values).map(header =>
|
||||||
header.textContent.trim()
|
header.textContent.trim()
|
||||||
)
|
)
|
||||||
expect(values).to.deep.eq([ '31', '5347', '5', '49', '20', '155', 'age' ])
|
expect(values).to.deep.eq([ "31", "5347", "5", "49", "20", "155", "age" ])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -85,7 +99,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([ 'Students', '23.333333333333332', '1650', '3', '25', '20', '70' ])
|
expect(values).to.deep.eq([ "Students", "23.333333333333332", "1650", "3", "25", "20", "70" ])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -62,9 +62,11 @@
|
||||||
on:mouseover={() => (hovered = true)}
|
on:mouseover={() => (hovered = true)}
|
||||||
on:mouseleave={() => (hovered = false)}>
|
on:mouseleave={() => (hovered = false)}>
|
||||||
<div class="column-header">
|
<div class="column-header">
|
||||||
{#if field.autocolumn}<i class="auto ri-magic-fill" />{/if}
|
|
||||||
<div class="column-header-text">
|
<div class="column-header-text">
|
||||||
<div class="column-header-name">{displayName}</div>
|
<div class="column-header-name">
|
||||||
|
{displayName}
|
||||||
|
{#if field.autocolumn}<i class="auto ri-magic-fill" />{/if}
|
||||||
|
</div>
|
||||||
{#if type}
|
{#if type}
|
||||||
<div class="column-header-type">{type}</div>
|
<div class="column-header-type">{type}</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -149,10 +151,12 @@
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.auto {
|
.auto {
|
||||||
font-size: var(--font-size-xs);
|
font-size: 9px;
|
||||||
transition: none;
|
transition: none;
|
||||||
margin-right: 6px;
|
position: relative;
|
||||||
margin-top: 2px;
|
margin-left: 2px;
|
||||||
|
top: -3px;
|
||||||
|
color: var(--grey-6);
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon:hover {
|
.icon:hover {
|
||||||
|
|
Loading…
Reference in New Issue