[ 
https://issues.apache.org/jira/browse/METRON-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16460954#comment-16460954
 ] 

ASF GitHub Bot commented on METRON-1489:
----------------------------------------

Github user sardell commented on a diff in the pull request:

    https://github.com/apache/metron/pull/1004#discussion_r185477658
  
    --- Diff: metron-interface/metron-alerts/e2e/alerts-list/alerts-list.po.ts 
---
    @@ -272,63 +308,149 @@ export class MetronAlertsPage {
       toggleAlertInList(index: number) {
         let selector = by.css('app-alerts-list tbody tr label');
         let checkbox = element.all(selector).get(index);
    -    this.waitForElementPresence(checkbox).then(() => {
    -      browser.actions().mouseMove(checkbox).perform().then(() => {
    -        checkbox.click();
    -      });
    -    });
    +    return this.waitForElementPresence(checkbox)
    +    .then(() => scrollIntoView(checkbox, true))
    +    .then(() => checkbox.click());
       }
     
       getAlertStatus(rowIndex: number, previousText: string, colIndex = 8) {
         let row = element.all(by.css('app-alerts-list tbody 
tr')).get(rowIndex);
         let column = row.all(by.css('td a')).get(colIndex);
    -    return this.waitForTextChange(column, previousText).then(() => {
    -      return column.getText();
    -    });
    +    return this.waitForTextChange(column, previousText).then(() => 
column.getText());
       }
     
    -  waitForMetaAlert() {
    -    browser.sleep(2000);
    -    return element(by.css('button[data-name="search"]')).click()
    -    .then(() => 
waitForElementPresence(element(by.css('.icon-cell.dropdown-cell'))));
    +  waitForMetaAlert(expectedCount) {
    +    let title = element(by.css('.col-form-label-lg'));
    +    function waitForMetaAlert$()
    +    {
    +      return function () {
    +        return browser.sleep(2000)
    +        .then(() => element(by.css('button[data-name="search"]')).click())
    +        .then(() => waitForTextChange(title, `Alerts (169)`))
    +        .then(() => title.getText())
    +        .then((text) => text === `Alerts (${expectedCount})`)
    +        .catch(catchNoSuchElementError())
    +      }
    +    }
    +    return 
browser.wait(waitForMetaAlert$()).catch(catchNoSuchElementError());
       }
     
       isDateSeettingDisabled() {
         return element.all(by.css('app-time-range 
button.btn.btn-search[disabled=""]')).count().then((count) => { return (count 
=== 1); });
       }
     
       clickDateSettings() {
    -    element(by.css('app-time-range button.btn-search')).click();
    -    browser.sleep(2000);
    +    return scrollIntoView(element(by.css('app-time-range 
button.btn-search')), true)
    +    .then(() => element(by.css('app-time-range 
button.btn-search')).click())
    +    .then(() => waitForCssClass(element(by.css('app-time-range 
#time-range')), 'show'));
    +  }
    +
    +  hideDateSettings() {
    +    return element(by.css('app-time-range button.btn-search')).click()
    +    .then(() => 
waitForCssClassNotToBePresent(element(by.css('app-time-range #time-range')), 
'show'))
    +    .then(() => waitForElementInVisibility(element(by.css('app-time-range 
#time-range'))));
       }
     
       getTimeRangeTitles() {
    -    return element.all(by.css('app-time-range .title')).getText();
    +    return element.all(by.css('app-time-range 
.title')).reduce(reduce_for_get_all(), []);
       }
     
       getQuickTimeRanges() {
    -    return element.all(by.css('app-time-range .quick-ranges 
span')).getText();
    +    return element.all(by.css('app-time-range .quick-ranges 
span')).reduce(reduce_for_get_all(), []);
       }
     
       getValueForManualTimeRange() {
    -    return element.all(by.css('app-time-range input.form-control')). 
getAttribute('value');
    +    return element.all(by.css('app-time-range 
input.form-control')).reduce((acc, ele) => {
    +      return ele.getAttribute('value').then(value => {
    +        acc.push(value);
    +        return acc;
    +      });
    +    }, []);
       }
     
       isManulaTimeRangeApplyButtonPresent() {
         return 
element.all(by.css('app-time-range')).all(by.buttonText('APPLY')).count().then(count
 => count === 1);
       }
     
    +  waitForTextAndSubTextInTimeRange(currentTimeRangeVal) {
    +    return waitForTextChange(element(by.css('app-time-range 
.time-range-value')), currentTimeRangeVal[1])
    +    .then(() => waitForTextChange(element(by.css('app-time-range 
.time-range-text')), currentTimeRangeVal[0]))
    +  }
    +
    +  async selectQuickTimeRangeAndGetTimeRangeAndTimeText(quickRange: string) 
{
    +    let currentTimeRangeVal: any = [];
    +    // return element.all(by.css('app-time-range button span')).getText()
    --- End diff --
    
    @iraghumitra what was the reason for commenting out this test?


> Retrofit UI tests to run reliably during nightly QE runs
> --------------------------------------------------------
>
>                 Key: METRON-1489
>                 URL: https://issues.apache.org/jira/browse/METRON-1489
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Daniel Toth
>            Assignee: Daniel Toth
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to