Skip to content

Commit d0b5266

Browse files
[Manual Backport 2.x] [Bug] Add loading status to all pages in traces and services pages (#2336) (#2337)
* [Bug] Add loading status to all pages in traces and services pages (#2325) * add loading status to trace content * add loading status to trace view and services pages * update unit tests and remove console.log * resolve comments * update cypress tests * add loader for span flyout and fix trace tests --------- (cherry picked from commit ca79a8f) * add app analytic flyout snapshot --------- (cherry picked from commit 036a4f9) Signed-off-by: Shenoy Pratik <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 7d08acc commit d0b5266

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+19690
-4818
lines changed

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

Lines changed: 121 additions & 65 deletions
Large diffs are not rendered by default.

.cypress/integration/trace_analytics_test/trace_analytics_dashboard.spec.js

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import { testDataSet, setTimeFilter, jaegerTestDataSet } from '../../utils/constants';
99
import { suppressResizeObserverIssue } from '../../utils/constants';
1010

11-
suppressResizeObserverIssue();//needs to be in file once
11+
suppressResizeObserverIssue(); //needs to be in file once
1212

1313
describe('Dump test data', () => {
1414
it('Indexes test data', () => {
@@ -102,8 +102,8 @@ describe('Testing dashboard table', () => {
102102
});
103103

104104
it('Adds the percentile filters', () => {
105-
106105
cy.get('[data-test-subj="dashboardTable"]').should('be.visible');
106+
cy.contains('client_create_order').should('exist');
107107
cy.get('[data-test-subj="dashboard-table-percentile-button-2"]').click();
108108

109109
cy.contains('Latency percentile within trace group: >= 95th').should('exist');
@@ -171,7 +171,7 @@ describe('Testing plots', () => {
171171
});
172172
});
173173

174-
describe('Latency by trace group table', () =>{
174+
describe('Latency by trace group table', () => {
175175
beforeEach(() => {
176176
cy.visit('app/observability-traces#/', {
177177
onBeforeLoad: (win) => {
@@ -191,35 +191,59 @@ describe('Latency by trace group table', () =>{
191191
cy.get('[data-test-subj="tableHeaderCell_dashboard_error_rate_4"]').should('exist');
192192
cy.get('[data-test-subj="tableHeaderCell_dashboard_traces_5"]').should('exist');
193193
cy.get('[data-test-subj="tablePaginationPopoverButton"]').eq(1).click();
194-
cy.get('.euiIcon.euiIcon--medium.euiIcon--inherit.euiContextMenu__icon').eq(0).should('exist').click();
194+
cy.get('.euiIcon.euiIcon--medium.euiIcon--inherit.euiContextMenu__icon')
195+
.eq(0)
196+
.should('exist')
197+
.click();
195198
cy.get('[data-test-subj="pagination-button-next"]').eq(1).should('exist').click();
196-
cy.get('button[data-test-subj="dashboard-table-trace-group-name-button"]').contains('mysql').should('exist');
199+
cy.get('button[data-test-subj="dashboard-table-trace-group-name-button"]')
200+
.contains('mysql')
201+
.should('exist');
197202
});
198203

199204
it('Sorts the Latency by trace group table', () => {
200205
cy.get('span[title*="Trace group name"]').click();
201-
cy.get('[data-test-subj="dashboard-table-trace-group-name-button"]').eq(0).contains('/**').should('exist');
206+
cy.get('[data-test-subj="dashboard-table-trace-group-name-button"]')
207+
.eq(0)
208+
.contains('/**')
209+
.should('exist');
202210
});
203211

204212
it('Verify tooltips in Latency by trace group table', () => {
205213
cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.eui-alignTop').eq(0).trigger('mouseover');
206-
cy.contains('Traces of all requests that share a common API and operation at the start of distributed tracing instrumentation.').should('be.visible');
214+
cy.contains(
215+
'Traces of all requests that share a common API and operation at the start of distributed tracing instrumentation.'
216+
).should('be.visible');
207217
cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.eui-alignTop').eq(1).trigger('mouseover');
208-
cy.contains('Range of latencies for traces within a trace group in the selected time range.').should('be.visible');
218+
cy.contains(
219+
'Range of latencies for traces within a trace group in the selected time range.'
220+
).should('be.visible');
209221
cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.eui-alignTop').eq(2).trigger('mouseover');
210-
cy.contains('Average latency of traces within a trace group in the selected time range.').should('be.visible');
222+
cy.contains(
223+
'Average latency of traces within a trace group in the selected time range.'
224+
).should('be.visible');
211225
cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.eui-alignTop').eq(3).trigger('mouseover');
212-
cy.contains('24 hour time series view of hourly average, hourly percentile, and hourly range of latency for traces within a trace group.').should('be.visible');
226+
cy.contains(
227+
'24 hour time series view of hourly average, hourly percentile, and hourly range of latency for traces within a trace group.'
228+
).should('be.visible');
213229
cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.eui-alignTop').eq(4).trigger('mouseover');
214-
cy.contains('Error rate based on count of trace errors within a trace group in the selected time range.').should('be.visible');
230+
cy.contains(
231+
'Error rate based on count of trace errors within a trace group in the selected time range.'
232+
).should('be.visible');
215233
cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.eui-alignTop').eq(5).trigger('mouseover');
216-
cy.contains('Count of traces with unique trace identifiers in the selected time range.').should('be.visible');
234+
cy.contains('Count of traces with unique trace identifiers in the selected time range.').should(
235+
'be.visible'
236+
);
217237
});
218238

219239
it('Verify Search engine on Trace dashboard', () => {
220240
cy.get('.euiFieldSearch.euiFieldSearch--fullWidth').click().type('client_pay_order');
221241
cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').click();
222-
cy.get('.euiTableCellContent.euiTableCellContent--alignRight.euiTableCellContent--overflowingContent').contains('211.04').should('exist');
242+
cy.get(
243+
'.euiTableCellContent.euiTableCellContent--alignRight.euiTableCellContent--overflowingContent'
244+
)
245+
.contains('211.04')
246+
.should('exist');
223247
cy.get('button[data-test-subj="dashboard-table-trace-group-name-button"]').eq(0).click();
224248
cy.get('.euiBadge.euiBadge--hollow.euiBadge--iconRight.globalFilterItem').click();
225249
cy.get('.euiIcon.euiIcon--medium.euiContextMenu__arrow').click();
@@ -232,14 +256,16 @@ describe('Latency by trace group table', () =>{
232256
cy.get('.euiContextMenuItem__text').eq(1).contains('Include results').click();
233257
cy.get('.euiBadge.euiBadge--hollow.euiBadge--iconRight.globalFilterItem').click();
234258
cy.get('.euiContextMenuItem__text').eq(2).contains('Temporarily disable').click();
235-
cy.get('.euiBadge.euiBadge--iconRight.globalFilterItem.globalFilterItem-isDisabled').should('exist').click();
259+
cy.get('.euiBadge.euiBadge--iconRight.globalFilterItem.globalFilterItem-isDisabled')
260+
.should('exist')
261+
.click();
236262
cy.get('.euiContextMenuItem__text').eq(2).contains('Re-enable').click();
237263
cy.get('.euiBadge.euiBadge--hollow.euiBadge--iconRight.globalFilterItem').click();
238264
cy.get('.euiContextMenuItem__text').eq(3).contains('Delete').click();
239265
});
240266
});
241267

242-
describe('Testing filters on trace analytics page', { scrollBehavior: false }, () =>{
268+
describe('Testing filters on trace analytics page', { scrollBehavior: false }, () => {
243269
beforeEach(() => {
244270
cy.visit('app/observability-traces#/', {
245271
onBeforeLoad: (win) => {
@@ -249,15 +275,15 @@ describe('Testing filters on trace analytics page', { scrollBehavior: false }, (
249275
setTimeFilter();
250276
});
251277

252-
it('Verify Change all filters', () =>{
278+
it('Verify Change all filters', () => {
253279
cy.get('[data-test-subj="global-filter-button"]').click();
254280
cy.get('.euiContextMenuPanelTitle').contains('Change all filters').should('exist');
255281
cy.get('.euiContextMenuItem__text').eq(1).contains('Enable all');
256282
cy.get('.euiContextMenuItem__text').eq(2).contains('Disable all');
257283
cy.get('.euiContextMenuItem__text').eq(3).contains('Invert inclusion');
258284
cy.get('.euiContextMenuItem__text').eq(4).contains('Invert enabled/disabled');
259285
cy.get('.euiContextMenuItem__text').eq(5).contains('Remove all');
260-
})
286+
});
261287

262288
it('Verify Add filter section', () => {
263289
cy.get('[data-test-subj="global-filter-button"]').click();
@@ -271,7 +297,7 @@ describe('Testing filters on trace analytics page', { scrollBehavior: false }, (
271297
cy.get('.euiIcon.euiIcon--medium.euiContextMenu__arrow').click();
272298
cy.get('[data-test-subj="filter-popover-cancel-button"]').contains('Cancel').click();
273299
cy.get('.euiIcon.euiIcon--small.euiIcon--inherit.euiBadge__icon').click();
274-
})
300+
});
275301
});
276302

277303
describe('Dump jaeger test data', () => {
@@ -360,9 +386,9 @@ describe('Testing switch mode to jaeger', () => {
360386
cy.get('[data-test-subj="dashboard-table-traces-button"]').contains('7').click();
361387

362388
cy.contains(' (7)').should('exist');
363-
cy.get("[data-test-subj='filterBadge']").eq(0).contains('process.serviceName: redis')
364-
cy.get("[data-test-subj='filterBadge']").eq(1).contains('operationName: GetDriver');
365-
})
389+
cy.get("[data-test-subj='filterBadge']").eq(0).contains('process.serviceName: redis');
390+
cy.get("[data-test-subj='filterBadge']").eq(1).contains('operationName: GetDriver');
391+
});
366392

367393
it('Switches to throughput mode and verifies columns and data', () => {
368394
cy.get("[data-test-subj='throughput-toggle']").click();
@@ -375,4 +401,4 @@ describe('Testing switch mode to jaeger', () => {
375401
cy.contains('Error rate').should('exist');
376402
cy.contains('Traces').should('exist');
377403
});
378-
});
404+
});

.cypress/integration/trace_analytics_test/trace_analytics_services.spec.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -324,17 +324,7 @@ describe('Testing traces Spans table verify table headers functionality', () =>
324324
.click();
325325
cy.get('[data-test-subj="dataGridColumnSortingPopoverColumnSelection"]').click();
326326
cy.get('[data-test-subj="dataGridColumnSortingPopoverColumnSelection-spanId').click();
327-
cy.get('[data-test-subj="dataGridColumnSortingPopoverColumnSelection-parentSpanId"]').click();
328-
cy.get('[data-test-subj="dataGridColumnSortingPopoverColumnSelection-traceId"]').click();
329-
cy.get('[data-test-subj="dataGridColumnSortingPopoverColumnSelection-traceGroup').click();
330-
cy.get(
331-
'[data-test-subj="dataGridColumnSortingPopoverColumnSelection-durationInNanos"]'
332-
).click();
333-
cy.get('[data-test-subj="dataGridColumnSortingPopoverColumnSelection-startTime"]').click();
334-
cy.get('[data-test-subj="dataGridColumnSortingPopoverColumnSelection-endTime').click();
335-
cy.get('[data-test-subj="dataGridColumnSortingPopoverColumnSelection-status.code"]').click();
336-
cy.get('[data-test-subj="dataGridColumnSortingPopoverColumnSelection"]').click();
337-
cy.get('[data-test-subj="dataGridColumnSortingButton"]').should('have.text', '8 fields sorted');
327+
cy.get('[data-test-subj="dataGridColumnSortingButton"]').should('have.text', '1 fields sorted');
338328
cy.get('[data-test-subj="dataGridColumnSortingButton"]').should('exist').click();
339329
});
340330
});
@@ -371,6 +361,8 @@ describe('Testing traces Spans table and verify columns functionality', () => {
371361
.should('exist');
372362
count_table_row(1);
373363
cy.get('[aria-label="remove current filter"]').click();
364+
verify_traces_spans_data_grid_cols_exists();
365+
cy.contains('277a5934acf55dcf').should('exist');
374366
cy.get('.panel-title-count').contains('8').should('exist');
375367
count_table_row(8);
376368
});

.cypress/integration/trace_analytics_test/trace_analytics_traces.spec.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describe('Testing trace view', () => {
7272
setTimeFilter();
7373
cy.get('input[type="search"]').focus().type(`${TRACE_ID}`);
7474
cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').click();
75-
cy.get('.euiTableRow').should('have.length.lessThan', 3);//Replaces wait
75+
cy.get('.euiTableRow').should('have.length.lessThan', 3); //Replaces wait
7676
cy.get('[data-test-subj="trace-link"]').eq(0).click();
7777
});
7878

@@ -95,7 +95,8 @@ describe('Testing trace view', () => {
9595
cy.get('.euiTitle').contains('Logs').should('exist');
9696
});
9797

98-
it('Renders data grid, flyout and filters', () => {
98+
it.only('Renders data grid, flyout and filters', () => {
99+
cy.get('.panel-title-count').contains('(11)').should('exist');
99100
cy.get('.euiButton__text[title="Span list"]').click({ force: true });
100101
cy.contains('2 columns hidden').should('exist');
101102

@@ -148,7 +149,7 @@ describe('Testing traces table', () => {
148149
cy.get('.euiContextMenuItem__text').contains('15 rows').click();
149150
let expected_row_count = 15;
150151
cy.get('.euiTable--auto')
151-
.find("tr")
152+
.find('tr')
152153
.then((row) => {
153154
let total = row.length - 1;
154155
expect(total).to.equal(expected_row_count);
@@ -174,7 +175,7 @@ describe('Testing traces tree view', () => {
174175
it('Verifies tree view and table toggle functionality with expand/collapse logic', () => {
175176
cy.get('.euiButtonGroup').contains('Tree view').click();
176177
cy.contains('Expand all').should('exist');
177-
cy.contains("Collapse all").should('exist')
178+
cy.contains('Collapse all').should('exist');
178179
//Waiting time for render to complete
179180
cy.get("[data-test-subj='treeExpandAll']").click();
180181
cy.get("[data-test-subj='treeCollapseAll']").click();
@@ -204,7 +205,7 @@ describe('Testing traces tree view', () => {
204205
it('Verifies tree view expand arrow functionality', () => {
205206
cy.get('.euiButtonGroup').contains('Tree view').click();
206207
cy.contains('Expand all').should('exist');
207-
cy.contains("Collapse all").should('exist')
208+
cy.contains('Collapse all').should('exist');
208209
// Waiting time for render to complete
209210
cy.get("[data-test-subj='treeExpandAll']").click();
210211
cy.get("[data-test-subj='treeCollapseAll']").click();
@@ -227,23 +228,21 @@ describe('Testing traces tree view', () => {
227228
it('Verifies span flyout', () => {
228229
cy.get('.euiButtonGroup').contains('Tree view').click();
229230
cy.contains('Expand all').should('exist');
230-
cy.contains("Collapse all").should('exist')
231+
cy.contains('Collapse all').should('exist');
231232
// Waiting time for render to complete
232233
cy.get("[data-test-subj='treeExpandAll']").click();
233234
cy.get("[data-test-subj='treeCollapseAll']").click();
234235

235236
// Open flyout for a span
236-
cy.get("[data-test-subj='spanId-flyout-button']")
237-
.contains(SPAN_ID_TREE_VIEW)
238-
.click()
237+
cy.get("[data-test-subj='spanId-flyout-button']").contains(SPAN_ID_TREE_VIEW).click();
239238
cy.contains('Span detail').should('exist');
240239
cy.contains('Span attributes').should('exist');
241240
});
242241

243242
it('Handles toggling between full screen and regular modes', () => {
244243
cy.get('.euiButtonGroup').contains('Tree view').click();
245244
cy.contains('Expand all').should('exist');
246-
cy.contains("Collapse all").should('exist')
245+
cy.contains('Collapse all').should('exist');
247246
// Waiting time for render to complete
248247
cy.get("[data-test-subj='treeExpandAll']").click();
249248
cy.get("[data-test-subj='treeCollapseAll']").click();
@@ -280,7 +279,7 @@ describe('Testing switch mode to jaeger', () => {
280279

281280
it('Verifies Trace View', () => {
282281
cy.contains('08ee9fd9bf964384').click();
283-
cy.contains("Time spent by service").should('exist');
282+
cy.contains('Time spent by service').should('exist');
284283
cy.get("[data-test-subj='span-gantt-chart-panel']").should('exist');
285-
})
284+
});
286285
});

0 commit comments

Comments
 (0)