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

.pressButton does not care redirects? #1095

Closed
s-a opened this issue Nov 14, 2016 · 1 comment
Closed

.pressButton does not care redirects? #1095

s-a opened this issue Nov 14, 2016 · 1 comment

Comments

@s-a
Copy link

s-a commented Nov 14, 2016

I try to test a simple login scenario...

const Browser = require('zombie');

// We're going to make requests to http://example.com/signup
// Which will be routed to our test server localhost:3000
Browser.localhost('localhost', 52585);

describe('User visits signup page', function() {

  const browser = new Browser();

  before(function(done) {
    browser.visit('/Account/Login.aspx?ReturnUrl=%2fterminal%2f', done);
  });

  describe('submits form', function() {

    before(function(done) {
      browser
        .fill('#MainContent_LoginUser_UserName', '***')
        .fill('#MainContent_LoginUser_Password', '***')
        .pressButton('Anmelden', done);
    });

    it('should be successful', function() {
      browser.assert.success();
    });

    it('should see welcome page', function() {
      browser.assert.text('title', 'development.Terminal');
    });
  });
});

This code stay on the login page. How to log some http states if .pressButton is a submit button?
Do I need to take care of JavaScript errors while using zombie?

However ... In fact my avatar fits best to this repository 👍 😄

@s-a
Copy link
Author

s-a commented Nov 30, 2016

This was because client side page rendering.

@s-a s-a closed this as completed Nov 30, 2016
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