Skip to content
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ if (Cypress.env('VISBUILDER_ENABLED')) {
cy.getElementByTestId('field-categories.keyword-showDetails').drag(
'[data-test-subj="dropBoxAddField-split_row"]'
);
testSplitTables('', 4);
testSplitTables(4);
removeBucket('dropBoxField-split_row-0');

// vis builder should render splitted tables in columns
cy.getElementByTestId('field-categories.keyword-showDetails').drag(
'[data-test-subj="dropBoxAddField-split_column"]'
);
testSplitTables('visTable__groupInColumns', 4);
testSplitTables(4);
});

after(() => {
Expand Down Expand Up @@ -85,9 +85,9 @@ export const removeBucket = (bucket) => {
});
};

export const testSplitTables = (dir, num) => {
export const testSplitTables = (num) => {
cy.getElementByTestId('visTable')
.should('have.class', `visTable ${dir}`.trim())
.should('have.class', `visTable`)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to do .should('have.class', 'visTable') since it is a constant string now that doesn't require any variable interpolation.

.find('[class="visTable__group"]')
.should(($tables) => {
// should have found specified number of tables
Expand Down