Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
Signed-off-by: Jovan Cvetkovic <[email protected]>
  • Loading branch information
jovancvetkovic3006 committed May 5, 2023
1 parent c743036 commit d8a1641
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cypress/integration/1_detectors.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,15 @@ const createDetector = (detectorName, dataSource, expectFailure) => {
cy.validateDetailsItem('Detector dashboard', 'Not available for this log type');

if (!expectFailure) {
let fields = [];
for (let field in dns_mapping_fields) {
fields.push([field, dns_mapping_fields[field]]);
}
cy.getElementByText('.euiTitle', 'Field mapping')
.parentsUntil('.euiPanel')
.siblings()
.eq(2)
.validateTable(Object.entries(dns_mapping_fields));
.validateTable(fields);
}

validateAlertPanel('test_trigger');
Expand Down Expand Up @@ -203,13 +207,17 @@ const createDetector = (detectorName, dataSource, expectFailure) => {
cy.intercept('GET', '/mappings?indexName').as('getMappingFields');
cy.getElementByText('button.euiTab', 'Field mappings').should('be.visible').click();
if (!expectFailure) {
let fields = [];
for (let field in dns_mapping_fields) {
fields.push([field, dns_mapping_fields[field]]);
}
cy.wait('@getMappingFields');
cy.wait(2000);
cy.getElementByText('.euiTitle', 'Field mapping')
.parentsUntil('.euiPanel')
.siblings()
.eq(2)
.validateTable(Object.entries(dns_mapping_fields));
.validateTable(fields);
}
});
});
Expand Down

0 comments on commit d8a1641

Please sign in to comment.