Skip to content
This repository was archived by the owner on Dec 16, 2023. It is now read-only.

Status code 0 when submitting form #1146

Closed
useo6 opened this issue Jan 1, 2018 · 1 comment
Closed

Status code 0 when submitting form #1146

useo6 opened this issue Jan 1, 2018 · 1 comment

Comments

@useo6
Copy link

useo6 commented Jan 1, 2018

I'm trying to test my register form, but I'm having some trouble. When submitting the form, Zombie tells me that a new window was opened:

zombie Submit form to http://localhost:58099/account/register +0ms
zombie Opened window http://localhost:58099/account/register +4ms

That's confusing me at the moment and furthermore, dumping the browser output to the console after submitting the form, shows me the following:

Zombie: 5.0.7
URL: http://localhost:58099/account/register

History:
1: http://localhost:58099/account/register
2: http://localhost:58099/account/register

Cookies:

Storage:
Document:

Event loop: waiting for true events
undefined

When I check the browser.statusCode, the code is 0... but... why 0? I would expect 200 or maybe 500, but not 0...

The code is the following:

describe('Checking /account/register', function () {
  const browser = new Browser({ site: 'http://localhost:58099', debug: true })

  before((done) => {
    browser.visit('/account/register', done)
  })

  describe('Check valid data...', () => {
    before((xDone_p) => {
      browser.debug()
      browser.fill('email', '[email protected]')
      browser.fill('acceptterms', 'on')
      browser.pressButton('Register', () => {
        console.log(browser.dump())
        xDone_p()
      })
    })

    it('test', () => {
      console.log(browser.statusCode)
      expect(browser.statusCode).to.be(200)
    })
  })
})
@useo6
Copy link
Author

useo6 commented Jan 4, 2018

I'll close the ticket because all of the errors were on my side.

@useo6 useo6 closed this as completed Jan 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant