-
Notifications
You must be signed in to change notification settings - Fork 0
/
third.spec.js
35 lines (25 loc) · 954 Bytes
/
third.spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
describe("Protractor Demo App",function(){
var firstNumber = element(by.model('first'));
var secondNumber = element(by.model('second'));
var gobtn =element(by.id('gobutton'));
var latestResult = element(by.binding('latest'));
beforeEach(function(){
browser.get('http://juliemr.github.io/protractor-demo/');
});
it("should have a title",function(){
expect(browser.getTitle()).toEqual('Super Calculator');
});
it('should add two numbers',function(){
firstNumber.sendKeys('200');
secondNumber.sendKeys('300');
gobtn.click();
expect(latestResult.getText()).toEqual('500');
});
it('should add two more numbers',function(){
firstNumber.sendKeys('600');
secondNumber.sendKeys('300');
gobtn.click();
expect(latestResult.getText()).toEqual('900'); //this is totally fine and can be done
});
browser.takeScreenshot();
});