Skip to content

Commit af13362

Browse files
jennypavlovakibanamachine
authored andcommitted
[APM] Try to fix skipped tests (elastic#222205)
Closes [elastic#219712](elastic#219712) and [elastic#219711](elastic#219711) ## Summary This PR tries to fix the flaky tests skipped in [elastic#219712](elastic#219712) and [elastic#219711](elastic#219711) I saw that some of the requests were showing the wrong values: I separated the check and moved the `wait` to be after the action so we have the second result as expected in the tests ( so hopefully this can make the tests more stable) --------- Co-authored-by: kibanamachine <[email protected]>
1 parent ba7d342 commit af13362

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/e2e/service_inventory/service_inventory.cy.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ const mainApiRequestsToIntercept = [
3636

3737
const mainAliasNames = mainApiRequestsToIntercept.map(({ aliasName }) => `@${aliasName}`);
3838

39-
// Failing: See https://github.com/elastic/kibana/issues/219711
40-
// Failing: See https://github.com/elastic/kibana/issues/219712
41-
describe.skip('Service Inventory', () => {
39+
describe('Service Inventory', () => {
4240
before(() => {
4341
const { rangeFrom, rangeTo } = timeRange;
4442
synthtrace.index(
@@ -103,7 +101,7 @@ describe.skip('Service Inventory', () => {
103101
cy.getByTestSubj('comboBoxOptionsList environmentFilter-optionsList').should('be.visible');
104102
cy.getByTestSubj('comboBoxOptionsList environmentFilter-optionsList')
105103
.contains('button', 'production')
106-
.click();
104+
.click({ force: true });
107105

108106
cy.expectAPIsToHaveBeenCalledWith({
109107
apisIntercepted: mainAliasNames,
@@ -112,8 +110,6 @@ describe.skip('Service Inventory', () => {
112110
});
113111

114112
it('when selecting a different time range and clicking the update button', () => {
115-
cy.wait(mainAliasNames);
116-
117113
cy.selectAbsoluteTimeRange(
118114
moment(timeRange.rangeFrom).subtract(5, 'm').toISOString(),
119115
moment(timeRange.rangeTo).subtract(5, 'm').toISOString()
@@ -156,9 +152,6 @@ describe.skip('Service Inventory', () => {
156152
to: new Date(rangeTo).getTime(),
157153
})
158154
);
159-
});
160-
161-
beforeEach(() => {
162155
cy.loginAsViewerUser();
163156
});
164157

@@ -170,10 +163,8 @@ describe.skip('Service Inventory', () => {
170163
cy.intercept('POST', '/internal/apm/services/detailed_statistics?*').as(
171164
'detailedStatisticsRequest'
172165
);
173-
cy.intercept('GET', '/internal/apm/services?*').as('mainStatisticsRequest');
174166

175167
cy.visitKibana(`${serviceInventoryHref}&pageSize=10&sortField=serviceName&sortDirection=asc`);
176-
cy.wait('@mainStatisticsRequest');
177168
cy.contains('Services');
178169
cy.get('.euiPagination__list').children().should('have.length', 5);
179170
cy.wait('@detailedStatisticsRequest').then((payload) => {

0 commit comments

Comments
 (0)