Skip to content

Commit

Permalink
Realign cypress/ccs_integration with cypress/integration (#107743) (#…
Browse files Browse the repository at this point in the history
…107797)

Co-authored-by: Domenico Andreoli <domenico.andreoli@elastic.co>
  • Loading branch information
kibanamachine and cavokz authored Aug 5, 2021
1 parent 025b209 commit 5dde09e
Showing 1 changed file with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { CELL_TEXT, JSON_LINES, TABLE_ROWS } from '../../screens/alerts_details';
import { ALERT_FLYOUT, CELL_TEXT, JSON_LINES, TABLE_ROWS } from '../../screens/alerts_details';

import {
expandFirstAlert,
Expand Down Expand Up @@ -45,12 +45,15 @@ describe('Alert details with unmapped fields', () => {
openJsonView();
scrollJsonViewToBottom();

cy.get(JSON_LINES).then((elements) => {
const length = elements.length;
cy.wrap(elements)
.eq(length - expectedUnmappedField.line)
.should('have.text', expectedUnmappedField.text);
});
cy.get(ALERT_FLYOUT)
.find(JSON_LINES)
.then((elements) => {
const length = elements.length;
cy.wrap(elements)
.eq(length - expectedUnmappedField.line)
.invoke('text')
.should('include', expectedUnmappedField.text);
});
});

it('Displays the unmapped field on the table', () => {
Expand All @@ -61,8 +64,8 @@ describe('Alert details with unmapped fields', () => {
};

openTable();

cy.get(TABLE_ROWS)
cy.get(ALERT_FLYOUT)
.find(TABLE_ROWS)
.eq(expectedUnmmappedField.row)
.within(() => {
cy.get(CELL_TEXT).eq(2).should('have.text', expectedUnmmappedField.field);
Expand Down

0 comments on commit 5dde09e

Please sign in to comment.