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

Wait For text timeout not working using nightmare helper #236

Closed
rodrigomaia17 opened this Issue Sep 28, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@rodrigomaia17

rodrigomaia17 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

This comment has been minimized.

Show comment
Hide comment
@c-m-hunt

c-m-hunt Jan 5, 2017

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

c-m-hunt commented Jan 5, 2017

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

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Jan 14, 2017

Member

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'));
    });
  });
Member

DavertMik commented Jan 14, 2017

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