mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 02:10:45 -06:00
7bca69849f
* Mark Scenes feature toggles as GA * Move old arch e2e to a new folder * Run E2E on scenes by default * Upgrade e2e-selectors to ensure the tests in Playwright works
31 lines
1019 B
TypeScript
31 lines
1019 B
TypeScript
import { e2e } from '../utils';
|
|
|
|
const PAGE_UNDER_TEST = 'edediimbjhdz4b/a-tall-dashboard';
|
|
|
|
describe('Dashboards', () => {
|
|
beforeEach(() => {
|
|
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
|
});
|
|
|
|
it('should restore scroll position', () => {
|
|
e2e.flows.openDashboard({ uid: PAGE_UNDER_TEST });
|
|
e2e.components.Panels.Panel.title('Panel #1').should('be.visible');
|
|
|
|
// scroll to the bottom
|
|
cy.scrollTo('bottom', {
|
|
timeout: 5 * 1000,
|
|
});
|
|
|
|
// The last panel should be visible...
|
|
e2e.components.Panels.Panel.title('Panel #50').should('be.visible');
|
|
|
|
// Then we open and close the panel editor
|
|
e2e.components.Panels.Panel.menu('Panel #50').click({ force: true }); // it only shows on hover
|
|
e2e.components.Panels.Panel.menuItems('Edit').click();
|
|
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
|
|
|
// The last panel should still be visible!
|
|
e2e.components.Panels.Panel.title('Panel #50').should('be.visible');
|
|
});
|
|
});
|