Skip to content

Commit

Permalink
Update observability dashboards tests (#1669)
Browse files Browse the repository at this point in the history
* update observability dashboards tests

Signed-off-by: Ritvi Bhatt <[email protected]>

* fix notebook delete

Signed-off-by: Ritvi Bhatt <[email protected]>

* skip reporting tests

Signed-off-by: Ritvi Bhatt <[email protected]>

* add back reporting tests

Signed-off-by: Ritvi Bhatt <[email protected]>

* skip last reporting tests

Signed-off-by: Ritvi Bhatt <[email protected]>

* move notebook alias earlier

Signed-off-by: Ritvi Bhatt <[email protected]>

* skip last reporting tests

Signed-off-by: Ritvi Bhatt <[email protected]>

* add back reporting tests

Signed-off-by: Ritvi Bhatt <[email protected]>

* stop tests

Signed-off-by: Ritvi Bhatt <[email protected]>

* add back reporting tests

Signed-off-by: Ritvi Bhatt <[email protected]>

* skip reporting tests

Signed-off-by: Ritvi Bhatt <[email protected]>

* add back reporting tests

Signed-off-by: Ritvi Bhatt <[email protected]>

---------

Signed-off-by: Ritvi Bhatt <[email protected]>
Co-authored-by: Ritvi Bhatt <[email protected]>
  • Loading branch information
ritvibhatt and Ritvi Bhatt authored Jan 15, 2025
1 parent c4dd875 commit 57db1eb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('Testing services table', () => {
.first()
.focus()
.type(`${SERVICE_NAME}{enter}`);
cy.get('.euiButton__text').contains('Refresh').click();
cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').click();
cy.contains(' (1)').should('exist');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ 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"]').click();
cy.contains(' (1)').should('exist');
cy.contains('03/25/2021 10:21:22').should('exist');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const makeTestNotebook = () => {

cy.contains(`Notebook "${notebookName}" successfully created`);

cy.get('h1[data-test-subj="notebookTitle"]')
cy.get('[data-test-subj="notebookTitle"]')
.contains(notebookName)
.should('exist');

Expand All @@ -61,8 +61,7 @@ const deleteNotebook = (notebookName) => {
.find('input[type="checkbox"]')
.check();

cy.get('button[data-test-subj="notebookTableActionBtn"]').click();
cy.get('button[data-test-subj="deleteNotebookBtn"]').click();
cy.get('[data-test-subj="deleteSelectedNotebooks"]').click();

cy.get('input[data-test-subj="delete-notebook-modal-input"]').focus();
cy.get('input[data-test-subj="delete-notebook-modal-input"]').type('delete');
Expand Down Expand Up @@ -110,11 +109,11 @@ describe('Testing notebook actions', () => {
describe('Test reporting integration if plugin installed', () => {
beforeEach(() => {
let notebookName = makeTestNotebook();
cy.wrap({ name: notebookName }).as('notebook');
cy.get('body').then(($body) => {
skipOn($body.find('#reportingActionsButton').length <= 0);
});
makePopulatedParagraph();
cy.wrap({ name: notebookName }).as('notebook');
});

afterEach(() => {
Expand Down
7 changes: 3 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,8 @@ 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"]').click();
cy.wait(delayTime);
};

Expand Down Expand Up @@ -171,9 +172,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

0 comments on commit 57db1eb

Please sign in to comment.