Protractor, what does timeout mean under expected conditions?

Protractor: version 1.8.0

browser.wait(EC.presenceOf(element), 3000);

what exactly are 3 seconds worth? and does an error occur when 3 seconds have passed and the item was not found? or is the test just going on?

I checked the test with

element(by.id('#input')).sendKeys('foo');    
browser.wait(EC.presenceOf(element(by.xpath(BAD-LOCATOR)), 3000));
element(by.id('#input')).sendKeys('bar');

BAD-LOCATOR is just an xpath referring to an element that does not exist. but after evaluating this line, the test waits for this time until it hits the jasmine defaultTimeoutInterval timeout (I set the value to 25 seconds). Why doesn't this fail after 3 seconds since the promise was not resolved within 3 seconds? I expect wait () to fail, and the second sendKeys command will execute from the moment it is next in the control flow.

, "foo" , (: - - Async , jasmine.DEFAULT_TIMEOUT_INTERVAL.). 3 . "bar'never ".

+4
1

-, 3 , , -. , ,

 describe("long asynchronous specs", function() {
    beforeEach(function(done) {
      done();
    }, 1000);

Jasmine

0

All Articles