grafana/e2e/old-arch/dashboards-suite/dashboard-panel-attention.spec.ts
Ivan Ortega Alba 7bca69849f
Dashboards: Enable scenes by default (#93818)
* 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
2024-09-30 10:49:02 +01:00

31 lines
1.1 KiB
TypeScript

import { e2e } from '../utils';
describe('Dashboard Panel Attention', () => {
beforeEach(() => {
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
// Open all panels dashboard
e2e.flows.openDashboard({ uid: 'n1jR8vnnz' });
});
it('Should give panel attention on focus', () => {
e2e.components.Panels.Panel.title('State timeline').focus();
cy.get('body').type('v');
cy.url().should('include', 'viewPanel=41');
});
it('Should give panel attention on hover', () => {
e2e.components.Panels.Panel.title('State timeline').trigger('mousemove');
cy.wait(100); // Wait because of debounce
cy.get('body').type('v');
cy.url().should('include', 'viewPanel=41');
});
it('Should change panel attention between focus and mousemove', () => {
e2e.components.Panels.Panel.title('Size, color mapped to different fields + share view').focus();
e2e.components.Panels.Panel.title('State timeline').trigger('mousemove');
cy.wait(100); // Wait because of debounce
cy.get('body').type('v');
cy.url().should('include', 'viewPanel=41');
});
});