Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Unable to use negation on Jasmine matchers #282

Closed
cyranix opened this issue Nov 22, 2013 · 1 comment
Closed

Unable to use negation on Jasmine matchers #282

cyranix opened this issue Nov 22, 2013 · 1 comment

Comments

@cyranix
Copy link

cyranix commented Nov 22, 2013

Just starting out with Protractor and unsure whether this is a defect or my own mistake:

it 'should accept a valid email address and password', ->
    browser.get 'app/#/login'
    url = browser.getCurrentUrl()

    loginButton = element `by`.xpath '//form[1]/input[@type="submit"]'
    emailField = element `by`.name 'login-email'
    passwordField = element `by`.name 'login-password'

    emailField.sendKeys('test@example.com')
    passwordField.sendKeys('test')
    loginButton.click()
    ptor.waitForAngular()
    expect(browser.getCurrentUrl()).not.toEqual(url)

This test yields TypeError: Cannot call method 'toEqual' of undefined. When my app is a little further along, I can change this test to be a positive check for a known URL instead of a negative check against the login URL, but I didn't see this removed capability mentioned in the docs so I thought it would be worth raising an issue.

@juliemr
Copy link
Member

juliemr commented Nov 22, 2013

You caught it in-between 'fixed' and 'released'. Should be out in 0.13.0

Dupe of #139

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants