Created
January 13, 2017 21:50
-
-
Save javaeeeee/6f2f8d58a468fc77820c2b8f23537455 to your computer and use it in GitHub Desktop.
AngularJS application end-to-end test
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
describe('Hello world', function () { | |
var message = 'AngularJS'; | |
var input = element(by.model('myModel')); | |
beforeEach(function () { | |
browser.get('http://localhost:3000'); | |
}); | |
it('should have title', function () { | |
expect(browser.getTitle()) | |
.toEqual('Hello World AngularJS application'); | |
}); | |
it('should be world', function () { | |
expect(input.getAttribute('value')).toEqual('World'); | |
}); | |
it('should update greeting when data is entered in the input field', | |
function () { | |
input.clear().then(function () { | |
input.sendKeys(message); | |
expect(element(by.binding('myModel')).getText()) | |
.toEqual('Hello ' + message + '!'); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment