Skip to content

Commit

Permalink
update testSplitTables test (#731)
Browse files Browse the repository at this point in the history
Signed-off-by: Sirazh Gabdullin <sirazh.gabdullin@nu.edu.kz>
(cherry picked from commit 25fd14f)
  • Loading branch information
curq authored and github-actions[bot] committed Jul 10, 2023
1 parent cf23f5b commit 765f2a6
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 765f2a6

Please sign in to comment.