Skip to content

Commit

Permalink
update testSplitTables test (#731) (#744)
Browse files Browse the repository at this point in the history
Signed-off-by: Sirazh Gabdullin <[email protected]>
(cherry picked from commit 25fd14f)

Co-authored-by: Sirazh Gabdullin <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and curq authored Jul 10, 2023
1 parent cf23f5b commit a74dd7a
Showing 1 changed file with 4 additions and 4 deletions.
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`)
.find('[class="visTable__group"]')
.should(($tables) => {
// should have found specified number of tables
Expand Down

0 comments on commit a74dd7a

Please sign in to comment.