mozilla / fxa-content-server

DEPRECATED - Migrated to https://github.com/mozilla/fxa
Mozilla Public License 2.0
163 stars 120 forks source link

Brittle functional test causes false positives #966

Closed zaach closed 10 years ago

zaach commented 10 years ago

This particular functional test in tests/functional/settings.js is a serious offender: sign in, try to change password with an incorrect old password.

There are a couple of other functional tests that use wait (in reset_password.js and confirm.js) that might deserve some attention, too.

vladikoff commented 10 years ago
// brittle, but some processing time.
        .wait(2000)

        .elementByCssSelector('.error').isDisplayed()
          .then(function (isDisplayed) {
            assert.isTrue(isDisplayed);
          })
        .end()

this can probably use

.waitForElementByCssSelector

I'll PR something tomorrow if this isn't updated.

zaach commented 10 years ago

@vladikoff Maybe, I think that's not being used because the element is already in the DOM but not displayed. I'm looking now.

vladikoff commented 10 years ago
waitForVisibleByCssSelector

might also work, I'll have to check. Via https://github.com/admc/wd/blob/v0.2.2/doc/jsonwire-full-mapping.md

zaach commented 10 years ago

Yep, I'm trying it out now.

pdehaan commented 10 years ago

wait(Number.POSITIVE_INFINITY)?