Xolvio/meteor-cucumber test fails


#1

How come these steps fail with a timeout error?

this.Then(/^I am at the "([^"]*)"$/, function (loginPage, callback) {
      this.client.url(url.resolve(process.env.ROOT_URL, '/login')); // go to login page
      this.client.waitForVisible('.loginForm').call(callback);  // wait for element to load
    });

    this.When(/^I click the signup link "([^"]*)"$/, function (signUpLink, callback) {
      this.client.click('.register').call(callback);
    });

    this.Then(/^I am at the "([^"]*)"$/, function (registrationPage, callback) {
      this.client.waitForVisible(".registerModal").call(callback);
    });

this.client.click('.register').call(callback); should take me to the page where the .registerModal element exists but the waitForVisible is giving me a timeout error.


#2

I use waitForExist() before waitForVisible() and now it works.