mirror of
https://github.com/grafana/grafana.git
synced 2025-01-16 03:32:37 -06:00
E2E: saving a dashboard should wait for success (#18171)
- navigating right away triggered the unsaved warning on slower machines - this change makes sure we see a success message first
This commit is contained in:
parent
2c8809d3cf
commit
fb21492eae
@ -4,17 +4,20 @@ import {
|
||||
Selector,
|
||||
InputPageObjectType,
|
||||
InputPageObject,
|
||||
PageObject,
|
||||
} from 'e2e-test/core/pageObjects';
|
||||
import { TestPage } from 'e2e-test/core/pages';
|
||||
|
||||
export interface SaveDashboardModal {
|
||||
name: InputPageObjectType;
|
||||
save: ClickablePageObjectType;
|
||||
success: PageObject;
|
||||
}
|
||||
|
||||
export const saveDashboardModal = new TestPage<SaveDashboardModal>({
|
||||
pageObjects: {
|
||||
name: new InputPageObject(Selector.fromAriaLabel('Save dashboard title field')),
|
||||
save: new ClickablePageObject(Selector.fromAriaLabel('Save dashboard button')),
|
||||
success: new PageObject(Selector.fromSelector('.alert-success')),
|
||||
},
|
||||
});
|
||||
|
@ -57,6 +57,7 @@ e2eScenario(
|
||||
const dashboardTitle = new Date().toISOString();
|
||||
await saveDashboardModal.pageObjects.name.enter(dashboardTitle);
|
||||
await saveDashboardModal.pageObjects.save.click();
|
||||
await saveDashboardModal.pageObjects.success.exists();
|
||||
|
||||
// Share the dashboard
|
||||
const dashboardsPage = dashboardsPageFactory(dashboardTitle);
|
||||
|
Loading…
Reference in New Issue
Block a user