From 56a49166607a4945053013f7df6150de93b4c1d5 Mon Sep 17 00:00:00 2001 From: kevinlog Date: Wed, 17 Jun 2020 16:14:35 -0400 Subject: [PATCH 1/8] add policy empty state --- .../pages/policy/view/policy_list.tsx | 163 ++++++++++++++++-- 1 file changed, 147 insertions(+), 16 deletions(-) diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx index 090a16a763664..9a715a7e38a82 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx @@ -22,6 +22,8 @@ import { EuiCallOut, EuiSpacer, EuiButton, + EuiSteps, + EuiTitle, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; @@ -61,6 +63,10 @@ const NO_WRAP_TRUNCATE_STYLE: CSSProperties = Object.freeze({ whiteSpace: 'nowrap', }); +const TEXT_ALIGN_CENTER: CSSProperties = Object.freeze({ + textAlign: 'center', +}); + const DangerEuiContextMenuItem = styled(EuiContextMenuItem)` color: ${(props) => props.theme.eui.textColors.danger}; `; @@ -410,24 +416,49 @@ export const PolicyList = React.memo(() => { } bodyHeader={ - - - + policyItems && + policyItems.length > 0 && ( + + + + ) } > - [...policyItems], [policyItems])} - columns={columns} - loading={loading} - pagination={paginationSetup} - onChange={handleTableChange} - data-test-subj="policyTable" - hasActions={false} - /> + {useMemo(() => { + return ( + <> + {policyItems && policyItems.length > 0 ? ( + + ) : ( + + )} + + ); + }, [ + policyItems, + loading, + isFetchingPackageInfo, + columns, + handleCreatePolicyClick, + handleTableChange, + paginationSetup, + ])} @@ -436,6 +467,106 @@ export const PolicyList = React.memo(() => { PolicyList.displayName = 'PolicyList'; +const EmptyPolicyTable = React.memo<{ + loading: boolean; + onActionClick: () => void; + actionDisabled: boolean; +}>(({ loading, onActionClick, actionDisabled }) => { + const policySteps = [ + { + title: i18n.translate('xpack.securitySolution.endpoint.policyList.stepOneTitle', { + defaultMessage: 'Head over to Ingest Manager.', + }), + children: ( + + + + ), + }, + { + title: i18n.translate('xpack.securitySolution.endpoint.policyList.stepTwoTitle', { + defaultMessage: 'We’ll create a recommended security policy for you.', + }), + children: ( + + + + ), + }, + { + title: i18n.translate('xpack.securitySolution.endpoint.policyList.stepThreeTitle', { + defaultMessage: 'Enroll your agents through Fleet.', + }), + children: ( + + + + ), + }, + ]; + return ( + <> + {loading ? ( + + ) : ( + <> + + +

+ +

+
+ + + + + + + + + + + + + + + + + + + )} + + ); +}); + +EmptyPolicyTable.displayName = 'EmptyPolicyTable'; + const ConfirmDelete = React.memo<{ hostCount: number; isDeleting: boolean; From a63890906cd9f6a493346f7a7c6f7d166a3286fe Mon Sep 17 00:00:00 2001 From: kevinlog Date: Wed, 17 Jun 2020 17:11:54 -0400 Subject: [PATCH 2/8] fix type --- .../public/management/pages/policy/view/policy_list.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx index 9a715a7e38a82..4cd2966f47066 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { useCallback, useEffect, useMemo, CSSProperties, useState } from 'react'; +import React, { useCallback, useEffect, useMemo, CSSProperties, useState, MouseEvent } from 'react'; import { EuiBasicTable, EuiText, @@ -469,7 +469,7 @@ PolicyList.displayName = 'PolicyList'; const EmptyPolicyTable = React.memo<{ loading: boolean; - onActionClick: () => void; + onActionClick: (event: MouseEvent) => void; actionDisabled: boolean; }>(({ loading, onActionClick, actionDisabled }) => { const policySteps = [ From b9628d381d4cda4879e318b104c7779d50b2a388 Mon Sep 17 00:00:00 2001 From: kevinlog Date: Wed, 17 Jun 2020 18:40:26 -0400 Subject: [PATCH 3/8] fix tests --- .../pages/policy/view/policy_list.test.tsx | 4 +- .../pages/policy/view/policy_list.tsx | 8 ++- .../apps/endpoint/index.ts | 4 +- .../apps/endpoint/policy_list.ts | 57 ++++++++++--------- .../page_objects/endpoint_page.ts | 10 ++++ 5 files changed, 50 insertions(+), 33 deletions(-) diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx index a2901ab6bfe5c..b1eb6be4f40bd 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx @@ -23,9 +23,9 @@ describe('when on the policies page', () => { render = () => mockedContext.render(); }); - it('should show a table', async () => { + it('should show the empty state', async () => { const renderResult = render(); - const table = await renderResult.findByTestId('policyTable'); + const table = await renderResult.findByTestId('emptyPolicyTable'); expect(table).not.toBeNull(); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx index 4cd2966f47066..1f5e13be3f22f 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx @@ -446,6 +446,7 @@ export const PolicyList = React.memo(() => { loading={loading} onActionClick={handleCreatePolicyClick} actionDisabled={isFetchingPackageInfo} + dataTestSubj="emptyPolicyTable" /> )} @@ -471,7 +472,8 @@ const EmptyPolicyTable = React.memo<{ loading: boolean; onActionClick: (event: MouseEvent) => void; actionDisabled: boolean; -}>(({ loading, onActionClick, actionDisabled }) => { + dataTestSubj: string; +}>(({ loading, onActionClick, actionDisabled, dataTestSubj }) => { const policySteps = [ { title: i18n.translate('xpack.securitySolution.endpoint.policyList.stepOneTitle', { @@ -514,7 +516,7 @@ const EmptyPolicyTable = React.memo<{ }, ]; return ( - <> +
{loading ? ( )} - +
); }); diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts index 199d138d1c450..5e2f3f81c6dbc 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/index.ts @@ -9,9 +9,9 @@ export default function ({ loadTestFile }: FtrProviderContext) { describe('endpoint', function () { this.tags('ciGroup7'); - loadTestFile(require.resolve('./endpoint_list')); + // loadTestFile(require.resolve('./endpoint_list')); loadTestFile(require.resolve('./policy_list')); - loadTestFile(require.resolve('./policy_details')); + // loadTestFile(require.resolve('./policy_details')); // loadTestFile(require.resolve('./alerts')); // loadTestFile(require.resolve('./resolver')); diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/policy_list.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/policy_list.ts index 1f5b6889f8fed..f4c4841bedf40 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/policy_list.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/policy_list.ts @@ -18,6 +18,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const policyTestResources = getService('policyTestResources'); const RELATIVE_DATE_FORMAT = /\d (?:seconds|minutes) ago/i; + const retry = getService('retry'); describe('When on the Endpoint Policy List', function () { this.tags(['ciGroup7']); @@ -36,29 +37,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const createButtonTitle = await testSubjects.getVisibleText('headerCreateNewPolicyButton'); expect(createButtonTitle).to.equal('Create new policy'); }); - it('shows policy count total', async () => { - const policyTotal = await testSubjects.getVisibleText('policyTotalCount'); - expect(policyTotal).to.equal('0 Policies'); - }); - it('has correct table headers', async () => { - const allHeaderCells = await pageObjects.endpointPageUtils.tableHeaderVisibleText( - 'policyTable' - ); - expect(allHeaderCells).to.eql([ - 'Policy Name', - 'Created By', - 'Created Date', - 'Last Updated By', - 'Last Updated', - 'Version', - 'Actions', - ]); - }); - it('should show empty table results message', async () => { - const [, [noItemsFoundMessage]] = await pageObjects.endpointPageUtils.tableData( - 'policyTable' - ); - expect(noItemsFoundMessage).to.equal('No items found'); + it('shows empty state', async () => { + await testSubjects.existOrFail('emptyPolicyTable'); }); describe('and policies exists', () => { @@ -76,6 +56,21 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { } }); + it('has correct table headers', async () => { + const allHeaderCells = await pageObjects.endpointPageUtils.tableHeaderVisibleText( + 'policyTable' + ); + expect(allHeaderCells).to.eql([ + 'Policy Name', + 'Created By', + 'Created Date', + 'Last Updated By', + 'Last Updated', + 'Version', + 'Actions', + ]); + }); + it('should show policy on the list', async () => { const [, policyRow] = await pageObjects.endpointPageUtils.tableData('policyTable'); // Validate row data with the exception of the Date columns - since those are initially @@ -106,9 +101,19 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await pageObjects.policy.launchAndFindDeleteModal(); await testSubjects.existOrFail('policyListDeleteModal'); await pageObjects.common.clickConfirmOnModal(); - await pageObjects.endpoint.waitForTableToNotHaveData('policyTable'); - const policyTotal = await testSubjects.getVisibleText('policyTotalCount'); - expect(policyTotal).to.equal('0 Policies'); + let emptyPolicyTable; + await retry.waitForWithTimeout( + 'table to not have data and empty state returns', + 2000, + async () => { + emptyPolicyTable = await testSubjects.find('emptyPolicyTable'); + if (emptyPolicyTable) { + return true; + } + return false; + } + ); + expect(emptyPolicyTable).not.to.be(null); }); }); diff --git a/x-pack/test/security_solution_endpoint/page_objects/endpoint_page.ts b/x-pack/test/security_solution_endpoint/page_objects/endpoint_page.ts index 830c5ec5a42d1..45c3d39689c36 100644 --- a/x-pack/test/security_solution_endpoint/page_objects/endpoint_page.ts +++ b/x-pack/test/security_solution_endpoint/page_objects/endpoint_page.ts @@ -43,6 +43,16 @@ export function EndpointPageProvider({ getService, getPageObjects }: FtrProvider }); }, + async waitForEmptyState(dataTestSubj: string) { + await retry.waitForWithTimeout('table to not have data', 2000, async () => { + const tableData = await pageObjects.endpointPageUtils.tableData(dataTestSubj); + if (tableData[1][0] === 'No items found') { + return true; + } + return false; + }); + }, + async waitForVisibleTextToChange(dataTestSubj: string, currentText: string) { await retry.waitForWithTimeout('visible text to change', 2000, async () => { const detailFlyoutTitle = await testSubjects.getVisibleText(dataTestSubj); From 71ce810a5e9d5346c74b41215619018bfdd741a5 Mon Sep 17 00:00:00 2001 From: kevinlog Date: Wed, 17 Jun 2020 21:07:02 -0400 Subject: [PATCH 4/8] add more tests --- .../management/pages/policy/view/policy_list.test.tsx | 8 ++++++++ .../public/management/pages/policy/view/policy_list.tsx | 4 ++-- .../security_solution_endpoint/apps/endpoint/index.ts | 4 ++-- .../apps/endpoint/policy_list.ts | 8 ++++++++ .../page_objects/policy_page.ts | 8 ++++++++ 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx index b1eb6be4f40bd..cd4bc199a98d7 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx @@ -29,6 +29,12 @@ describe('when on the policies page', () => { expect(table).not.toBeNull(); }); + it('should display the onboarding steps', async () => { + const renderResult = render(); + const table = await renderResult.findByTestId('onBoardingSteps'); + expect(table).not.toBeNull(); + }); + describe('when list data loads', () => { let firstPolicyID: string; beforeEach(() => { @@ -50,11 +56,13 @@ describe('when on the policies page', () => { }); }); }); + it('should display rows in the table', async () => { const renderResult = render(); const rows = await renderResult.findAllByRole('row'); expect(rows).toHaveLength(4); }); + it('should display policy name value as a link', async () => { const renderResult = render(); const policyNameLink = (await renderResult.findAllByTestId('policyNameLink'))[0]; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx index 1f5e13be3f22f..d68b6be925004 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx @@ -543,7 +543,7 @@ const EmptyPolicyTable = React.memo<{ - + @@ -552,7 +552,7 @@ const EmptyPolicyTable = React.memo<{ fill onClick={onActionClick} isDisabled={actionDisabled} - data-test-subj="emptyCreateNewPolicyButton" + data-test-subj="onboardingStartButton" > { + it('should direct users to the ingest management integrations add datasource', async () => { + await pageObjects.policy.navigateToPolicyList(); + await (await pageObjects.policy.findEmptyStateButton()).click(); + await pageObjects.ingestManagerCreateDatasource.ensureOnCreatePageOrFail(); + }); + }); }); } diff --git a/x-pack/test/security_solution_endpoint/page_objects/policy_page.ts b/x-pack/test/security_solution_endpoint/page_objects/policy_page.ts index a2b0f9a671039..d2bc02aad6bd9 100644 --- a/x-pack/test/security_solution_endpoint/page_objects/policy_page.ts +++ b/x-pack/test/security_solution_endpoint/page_objects/policy_page.ts @@ -101,5 +101,13 @@ export function EndpointPolicyPageProvider({ getService, getPageObjects }: FtrPr async findDatasourceEndpointCustomConfiguration(onEditPage: boolean = false) { return await testSubjects.find(`endpointDatasourceConfig_${onEditPage ? 'edit' : 'create'}`); }, + + /** + * Finds and returns the onboarding button displayed in empty List pages + */ + async findEmptyStateButton() { + await testSubjects.waitForEnabled('onboardingStartButton'); + return await testSubjects.find('onboardingStartButton'); + }, }; } From 17ad610fdd43f1a75d3aeb816955ca8c15230acd Mon Sep 17 00:00:00 2001 From: kevinlog Date: Wed, 17 Jun 2020 21:13:36 -0400 Subject: [PATCH 5/8] remove uneeded code --- .../page_objects/endpoint_page.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/x-pack/test/security_solution_endpoint/page_objects/endpoint_page.ts b/x-pack/test/security_solution_endpoint/page_objects/endpoint_page.ts index 45c3d39689c36..830c5ec5a42d1 100644 --- a/x-pack/test/security_solution_endpoint/page_objects/endpoint_page.ts +++ b/x-pack/test/security_solution_endpoint/page_objects/endpoint_page.ts @@ -43,16 +43,6 @@ export function EndpointPageProvider({ getService, getPageObjects }: FtrProvider }); }, - async waitForEmptyState(dataTestSubj: string) { - await retry.waitForWithTimeout('table to not have data', 2000, async () => { - const tableData = await pageObjects.endpointPageUtils.tableData(dataTestSubj); - if (tableData[1][0] === 'No items found') { - return true; - } - return false; - }); - }, - async waitForVisibleTextToChange(dataTestSubj: string, currentText: string) { await retry.waitForWithTimeout('visible text to change', 2000, async () => { const detailFlyoutTitle = await testSubjects.getVisibleText(dataTestSubj); From e427de5125c408c7c7849f840a5b6dc204a7e4de Mon Sep 17 00:00:00 2001 From: kevinlog Date: Thu, 18 Jun 2020 07:35:24 -0400 Subject: [PATCH 6/8] fix test --- .../public/management/pages/policy/view/policy_list.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx index cd4bc199a98d7..e248d6d8584f9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx @@ -31,7 +31,7 @@ describe('when on the policies page', () => { it('should display the onboarding steps', async () => { const renderResult = render(); - const table = await renderResult.findByTestId('onBoardingSteps'); + const table = await renderResult.findByTestId('onboardingSteps'); expect(table).not.toBeNull(); }); From 399752c0d904d2c6aea6e1701a4cd05287fa7efa Mon Sep 17 00:00:00 2001 From: kevinlog Date: Thu, 18 Jun 2020 12:11:50 -0400 Subject: [PATCH 7/8] address comments --- .../pages/policy/view/policy_list.test.tsx | 4 +- .../pages/policy/view/policy_list.tsx | 91 ++++++++++--------- .../apps/endpoint/policy_list.ts | 15 +-- .../page_objects/policy_page.ts | 2 +- 4 files changed, 51 insertions(+), 61 deletions(-) diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx index e248d6d8584f9..63a5cd0d67ae6 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx @@ -31,8 +31,8 @@ describe('when on the policies page', () => { it('should display the onboarding steps', async () => { const renderResult = render(); - const table = await renderResult.findByTestId('onboardingSteps'); - expect(table).not.toBeNull(); + const onboardingSteps = await renderResult.findByTestId('onboardingSteps'); + expect(onboardingSteps).not.toBeNull(); }); describe('when list data loads', () => { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx index d68b6be925004..2d4abd6de0e42 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx @@ -24,6 +24,7 @@ import { EuiButton, EuiSteps, EuiTitle, + EuiProgress, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; @@ -474,54 +475,54 @@ const EmptyPolicyTable = React.memo<{ actionDisabled: boolean; dataTestSubj: string; }>(({ loading, onActionClick, actionDisabled, dataTestSubj }) => { - const policySteps = [ - { - title: i18n.translate('xpack.securitySolution.endpoint.policyList.stepOneTitle', { - defaultMessage: 'Head over to Ingest Manager.', - }), - children: ( - - - - ), - }, - { - title: i18n.translate('xpack.securitySolution.endpoint.policyList.stepTwoTitle', { - defaultMessage: 'We’ll create a recommended security policy for you.', - }), - children: ( - - - - ), - }, - { - title: i18n.translate('xpack.securitySolution.endpoint.policyList.stepThreeTitle', { - defaultMessage: 'Enroll your agents through Fleet.', - }), - children: ( - - - - ), - }, - ]; + const policySteps = useMemo( + () => [ + { + title: i18n.translate('xpack.securitySolution.endpoint.policyList.stepOneTitle', { + defaultMessage: 'Head over to Ingest Manager.', + }), + children: ( + + + + ), + }, + { + title: i18n.translate('xpack.securitySolution.endpoint.policyList.stepTwoTitle', { + defaultMessage: 'We’ll create a recommended security policy for you.', + }), + children: ( + + + + ), + }, + { + title: i18n.translate('xpack.securitySolution.endpoint.policyList.stepThreeTitle', { + defaultMessage: 'Enroll your agents through Fleet.', + }), + children: ( + + + + ), + }, + ], + [] + ); return (
{loading ? ( - + ) : ( <> diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/policy_list.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/policy_list.ts index 6245660523974..51b133bf6e146 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/policy_list.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/policy_list.ts @@ -101,18 +101,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await pageObjects.policy.launchAndFindDeleteModal(); await testSubjects.existOrFail('policyListDeleteModal'); await pageObjects.common.clickConfirmOnModal(); - let emptyPolicyTable; - await retry.waitForWithTimeout( - 'table to not have data and empty state returns', - 2000, - async () => { - emptyPolicyTable = await testSubjects.find('emptyPolicyTable'); - if (emptyPolicyTable) { - return true; - } - return false; - } - ); + const emptyPolicyTable = await testSubjects.find('emptyPolicyTable'); expect(emptyPolicyTable).not.to.be(null); }); }); @@ -157,7 +146,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { describe('and user clicks on page header create button', () => { it('should direct users to the ingest management integrations add datasource', async () => { await pageObjects.policy.navigateToPolicyList(); - await (await pageObjects.policy.findEmptyStateButton()).click(); + await (await pageObjects.policy.findOnboardingStartButton()).click(); await pageObjects.ingestManagerCreateDatasource.ensureOnCreatePageOrFail(); }); }); diff --git a/x-pack/test/security_solution_endpoint/page_objects/policy_page.ts b/x-pack/test/security_solution_endpoint/page_objects/policy_page.ts index d2bc02aad6bd9..3ffd7eb032c22 100644 --- a/x-pack/test/security_solution_endpoint/page_objects/policy_page.ts +++ b/x-pack/test/security_solution_endpoint/page_objects/policy_page.ts @@ -105,7 +105,7 @@ export function EndpointPolicyPageProvider({ getService, getPageObjects }: FtrPr /** * Finds and returns the onboarding button displayed in empty List pages */ - async findEmptyStateButton() { + async findOnboardingStartButton() { await testSubjects.waitForEnabled('onboardingStartButton'); return await testSubjects.find('onboardingStartButton'); }, From f67bb352838f8c06423b48e572446cb0d0b61efe Mon Sep 17 00:00:00 2001 From: kevinlog Date: Thu, 18 Jun 2020 15:41:19 -0400 Subject: [PATCH 8/8] remove uneeded variable --- .../test/security_solution_endpoint/apps/endpoint/policy_list.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/test/security_solution_endpoint/apps/endpoint/policy_list.ts b/x-pack/test/security_solution_endpoint/apps/endpoint/policy_list.ts index 51b133bf6e146..941a100416740 100644 --- a/x-pack/test/security_solution_endpoint/apps/endpoint/policy_list.ts +++ b/x-pack/test/security_solution_endpoint/apps/endpoint/policy_list.ts @@ -18,7 +18,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const policyTestResources = getService('policyTestResources'); const RELATIVE_DATE_FORMAT = /\d (?:seconds|minutes) ago/i; - const retry = getService('retry'); describe('When on the Endpoint Policy List', function () { this.tags(['ciGroup7']);