Created
July 16, 2013 21:57
-
-
Save deanapeterson/6015536 to your computer and use it in GitHub Desktop.
Testing for scrollbar in Jasmine/Karma
This file contains 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
//Pseudo Code | |
it(" should have a scrollbar", function(){ | |
var tableWrap, table, tablePosTop, newTablePosTop; | |
tableWrap = $(".tableWrapper"); | |
table = tableWrap.find("table"); | |
tablePosTop = table.position().top; | |
tableWrap.animate({scrollTop:100},0); | |
newTablePosTop = table.position().top; | |
expect( tablePosTop ).toBeGreaterThan( newTablePosTop ); //true | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment