Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.attr() does not work properly, potential bug #12

Open
izocan opened this issue Apr 17, 2014 · 4 comments
Open

.attr() does not work properly, potential bug #12

izocan opened this issue Apr 17, 2014 · 4 comments
Assignees

Comments

@izocan
Copy link

izocan commented Apr 17, 2014

i have an html element like this:

<input id="blub" class="ember-view ember-text-field form-control" placeholder="-" disabled="disabled" type="text" data-testid="foo">

I want to assert the disabled attribute as it is described in the docs with:

.attr('[data-testid="foo"]').is('disabled', 'disabled', 'Textfield blub is disabled.')

but it fails saying:
-->0 EXPECTED: disabled
-->0 FOUND: null
-->0 MESSAGE: disabled

Any ideas?

versions:
Win7
dalek-cli 0.0.4
dalekjs local install: 0.0.8

cheers izocan

@asciidisco
Copy link
Member

Mhh, seems like a bug within the attrmethod itself. Does it work when you select the element by ID and/or check the type attribute?

That information would help.

@izocan
Copy link
Author

izocan commented Apr 17, 2014

Hey,

i have a submit button:

<button type="submit" class="btn btn-success" id="loginButton" data-testid="login" disabled="disabled" data-bindattr-11="11" data-ember-action="12">Login</button>

i tried following assertions:

        .attr('#loginButton').is('data-testid', 'login', 'BLUB.') --> Same error like above
        .attr('#loginButton', 'data-testid', 'login') --> success
        .attr('[data-testid="login"]', 'type', 'submit') --> success
        .attr('#loginButton').is('disabled', 'disabled', 'BLUB.') --> same error like above
        .attr('#loginButton', 'class', 'btn btn-success') --> success
        .attr('[data-testid="login"]', 'type', 'submit') --> success
        .attr('#loginButton', 'disabled', 'disabled') --> same error
        .attr('#loginButton', 'type', 'submit') --> Success

hope this helps.

cheers

@asciidisco
Copy link
Member

Thanks, that actually is really helpful. I´m currently in the road not back to the office until next week, but will take care of it then.

@asciidisco
Copy link
Member

Identified the problem.

@asciidisco asciidisco self-assigned this Aug 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants