M
M
majestik2016-11-25 17:06:03
Angular
majestik, 2016-11-25 17:06:03

How to catch ngToast in protractor?

Unable to test ngToast popup. Who does it how? My code:

var HomePage = require('./home.pageObject');

describe('Home Page tests', function () {
    var homePage = new HomePage();
    var EC = protractor.ExpectedConditions;

    beforeEach(function () {
        browser.get('/#/');
    });

    it('should fail login', function () {
        var toast = $('.ng-toast');
        homePage.signinBtn.click();
        homePage.login('admin', 'Password')
            .then(function () {
                var toast = $('.alert');
                browser.wait(EC.visibilityOf(toast), 3000);
            });
    });
});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question