Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Restyled by prettier
  • Loading branch information
restyled-commits authored and Ezra Odio committed Jun 14, 2024
commit bbdf73a7da81478fca2aeb41bba49981fd430a57
22 changes: 12 additions & 10 deletions client/cypress/integration/visualizations/table/table_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as AllCellTypes from "./.mocks/all-cell-types";
import * as MultiColumnSort from "./.mocks/multi-column-sort";
import * as SearchInData from "./.mocks/search-in-data";
import * as LargeDataset from "./.mocks/large-dataset";
import * as WideDataSet from "./.mocks/wide-dataset"
import * as WideDataSet from "./.mocks/wide-dataset";

function prepareVisualization(query, type, name, options) {
return cy
Expand Down Expand Up @@ -108,15 +108,17 @@ describe("Table", () => {
cy.getByTestId("FixedColumns").click();
cy.contains(".ant-select-item-option-content", "1").click();
cy.contains("Save").click();
cy.wait(500);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500); //add some waiting to make sure table visualization is saved

cy.get('.ant-table-thead')
.find('th.ant-table-cell-fix-left')
.then((fixedCols) => {
expect(fixedCols.length).to.equal(1)});
cy.get(".ant-table-thead")
.find("th.ant-table-cell-fix-left")
.then(fixedCols => {
expect(fixedCols.length).to.equal(1);
});

cy.get('.ant-table-content').scrollTo('right', { duration: 1000 });
cy.get('.ant-table-content').scrollTo('left', { duration: 1000 });
cy.get(".ant-table-content").scrollTo("right", { duration: 1000 });
cy.get(".ant-table-content").scrollTo("left", { duration: 1000 });
});

it("doesn't let user fix too many columns", () => {
Expand All @@ -125,7 +127,7 @@ describe("Table", () => {
cy.getByTestId("EditVisualization").click();
cy.contains("span", "Grid").click();
cy.getByTestId("FixedColumns").click();
cy.get(".ant-select-item-option-content")
cy.get(".ant-select-item-option-content");
cy.contains(".ant-select-item-option-content", "3").should("not.exist");
cy.contains(".ant-select-item-option-content", "4").should("not.exist");
});
Expand All @@ -138,7 +140,7 @@ describe("Table", () => {
cy.getByTestId("FixedColumns").click();
cy.contains(".ant-select-item-option-content", "4").click();
cy.contains("Save").click();
})
});
});

it("searches in multiple columns", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Object {
],
"dateTimeFormat": undefined,
"displayAs": "string",
"fixed": false,
"highlightLinks": false,
"imageHeight": "",
"imageTitleTemplate": "{{ @ }}",
Expand Down Expand Up @@ -46,6 +47,7 @@ Object {
],
"dateTimeFormat": undefined,
"displayAs": "number",
"fixed": false,
"highlightLinks": false,
"imageHeight": "",
"imageTitleTemplate": "{{ @ }}",
Expand Down Expand Up @@ -79,6 +81,7 @@ Object {
],
"dateTimeFormat": undefined,
"displayAs": "string",
"fixed": false,
"highlightLinks": false,
"imageHeight": "",
"imageTitleTemplate": "{{ @ }}",
Expand Down Expand Up @@ -112,6 +115,7 @@ Object {
],
"dateTimeFormat": undefined,
"displayAs": "string",
"fixed": false,
"highlightLinks": false,
"imageHeight": "",
"imageTitleTemplate": "{{ @ }}",
Expand Down Expand Up @@ -145,6 +149,7 @@ Object {
],
"dateTimeFormat": undefined,
"displayAs": "string",
"fixed": false,
"highlightLinks": false,
"imageHeight": "",
"imageTitleTemplate": "{{ @ }}",
Expand Down