Skip to content

Wait For text timeout not working using nightmare helper #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rodrimaia opened this issue Sep 28, 2016 · 2 comments
Closed

Wait For text timeout not working using nightmare helper #236

rodrimaia opened this issue Sep 28, 2016 · 2 comments

Comments

@rodrimaia
Copy link

rodrimaia commented Sep 28, 2016

With the following scenario, the timeout is failing only after 30000msec

Scenario('Timeout  failing', (I) => {
  I.amOnPage('http://www.github.com');
  I.see('Welcome home');
  I.click('.header-logo-invertocat');
  I.waitForText('Priced for everyone', 2); // should fail after 2 seconds
});
codeceptjs run --steps 

-- FAILURES:

  1) login: Login with user list:
     .wait() timed out after 30000msec

Update: If I run
I.wait(1); I.see('Priced for everyone');
then it works.

but if I run only the
I.see('Priced for everyone')
then i got:

(node:47217) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot create property 'stack' on string 'codeceptjs is not defined' ^C%

@c-m-hunt
Copy link

c-m-hunt commented Jan 5, 2017

I'm having the same issue - did you get to the bottom of it?

@DavertMik
Copy link
Contributor

waitForText should work in 0.4.13 for all helpers. We have internal tests that prove it:


  describe('#waitForText', () => {
    it('should wait for text', () => {
      return I.amOnPage('/dynamic')
        .then(() => I.dontSee('Dynamic text'))
        .then(() => I.waitForText('Dynamic text', 2))
        .then(() => I.see('Dynamic text'));
    });

    it('should wait for text in context', () => {
      return I.amOnPage('/dynamic')
        .then(() => I.dontSee('Dynamic text'))
        .then(() => I.waitForText('Dynamic text', 2, '#text'))
        .then(() => I.see('Dynamic text'));
    });
  });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants