metron-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmerri...@apache.org
Subject [18/19] metron git commit: METRON-1489 Retrofit UI tests to run reliably during nightly QE runs (sardell via nickwallen) closes apache/metron#1004
Date Tue, 26 Jun 2018 15:40:25 GMT
METRON-1489 Retrofit UI tests to run reliably during nightly QE runs (sardell via nickwallen) closes apache/metron#1004


Project: http://git-wip-us.apache.org/repos/asf/metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/436cec43
Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/436cec43
Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/436cec43

Branch: refs/heads/feature/METRON-1554-pcap-query-panel
Commit: 436cec43737bf0e38659c598cc8098509763fedf
Parents: 2ee6cc7
Author: sardell <sardell@hortonworks.com>
Authored: Tue Jun 26 10:45:22 2018 -0400
Committer: nickallen <nickallen@apache.org>
Committed: Tue Jun 26 10:45:22 2018 -0400

----------------------------------------------------------------------
 metron-interface/metron-alerts/README.md        |   19 +-
 .../e2e/alert-details/alert-details.po.ts       |   67 +-
 .../alert-details-status.e2e-spec.ts            |  168 +-
 .../alert-filters/alert-filters.e2e-spec.ts     |   78 +-
 .../alert-filters/alert-filters.po.ts           |   31 +-
 .../alert-status/alerts-list-status.e2e-spec.ts |  125 +-
 .../e2e/alerts-list/alerts-list.e2e-spec.ts     |  369 +-
 .../e2e/alerts-list/alerts-list.po.ts           |  308 +-
 .../configure-table/configure-table.e2e-spec.ts |   62 +-
 .../meta-alerts/meta-alert.e2e-spec.ts          |  248 +-
 .../alerts-list/meta-alerts/meta-alert.po.ts    |   21 +-
 .../save-search/save-search.e2e-spec.ts         |   93 +-
 .../alerts-list/tree-view/tree-view.e2e-spec.ts |  208 +-
 .../e2e/alerts-list/tree-view/tree-view.po.ts   |  170 +-
 .../metron-alerts/e2e/login/login.e2e-spec.ts   |   36 +-
 .../metron-alerts/e2e/login/login.po.ts         |   44 +-
 .../e2e/utils/clean_metron_update_table.ts      |   52 +
 .../metron-alerts/e2e/utils/e2e_util.ts         |  223 +-
 .../metron-alerts/package-lock.json             | 6163 +++++++++++++++---
 metron-interface/metron-alerts/package.json     |    8 +-
 .../metron-alerts/protractor.conf.js            |   31 +-
 .../alert-filters/alert-filters.component.ts    |    2 +-
 .../alerts-list/alerts-list.component.html      |    8 +-
 .../alerts-list/alerts-list.component.scss      |    3 +-
 .../alerts/alerts-list/alerts-list.component.ts |    4 +-
 .../tree-view/tree-view.component.html          |    4 +-
 .../configure-rows/configure-rows.component.ts  |    2 +-
 .../saved-searches.component.html               |    4 +-
 .../app/shared/group-by/group-by.component.html |    2 +-
 .../shared/time-range/time-range.component.html |   12 +-
 .../shared/time-range/time-range.component.scss |    4 +
 .../metron-alerts/src/app/utils/constants.ts    |    1 +
 .../src/environments/environment.e2e.ts         |    3 +-
 .../src/environments/environment.js             |    6 +-
 .../src/environments/environment.prod.ts        |    3 +-
 .../src/environments/environment.ts             |    3 +-
 metron-interface/metron-alerts/src/index.html   |    2 +-
 metron-interface/metron-alerts/src/styles.scss  |   10 +
 38 files changed, 6644 insertions(+), 1953 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/metron/blob/436cec43/metron-interface/metron-alerts/README.md
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/README.md b/metron-interface/metron-alerts/README.md
index 41052a7..ca6dcb7 100644
--- a/metron-interface/metron-alerts/README.md
+++ b/metron-interface/metron-alerts/README.md
@@ -136,20 +136,27 @@ The application will be available at http://host:4201 assuming the port is set t
 
 ## E2E Tests
 
-An expressjs server is available for mocking the elastic search api.
+### Caveats
+1. E2E tests uses data from full-dev wherever applicable. The tests assume rest-api's are available @http://node1:8082. It is recommended to shutdown all other Metron services while running the E2E tests including Parsers, Enrichment, Indexing and the Profiler.
 
