Created
November 7, 2013 11:58
-
-
Save jhuska/7353472 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test(fixture, element) { | |
// given | |
// var changeCallback = jasmine.createSpy('changeCallback'); | |
var options = { | |
disabled: true, | |
// change: changeCallback | |
}; | |
// when | |
element.pickList(options); | |
// then | |
var listClassAttr = element.attr('class'); | |
var sourceClassAttr = element.find('.source').attr('class'); | |
var targetClassAttr = element.find('.target').attr('class'); | |
var buttonsClasses = element.find('.btn'); | |
expect(listClassAttr).toContain('disabled'); | |
expect(sourceClassAttr).toContain('disabled'); | |
expect(targetClassAttr).toContain('disabled'); | |
buttonsClasses.each(function (index) { | |
expect(this.attr('disabled')).toEqual(true); | |
}); | |
debugger; | |
element.pickList('option', 'disabled', 'false'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jhuska
this will not work? line 23
expect( $(this).attr('disabled')).toEqual(true);
this
>>>$(this)