Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Table Visualizations] Update test #731

Merged
merged 1 commit into from
Jul 10, 2023
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
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
Loading