Created
August 21, 2013 23:22
-
-
Save ngokevin/6301463 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
var suite = require('./kasperle').suite(); | |
suite.run('/', function(test, waitFor) { | |
test('Click close prompt', function(assert) { | |
suite.evaluate(function() { | |
// Set chromeless since prompt only shows on browsers. | |
window.require(['capabilities', 'storage'], function(capabilities, storage) { | |
capabilities.chromeless = false; | |
storage.setItem('mktapp-prompt-closed', true); | |
}); | |
}); | |
waitFor(function() { | |
// Wait for prompt. | |
return suite.exists('#mktapp-prompt .prompt-text'); | |
}, function() { | |
// Click the close button and check the prompt goes away. | |
assert.selectorExists('#mktapp-prompt .prompt-text'); | |
suite.press('#mktapp-prompt .prompt-close'); | |
assert.selectorDoesNotExist('#mktapp-prompt .prompt-text'); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment