-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspec.js
More file actions
32 lines (30 loc) · 1022 Bytes
/
spec.js
File metadata and controls
32 lines (30 loc) · 1022 Bytes
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
describe('Protractor Demo App', function () {
beforeEach(() => {
browser.get('http://juliemr.github.io/protractor-demo/');
})
it('first input', () => {
let first = element(by.css('.input-small'));
first.sendKeys('2');
expect(first.getAttribute('value')).toEqual('2');
});
it('two input', () => {
let els = element.all(by.css('.input-small'));
let first = els.get(0);
// let first = els.first(); same as get(0)
first.sendKeys('2');
let sec = els.get(1);
// let sec = els.last(); same as get(1)
sec.sendKeys('4');
});
fit('calculate', () => {
let els = element.all(by.css('.input-small'));
let first = els.get(0);
// let first = els.first(); same as get(0)
first.sendKeys('2');
let sec = els.get(1);
// let sec = els.last();
sec.sendKeys('4');
element(by.id('gobutton')).click();
expect($('h2').getText()).toEqual('6');
})
});