Skip to content

Commit

Permalink
Fixed graph_analysis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
edro15 committed Apr 15, 2024
1 parent a118a31 commit d2c496c
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions test/cypress/e2e/graph_analysis.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,33 @@ describe('Graph Analysis', {
cy.wait('@hasPageLoaded').then((interception) => {
/* eslint-disable no-unused-expressions */
expect(interception.response.body).not.to.be.empty;
});

// Buttons
cy.get('#cidds', { timeout: 10000 }).should('exist').and('be.visible').and('not.be.disabled');
cy.get('#bitcoin', { timeout: 10000 }).should('exist').and('be.visible').and('not.be.disabled');
cy.get('#internal', { timeout: 10000 }).should('exist').and('be.visible').and('not.be.disabled');
// Buttons
cy.get('#cidds').should('exist').and('be.visible').and('not.be.disabled');
cy.get('#bitcoin').should('exist').and('be.visible').and('not.be.disabled');
cy.get('#internal').should('exist').and('be.visible').and('not.be.disabled');

// Search bar
cy.get('#mysearchbar1', { timeout: 10000 }).should('exist').and('be.visible');
// Search bar
cy.get('#mysearchbar1').should('exist').and('be.visible');
});
});

it("internal log data sources render properly", () => {
cy.wait('@hasPageLoaded').then((interception) => {
/* eslint-disable no-unused-expressions */
expect(interception.response.body).not.to.be.empty;
});

cy.get('#internal', { timeout: 10000 }).click();
// Table with search results shown
cy.get('.splunk-table', { timeout: 10000 }).should('exist');
// Dropdown buttons to select fields shown
cy.get('.splunk-dropdown', { timeout: 10000 }).should('have.length', 3);
// Waiting for search to be done and dropdowns under "Select Fields" section to be shown
// Otherwise logout will be triggered and pending searches will throw errors
// cy.get("button[data-test='select']", { timeout: 10000 }).should('have.length', 3);
cy.get("div#statistics.viz-controller table", { timeout: 10000 }).eq(0).find('thead').should('be.visible');
cy.get("div#statistics.viz-controller table", { timeout: 10000 }).eq(0).find('thead').should('exist');
cy.get('#internal').click();
// Table with search results shown
cy.get('.splunk-table').should('exist');
// Dropdown buttons to select fields shown
cy.get('.splunk-dropdown').should('have.length', 3);
// Waiting for search to be done and dropdowns under "Select Fields" section to be shown
// Otherwise logout will be triggered and pending searches will throw errors
// cy.get("button[data-test='select']", { timeout: 10000 }).should('have.length', 3);
cy.get("div#statistics.viz-controller table").eq(0).find('thead').should('be.visible');
cy.get("div#statistics.viz-controller table").eq(0).find('thead').should('exist');
});
});
// TODO extend tests
});
Expand Down

0 comments on commit d2c496c

Please sign in to comment.