From 593a66b6154caf12f626066af5ae21dce9531874 Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Wed, 24 Mar 2021 13:53:28 -0600 Subject: [PATCH] Adjust 2 cypress tests --- .../cypress/integration/timelines/flyout_button.spec.ts | 2 +- x-pack/plugins/security_solution/cypress/tasks/timeline.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/cypress/integration/timelines/flyout_button.spec.ts b/x-pack/plugins/security_solution/cypress/integration/timelines/flyout_button.spec.ts index c7ec17d027e80..1fbd9990a76bd 100644 --- a/x-pack/plugins/security_solution/cypress/integration/timelines/flyout_button.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/timelines/flyout_button.spec.ts @@ -61,7 +61,7 @@ describe('timeline flyout button', () => { it('the `(+)` button popover menu owns focus', () => { cy.get(TIMELINE_SETTINGS_ICON).filter(':visible').click({ force: true }); - cy.get(CREATE_NEW_TIMELINE).should('have.focus'); + cy.get(CREATE_NEW_TIMELINE).closest('.euiPanel').should('have.focus'); cy.get('body').type('{esc}'); cy.get(CREATE_NEW_TIMELINE).should('not.be.visible'); }); diff --git a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts index 59c3fb5876d76..2078744393d94 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts @@ -162,6 +162,7 @@ export const closeTimeline = () => { export const createNewTimeline = () => { cy.get(TIMELINE_SETTINGS_ICON).filter(':visible').click({ force: true }); + cy.wait(300); cy.get(CREATE_NEW_TIMELINE).click(); };