|
|
|
@ -11,7 +11,9 @@ e2e.scenario({ |
|
|
|
|
e2e.components.DataSourcePicker.container().should('be.visible').click(); |
|
|
|
|
|
|
|
|
|
cy.contains('gdev-prometheus').scrollIntoView().should('be.visible').click(); |
|
|
|
|
const queryText = 'http_requests_total'; |
|
|
|
|
const queryText = `rate(http_requests_total{job="grafana"}[5m])`; |
|
|
|
|
|
|
|
|
|
cy.contains('label', 'Code').click(); |
|
|
|
|
|
|
|
|
|
// we need to wait for the query-field being lazy-loaded, in two steps:
|
|
|
|
|
// it is a two-step process:
|
|
|
|
@ -20,13 +22,18 @@ e2e.scenario({ |
|
|
|
|
const monacoLoadingText = 'Loading...'; |
|
|
|
|
e2e.components.QueryField.container().should('be.visible').should('have.text', monacoLoadingText); |
|
|
|
|
e2e.components.QueryField.container().should('be.visible').should('not.have.text', monacoLoadingText); |
|
|
|
|
|
|
|
|
|
e2e.components.QueryField.container().type(queryText).type('{backspace}'); |
|
|
|
|
e2e.components.QueryField.container().type(queryText, { parseSpecialCharSequences: false }).type('{backspace}'); |
|
|
|
|
|
|
|
|
|
cy.contains(queryText.slice(0, -1)).should('be.visible'); |
|
|
|
|
|
|
|
|
|
e2e.components.QueryField.container().type(e2e.typings.undo()); |
|
|
|
|
|
|
|
|
|
cy.contains(queryText).should('be.visible'); |
|
|
|
|
|
|
|
|
|
cy.get('body').click(); |
|
|
|
|
|
|
|
|
|
cy.contains('label', 'Builder').click(); |
|
|
|
|
|
|
|
|
|
cy.get('[data-testid="operations.0.wrapper"]').should('be.visible'); |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|