From 35db8ca7e0288092ca0e25588a60623caacefed9 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 28 Oct 2020 09:50:05 +0000 Subject: [PATCH] finally reached the summit of the cypress mountain --- .DS_Store | Bin 6148 -> 8196 bytes .../cypress/integration/createTable.spec.js | 16 ++++++++++------ .../cypress/integration/createView.spec.js | 1 + .../DataTable/TableHeader/TableHeader.svelte | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.DS_Store b/.DS_Store index 363dbb1c4c7a5fb97895c6f471243558723a3be9..b16eb9ec688d57004e4a1eb943a3c33776c5b934 100644 GIT binary patch literal 8196 zcmeHM&2G~`5T0!Vb<#qLgwz~;LE_L>ts3Y7A%(OEaskwo9|=%vH&JSE?BF;JB?RTd zI{K!0nLDBKr^5j_#YU+JDZC!Q*zL8Mu%P z@bke$Wm${lL`nJRKqFHC$O10Qfv4wDXCk{fM#Ht0nXj8B3o}$pWIab{svck@*1vxWV^l% zJsd5;`Zs^eA}1>V+W{`j=zY%UEu87mF%8I0YttQQe@V<*inSfg?qMAPwWl%SeFC!> zW4h39!HUbf%Ameu4@p!Rs2Cn=wnC369I zw`dJaw#f#Y9bjFoxRbHXjHcJiyesrNtIs0d_ajdoucxxNBhF0*`Oe zc7R@!E9CJE%hH3%)h=abn1$nbPFglHxNMvuqJ@$0;*`EU?DwK`^~3JDPCwk(_$lV* z3zsf07)Hq`T`9e89{a;)XoZ7*-3ngv=!q2`+fjet_uaT}+0UHz@L>7+j_-w*5>Q0+4yLji$L%-trZ#%g3_REOIt)aufH*#yE?mvW?j1(_@Ch*v z(d**A3wLrqC)DL(N;4ejIl}|ftfx$ayLn9F_pTb88~kS=9Pg8=l}O-fB!%4W$5`e1Db(< z$bcy9Hh1e-z}b5}yB5y1P1HkFF040EQbN$kbR1HqdqylyTu1AhQeO{=Q_ delta 175 zcmZp1XfcprU|?W$DortDU=RQ@Ie-{Mvv5r;6q~50D9R0z2aEYL1Th3N=rQCnq--o) z&dkU?d6i)46gF}!RXf_ZCfb4Ju*}1XsJM(0I8BdT47?>cg0XdLib3D%+ FW&o5gA%y?{ diff --git a/packages/builder/cypress/integration/createTable.spec.js b/packages/builder/cypress/integration/createTable.spec.js index 2d6f131289..0715d61c0b 100644 --- a/packages/builder/cypress/integration/createTable.spec.js +++ b/packages/builder/cypress/integration/createTable.spec.js @@ -22,8 +22,10 @@ context("Create a Table", () => { }) it("updates a column on the table", () => { - cy.contains("name").click() - cy.get(".ri-pencil-line").click() + cy.contains("header", "name") + .trigger("mouseover") + .find(".ri-pencil-line") + .click({ force: true }) cy.get(".actions input") .first() .type("updated") @@ -48,11 +50,13 @@ context("Create a Table", () => { }) it("deletes a column", () => { - cy.contains("name").click() - cy.get(".ri-pencil-line").click() - cy.contains("Delete Column").click() + cy + .contains("header", "name") + .trigger("mouseover") + .find(".ri-pencil-line").click({ force: true }) + cy.contains("Delete").click() cy.wait(50) - cy.get(".buttons").contains("Delete Column").click() + cy.get(".buttons").contains("Delete").click() cy.contains("nameupdated").should("not.exist") }) diff --git a/packages/builder/cypress/integration/createView.spec.js b/packages/builder/cypress/integration/createView.spec.js index 4b01fb43ed..ca0dd60f8b 100644 --- a/packages/builder/cypress/integration/createView.spec.js +++ b/packages/builder/cypress/integration/createView.spec.js @@ -63,6 +63,7 @@ context("Create a View", () => { .eq(1) .select("age") cy.contains("Save").click() + cy.get(".ag-center-cols-viewport").scrollTo("100%") cy.get("[data-cy=table-header]").then($headers => { expect($headers).to.have.length(7) const headers = Array.from($headers).map(header => header.textContent.trim()) diff --git a/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte b/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte index 922f565a22..9588b34dd7 100644 --- a/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte +++ b/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte @@ -34,7 +34,7 @@ modal.show() } - function setSort(column) { + function setSort() { sortDirection = column.getSort() }