From 8f1ba3c53dfeede0063bad557c2eb6a2c52595c1 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Sat, 14 Mar 2020 15:53:00 -0400 Subject: [PATCH 1/4] test to verify alerts page header says alerts --- .../endpoint/public/applications/endpoint/view/alerts/index.tsx | 2 +- x-pack/test/functional/apps/endpoint/alert_list.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.tsx b/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.tsx index 9718b4e4ef8cdc..b900a0a35dbf57 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.tsx +++ b/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.tsx @@ -233,7 +233,7 @@ export const AlertIndex = memo(() => { -

+

{ await testSubjects.existOrFail('alertListPage'); + const alertsTitle = await testSubjects.getVisibleText('alertsViewTitle'); + expect(alertsTitle).to.equal('Alerts'); }); it('includes alerts search bar', async () => { await testSubjects.existOrFail('alertsSearchBar'); From 98b6a6abd0710c8a56fc402fa0555256de6b74de Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Mon, 16 Mar 2020 13:53:55 -0400 Subject: [PATCH 2/4] updating test with pr feedback --- x-pack/test/functional/apps/endpoint/alert_list.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x-pack/test/functional/apps/endpoint/alert_list.ts b/x-pack/test/functional/apps/endpoint/alert_list.ts index f4c392f0b2fd01..ffbdb6efd0b1c9 100644 --- a/x-pack/test/functional/apps/endpoint/alert_list.ts +++ b/x-pack/test/functional/apps/endpoint/alert_list.ts @@ -21,6 +21,8 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { it('loads the Alert List Page', async () => { await testSubjects.existOrFail('alertListPage'); + }); + it('loads verifies the Alert List Page title', async () => { const alertsTitle = await testSubjects.getVisibleText('alertsViewTitle'); expect(alertsTitle).to.equal('Alerts'); }); From 14205dc137b2ac41993278f5857562322147093d Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Mon, 16 Mar 2020 13:56:22 -0400 Subject: [PATCH 3/4] updating test with pr feedback and better verbiage --- x-pack/test/functional/apps/endpoint/alert_list.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/functional/apps/endpoint/alert_list.ts b/x-pack/test/functional/apps/endpoint/alert_list.ts index ffbdb6efd0b1c9..27fed1f1a70d0a 100644 --- a/x-pack/test/functional/apps/endpoint/alert_list.ts +++ b/x-pack/test/functional/apps/endpoint/alert_list.ts @@ -22,7 +22,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { it('loads the Alert List Page', async () => { await testSubjects.existOrFail('alertListPage'); }); - it('loads verifies the Alert List Page title', async () => { + it('verifies the Alert List Page title', async () => { const alertsTitle = await testSubjects.getVisibleText('alertsViewTitle'); expect(alertsTitle).to.equal('Alerts'); }); From 552b23a0e27995cd91a57c0164827521545009a7 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Mon, 16 Mar 2020 14:53:30 -0400 Subject: [PATCH 4/4] updating test with pr feedback for better test titling --- x-pack/test/functional/apps/endpoint/alert_list.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/test/functional/apps/endpoint/alert_list.ts b/x-pack/test/functional/apps/endpoint/alert_list.ts index 27fed1f1a70d0a..ac00258ff9c020 100644 --- a/x-pack/test/functional/apps/endpoint/alert_list.ts +++ b/x-pack/test/functional/apps/endpoint/alert_list.ts @@ -12,17 +12,17 @@ export default function({ getPageObjects, getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const browser = getService('browser'); - describe('Endpoint Alert List', function() { + describe('Endpoint Alert List page', function() { this.tags(['ciGroup7']); before(async () => { await esArchiver.load('endpoint/alerts/api_feature'); await pageObjects.common.navigateToUrlWithBrowserHistory('endpoint', '/alerts'); }); - it('loads the Alert List Page', async () => { + it('loads in the browser', async () => { await testSubjects.existOrFail('alertListPage'); }); - it('verifies the Alert List Page title', async () => { + it('contains the Alert List Page title', async () => { const alertsTitle = await testSubjects.getVisibleText('alertsViewTitle'); expect(alertsTitle).to.equal('Alerts'); });