Created
December 21, 2012 07:59
-
-
Save roycollings/4351335 to your computer and use it in GitHub Desktop.
AngularJS E2E: nice way to match against multi-line string.
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
// | |
// Html | |
// | |
<a id="msg1">To start making payments you need to | |
verify your email address by clicking | |
the link in the confirmation email ... | |
</a> | |
// | |
// AngularJS E2E test (inside a "describe", obviously) ... | |
// | |
it('contains a message about starting to make payments etc...', function() { | |
var expectedMsg = [ | |
'To start making payments you need to', | |
'verify your email address by clicking', | |
'the link in the confirmation email ...' | |
].join(' *\n *'); | |
expect(element('#msg1').text()).toMatch(expectedMsg); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment