Logs: e2e test flake in loki-table-explore-to-dash.spec.ts (#83856)

fix flake in e2e test checking monaco loading state
This commit is contained in:
Galen Kistler 2024-03-04 13:01:48 -06:00 committed by GitHub
parent 5aa965b9e9
commit f1000978cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -147,10 +147,18 @@ describe('Loki Query Editor', () => {
cy.contains('Code').click({ force: true });
// Wait for lazy loading
const monacoLoadingText = 'Loading...';
// 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().should('be.visible').should('have.text', monacoLoadingText);
e2e.components.QueryField.container()
.find('.view-overlays[role="presentation"]')
.get('.cdr')
.then(($el) => {
const win = $el[0].ownerDocument.defaultView;
const after = win.getComputedStyle($el[0], '::after');
const content = after.getPropertyValue('content');
expect(content).to.eq('"Enter a Loki query (run with Shift+Enter)"');
});
// Write a simple query
e2e.components.QueryField.container().type('query').type('{instance="instance1"');