mirror of
https://github.com/grafana/grafana.git
synced 2024-12-25 16:31:28 -06:00
Chore: Remove some hardcoded waits from e2e tests (#75515)
remove some hardcoded waits
This commit is contained in:
parent
163b0d182b
commit
e82e1593d8
@ -68,8 +68,6 @@ describe('Panel edit tests', () => {
|
|||||||
e2e.components.PanelEditor.toggleVizOptions().click();
|
e2e.components.PanelEditor.toggleVizOptions().click();
|
||||||
e2e.components.PanelEditor.OptionsPane.content().should('not.exist');
|
e2e.components.PanelEditor.OptionsPane.content().should('not.exist');
|
||||||
|
|
||||||
cy.wait(100);
|
|
||||||
|
|
||||||
// open options pane
|
// open options pane
|
||||||
e2e.components.PanelEditor.toggleVizOptions().should('be.visible').click();
|
e2e.components.PanelEditor.toggleVizOptions().should('be.visible').click();
|
||||||
e2e.components.PanelEditor.OptionsPane.content().should('be.visible');
|
e2e.components.PanelEditor.OptionsPane.content().should('be.visible');
|
||||||
|
@ -34,9 +34,6 @@ describe('Panels smokescreen', () => {
|
|||||||
e2e.components.PanelEditor.toggleVizPicker().click();
|
e2e.components.PanelEditor.toggleVizPicker().click();
|
||||||
e2e.components.PluginVisualization.item(panel.name).scrollIntoView().should('be.visible').click();
|
e2e.components.PluginVisualization.item(panel.name).scrollIntoView().should('be.visible').click();
|
||||||
|
|
||||||
// Wait for panel to load (TODO: Better way to do this?)
|
|
||||||
cy.wait(500);
|
|
||||||
|
|
||||||
e2e.components.PanelEditor.toggleVizPicker().should((e) => expect(e).to.contain(panel.name));
|
e2e.components.PanelEditor.toggleVizPicker().should((e) => expect(e).to.contain(panel.name));
|
||||||
// TODO: Come up with better check / better failure messaging to clearly indicate which panel failed
|
// TODO: Come up with better check / better failure messaging to clearly indicate which panel failed
|
||||||
cy.contains('An unexpected error happened').should('not.exist');
|
cy.contains('An unexpected error happened').should('not.exist');
|
||||||
|
@ -70,13 +70,7 @@ describe('Exemplars', () => {
|
|||||||
e2e.components.TimePicker.applyTimeRange().click();
|
e2e.components.TimePicker.applyTimeRange().click();
|
||||||
e2e.components.QueryField.container().should('be.visible').type('exemplar-query_bucket{shift}{enter}');
|
e2e.components.QueryField.container().should('be.visible').type('exemplar-query_bucket{shift}{enter}');
|
||||||
|
|
||||||
cy.wait(1000);
|
cy.get(`[data-testid="time-series-zoom-to-data"]`).click();
|
||||||
|
|
||||||
cy.get('body').then((body) => {
|
|
||||||
if (body.find(`[data-testid="time-series-zoom-to-data"]`).length > 0) {
|
|
||||||
cy.get(`[data-testid="time-series-zoom-to-data"]`).click();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
e2e.components.DataSource.Prometheus.exemplarMarker().first().trigger('mouseover');
|
e2e.components.DataSource.Prometheus.exemplarMarker().first().trigger('mouseover');
|
||||||
cy.contains('Query with gdev-tempo').click();
|
cy.contains('Query with gdev-tempo').click();
|
||||||
|
@ -49,8 +49,6 @@ describe('Annotations filtering', () => {
|
|||||||
e2e.pages.Dashboard.SubMenu.Annotations.annotationToggle('Red, only panel 1').should('be.checked');
|
e2e.pages.Dashboard.SubMenu.Annotations.annotationToggle('Red, only panel 1').should('be.checked');
|
||||||
});
|
});
|
||||||
|
|
||||||
cy.wait(3000);
|
|
||||||
|
|
||||||
e2e.components.Panels.Panel.title('Panel one')
|
e2e.components.Panels.Panel.title('Panel one')
|
||||||
.should('exist')
|
.should('exist')
|
||||||
.within(() => {
|
.within(() => {
|
||||||
|
@ -9,8 +9,6 @@ describe('Gauge Panel', () => {
|
|||||||
// open Panel Tests - Gauge
|
// open Panel Tests - Gauge
|
||||||
e2e.flows.openDashboard({ uid: '_5rDmaQiz' });
|
e2e.flows.openDashboard({ uid: '_5rDmaQiz' });
|
||||||
|
|
||||||
cy.wait(1000);
|
|
||||||
|
|
||||||
// check that gauges are rendered
|
// check that gauges are rendered
|
||||||
cy.get('body').find(`.flot-base`).should('have.length', 16);
|
cy.get('body').find(`.flot-base`).should('have.length', 16);
|
||||||
|
|
||||||
|
@ -14,8 +14,6 @@ describe('Auto-migrate graph panel', () => {
|
|||||||
|
|
||||||
e2e.flows.openDashboard({ uid: DASHBOARD_ID, queryParams: { '__feature.autoMigrateOldPanels': true } });
|
e2e.flows.openDashboard({ uid: DASHBOARD_ID, queryParams: { '__feature.autoMigrateOldPanels': true } });
|
||||||
|
|
||||||
cy.wait(1000);
|
|
||||||
|
|
||||||
e2e.components.Panels.Panel.title('Business Hours')
|
e2e.components.Panels.Panel.title('Business Hours')
|
||||||
.should('exist')
|
.should('exist')
|
||||||
.within(() => {
|
.within(() => {
|
||||||
|
@ -69,12 +69,10 @@ describe('Loki query builder', () => {
|
|||||||
e2e.components.QueryBuilder.labelSelect().should('be.visible').click();
|
e2e.components.QueryBuilder.labelSelect().should('be.visible').click();
|
||||||
// wait until labels are loaded and set on the component before starting to type
|
// wait until labels are loaded and set on the component before starting to type
|
||||||
cy.wait('@labelsRequest');
|
cy.wait('@labelsRequest');
|
||||||
cy.wait(100);
|
|
||||||
e2e.components.QueryBuilder.labelSelect().type('instance{enter}');
|
e2e.components.QueryBuilder.labelSelect().type('instance{enter}');
|
||||||
e2e.components.QueryBuilder.matchOperatorSelect().should('be.visible').click().type('=~{enter}');
|
e2e.components.QueryBuilder.matchOperatorSelect().should('be.visible').click().type('=~{enter}');
|
||||||
e2e.components.QueryBuilder.valueSelect().should('be.visible').click();
|
e2e.components.QueryBuilder.valueSelect().should('be.visible').click();
|
||||||
cy.wait('@valuesRequest');
|
cy.wait('@valuesRequest');
|
||||||
cy.wait(100);
|
|
||||||
e2e.components.QueryBuilder.valueSelect().type('instance1{enter}').type('instance2{enter}');
|
e2e.components.QueryBuilder.valueSelect().type('instance1{enter}').type('instance2{enter}');
|
||||||
cy.contains(MISSING_LABEL_FILTER_ERROR_MESSAGE).should('not.exist');
|
cy.contains(MISSING_LABEL_FILTER_ERROR_MESSAGE).should('not.exist');
|
||||||
cy.contains(finalQuery).should('be.visible');
|
cy.contains(finalQuery).should('be.visible');
|
||||||
|
@ -11,7 +11,6 @@ describe('Visualization suggestions', () => {
|
|||||||
// Try visualization suggestions
|
// Try visualization suggestions
|
||||||
e2e.components.PanelEditor.toggleVizPicker().click();
|
e2e.components.PanelEditor.toggleVizPicker().click();
|
||||||
cy.contains('Suggestions').click();
|
cy.contains('Suggestions').click();
|
||||||
cy.wait(3000);
|
|
||||||
|
|
||||||
// Verify we see suggestions
|
// Verify we see suggestions
|
||||||
e2e.components.VisualizationPreview.card('Line chart').should('be.visible');
|
e2e.components.VisualizationPreview.card('Line chart').should('be.visible');
|
||||||
|
Loading…
Reference in New Issue
Block a user