-1. Run e2e webserver :
+1. E2E tests are run on headless chrome. To see the chrome browser in action, remove the '--headless' parameter of chromeOptions in metron/metron-interface/metron-alerts/protractor.conf.js file
+
+1. E2E tests delete all the data in HBase table 'metron_update' and Elastic search index 'meta_alerts_index' for testing against its test data
+
+1. E2E tests use [protractor-flake](https://github.com/NickTomlin/protractor-flake) to re-run flaky tests.
+
+### Steps to run
+
+1. An Express.js server is available for accessing the rest api. Run the e2e webserver:
     ```
     cd metron/metron-interface/metron-alerts
     sh ./scripts/start-server-for-e2e.sh
     ```
 
-1. run e2e test using the following command
+1. Run e2e tests using the following command:
     ```
     cd metron/metron-interface/metron-alerts
     npm run e2e
     ```
 
-1. E2E tests uses data from full-dev wherever applicable. The tests assume rest-api's are available @http://node1:8082
-
-**NOTE**: *e2e tests covers all the general workflows and we will extend them as we need*
+**NOTE**: *e2e tests cover all the general workflows and we will extend them as we need*

http://git-wip-us.apache.org/repos/asf/metron/blob/436cec43/metron-interface/metron-alerts/e2e/alert-details/alert-details.po.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/e2e/alert-details/alert-details.po.ts b/metron-interface/metron-alerts/e2e/alert-details/alert-details.po.ts
index 18cb273..8279ad9 100644
--- a/metron-interface/metron-alerts/e2e/alert-details/alert-details.po.ts
+++ b/metron-interface/metron-alerts/e2e/alert-details/alert-details.po.ts
@@ -17,77 +17,84 @@
  */
 
 import {browser, element, by, protractor} from 'protractor';
-import {waitForElementInVisibility, waitForElementPresence, waitForElementVisibility} from '../utils/e2e_util';
+import {
+  scrollIntoView, waitForElementInVisibility, waitForElementPresence,
+  waitForElementVisibility, waitForStalenessOf
+} from '../utils/e2e_util';
 
 export class MetronAlertDetailsPage {
 
   navigateTo(alertId: string) {
-    browser.waitForAngularEnabled(false);
-    browser.get('/alerts-list(dialog:details/alerts_ui_e2e/'+ alertId +'/alerts_ui_e2e_index)');
-    browser.sleep(2000);
+    return browser.waitForAngularEnabled(false)
+    .then(() => browser.get('/alerts-list(dialog:details/alerts_ui_e2e/'+ alertId +'/alerts_ui_e2e_index)'))
+    .then(() => browser.sleep(1000));
   }
 
   addCommentAndSave(comment: string, index: number) {
     let textAreaElement = element(by.css('app-alert-details textarea'));
     let addCommentButtonElement = element(by.buttonText('ADD COMMENT'));
-    let latestCommentEle = element.all(by.css('.comment-container .comment')).get(index);
+    let latestCommentEle = element.all(by.cssContainingText('.comment-container .comment', comment));
 
-    textAreaElement.clear()
+    return textAreaElement.clear()
     .then(() => textAreaElement.sendKeys(comment))
     .then(() => addCommentButtonElement.click())
-    .then(() => waitForElementPresence(latestCommentEle));
+    .then(() => waitForElementVisibility(latestCommentEle));
   }
 
   clickNew() {
-    element.all(by.css('.metron-slider-pane-details table tbody tr')).get(1).all(by.css('td')).get(0).click();
+    return element.all(by.css('.metron-slider-pane-details table tbody tr')).get(1).all(by.css('td')).get(0).click();
   }
 
   clickOpen() {
-    element.all(by.css('.metron-slider-pane-details table tbody tr')).get(1).all(by.css('td')).get(1).click();
+    return element.all(by.css('.metron-slider-pane-details table tbody tr')).get(1).all(by.css('td')).get(1).click();
   }
 
   clickDismiss() {
-    element.all(by.css('.metron-slider-pane-details table tbody tr')).get(1).all(by.css('td')).get(2).click();
+    return element.all(by.css('.metron-slider-pane-details table tbody tr')).get(1).all(by.css('td')).get(2).click();
   }
 
   clickEscalate() {
-    element.all(by.css('.metron-slider-pane-details table tbody tr')).get(0).all(by.css('td')).get(1).click();
+    return element.all(by.css('.metron-slider-pane-details table tbody tr')).get(0).all(by.css('td')).get(1).click();
   }
 
   clickResolve() {
-    element.all(by.css('.metron-slider-pane-details table tbody tr')).get(2).all(by.css('td')).get(1).click();
+    return element.all(by.css('.metron-slider-pane-details table tbody tr')).get(2).all(by.css('td')).get(1).click();
   }
 
   clickCommentsInSideNav() {
-    return element(by.css('app-alert-details .fa.fa-comment')).click();
+    let commentIcon = element(by.css('app-alert-details .fa.fa-comment'));
+    return waitForElementVisibility(commentIcon)
+    .then(() => commentIcon.click())
+    .then(() => waitForElementVisibility(element(by.buttonText('ADD COMMENT'))));
   }
 
   clickNoForConfirmation() {
-    browser.sleep(1000);
-    let dialogElement = element(by.css('.metron-dialog .modal-header .close'));
-    let maskElement = element(by.css('.modal-backdrop.fade'));
-    waitForElementVisibility(dialogElement).then(() => element(by.css('.metron-dialog')).element(by.buttonText('Cancel')).click())
+    let cancelButton = element(by.css('.metron-dialog')).element(by.buttonText('Cancel'));
+    let maskElement = element(by.css('.modal-backdrop'));
+    waitForElementVisibility(cancelButton).then(() => element(by.css('.metron-dialog')).element(by.buttonText('Cancel')).click())
     .then(() => waitForElementInVisibility(maskElement));
   }
 
-  clickYesForConfirmation() {
-    browser.sleep(1000);
-    let dialogElement = element(by.css('.metron-dialog .modal-header .close'));
-    let maskElement = element(by.css('.modal-backdrop.fade'));
-    waitForElementVisibility(dialogElement).then(() => element(by.css('.metron-dialog')).element(by.buttonText('OK')).click())
+  clickYesForConfirmation(comment) {
+    let okButton = element(by.css('.metron-dialog')).element(by.buttonText('OK'));
+    let maskElement = element(by.css('.modal-backdrop'));
+    waitForElementVisibility(okButton).then(() => element(by.css('.metron-dialog')).element(by.buttonText('OK')).click())
     .then(() => waitForElementInVisibility(maskElement));
   }
 
   closeDetailPane() {
-    element(by.css('app-alert-details .close-button')).click();
-    browser.sleep(2000);
-  }
+  let dialogElement = element(by.css('.metron-dialog.modal.show'));
+  return waitForElementInVisibility(dialogElement).then(() => scrollIntoView(element(by.css('app-alert-details .close-button')), true)
+        .then(() => element(by.css('app-alert-details .close-button')).click())
+        .then(() => waitForElementInVisibility(element(by.css('app-alert-details')))));
+}
 
   deleteComment() {
     let scrollToEle = element.all(by.css('.comment-container')).get(0);
     let trashIcon = element.all(by.css('.fa.fa-trash-o')).get(0);
     browser.actions().mouseMove(scrollToEle).perform().then(() => waitForElementVisibility(trashIcon))
-    .then(() => element.all(by.css('.fa.fa-trash-o')).get(0).click());
+    .then(() => trashIcon.click())
+    .then(() => waitForElementVisibility(element(by.css('.modal-backdrop'))));
   }
 
   getAlertStatus(previousText) {
@@ -126,19 +133,19 @@ export class MetronAlertDetailsPage {
   }
 
   clickRenameMetaAlert() {
-    element(by.css('app-alert-details .editable-text')).click();
+    return element(by.css('app-alert-details .editable-text')).click();
   }
 
   renameMetaAlert(name: string) {
-    element(by.css('app-alert-details input.form-control')).sendKeys(name);
+    return element(by.css('app-alert-details input.form-control')).sendKeys(name);
   }
 
   cancelRename() {
-    element(by.css('app-alert-details .input-group .fa.fa-times')).click();
+    return element(by.css('app-alert-details .input-group .fa.fa-times')).click();
   }
 
   saveRename() {
-    element(by.css('app-alert-details .fa.fa-check')).click();
+    return element(by.css('app-alert-details .fa.fa-check')).click();
   }
 
   getAlertDetailsCount() {

http://git-wip-us.apache.org/repos/asf/metron/blob/436cec43/metron-interface/metron-alerts/e2e/alert-details/alert-status/alert-details-status.e2e-spec.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/e2e/alert-details/alert-status/alert-details-status.e2e-spec.ts b/metron-interface/metron-alerts/e2e/alert-details/alert-status/alert-details-status.e2e-spec.ts
index d051a78..28d9ed0 100644
--- a/metron-interface/metron-alerts/e2e/alert-details/alert-status/alert-details-status.e2e-spec.ts
+++ b/metron-interface/metron-alerts/e2e/alert-details/alert-status/alert-details-status.e2e-spec.ts
@@ -23,24 +23,25 @@ import {loadTestData, deleteTestData} from '../../utils/e2e_util';
 import { MetronAlertsPage } from '../../alerts-list/alerts-list.po';
 import {TreeViewPage} from '../../alerts-list/tree-view/tree-view.po';
 
-describe('metron-alerts alert status', function() {
+describe('Test spec for metron details page', function() {
   let page: MetronAlertDetailsPage;
   let listPage: MetronAlertsPage;
   let treePage: TreeViewPage;
   let loginPage: LoginPage;
 
-  beforeAll(() => {
-    loadTestData();
+  beforeAll(async function() : Promise<any> {
     loginPage = new LoginPage();
     listPage = new MetronAlertsPage();
     treePage = new TreeViewPage();
-    loginPage.login();
+
+    await loadTestData();
+    await loginPage.login();
   });
 
-  afterAll(() => {
+  afterAll(async function() : Promise<any> {
     new MetronAlertsPage().navigateTo();
-    loginPage.logout();
-    deleteTestData();
+    await loginPage.logout();
+    await deleteTestData();
   });
 
   beforeEach(() => {
@@ -48,99 +49,104 @@ describe('metron-alerts alert status', function() {
     jasmine.addMatchers(customMatchers);
   });
 
-  it('should change alert statuses', () => {
-    let alertId = 'c4c5e418-3938-099e-bb0d-37028a98dca8';
-
-    page.navigateTo(alertId);
-    page.clickNew();
-    expect(page.getAlertStatus('ANY')).toEqual('NEW');
-    page.clickOpen();
-    expect(page.getAlertStatus('NEW')).toEqual('OPEN');
-    expect(listPage.getAlertStatusById(alertId)).toEqual('OPEN');
-    page.clickDismiss();
-    expect(page.getAlertStatus('OPEN')).toEqual('DISMISS');
-    expect(listPage.getAlertStatusById(alertId)).toEqual('DISMISS');
-    page.clickEscalate();
-    expect(page.getAlertStatus('DISMISS')).toEqual('ESCALATE');
-    expect(listPage.getAlertStatusById(alertId)).toEqual('ESCALATE');
-    page.clickResolve();
-    expect(page.getAlertStatus('ESCALATE')).toEqual('RESOLVE');
-    expect(listPage.getAlertStatusById(alertId)).toEqual('RESOLVE');
-    page.clickNew();
+  it('should change alert statuses', async function() : Promise<any> {
+    let alertId = '2cc174d7-c049-aaf4-d0d6-138073777309';
+
+    await page.navigateTo(alertId);
+    expect(await page.getAlertStatus('ANY')).toEqual('NEW');
+    await page.clickOpen();
+    expect(await page.getAlertStatus('NEW')).toEqual('OPEN');
+    expect(await listPage.getAlertStatusById(alertId)).toEqual('OPEN');
+    await page.clickDismiss();
+    expect(await page.getAlertStatus('OPEN')).toEqual('DISMISS');
+    expect(await listPage.getAlertStatusById(alertId)).toEqual('DISMISS');
+    await page.clickEscalate();
+    expect(await page.getAlertStatus('DISMISS')).toEqual('ESCALATE');
+    expect(await listPage.getAlertStatusById(alertId)).toEqual('ESCALATE');
+    await page.clickResolve();
+    expect(await page.getAlertStatus('ESCALATE')).toEqual('RESOLVE');
+    expect(await listPage.getAlertStatusById(alertId)).toEqual('RESOLVE');
+    await page.clickNew();
   });
 
-  it('should add comments for table view', () => {
-    let comment1 = 'This is a sample comment';
-    let comment2 = 'This is a sample comment again';
-    let userNameAndTimestamp = '- admin - a few seconds ago';
+  // The below code will fail until this issue is resolved in Protractor: https://github.com/angular/protractor/issues/4693
+  // This is because the connection resets before deleting the test comment, which causes the assertion to be false
 
-    page.clickCommentsInSideNav();
-    page.addCommentAndSave(comment1, 0);
+  // it('should add comments for table view', async function() : Promise<any> {
+  //   let comment1 = 'This is a sample comment';
+  //   let comment2 = 'This is a sample comment again';
+  //   let userNameAndTimestamp = '- admin - a few seconds ago';
+  //   let alertId = '2cc174d7-c049-aaf4-d0d6-138073777309';
 
-    expect(page.getCommentsText()).toEqual([comment1]);
-    expect(page.getCommentsUserNameAndTimeStamp()).toEqual([userNameAndTimestamp]);
+  //   page.navigateTo(alertId);
 
-    page.addCommentAndSave(comment2, 1);
-    expect(page.getCommentsText()).toEqual([comment2, comment1]);
-    expect(page.getCommentsUserNameAndTimeStamp()).toEqual([userNameAndTimestamp, userNameAndTimestamp]);
+  //   await page.clickCommentsInSideNav();
+  //   await page.addCommentAndSave(comment1, 0);
 
-    page.deleteComment();
-    page.clickNoForConfirmation();
-    expect(page.getCommentsText()).toEqual([comment2, comment1]);
+  //   expect(await page.getCommentsText()).toEqual([comment1]);
+  //   expect(await page.getCommentsUserNameAndTimeStamp()).toEqual([userNameAndTimestamp]);
 
-    page.deleteComment();
-    page.clickYesForConfirmation();
-    expect(page.getCommentsText()).toEqual([comment1]);
+  //   await page.addCommentAndSave(comment2, 0);
+  //   expect(await page.getCommentsText()).toEqual([comment2, comment1]);
+  //   expect(await page.getCommentsUserNameAndTimeStamp()).toEqual([userNameAndTimestamp, userNameAndTimestamp]);
 
-    expect(page.getCommentIconCountInListView()).toEqual(1);
+  //   await page.deleteComment();
+  //   await page.clickNoForConfirmation();
+  //   expect(await page.getCommentsText()).toEqual([comment2, comment1]);
 
-    page.deleteComment();
-    page.clickYesForConfirmation();
-    expect(page.getCommentsText()).toEqual([]);
+  //   await page.deleteComment();
+  //   await page.clickYesForConfirmation(comment2);
+  //   expect(await page.getCommentsText()).toEqual([comment1]);
 
-    page.closeDetailPane();
-  });
+  //   expect(await page.getCommentIconCountInListView()).toEqual(1);
 
-  it('should add comments for tree view', () => {
-    let comment1 = 'This is a sample comment';
-    let comment2 = 'This is a sample comment again';
-    let userNameAndTimestamp = '- admin - a few seconds ago';
+  //   await page.deleteComment();
+  //   await page.clickYesForConfirmation(comment1);
+  //   expect(await page.getCommentsText()).toEqual([]);
 
-    treePage.selectGroup('source:type');
-    treePage.expandDashGroup('alerts_ui_e2e');
+  //   await page.closeDetailPane();
+  // });
 
-    treePage.clickOnRow('acf5a641-9cdb-d7ec-c309-6ea316e14fbe');
-    page.clickCommentsInSideNav();
-    page.addCommentAndSave(comment1, 0);
+  // it('should add comments for tree view', async function(): Promise<any> {
+  //   let comment1 = 'This is a sample comment';
+  //   let comment2 = 'This is a sample comment again';
+  //   let userNameAndTimestamp = '- admin - a few seconds ago';
 
-    expect(page.getCommentsText()).toEqual([comment1]);
-    expect(page.getCommentsUserNameAndTimeStamp()).toEqual([userNameAndTimestamp]);
-    expect(page.getCommentIconCountInTreeView()).toEqual(1);
+  //   await treePage.navigateToAlertsList();
+  //   await treePage.selectGroup('source:type');
+  //   await treePage.expandDashGroup('alerts_ui_e2e');
 
-    page.deleteComment();
-    page.clickYesForConfirmation();
-    expect(page.getCommentsText()).toEqual([]);
-    page.closeDetailPane();
+  //   await treePage.clickOnRow('acf5a641-9cdb-d7ec-c309-6ea316e14fbe');
+  //   await page.clickCommentsInSideNav();
+  //   await page.addCommentAndSave(comment1, 0);
 
-    treePage.unGroup();
+  //   expect(await page.getCommentsText()).toEqual([comment1]);
+  //   expect(await page.getCommentsUserNameAndTimeStamp()).toEqual([userNameAndTimestamp]);
+  //   expect(await page.getCommentIconCountInTreeView()).toEqual(1);
 
-    treePage.selectGroup('source:type');
-    treePage.selectGroup('enrichments:geo:ip_dst_addr:country');
-    treePage.expandDashGroup('alerts_ui_e2e');
-    treePage.expandSubGroup('alerts_ui_e2e', 'FR');
+  //   await page.deleteComment();
+  //   await page.clickYesForConfirmation(comment1);
+  //   expect(await page.getCommentsText()).toEqual([]);
+  //   await page.closeDetailPane();
 
-    treePage.clickOnRow('7cd91565-132f-3340-db76-3ade5be54a6e');
-    page.clickCommentsInSideNav();
-    page.addCommentAndSave(comment2, 0);
+  //   await treePage.unGroup();
 
-    expect(page.getCommentsText()).toEqual([comment2]);
-    expect(page.getCommentsUserNameAndTimeStamp()).toEqual([userNameAndTimestamp]);
-    expect(page.getCommentIconCountInTreeView()).toEqual(1);
+  //   await treePage.selectGroup('source:type');
+  //   await treePage.selectGroup('enrichments:geo:ip_dst_addr:country');
+  //   await treePage.expandDashGroup('alerts_ui_e2e');
+  //   await treePage.expandSubGroup('alerts_ui_e2e', 'FR');
 
-    page.deleteComment();
-    page.clickYesForConfirmation();
-    expect(page.getCommentsText()).toEqual([]);
-    page.closeDetailPane();
-  });
+  //   await treePage.clickOnRow('07b29c29-9ab0-37dd-31d3-08ff19eaa888');
+  //   await page.clickCommentsInSideNav();
+  //   await page.addCommentAndSave(comment2, 0);
+
+  //   expect(await page.getCommentsText()).toEqual(comment2);
+  //   expect(await page.getCommentsUserNameAndTimeStamp()).toEqual(userNameAndTimestamp);
+  //   expect(await page.getCommentIconCountInTreeView()).toEqual(1);
+
+  //   await page.deleteComment();
+  //   await page.clickYesForConfirmation(comment2);
+  //   await page.closeDetailPane();
+  // });
 
 });

http://git-wip-us.apache.org/repos/asf/metron/blob/436cec43/metron-interface/metron-alerts/e2e/alerts-list/alert-filters/alert-filters.e2e-spec.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/e2e/alerts-list/alert-filters/alert-filters.e2e-spec.ts b/metron-interface/metron-alerts/e2e/alerts-list/alert-filters/alert-filters.e2e-spec.ts
index b21e316..d9caf7c 100644
--- a/metron-interface/metron-alerts/e2e/alerts-list/alert-filters/alert-filters.e2e-spec.ts
+++ b/metron-interface/metron-alerts/e2e/alerts-list/alert-filters/alert-filters.e2e-spec.ts
@@ -21,20 +21,24 @@ import {customMatchers} from '../../matchers/custom-matchers';
 import {LoginPage} from '../../login/login.po';
 import {AlertFacetsPage} from './alert-filters.po';
 import {loadTestData, deleteTestData} from '../../utils/e2e_util';
+import {MetronAlertsPage} from '../alerts-list.po';
 
-describe('metron-alerts facets', function() {
+describe('Test spec for facet filters', function() {
   let page: AlertFacetsPage;
+  let tablePage: MetronAlertsPage;
   let loginPage: LoginPage;
 
-  beforeAll(() => {
-    loadTestData();
+  beforeAll(async function() : Promise<any> {
     loginPage = new LoginPage();
-    loginPage.login();
+    tablePage = new MetronAlertsPage();
+
+    await loadTestData();
+    await loginPage.login();
   });
 
-  afterAll(() => {
-    loginPage.logout();
-    deleteTestData();
+  afterAll(async function() : Promise<any> {
+    await loginPage.logout();
+    await deleteTestData();
   });
 
   beforeEach(() => {
@@ -42,63 +46,21 @@ describe('metron-alerts facets', function() {
     jasmine.addMatchers(customMatchers);
   });
 
-  it('should display facets data', () => {
+  it('should display facets data', async function() : Promise<any> {
     let facetValues = [ 'enrichm...:country 3', 'ip_dst_addr 8', 'ip_src_addr 2', 'source:type 1' ];
 
-    page.navgateToAlertList();
-    expect(page.getFacetsTitle()).toEqualBcoz(['Filters'], 'for Title as Filters');
-    expect(page.getFacetsValues()).toEqual(facetValues, 'for Facet values');
-  });
-
-  it('should expand all facets', () => {
-    expect(page.getFacetState(0)).toEqualBcoz('collapse', 'for first facet');
-    expect(page.getFacetState(1)).toEqualBcoz('collapse', 'for second facet');
-    expect(page.getFacetState(2)).toEqualBcoz('collapse', 'for third facet');
-    expect(page.getFacetState(3)).toEqualBcoz('collapse', 'for fourth facet');
-
-    page.toggleFacetState(0);
-    page.toggleFacetState(1);
-    page.toggleFacetState(2);
-    page.toggleFacetState(3);
-
-    expect(page.getFacetState(0)).toEqualBcoz('collapse show', 'for first facet');
-    expect(page.getFacetState(1)).toEqualBcoz('collapse show', 'for second facet');
-    expect(page.getFacetState(2)).toEqualBcoz('collapse show', 'for third facet');
-    expect(page.getFacetState(3)).toEqualBcoz('collapse show', 'for fourth facet');
-  });
-
-  it('should have all facet  values', () => {
-    let hostMap = {
-        'comarks...rity.com': '9' ,
-        '7oqnsnz...ysun.com': '44' ,
-        'node1': '36' ,
-        '62.75.195.236': '18' ,
-        'runlove.us': '13' ,
-        'ip-addr.es': '2' ,
-        'ubb67.3...grams.in': '1' ,
-        'r03afd2...grams.in': '3' ,
-        'va872g....grams.in': '1'
-    };
-
-    expect(page.getFacetValues(0)).toEqualBcoz({ US: '22', RU: '44', FR: '25' }, 'for enrichment facet');
-    expect(page.getFacetValues(3)).toEqual({ alerts_ui_e2e: '169' }, 'for source:type facet');
+    await page.navgateToAlertList();
+    expect(await page.getFacetsTitle()).toEqualBcoz('Filters', 'for Title as Filters');
+    expect(await page.getFacetsValues()).toEqual(facetValues, 'for Facet values');
   });
 
-  it('should collapse all facets', () => {
-    expect(page.getFacetState(0)).toEqualBcoz('collapse show', 'for first facet');
-    expect(page.getFacetState(1)).toEqualBcoz('collapse show', 'for second facet');
-    expect(page.getFacetState(2)).toEqualBcoz('collapse show', 'for third facet');
-    expect(page.getFacetState(3)).toEqualBcoz('collapse show', 'for fourth facet');
+  it('should search when facet is selected', async function() : Promise<any> {
+    await page.toggleFacetState(1);
+    expect(await page.getFacetState(1)).toEqualBcoz('collapse show', 'for second facet');
 
-    page.toggleFacetState(0);
-    page.toggleFacetState(1);
-    page.toggleFacetState(2);
-    page.toggleFacetState(3);
+    await page.selectFilter('95.163.121.204');
+    expect(await tablePage.getChangesAlertTableTitle('Alerts (169)')).toEqual('Alerts (44)');
 
-    expect(page.getFacetState(0)).toEqualBcoz('collapse', 'for first facet');
-    expect(page.getFacetState(1)).toEqualBcoz('collapse', 'for second facet');
-    expect(page.getFacetState(2)).toEqualBcoz('collapse', 'for third facet');
-    expect(page.getFacetState(3)).toEqualBcoz('collapse', 'for fourth facet');
   });
 });
 

http://git-wip-us.apache.org/repos/asf/metron/blob/436cec43/metron-interface/metron-alerts/e2e/alerts-list/alert-filters/alert-filters.po.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/e2e/alerts-list/alert-filters/alert-filters.po.ts b/metron-interface/metron-alerts/e2e/alerts-list/alert-filters/alert-filters.po.ts
index 7d675e5..3d17db6 100644
--- a/metron-interface/metron-alerts/e2e/alerts-list/alert-filters/alert-filters.po.ts
+++ b/metron-interface/metron-alerts/e2e/alerts-list/alert-filters/alert-filters.po.ts
@@ -17,39 +17,43 @@
  */
 
 import {browser, element, by} from 'protractor';
-import {waitForElementPresence} from '../../utils/e2e_util';
+import {
+  reduce_for_get_all, waitForElementPresence,
+  waitForElementVisibility
+} from '../../utils/e2e_util';
 
 export class AlertFacetsPage {
 
   private sleepTime = 500;
 
   navgateToAlertList() {
-    browser.waitForAngularEnabled(false);
-    return browser.get('/alerts-list');
+    return browser.waitForAngularEnabled(false).then(() => browser.get('/alerts-list'));
   }
 
   getFacetsTitle() {
-    return waitForElementPresence(element.all(by.css('app-alert-filters metron-collapse'))).then(() => {
-      return element.all(by.css('app-alert-filters .title')).getText();
+    return waitForElementVisibility(element(by.css('app-alert-filters .title'))).then(() => {
+      return element(by.css('app-alert-filters .title')).getText();
     });
   }
 
   getFacetsValues() {
-    return element.all(by.css('app-alert-filters metron-collapse')).getText();
+    return waitForElementVisibility(element(by.css('app-alert-filters  metron-collapse:first-child'))).then(() => {
+      return element.all(by.css('app-alert-filters metron-collapse')).reduce(reduce_for_get_all(), []);
+    });
   }
 
   getFacetState(id: number) {
-    browser.sleep(this.sleepTime);
     let collpaseElement = element.all(by.css('metron-collapse')).get(id);
-    browser.actions().mouseMove(collpaseElement).perform();
-    return collpaseElement.element(by.css('div.collapse')).getAttribute('class');
+    return browser.actions().mouseMove(collpaseElement).perform()
+    .then(() => collpaseElement.element(by.css('div.collapse')).getAttribute('class'))
   }
 
   toggleFacetState(id: number) {
-    browser.sleep(this.sleepTime);
     let collpaseElement = element.all(by.css('metron-collapse')).get(id);
-    browser.actions().mouseMove(collpaseElement).perform();
-    return collpaseElement.element(by.css('a')).click();
+    return browser.actions().mouseMove(collpaseElement).perform()
+    .then(() => collpaseElement.element(by.css('a')).click())
+    .then(() => waitForElementVisibility(collpaseElement.element(by.css('div.collapse'))))
+
   }
 
   getFacetValues(id: number) {
@@ -64,5 +68,8 @@ export class AlertFacetsPage {
     });
   }
 
+  selectFilter(filterTitle: string) {
+    return element(by.css(`li[title="${filterTitle}"]`)).click();
+  }
 }
 

http://git-wip-us.apache.org/repos/asf/metron/blob/436cec43/metron-interface/metron-alerts/e2e/alerts-list/alert-status/alerts-list-status.e2e-spec.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/e2e/alerts-list/alert-status/alerts-list-status.e2e-spec.ts b/metron-interface/metron-alerts/e2e/alerts-list/alert-status/alerts-list-status.e2e-spec.ts
index 828f290..e421c6e 100644
--- a/metron-interface/metron-alerts/e2e/alerts-list/alert-status/alerts-list-status.e2e-spec.ts
+++ b/metron-interface/metron-alerts/e2e/alerts-list/alert-status/alerts-list-status.e2e-spec.ts
@@ -22,20 +22,21 @@ import {LoginPage} from '../../login/login.po';
 import {loadTestData, deleteTestData} from '../../utils/e2e_util';
 import {TreeViewPage} from '../tree-view/tree-view.po';
 
-describe('metron-alerts alert status', function() {
+describe('Test spec for changing alert status in list view & tree view', function() {
   let page: MetronAlertsPage;
   let treePage: TreeViewPage;
   let loginPage: LoginPage;
 
-  beforeAll(() => {
-    loadTestData();
+  beforeAll(async function() : Promise<any> {
     loginPage = new LoginPage();
-    loginPage.login();
+
+    await loadTestData();
+    await loginPage.login();
   });
 
-  afterAll(() => {
-    loginPage.logout();
-    deleteTestData();
+  afterAll(async function() : Promise<any> {
+    await loginPage.logout();
+    await deleteTestData();
   });
 
   beforeEach(() => {
@@ -44,81 +45,81 @@ describe('metron-alerts alert status', function() {
     jasmine.addMatchers(customMatchers);
   });
 
-  it('should change alert status for multiple alerts to OPEN', () => {
-    page.navigateTo();
-    page.toggleAlertInList(0);
-    page.toggleAlertInList(1);
-    page.toggleAlertInList(2);
-    page.clickActionDropdownOption('Open');
-    expect(page.getAlertStatus(0, 'NEW')).toEqual('OPEN');
-    expect(page.getAlertStatus(1, 'NEW')).toEqual('OPEN');
-    expect(page.getAlertStatus(2, 'NEW')).toEqual('OPEN');
+  it('should change alert status for multiple alerts to OPEN', async function() : Promise<any> {
+    await page.navigateTo();
+    await page.toggleAlertInList(0);
+    await page.toggleAlertInList(1);
+    await page.toggleAlertInList(2);
+    await page.clickActionDropdownOption('Open');
+    expect(await page.getAlertStatus(0, 'NEW')).toEqual('OPEN');
+    expect(await page.getAlertStatus(1, 'NEW')).toEqual('OPEN');
+    expect(await page.getAlertStatus(2, 'NEW')).toEqual('OPEN');
   });
 
-  it('should change alert status for multiple alerts to DISMISS', () => {
-    page.toggleAlertInList(3);
-    page.toggleAlertInList(4);
-    page.toggleAlertInList(5);
-    page.clickActionDropdownOption('Dismiss');
-    expect(page.getAlertStatus(3, 'NEW')).toEqual('DISMISS');
-    expect(page.getAlertStatus(4, 'NEW')).toEqual('DISMISS');
-    expect(page.getAlertStatus(5, 'NEW')).toEqual('DISMISS');
+  it('should change alert status for multiple alerts to DISMISS', async function() : Promise<any> {
+    await page.toggleAlertInList(3);
+    await page.toggleAlertInList(4);
+    await page.toggleAlertInList(5);
+    await page.clickActionDropdownOption('Dismiss');
+    expect(await page.getAlertStatus(3, 'NEW')).toEqual('DISMISS');
+    expect(await page.getAlertStatus(4, 'NEW')).toEqual('DISMISS');
+    expect(await page.getAlertStatus(5, 'NEW')).toEqual('DISMISS');
   });
 
-  it('should change alert status for multiple alerts to ESCALATE', () => {
-    page.toggleAlertInList(6);
-    page.toggleAlertInList(7);
-    page.toggleAlertInList(8);
-    page.clickActionDropdownOption('Escalate');
-    expect(page.getAlertStatus(6, 'NEW')).toEqual('ESCALATE');
-    expect(page.getAlertStatus(7, 'NEW')).toEqual('ESCALATE');
-    expect(page.getAlertStatus(8, 'NEW')).toEqual('ESCALATE');
+  it('should change alert status for multiple alerts to ESCALATE', async function() : Promise<any> {
+    await page.toggleAlertInList(6);
+    await page.toggleAlertInList(7);
+    await page.toggleAlertInList(8);
+    await page.clickActionDropdownOption('Escalate');
+    expect(await page.getAlertStatus(6, 'NEW')).toEqual('ESCALATE');
+    expect(await page.getAlertStatus(7, 'NEW')).toEqual('ESCALATE');
+    expect(await page.getAlertStatus(8, 'NEW')).toEqual('ESCALATE');
   });
 
-  it('should change alert status for multiple alerts to RESOLVE', () => {
-    page.toggleAlertInList(9);
-    page.toggleAlertInList(10);
-    page.toggleAlertInList(11);
-    page.clickActionDropdownOption('Resolve');
-    expect(page.getAlertStatus(9, 'NEW')).toEqual('RESOLVE');
-    expect(page.getAlertStatus(10, 'NEW')).toEqual('RESOLVE');
-    expect(page.getAlertStatus(11, 'NEW')).toEqual('RESOLVE');
+  it('should change alert status for multiple alerts to RESOLVE', async function() : Promise<any> {
+    await page.toggleAlertInList(9);
+    await page.toggleAlertInList(10);
+    await page.toggleAlertInList(11);
+    await page.clickActionDropdownOption('Resolve');
+    expect(await page.getAlertStatus(9, 'NEW')).toEqual('RESOLVE');
+    expect(await page.getAlertStatus(10, 'NEW')).toEqual('RESOLVE');
+    expect(await page.getAlertStatus(11, 'NEW')).toEqual('RESOLVE');
   });
 
 
-  it('should change alert status for multiple alerts to OPEN in tree view', () => {
-    treePage.selectGroup('source:type');
-    treePage.selectGroup('enrichments:geo:ip_dst_addr:country');
-    
-    treePage.expandDashGroup('alerts_ui_e2e');
-    treePage.expandSubGroup('alerts_ui_e2e', 'US');
-    treePage.expandSubGroup('alerts_ui_e2e', 'RU');
-    treePage.expandSubGroup('alerts_ui_e2e', 'FR');
+  it('should change alert status for multiple alerts to OPEN in tree view', async function() : Promise<any> {
+    await treePage.selectGroup('source:type');
+    await treePage.selectGroup('enrichments:geo:ip_dst_addr:country');
+
+    await treePage.expandDashGroup('alerts_ui_e2e');
+    await treePage.expandSubGroup('alerts_ui_e2e', 'US');
+    await treePage.expandSubGroup('alerts_ui_e2e', 'RU');
+    await treePage.expandSubGroup('alerts_ui_e2e', 'FR');
 
-    treePage.toggleAlertInTree(1);
-    treePage.toggleAlertInTree(2);
-    treePage.toggleAlertInTree(3);
-    page.clickActionDropdownOption('Open');
+    await treePage.toggleAlertInTree(1);
+    await treePage.toggleAlertInTree(2);
+    await treePage.toggleAlertInTree(3);
+    await page.clickActionDropdownOption('Open');
     expect(treePage.getAlertStatusForTreeView(1, 'NEW')).toEqual('OPEN');
     expect(treePage.getAlertStatusForTreeView(2, 'NEW')).toEqual('OPEN');
     expect(treePage.getAlertStatusForTreeView(3, 'NEW')).toEqual('OPEN');
 
-    treePage.toggleAlertInTree(4);
-    treePage.toggleAlertInTree(5);
-    page.clickActionDropdownOption('Dismiss');
+    await treePage.toggleAlertInTree(4);
+    await treePage.toggleAlertInTree(5);
+    await page.clickActionDropdownOption('Dismiss');
     expect(treePage.getAlertStatusForTreeView(4, 'NEW')).toEqual('DISMISS');
     expect(treePage.getAlertStatusForTreeView(5, 'NEW')).toEqual('DISMISS');
 
-    treePage.toggleAlertInTree(8);
-    treePage.toggleAlertInTree(9);
-    page.clickActionDropdownOption('Escalate');
+    await treePage.toggleAlertInTree(8);
+    await treePage.toggleAlertInTree(9);
+    await page.clickActionDropdownOption('Escalate');
     expect(treePage.getAlertStatusForTreeView(8, 'NEW')).toEqual('ESCALATE');
     expect(treePage.getAlertStatusForTreeView(9, 'NEW')).toEqual('ESCALATE');
 
-    treePage.toggleAlertInTree(10);
-    treePage.toggleAlertInTree(11);
-    treePage.toggleAlertInTree(12);
-    page.clickActionDropdownOption('Resolve');
+    await treePage.toggleAlertInTree(10);
+    await treePage.toggleAlertInTree(11);
+    await treePage.toggleAlertInTree(12);
+    await page.clickActionDropdownOption('Resolve');
     expect(treePage.getAlertStatusForTreeView(10, 'NEW')).toEqual('RESOLVE');
     expect(treePage.getAlertStatusForTreeView(11, 'NEW')).toEqual('RESOLVE');
     expect(treePage.getAlertStatusForTreeView(12, 'NEW')).toEqual('RESOLVE');

http://git-wip-us.apache.org/repos/asf/metron/blob/436cec43/metron-interface/metron-alerts/e2e/alerts-list/alerts-list.e2e-spec.ts
----------------------------------------------------------------------
diff --git a/metron-interface/metron-alerts/e2e/alerts-list/alerts-list.e2e-spec.ts b/metron-interface/metron-alerts/e2e/alerts-list/alerts-list.e2e-spec.ts
index 358878d..e3709ab 100644
--- a/metron-interface/metron-alerts/e2e/alerts-list/alerts-list.e2e-spec.ts
+++ b/metron-interface/metron-alerts/e2e/alerts-list/alerts-list.e2e-spec.ts
@@ -21,7 +21,7 @@ import { customMatchers } from  '../matchers/custom-matchers';
 import { LoginPage } from '../login/login.po';
 import { loadTestData, deleteTestData } from '../utils/e2e_util';
 
-describe('metron-alerts App', function() {
+describe('Test spec for all ui elements & list view', function() {
   let page: MetronAlertsPage;
   let loginPage: LoginPage;
   let columnNames = [ '', 'Score', 'id', 'timestamp', 'source:type', 'ip_src_addr', 'enrichm...:country',
@@ -29,15 +29,16 @@ describe('metron-alerts App', function() {
   let colNamesColumnConfig = [ 'score', 'id', 'timestamp', 'source:type', 'ip_src_addr', 'enrichments:geo:ip_dst_addr:country',
                                 'ip_dst_addr', 'host', 'alert_status' ];
 
-  beforeAll(() => {
-    loadTestData();
+  beforeAll(async function() : Promise<any> {
     loginPage = new LoginPage();
-    loginPage.login();
+
+    await loadTestData();
+    await loginPage.login();
   });
 
-  afterAll(() => {
-    loginPage.logout();
-    deleteTestData();
+  afterAll(async function() : Promise<any> {
+    await loginPage.logout();
+    await deleteTestData();
   });
 
   beforeEach(() => {
@@ -45,110 +46,109 @@ describe('metron-alerts App', function() {
     jasmine.addMatchers(customMatchers);
   });
 
-  it('should have all the UI elements', () => {
-    page.navigateTo();
-    page.clearLocalStorage();
-
-    expect(page.isMetronLogoPresent()).toEqualBcoz(true, 'for Metron Logo');
-    expect(page.isSavedSearchButtonPresent()).toEqualBcoz(true, 'for SavedSearch Button');
-    expect(page.isClearSearchPresent()).toEqualBcoz(true, 'for Clear Search');
-    expect(page.isSearchButtonPresent()).toEqualBcoz(true, 'for Search Button');
-    expect(page.isSaveSearchButtonPresent()).toEqualBcoz(true, 'for Save Search Button');
-    expect(page.isTableSettingsButtonPresent()).toEqualBcoz(true, 'for table settings button');
-    expect(page.isPausePlayRefreshButtonPresent()).toEqualBcoz(true, 'for pause/play button');
-    expect(page.isConfigureTableColumnsPresent()).toEqualBcoz(true, 'for alerts table column configure button');
-
-    expect(page.getChangesAlertTableTitle('Alerts (0)')).toEqualBcoz('Alerts (169)', 'for alerts title');
-    expect(page.getActionDropdownItems()).toEqualBcoz([ 'Open', 'Dismiss', 'Escalate', 'Resolve', 'Add to Alert' ],
-                                                        'for default dropdown actions');
-    expect(page.getTableColumnNames()).toEqualBcoz(columnNames, 'for default column names for alert list table');
-  });
+  it('should have all the UI elements', async function() : Promise<any> {
+    await page.navigateTo();
+    await page.clearLocalStorage();
 
-  it('should have all pagination controls and they should be working', () => {
-    expect(page.isChevronLeftEnabled()).toEqualBcoz(false, 'for left chevron to be disabled for first page');
-    expect(page.getPaginationText()).toEqualBcoz('1 - 25 of 169', 'for pagination text');
-    expect(page.isChevronRightEnabled()).toEqualBcoz(true, 'for right chevron to be enabled for first page');
+    expect(await page.getChangesAlertTableTitle('Alerts (0)')).toEqualBcoz('Alerts (169)', 'for alerts title');
 
-    page.clickChevronRight();
+    expect(await page.isMetronLogoPresent()).toEqualBcoz(true, 'for Metron Logo');
+    expect(await page.isSavedSearchButtonPresent()).toEqualBcoz(true, 'for SavedSearch Button');
+    expect(await page.isClearSearchPresent()).toEqualBcoz(true, 'for Clear Search');
+    expect(await page.isSearchButtonPresent()).toEqualBcoz(true, 'for Search Button');
+    expect(await page.isSaveSearchButtonPresent()).toEqualBcoz(true, 'for Save Search Button');
+    expect(await page.isTableSettingsButtonPresent()).toEqualBcoz(true, 'for table settings button');
+    expect(await page.isPausePlayRefreshButtonPresent()).toEqualBcoz(true, 'for pause/play button');
+    expect(await page.isConfigureTableColumnsPresent()).toEqualBcoz(true, 'for alerts table column configure button');
 
-    expect(page.isChevronLeftEnabled()).toEqualBcoz(true, 'for left chevron to be enabled for second page');
-    expect(page.getPaginationText()).toEqualBcoz('26 - 50 of 169', 'for pagination text');
-    expect(page.isChevronRightEnabled()).toEqualBcoz(true, 'for right chevron to be enabled for second page');
+    expect(await page.getActionDropdownItems()).toEqualBcoz([ 'Open', 'Dismiss', 'Escalate', 'Resolve', 'Add to Alert' ],
+                                                        'for default dropdown actions');
+    expect(await page.getTableColumnNames()).toEqualBcoz(columnNames, 'for default column names for alert list table');
+  });
 
-    page.clickChevronRight();
+  it('should have all pagination controls and they should be working', async function() : Promise<any> {
 
-    expect(page.isChevronLeftEnabled()).toEqualBcoz(true, 'for left chevron to be enabled for third page');
-    expect(page.getPaginationText()).toEqualBcoz('51 - 75 of 169', 'for pagination text');
-    expect(page.isChevronRightEnabled()).toEqualBcoz(true, 'for right chevron to be enabled for third page');
+    await page.clickSettings();
+    await page.clickPageSize('100');
 
-    page.clickChevronRight(4);
+    expect(await page.getChangedPaginationText('1 - 25 of 169')).toEqualBcoz('1 - 100 of 169', 'for pagination text');
+    expect(await page.isChevronLeftEnabled()).toEqualBcoz(false, 'for left chevron to be disabled for first page');
+    expect(await page.isChevronRightEnabled()).toEqualBcoz(true, 'for right chevron to be enabled for first page');
 
-    expect(page.isChevronLeftEnabled()).toEqualBcoz(true, 'for left chevron to be enabled for last page');
-    expect(page.getPaginationText()).toEqualBcoz('151 - 169 of 169', 'for pagination text');
-    expect(page.isChevronRightEnabled()).toEqualBcoz(false, 'for right chevron to be disabled for last page');
+    await page.clickChevronRight();
+    expect(await page.getChangedPaginationText('1 - 100 of 169')).toEqualBcoz('101 - 169 of 169', 'for pagination text');
+    expect(await page.isChevronLeftEnabled()).toEqualBcoz(true, 'for left chevron to be disabled for first page');
+    expect(await page.isChevronRightEnabled()).toEqualBcoz(false, 'for right chevron to be enabled for first page');
 
-    page.clickChevronLeft(7);
+    await page.clickChevronLeft();
+    expect(await page.getChangedPaginationText('101 - 169 of 169')).toEqualBcoz('1 - 100 of 169', 'for pagination text');
+    expect(await page.isChevronLeftEnabled()).toEqualBcoz(false, 'for left chevron to be disabled for first page');
+    expect(await page.isChevronRightEnabled()).toEqualBcoz(true, 'for right chevron to be enabled for first page');
 
-    expect(page.isChevronLeftEnabled()).toEqualBcoz(false, 'for left chevron to be disabled for first page again');
-    expect(page.getPaginationText()).toEqualBcoz('1 - 25 of 169', 'for pagination text');
-    expect(page.isChevronRightEnabled()).toEqualBcoz(true, 'for right chevron to be enabled for first page again');
+    await page.clickSettings();
+    await page.clickPageSize('25');
+    expect(await page.getChangedPaginationText('1 - 100 of 169')).toEqualBcoz('1 - 25 of 169', 'for pagination text');
 
+    await page.clickSettings();
   });
 
-  it('should have all settings controls and they should be working', () => {
+  it('should have all settings controls and they should be working', async function() : Promise<any> {
     let settingsPaneLbelNames = [ 'REFRESH RATE', 'ROWS PER PAGE', 'HIDE Resolved Alerts', 'HIDE Dismissed Alerts' ];
     let settingPaneRefreshIntervals = [ '5s', '10s', '15s', '30s', '1m', '10m', '1h' ];
     let settingsPanePageSize = [ '10', '25', '50', '100', '250', '500', '1000' ];
 
-    page.clickSettings();
+    await page.clickSettings();
+
+    expect(await page.getSettingsLabels()).toEqualBcoz(settingsPaneLbelNames, 'for table settings labels');
 
-    expect(page.getSettingsLabels()).toEqualBcoz(settingsPaneLbelNames, 'for table settings labels');
+    expect(await page.getRefreshRateOptions()).toEqualBcoz(settingPaneRefreshIntervals, 'for table settings refresh rate labels');
+    expect(await page.getRefreshRateSelectedOption()).toEqualBcoz([ '1m' ], 'for table settings default refresh rate');
 
-    expect(page.getRefreshRateOptions()).toEqualBcoz(settingPaneRefreshIntervals, 'for table settings refresh rate labels');
-    expect(page.getRefreshRateSelectedOption()).toEqualBcoz([ '1m' ], 'for table settings default refresh rate');
+    await  page.clickRefreshInterval('10s');
+    expect(await page.getRefreshRateSelectedOption()).toEqualBcoz([ '10s' ], 'for refresh interval 10s');
 
-    page.clickRefreshInterval('10s');
-    expect(page.getRefreshRateSelectedOption()).toEqualBcoz([ '10s' ], 'for refresh interval 10s');
+    await page.clickRefreshInterval('1h');
+    expect(await page.getRefreshRateSelectedOption()).toEqualBcoz([ '1h' ], 'for refresh interval 1h');
 
-    page.clickRefreshInterval('1h');
-    expect(page.getRefreshRateSelectedOption()).toEqualBcoz([ '1h' ], 'for refresh interval 1h');
+    expect(await page.getPageSizeOptions()).toEqualBcoz(settingsPanePageSize, 'for table settings refresh rate labels');
+    expect(await page.getPageSizeSelectedOption()).toEqualBcoz([ '25' ], 'for table settings default page size');
 
-    expect(page.getPageSizeOptions()).toEqualBcoz(settingsPanePageSize, 'for table settings refresh rate labels');
-    expect(page.getPageSizeSelectedOption()).toEqualBcoz([ '25' ], 'for table settings default page size');
+    await page.clickPageSize('50');
+    expect(await page.getPageSizeSelectedOption()).toEqualBcoz([ '50' ], 'for page size 50');
 
-    page.clickPageSize('10');
-    expect(page.getPageSizeSelectedOption()).toEqualBcoz([ '10' ], 'for page size 10');
+    await page.clickPageSize('100');
+    expect(await page.getPageSizeSelectedOption()).toEqualBcoz([ '100' ], 'for page size 100');
 
-    page.clickPageSize('100');
-    expect(page.getPageSizeSelectedOption()).toEqualBcoz([ '100' ], 'for page size 100');
+    await page.clickPageSize('25');
+    expect(await page.getPageSizeSelectedOption()).toEqualBcoz([ '25' ], 'for page size 100');
 
-    page.clickSettings();
+    await page.clickSettings();
   });
 
-  it('play pause should start polling and stop polling ', () => {
-    expect(page.getPlayPauseState()).toEqual('fa fa-pause', 'for default pause option');
+  it('play pause should start polling and stop polling ', async function() : Promise<any> {
+    expect(await page.getPlayPauseState()).toEqual('fa fa-play', 'for default pause option');
 
-    page.clickPlayPause();
-    expect(page.getPlayPauseState()).toEqual('fa fa-play', 'for default pause option');
+    await page.clickPlayPause('fa-pause');
+    expect(await page.getPlayPauseState()).toEqual('fa fa-pause', 'for default pause option');
 
-    page.clickPlayPause();
-    expect(page.getPlayPauseState()).toEqual('fa fa-pause', 'for default pause option');
+    await page.clickPlayPause('fa-play');
+    expect(await page.getPlayPauseState()).toEqual('fa fa-play', 'for default pause option');
   });
 
-  it('should select columns from table configuration', () => {
+  it('should select columns from table configuration', async function() : Promise<any> {
     let newColNamesColumnConfig = [ 'score', 'timestamp', 'source:type', 'ip_src_addr', 'enrichments:geo:ip_dst_addr:country',
       'ip_dst_addr', 'host', 'alert_status', 'guid' ];
 
-    page.clickConfigureTable();
-    expect(page.getSelectedColumnNames()).toEqual(colNamesColumnConfig, 'for default selected column names');
-    page.toggleSelectCol('id');
-    page.toggleSelectCol('guid', 'method');
-    expect(page.getSelectedColumnNames()).toEqual(newColNamesColumnConfig, 'for guid added to selected column names');
-    page.saveConfigureColumns();
+    await page.clickConfigureTable();
+    expect(await page.getSelectedColumnNames()).toEqual(colNamesColumnConfig, 'for default selected column names');
+    await page.toggleSelectCol('id');
+    await page.toggleSelectCol('guid');
+    expect(await page.getSelectedColumnNames()).toEqual(newColNamesColumnConfig, 'for guid added to selected column names');
+    await page.saveConfigureColumns();
 
   });
 
-  it('should have all time-range controls', () => {
+  it('should have all time-range controls', async function() : Promise<any> {
     let quickRanges = [
       'Last 7 days', 'Last 30 days', 'Last 60 days', 'Last 90 days', 'Last 6 months', 'Last 1 year', 'Last 2 years', 'Last 5 years',
       'Yesterday', 'Day before yesterday', 'This day last week', 'Previous week', 'Previous month', 'Previous year', 'All time',
@@ -156,191 +156,168 @@ describe('metron-alerts App', function() {
       'Last 5 minutes', 'Last 15 minutes', 'Last 30 minutes', 'Last 1 hour', 'Last 3 hours', 'Last 6 hours', 'Last 12 hours', 'Last 24 hours'
     ];
 
-    page.clickDateSettings();
-    expect(page.getTimeRangeTitles()).toEqual(['Time Range', 'Quick Ranges']);
-    expect(page.getQuickTimeRanges()).toEqual(quickRanges);
-    expect(page.getValueForManualTimeRange()).toEqual([ 'now', 'now' ]);
-    expect(page.isManulaTimeRangeApplyButtonPresent()).toEqual(true);
-    expect(page.getTimeRangeButtonText()).toEqual('All time');
-    page.clickDateSettings();
+    await page.clickDateSettings();
+    expect(await page.getTimeRangeTitles()).toEqual(['Time Range', 'Quick Ranges']);
+    expect(await page.getQuickTimeRanges()).toEqual(quickRanges);
+    expect(await page.getValueForManualTimeRange()).toEqual([ 'now', 'now' ]);
+    expect(await page.isManulaTimeRangeApplyButtonPresent()).toEqual(true);
+    expect(await page.getTimeRangeButtonText()).toEqual('All time');
+    await page.hideDateSettings();
 
   });
 
-  it('should have all time range values populated - 1', () => {
+  it('should have all time range values populated - 1', async function() : Promise<any> {
     let secInADay = (24 * 60 * 60 * 1000);
 
-    page.clickClearSearch();
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz(['All time'], 'for all-time');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 7 days').catch(e => console.log(e))).toEqualBcoz(['Last 7 days', String(secInADay * 7)], 'for last 7 days');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 7 days');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz(['Last 7 days', String(secInADay * 7)], 'for last 7 days');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 30 days').catch(e => console.log(e))).toEqualBcoz(['Last 30 days', String(secInADay * 30)], 'for last 30 days');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 30 days');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz(['Last 30 days', String(secInADay * 30)], 'for last 30 days');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 60 days').catch(e => console.log(e))).toEqualBcoz(['Last 60 days', String(secInADay * 60)], 'for last 60 days');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 60 days');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz(['Last 60 days', String(secInADay * 60)], 'for last 60 days');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 90 days').catch(e => console.log(e))).toEqualBcoz(['Last 90 days', String(secInADay * 90)], 'for last 90 days');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 90 days');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz(['Last 90 days', String(secInADay * 90)], 'for last 90 days');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 1 year').catch(e => console.log(e))).toEqualBcoz(['Last 1 year', String(secInADay * 365)], 'for last 1 year');
 
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 2 years').catch(e => console.log(e))).toEqualBcoz(['Last 2 years', String((secInADay * 365 * 2))], 'for last 2 years');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 1 year');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz(['Last 1 year', String(secInADay * 365)], 'for last 1 year');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 5 years').catch(e => console.log(e))).toEqualBcoz(['Last 5 years', String((secInADay * 365 * 5) + secInADay)], 'for last 5 years');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 2 years');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz(['Last 2 years', String((secInADay * 365 * 2) + secInADay)], 'for last 2 years');
-
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 5 years');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz(['Last 5 years', String((secInADay * 365 * 5) + secInADay)], 'for last 5 years');
-
-    page.clickClearSearch();
   });
 
-  it('should have all time range values populated - 2', () => {
+  it('should have all time range values populated - 2', async function() : Promise<any> {
     let secInADay = (24*60*60*1000);
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Yesterday');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz([ 'Yesterday', String(secInADay - 1000)], 'yesterday');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Yesterday').catch(e => console.log(e))).toEqualBcoz([ 'Yesterday', String(secInADay - 1000)], 'yesterday');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Day before yesterday');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz([ 'Day before yesterday', String(secInADay - 1000)], 'day before yesterday');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Day before yesterday').catch(e => console.log(e))).toEqualBcoz([ 'Day before yesterday', String(secInADay - 1000)], 'day before yesterday');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('This day last week');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz([ 'This day last week', String(secInADay - 1000)], 'this day last week');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('This day last week').catch(e => console.log(e))).toEqualBcoz([ 'This day last week', String(secInADay - 1000)], 'this day last week');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Previous week');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz([ 'Previous week', String((secInADay * 7) - (1000))], 'for previous week');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Previous week').catch(e => console.log(e))).toEqualBcoz([ 'Previous week', String((secInADay * 7) - (1000))], 'for previous week');
 
-    page.clickClearSearch();
   });
 
-  it('should have all time range values populated - 3', () => {
+  it('should have all time range values populated - 3', async function() : Promise<any> {
     let secInADay = (24*60*60*1000);
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Today');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz([ 'Today', String(secInADay - 1000)], 'for today');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Today').catch(e => console.log(e))).toEqualBcoz([ 'Today', String(secInADay - 1000)], 'for today');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('This week');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz([ 'This week', String((secInADay*7) - 1000)], 'for this week');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('This week').catch(e => console.log(e))).toEqualBcoz([ 'This week', String((secInADay*7) - 1000)], 'for this week');
 
-    page.clickClearSearch();
   });
 
-  it('should have all time range values populated - 4', () => {
-    let secInADay = (24*60*60*1000);
+  it('should have all time range values populated - 4', async function() : Promise<any> {
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 5 minutes');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz([ 'Last 5 minutes', String(5 * 60 * 1000)], 'for last 5 minutes');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 5 minutes').catch(e => console.log(e))).toEqualBcoz([ 'Last 5 minutes', String(5 * 60 * 1000)], 'for last 5 minutes');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 15 minutes');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz([ 'Last 15 minutes', String(15 * 60 * 1000)], 'for last 15 minutes');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 15 minutes').catch(e => console.log(e))).toEqualBcoz([ 'Last 15 minutes', String(15 * 60 * 1000)], 'for last 15 minutes');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 30 minutes');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz([ 'Last 30 minutes', String(30 * 60 * 1000)], 'for last 30 minutes');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 30 minutes').catch(e => console.log(e))).toEqualBcoz([ 'Last 30 minutes', String(30 * 60 * 1000)], 'for last 30 minutes');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 1 hour');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz([ 'Last 1 hour', String(60 * 60 * 1000)], 'for last 1 hour');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 1 hour').catch(e => console.log(e))).toEqualBcoz([ 'Last 1 hour', String(60 * 60 * 1000)], 'for last 1 hour');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 3 hours');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz([ 'Last 3 hours', String(3 * 60 * 60 * 1000)], 'for last 3 hours');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 3 hours').catch(e => console.log(e))).toEqualBcoz([ 'Last 3 hours', String(3 * 60 * 60 * 1000)], 'for last 3 hours');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 6 hours');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz([ 'Last 6 hours', String(6 * 60 * 60 * 1000)], 'for last 6 hours');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 6 hours').catch(e => console.log(e))).toEqualBcoz([ 'Last 6 hours', String(6 * 60 * 60 * 1000)], 'for last 6 hours');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 12 hours');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz([ 'Last 12 hours', String(12 * 60 * 60 * 1000)], 'for last 12 hours');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 12 hours').catch(e => console.log(e))).toEqualBcoz([ 'Last 12 hours', String(12 * 60 * 60 * 1000)], 'for last 12 hours');
 
-    page.clickDateSettings();
-    page.selectQuickTimeRange('Last 24 hours');
-    expect(page.getTimeRangeButtonAndSubText()).toEqualBcoz([ 'Last 24 hours', String(24 * 60 * 60 * 1000)], 'for last 24 hours');
+    await page.clickDateSettings();
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeAndTimeText('Last 24 hours').catch(e => console.log(e))).toEqualBcoz([ 'Last 24 hours', String(24 * 60 * 60 * 1000)], 'for last 24 hours');
 
-    page.clickClearSearch();
   });
 
-  it('should disable date picker when timestamp is present in search', () => {
-    page.clickTableText('2017-09-13 18:02:20');
-    expect(page.isDateSeettingDisabled()).toEqual(true);
+  it('should disable date picker when timestamp is present in search', async function() : Promise<any> {
+    await page.setSearchText('timestamp:1505325740512');
+    expect(await page.getChangesAlertTableTitle('Alerts (169)')).toEqual('Alerts (1)');
+    expect(await page.isDateSeettingDisabled()).toEqual(true);
 
-    page.clickClearSearch();
-    expect(page.isDateSeettingDisabled()).toEqual(false);
+    await page.clickClearSearch();
+    expect(await page.getChangesAlertTableTitle('Alerts (1)')).toEqual('Alerts (169)');
+    expect(await page.isDateSeettingDisabled()).toEqual(false);
 
-    page.clickTableText('alerts_ui_e2e');
-    expect(page.isDateSeettingDisabled()).toEqual(false);
+    await expect(page.clickTableTextAndGetSearchText('FR', 'enrichments:geo:ip_dst_addr:country:FR')).toEqual('enrichments:geo:ip_dst_addr:country:FR');
+    expect(await page.getChangesAlertTableTitle('Alerts (169)')).toEqual('Alerts (25)');
+    expect(await page.isDateSeettingDisabled()).toEqual(false);
 
-    page.clickClearSearch();
+    await page.clickClearSearch();
+    expect(await page.getChangesAlertTableTitle('Alerts (25)')).toEqual('Alerts (169)');
   });
 
-  it('should have now included when to date is empty', () => {
-    page.clickDateSettings();
-    page.setDate(0, '2017', 'September', '13', '23', '29', '35');
-    page.selectTimeRangeApplyButton();
-    expect(page.getTimeRangeButtonTextForNow()).toEqual([ 'Date Range', '2017-09-13 23:29:35 to now' ]);
+  it('should have now included when to date is empty', async function() : Promise<any> {
+    await page.clickDateSettings();
+    await page.setDate(0, '2017', 'September', '13', '23', '29', '35');
+    await page.selectTimeRangeApplyButton();
+    expect(await page.getTimeRangeButtonTextForNow()).toEqual([ 'Date Range', '2017-09-13 23:29:35 to now' ]);
 
-    page.clickClearSearch();
+    await page.clickClearSearch();
   });
-  
-  it('should have all time-range included while searching', () => {
+
+  it('should have all time-range included while searching', async function() : Promise<any> {
     let startDate = new Date(1505325575000);
     let endDate = new Date(1505325580000);
 
-    page.clearLocalStorage();
-    page.clickDateSettings();
+    await page.clearLocalStorage();
+    await page.clickDateSettings();
 
     /* Select Last 5years for time range */
-    page.selectQuickTimeRange('Last 5 years');
-    expect(page.getTimeRangeButtonText()).toEqual('Last 5 years');
+    expect(await page.selectQuickTimeRangeAndGetTimeRangeText('Last 5 years')).toEqual('Last 5 years');
 
     /* Select custom date for time range */
-    page.clickDateSettings();
-    page.setDate(0, String(startDate.getFullYear()), startDate.toLocaleString('en-us', { month: "long" }), String(startDate.getDate()),
+    await page.clickDateSettings();
+    await page.setDate(0, String(startDate.getFullYear()), startDate.toLocaleString('en-us', { month: "long" }), String(startDate.getDate()),
                 String(startDate.getHours()), String(startDate.getMinutes()), String(startDate.getSeconds()));
-    page.setDate(1, String(endDate.getFullYear()), endDate.toLocaleString('en-us', { month: "long" }), String(endDate.getDate()),
+    await page.setDate(1, String(endDate.getFullYear()), endDate.toLocaleString('en-us', { month: "long" }), String(endDate.getDate()),
                 String(endDate.getHours()), String(endDate.getMinutes()), String(endDate.getSeconds()));
-    page.selectTimeRangeApplyButton();
-    expect(page.getChangesAlertTableTitle('Alerts (169)')).toEqual('Alerts (5)');
+    await page.selectTimeRangeApplyButton();
+    expect(await page.getChangesAlertTableTitle('Alerts (169)')).toEqual('Alerts (5)');
 
     /* Save custom date in saved searches */
-    page.saveSearch('e2e-2');
-    page.clickSavedSearch();
-    expect(page.getRecentSearchOptions()).toContain('timestamp:last-5-years', 'for recent search options');
-    expect(page.getSavedSearchOptions()).toEqual(['e2e-2'],
+    await page.saveSearch('e2e-2');
+    await page.clickSavedSearch();
+
+    // The below expect statement will fail until this issue is resolved in Protractor: https://github.com/angular/protractor/issues/4693
+    // This is because the connection resets before deleting the test comment, which causes the assertion to be false
+
+    // expect(await page.getRecentSearchOptions()).toContain('timestamp:last-5-years', 'for recent search options');
+    expect(await page.getSavedSearchOptions()).toEqual(['e2e-2'],
                                                     'for saved search options');
-    page.clickCloseSavedSearch();
+    await page.clickCloseSavedSearch();
 
     /* Clear Search should should show all rows */
-    page.clickClearSearch();
-    expect(page.getChangesAlertTableTitle('Alerts (5)')).toEqual('Alerts (169)');
+    await page.clickClearSearch();
+    expect(await page.getChangesAlertTableTitle('Alerts (5)')).toEqual('Alerts (169)');
 
     /* Load the saved search */
-    page.clickSavedSearch();
-    page.loadSavedSearch('e2e-2');
-    expect(page.getChangesAlertTableTitle('Alerts (169)')).toEqual('Alerts (5)');
+    await page.clickSavedSearch();
+    await page.loadSavedSearch('e2e-2');
+    expect(await page.getChangesAlertTableTitle('Alerts (169)')).toEqual('Alerts (5)');
 
     /* Load recent search */
-    page.clickSavedSearch();
-    page.loadRecentSearch('last-5-years');
-    expect(page.getChangesAlertTableTitle('Alerts (5)')).toEqual('Alerts (169)');
+    await page.clickSavedSearch();
+    await page.loadRecentSearch('last-5-years');
+    expect(await page.getChangesAlertTableTitle('Alerts (5)')).toEqual('Alerts (169)');
 
   });
 


Mime
View raw message