mercredi 14 décembre 2016

CodeceptJs: why I have error "Error while waiting for Protractor to sync with the page: true"?

I have some angular app, which I would like to test by some acceptance tests. So I have extremely simple CodeceptJS test:

Feature('Base');

Scenario('test something', (I) => {
    I.amOnPage('http://localhost:8080');
    I.fillField("#username", "user0");
    I.fillField("#password", "11111111");
    I.click("Login");
    I.see("To Me");
})

OK, I start test and see this output:

Base --
 test something
 • I am on page "http://localhost:8080"
 • I fill field "#username", "user0"
 • I fill field "#password", "11111111"
 • I click "Login"
 • I see "To Me"
 ✖ FAILED in 3463ms


-- FAILURES:

  1) Base: test something:
     Error while waiting for Protractor to sync with the page: true

  Scenario Steps:

  - I.see("To Me") at Test.Scenario (base_test.js:10:3)
  - I.click("Login") at Test.Scenario (base_test.js:9:7)
  - I.fillField("#password", "11111111") at Test.Scenario (base_test.js:8:7)
  - I.fillField("#username", "user0") at Test.Scenario (base_test.js:7:7)
  - I.amOnPage("http://localhost:8080") at Test.Scenario (base_test.js:6:7)



  Run with --verbose flag to see NodeJS stacktrace


  FAIL  | 0 passed, 1 failed   // 3s

After click I have some async request, which is gets data and renders interface with button "To me".

I suspect that last error means that last assert "I see" really don't see "To me", so it failed.

Am I right or there is another reason about this ? How can I check context, where CodeceptJS searches text "To me" ?

Aucun commentaire:

Enregistrer un commentaire