Last active
August 29, 2015 14:17
-
-
Save rwjblue/1d0314fb2612ba929e81 to your computer and use it in GitHub Desktop.
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
test("Tour next, back, and cancel builtInButtons work", function(assert) { | |
assert.expect(6); | |
visit('/').then(function() { | |
assert.equal($('body.shepherd-active').length, 1, "Body gets class of shepherd-active, when shepherd becomes active"); | |
assert.equal($('.shepherd-enabled').length, 2, "attachTo element and tour get shepherd-enabled class"); | |
assert.equal($('#shepherdOverlay').length, 1, "#shepherdOverlay exists"); | |
click('.shepherd-enabled .next-button'); | |
//$("a:contains('Next'):visible")[0].click(); | |
assert.equal($("a:contains('Back'):visible").length, 1, "Ensure that the back button appears"); | |
click('.shepherd-enabled .back-button'); | |
//$("a:contains('Back'):visible")[0].click(); | |
assert.equal($("a:contains('Back'):visible").length, 0, "Ensure that the back button disappears"); | |
click('.shepherd-enabled .cancel-button'); | |
//$("a:contains('Exit'):visible")[0].click(); | |
assert.equal($('[class^=shepherd-button]:visible').length, 0, "Ensure that all buttons are gone, after exit"); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment