dsheiko/puppetry

page assert HTTP/S Response causes page wait for Timeout to be ignored

MooseTheCoder opened this issue · 5 comments

I have variables and snippets defined for accessing different parts of our application.

The Variables LOGIN_URL and LOGIN_EMAIL are visible
The Variable LOGIN_PASSWORD is hidden.
The Targets LOGIN_EMAIL and LOGIN_PASSWORD are HTML inputs
The Target LOGIN_BUTTON is a HTML button

The snippet USER_LOGIN :

  • Sets the browser to 1920x180
  • Navigates to {{ LOGIN_URL }}
  • Waits for 3000ms
  • Types {{ LOGIN_EMAIL }} in to the LOGIN_EMAIL target
  • Types {{ LOGIN_PASSWORD }} into the LOGIN_PASSWORD target
  • Clicks the LOGIN_BUTTON target
  • Waits for 5000ms

The snippet NAVIGATE_JOBS

  • Navigates to our Jobs page
  • Waits for 5000ms

I have created a Test Suite, Jobs Page (jobs-page.json) with the Groups Jobs Page Loads and Jobs Page Search - Global

Jobs Page Loads

  • Logs the user in using the snippet USER_LOGIN
  • Loads the Jobs page using the snippet NAVIGATE_JOBS
  • Checks that an element is no longer observable on the page.

Jobs Page Search - Global has a test case Search Something that

  • Uses a HTML input field to enter text
  • Wait for 3000ms
  • Assert there was a POST request with a 200 response to part of our API

The Jobs Page suite was working fine until I added the Jobs Page Search - Global group, when I added it, I noticed that the timeouts where being ignored, If I disabled the Jobs Page Search - Global group, the timeouts work as expected.

If I enable it again they stop working.

If I remove the assertHTTP/SResponse case, the timeouts work as expected.

I don't know if this case is unique to my setup or if this is an issue.

Any help would be appreciated.

Thank you. I'll try to tackle in the next release

I'm happy to fire over any other details that might help out

@MooseTheCoder can you please clone your project, remove all sensitive info (like endpoints) and share with me via https://gitter.im/dsheiko/puppetry or Slack? I cannot reproduce the issue. I suspect it can be something wrong with snippets rather than with page.waitForResponse

Seems to have resolved the issue, I'll keep an eye on it