Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
SERVICE_NAME,
setTimeFilter,
delayTime,
TIMEOUT_DELAY,
} from '../../../utils/constants';

describe('Testing services table', () => {
Expand All @@ -26,7 +27,9 @@ describe('Testing services table', () => {
.first()
.focus()
.type(`${SERVICE_NAME}{enter}`);
cy.get('.euiButton__text').contains('Refresh').click();
cy.get('[data-test-subj="superDatePickerApplyTimeButton"]', {
timeout: TIMEOUT_DELAY,
}).click();
cy.contains(' (1)').should('exist');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@

/// <reference types="cypress" />

import { setTimeFilter, TRACE_ID } from '../../../utils/constants';
import {
setTimeFilter,
TRACE_ID,
TIMEOUT_DELAY,
} from '../../../utils/constants';

describe('Testing traces table', () => {
beforeEach(() => {
Expand All @@ -25,7 +29,9 @@ describe('Testing traces table', () => {

it('Searches correctly', () => {
cy.get('input[type="search"]').focus().type(`${TRACE_ID}{enter}`);
cy.get('.euiButton__text').contains('Refresh').click();
cy.get('[data-test-subj="superDatePickerApplyTimeButton"]', {
timeout: TIMEOUT_DELAY,
}).click();
cy.contains(' (1)').should('exist');
cy.contains('03/25/2021 10:21:22').should('exist');
});
Expand Down
10 changes: 6 additions & 4 deletions cypress/utils/plugins/observability-dashboards/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ export const setTimeFilter = (setEndTime = false, refresh = true) => {
timeout: TIMEOUT_DELAY,
}).type('{selectall}' + endTime, { force: true });
}
if (refresh) cy.get('.euiButton__text').contains('Refresh').click();
if (refresh) {
cy.get('[data-test-subj="superDatePickerApplyTimeButton"]', {
timeout: TIMEOUT_DELAY,
}).click();
}
cy.wait(delayTime);
};

Expand Down Expand Up @@ -171,9 +175,7 @@ export const querySearch = (query, rangeSelected) => {
cy.get(rangeSelected).click();
cy.get('[data-test-subj="superDatePickerApplyTimeButton"]', {
timeout: TIMEOUT_DELAY,
})
.contains('Refresh')
.click();
}).click();
};

export const landOnEventHome = () => {
Expand Down
Loading