Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Returned promises do not get resolved #1757

@kmc059000

Description

@kmc059000

I was previously on 1.3.1 and just upgraded to 1.6.1. The following test worked in 1.3.1:

it('should use expect in then()', function() {
    element(by.css('#el')).isDisplayed().then(function(isDisplayed) {
        //do less trivial stuff here
        console.log('i expect this to be printed');
        expect(isDisplayed).toBe(true);
        browser.pause();
    });
});

In 1.3.1, the expectation is evaluated, a message is logged, and protractor pauses. However in 1.6.1, I have not seen any evidence that my callback that is passed into then() is ever called.

I also tried updating to 1.4.0 instead of 1.6.1, and I received the same issue. I have not upgraded to jasmine 2.

Any ideas what may cause this? Nothing stood out to me in the

I just tried this, and protractor prints that there is 1 test, and only 1 assertion. which is not correct since there are 3:

it('should expect things', function() {
    //these are ignored
    expect(element(by.css('#a')).isDisplayed()).toBe(true);
    expect(element(by.css('#a')).isDisplayed()).toBe(false);

    //this is evaluated
    expect(true).toBe(false);
});

Thanks, let me know if there is more information you need

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions