Skip to content

Commit

Permalink
Updated tests for graph_analysis page
Browse files Browse the repository at this point in the history
  • Loading branch information
edro15 committed Apr 15, 2024
1 parent adf59a6 commit d115cd6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/cypress/e2e/graph_analysis.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ describe('Graph Analysis', {
}, () => {
beforeEach(() => {
cy.splunkLogin();
cy.intercept(
{
method: 'GET',
pathname:
'/en-GB/splunkd/__raw/servicesNS/admin/splunk-3D-graph-network-topology-viz/scheduled/views/graph_analysis',
query: {
output_mode: 'json',
},
}
).as('hasPageLoaded');
});

afterEach(() => {
Expand All @@ -22,6 +32,11 @@ describe('Graph Analysis', {
})

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

// 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');
Expand All @@ -32,6 +47,11 @@ describe('Graph Analysis', {
});

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; // FIXME
});

cy.get('#internal', { timeout: 10000 }).click();
// Table with search results shown
cy.get('.splunk-table', { timeout: 10000 }).should('exist');
Expand Down

0 comments on commit d115cd6

Please sign in to comment.