Skip to content

Commit 54477cc

Browse files
TackAdamAdam Tackett
and
Adam Tackett
authored
Application Analytics - Flaky cypress fix (#2402)
* fix flaky app test Signed-off-by: Adam Tackett <[email protected]> * fix other flaky test Signed-off-by: Adam Tackett <[email protected]> --------- Signed-off-by: Adam Tackett <[email protected]> Co-authored-by: Adam Tackett <[email protected]>
1 parent 74ad512 commit 54477cc

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.cypress/integration/app_analytics_test/app_analytics.spec.js

+4
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ describe('Viewing application', () => {
303303

304304
it('Opens service detail flyout when Service Name is clicked', () => {
305305
cy.get('[data-test-subj="app-analytics-serviceTab"]').click();
306+
cy.get('[data-test-subj="globalLoadingIndicator"]').should('not.exist');
306307
cy.get('*[data-test-subj^="service-link"]').eq(0).click();
307308
cy.get('[data-test-subj="serviceDetailFlyoutTitle"]').should('be.visible');
308309
cy.get('[data-test-subj="Number of connected servicesDescriptionList"]').should('contain', '3');
@@ -319,6 +320,7 @@ describe('Viewing application', () => {
319320

320321
it('Opens trace detail flyout when Trace ID is clicked', () => {
321322
cy.get('[data-test-subj="app-analytics-traceTab"]').click();
323+
cy.get('[data-test-subj="globalLoadingIndicator"]').should('not.exist');
322324
cy.get('[title="03f9c770db5ee2f1caac0afc36db49ba"]').click();
323325
cy.get('[data-test-subj="traceDetailFlyoutTitle"]').should('be.visible');
324326
cy.get('[data-test-subj="traceDetailFlyout"]').within(($flyout) => {
@@ -339,6 +341,7 @@ describe('Viewing application', () => {
339341

340342
it('Opens span detail flyout when Span ID is clicked', () => {
341343
cy.get('[data-test-subj="app-analytics-traceTab"]').click();
344+
cy.get('[data-test-subj="globalLoadingIndicator"]').should('not.exist');
342345
cy.get('input[type="search"]').click().type(`5ff3516909562c60`);
343346
cy.get('[data-test-subj="globalLoadingIndicator"]').should('not.exist');
344347
cy.get('[data-test-subj="dataGridRowCell"]').contains('5ff3516909562c60').click();
@@ -432,6 +435,7 @@ describe('Viewing application', () => {
432435
changeTimeTo24('months');
433436
cy.get('[data-test-subj="app-analytics-logTab"]').click();
434437
cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').click();
438+
cy.get('[data-test-subj="globalLoadingIndicator"]').should('not.exist');
435439
cy.get('[id="explorerPlotComponent"]', { timeout: timeoutDelay }).should('exist');
436440
cy.get('[data-test-subj="searchAutocompleteTextArea"]').focus();
437441
cy.get('[data-test-subj="searchAutocompleteTextArea"]').type(' ' + query_two, {

.cypress/utils/app_constants.js

+1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ export const changeTimeTo24 = (timeUnit) => {
140140
cy.get('[aria-label="Time unit"]').select(timeUnit);
141141
cy.get('.euiButton').contains('Apply').click();
142142
cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').click();
143+
cy.get('[data-test-subj="globalLoadingIndicator"]').should('not.exist');
143144
};
144145

145146
export const expectMessageOnHover = (button, message) => {

0 commit comments

Comments
 (0)