Skip to content

Commit 7d7a942

Browse files
authored
fix: update Giraffe to fix Simple Table with multiple table headers (#6010)
* fix: update Giraffe to fix Simple Table with multiple table headers * test: update assertions to match correct row sizing for Simple Table
1 parent d8f4e10 commit 7d7a942

File tree

3 files changed

+25
-20
lines changed

3 files changed

+25
-20
lines changed

cypress/e2e/shared/simpleTable.test.ts

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ describe('simple table interactions', () => {
4646
// click last page
4747
cy.getByTestID('pagination-item').last().should('be.visible')
4848
cy.getByTestID('pagination-item').last().click()
49-
// verify correct number of pages
50-
cy.getByTestID('pagination-item').last().contains('50')
49+
// verify correct number of pages: 300 items at 3 items per page
50+
cy.getByTestID('pagination-item').last().contains('100')
5151

5252
// show raw data view of data with 10 pages
5353
cy.getByTestID(`selector-list ${simpleSmall}`).should('be.visible')
@@ -74,7 +74,7 @@ describe('simple table interactions', () => {
7474
})
7575
// verify correct number of pages
7676
cy.getByTestID('pagination-item').last().should('be.visible')
77-
cy.getByTestID('pagination-item').last().contains('15')
77+
cy.getByTestID('pagination-item').last().contains('10')
7878
})
7979

8080
it('should render correctly after switching from a dataset with fewer pages to one with more', () => {
@@ -101,7 +101,7 @@ describe('simple table interactions', () => {
101101
cy.getByTestID('pagination-item').last().should('be.visible')
102102
cy.getByTestID('pagination-item').last().click()
103103
// verify correct number of pages
104-
cy.getByTestID('pagination-item').last().contains('5')
104+
cy.getByTestID('pagination-item').last().contains('10')
105105

106106
// show raw data view of data with 100 pages
107107
cy.getByTestID(`selector-list ${simpleLarge}`).should('be.visible')
@@ -128,7 +128,7 @@ describe('simple table interactions', () => {
128128
})
129129
// verify correct number of pages
130130
cy.getByTestID('pagination-item').last().should('be.visible')
131-
cy.getByTestID('pagination-item').last().contains('150')
131+
cy.getByTestID('pagination-item').last().contains('100')
132132
})
133133

134134
it('should not duplicate records from the n-1 page on the nth page', () => {
@@ -155,7 +155,7 @@ describe('simple table interactions', () => {
155155
cy.getByTestID('pagination-item').last().should('be.visible')
156156
cy.getByTestID('pagination-item').last().click()
157157
// verify correct number of pages
158-
cy.getByTestID('pagination-item').last().contains('6')
158+
cy.getByTestID('pagination-item').last().contains('11')
159159
// verify only record 31 is on last page
160160
cy.getByTestID('table-cell 30').should('not.exist')
161161
cy.getByTestID('table-cell 31').should('be.visible')
@@ -185,32 +185,37 @@ describe('simple table interactions', () => {
185185
cy.getByTestID('pagination-item').last().should('be.visible')
186186
cy.getByTestID('pagination-item').last().click()
187187

188-
// click page 15
188+
// click page 10
189189
cy.getByTestID('pagination-item').eq(4).click()
190+
cy.getByTestID('table-cell 28').should('be.visible')
190191
cy.getByTestID('table-cell 29').should('be.visible')
191192
cy.getByTestID('table-cell 30').should('be.visible')
192193
cy.getByTestID('pagination-item').last().click()
193194

194-
// click page 14
195+
// click page 9
195196
cy.getByTestID('pagination-item').eq(3).click()
197+
cy.getByTestID('table-cell 25').should('be.visible')
198+
cy.getByTestID('table-cell 26').should('be.visible')
196199
cy.getByTestID('table-cell 27').should('be.visible')
197-
cy.getByTestID('table-cell 28').should('be.visible')
198200
cy.getByTestID('pagination-item').last().click()
199201

200-
// click page 13
202+
// click page 8
201203
cy.getByTestID('pagination-item').eq(2).click()
202-
cy.getByTestID('table-cell 25').should('be.visible')
203-
cy.getByTestID('table-cell 26').should('be.visible')
204+
cy.getByTestID('table-cell 22').should('be.visible')
205+
cy.getByTestID('table-cell 23').should('be.visible')
206+
cy.getByTestID('table-cell 24').should('be.visible')
204207
cy.getByTestID('pagination-item').last().click()
205208

206-
// click page 12
209+
// click page 7
207210
cy.getByTestID('pagination-item').eq(1).click()
208-
cy.getByTestID('table-cell 23').should('be.visible')
209-
cy.getByTestID('table-cell 24').should('be.visible')
211+
cy.getByTestID('table-cell 19').should('be.visible')
212+
cy.getByTestID('table-cell 20').should('be.visible')
213+
cy.getByTestID('table-cell 21').should('be.visible')
210214
cy.getByTestID('pagination-item').last().click()
211215

212216
// click left button
213217
cy.getByTestID('pagination-direction-item').eq(0).click()
218+
cy.getByTestID('table-cell 28').should('be.visible')
214219
cy.getByTestID('table-cell 29').should('be.visible')
215220
cy.getByTestID('table-cell 30').should('be.visible')
216221
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
"@docsearch/react": "^3.0.0-alpha.37",
167167
"@influxdata/clockface": "^6.3.8",
168168
"@influxdata/flux-lsp-browser": "0.8.35",
169-
"@influxdata/giraffe": "^2.37.0",
169+
"@influxdata/giraffe": "^2.37.1",
170170
"@influxdata/influxdb-templates": "0.9.0",
171171
"@influxdata/react-custom-scrollbars": "4.3.8",
172172
"abortcontroller-polyfill": "^1.3.0",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,10 +1449,10 @@
14491449
resolved "https://registry.yarnpkg.com/@influxdata/flux-lsp-browser/-/flux-lsp-browser-0.8.35.tgz#ed92117d46f297bacf6aec7e7ace451d55bdff79"
14501450
integrity sha512-d/zlUAx+O67aTBVNIr0XznuDl2jkGELlahRL2OIPOawfnAkNNREuC8iMhov8dq+Bw9d5w+mT041UKzhxZXl1Kg==
14511451

1452-
"@influxdata/giraffe@^2.37.0":
1453-
version "2.37.0"
1454-
resolved "https://registry.yarnpkg.com/@influxdata/giraffe/-/giraffe-2.37.0.tgz#a4e06aed4d10dc85067feb79830ff31037175161"
1455-
integrity sha512-XTGC9fo6g70pbwgD9XV0Yvi1JHMGypI8CR3UAg7nJGq5MgbCgo9nzLaxvilKdcvngrQGCzARvw+ixawfIUHrJg==
1452+
"@influxdata/giraffe@^2.37.1":
1453+
version "2.37.1"
1454+
resolved "https://registry.yarnpkg.com/@influxdata/giraffe/-/giraffe-2.37.1.tgz#63439ea226093c96564f1c1a6e438318c70a9f63"
1455+
integrity sha512-ISUmUKNhqrWk0JNVwCa20CGO9DzTOaGZUg8Ma0OeG5OhhX0z1niJQZ/MoonYC/virTWm+iERo0URBUZeMtwcIw==
14561456
dependencies:
14571457
merge-images "^2.0.0"
14581458

0 commit comments

Comments
 (0)