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

Add Test for Vis Builder Bugs #1340

Merged
merged 1 commit into from
Jun 3, 2024
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 @@ -161,6 +161,47 @@ if (Cypress.env('VISBUILDER_ENABLED')) {
cy.deleteSavedObjectByType(VB_SO_TYPE, `vb${cleanupKey}`);
});

it('Check toggle legend functionality', () => {
// Settting up the page
cy.visit(VB_APP_URL);

// Wait for page to load
cy.waitForLoader();
cy.vbSelectDataSource(VB_INDEX_PATTERN);

cy.getElementByTestId('field-undefined-showDetails').drag(
'[data-test-subj=dropBoxAddField-metric]'
);

// default behaviour: hidden
cy.getElementByTestId('legend-Count').should('be.visible');
cy.getElementByTestId('vislibToggleLegend').click();

cy.getElementByTestId('legend-Count').should('not.exist');
cy.getElementByTestId('vislibToggleLegend').click();

cy.getElementByTestId('legend-Count').should('be.visible');
});

it('Check dragging a field out of bounds does not scroll the pane', () => {
// Settting up the page
cy.visit(VB_APP_URL);

// Wait for page to load
cy.waitForLoader();
cy.vbSelectDataSource(VB_INDEX_PATTERN);

cy.getElementByTestId('field-undefined-showDetails').drag(
'[data-test-subj=dropBoxAddField-metric]'
);

cy.getElementByTestId('dropBoxField-metric-0').drag(
'[data-test-subj="vbOption-Settings"]'
);

cy.get('[class="vbConfig__title"]').contains('Configuration');
});

after(() => {
cy.deleteIndex(VB_INDEX_ID);
});
Expand Down
Loading