Skip to content

Commit

Permalink
fixes 're-orders columns via drag and drop' test (#75126)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
MadameSheema and elasticmachine authored Aug 20, 2020
1 parent 4a0a79f commit eba85ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
FIELDS_BROWSER_SELECTED_CATEGORY_TITLE,
} from '../screens/fields_browser';
import {
EVENTS_PAGE,
HEADER_SUBTITLE,
HOST_GEO_CITY_NAME_HEADER,
HOST_GEO_COUNTRY_NAME_HEADER,
Expand Down Expand Up @@ -153,7 +154,7 @@ describe('Events Viewer', () => {
});
});

context.skip('Events columns', () => {
context('Events columns', () => {
before(() => {
loginAndWaitForPage(HOSTS_URL);
openEvents();
Expand All @@ -171,6 +172,7 @@ describe('Events Viewer', () => {
const expectedOrderAfterDragAndDrop =
'message@timestamphost.nameevent.moduleevent.datasetevent.actionuser.namesource.ipdestination.ip';

cy.get(EVENTS_PAGE).scrollTo('bottom');
cy.get(HEADERS_GROUP).invoke('text').should('equal', originalColumnOrder);
dragAndDropColumn({ column: 0, newPosition: 1 });
cy.get(HEADERS_GROUP).invoke('text').should('equal', expectedOrderAfterDragAndDrop);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

export const CLOSE_MODAL = '[data-test-subj="modal-inspect-close"]';

export const EVENTS_PAGE = '[data-test-subj="pageContainer"]';

export const EVENTS_VIEWER_FIELDS_BUTTON =
'[data-test-subj="events-viewer-panel"] [data-test-subj="show-field-browser"]';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ export const dragAndDropColumn = ({
.eq(column)
.then((header) => drag(header));

cy.wait(5000); // wait for DOM updates before moving

cy.get(DRAGGABLE_HEADER)
.eq(newPosition)
.then((targetPosition) => {
Expand Down

0 comments on commit eba85ef

Please sign in to comment.