Skip to content

Commit

Permalink
fixes toggle columns cypress tests (#51279)
Browse files Browse the repository at this point in the history
  • Loading branch information
MadameSheema authored Nov 22, 2019
1 parent 0ce30b5 commit 67a3489
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ export const assertAtLeastOneEventMatchesSearch = () =>
export const toggleFirstTimelineEventDetails = () => {
cy.get(TOGGLE_TIMELINE_EXPAND_EVENT, { timeout: DEFAULT_TIMEOUT })
.first()
.click();
.click({ force: true });
};
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ export const SEARCH_OR_FILTER_CONTAINER =
export const SERVER_SIDE_EVENT_COUNT = '[data-test-subj="server-side-event-count"]';

/** Expands or collapses an event in the timeline */
export const TOGGLE_TIMELINE_EXPAND_EVENT =
'[data-test-subj="timeline"] [data-test-subj="expand-event"]';
export const TOGGLE_TIMELINE_EXPAND_EVENT = '[data-test-subj="expand-event"]';

/** The body of the timeline flyout */
export const TIMELINE_FLYOUT_BODY = '[data-test-subj="eui-flyout-body"]';
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('toggle column in timeline', () => {
const timestampField = '@timestamp';
const idField = '_id';

it.skip('displays a checked Toggle field checkbox for `@timestamp`, a default timeline column', () => {
it('displays a checked Toggle field checkbox for `@timestamp`, a default timeline column', () => {
populateTimeline();

toggleFirstTimelineEventDetails();
Expand All @@ -39,7 +39,7 @@ describe('toggle column in timeline', () => {
);
});

it.skip('removes the @timestamp field from the timeline when the user un-checks the toggle', () => {
it('removes the @timestamp field from the timeline when the user un-checks the toggle', () => {
populateTimeline();

toggleFirstTimelineEventDetails();
Expand All @@ -50,14 +50,14 @@ describe('toggle column in timeline', () => {

cy.get(
`[data-test-subj="timeline"] [data-test-subj="toggle-field-${timestampField}"]`
).uncheck();
).uncheck({ force: true });

cy.get(`[data-test-subj="timeline"] [data-test-subj="header-text-${timestampField}"]`).should(
'not.exist'
);
});

it.skip('adds the _id field to the timeline when the user checks the field', () => {
it('adds the _id field to the timeline when the user checks the field', () => {
populateTimeline();

toggleFirstTimelineEventDetails();
Expand All @@ -66,7 +66,9 @@ describe('toggle column in timeline', () => {
'not.exist'
);

cy.get(`[data-test-subj="timeline"] [data-test-subj="toggle-field-${idField}"]`).check();
cy.get(`[data-test-subj="timeline"] [data-test-subj="toggle-field-${idField}"]`).check({
force: true,
});

cy.get(`[data-test-subj="timeline"] [data-test-subj="header-text-${idField}"]`).should('exist');
});
Expand Down

0 comments on commit 67a3489

Please sign in to comment.