Files
grafana/e2e/various-suite/select-focus.spec.ts
Ashley Harrison ba7f77f25d Chore: remove scenario wrapping in cypress tests (#74674)
* remove scenario wrapping in cypress tests

* remove more hardcoded logins

* don't forget the various suite!

* make sure we log in for every test

* fix afterAll revert

* stability
2023-09-13 13:24:20 +01:00

35 lines
1.0 KiB
TypeScript

import { e2e } from '../utils';
describe('Select focus/unfocus tests', () => {
beforeEach(() => {
e2e.flows.login(e2e.env('USERNAME'), e2e.env('PASSWORD'));
});
it('Tests select focus/unfocus scenarios', () => {
e2e.flows.openDashboard({ uid: '5SdHCadmz' });
e2e.components.PageToolbar.item('Dashboard settings').click();
e2e.components.FolderPicker.containerV2()
.should('be.visible')
.within(() => {
cy.get('#dashboard-folder-input').should('be.visible').click();
});
e2e.components.Select.option().should('be.visible').first().click();
e2e.components.FolderPicker.containerV2()
.should('be.visible')
.within(() => {
cy.get('#dashboard-folder-input').should('exist').should('have.focus');
});
e2e.pages.Dashboard.Settings.General.title().click();
e2e.components.FolderPicker.containerV2()
.should('be.visible')
.within(() => {
cy.get('#dashboard-folder-input').should('exist').should('not.have.focus');
});
});
});