protractor-build-verification-testreport
Version:
A Node.js module used to generate readability HTML test report based on Protractor environment
30 lines (24 loc) • 925 B
JavaScript
describe('Protractor Demo App', function() {
var firstNumber = element(by.model('first'));
var secondNumber = element(by.model('second'));
var goButton = 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 named "Super Calculator"', function() {
expect(browser.getTitle()).toEqual('Super Calculator');
});
it('should add one and two and the result must be equal to three', function() {
firstNumber.sendKeys(1);
secondNumber.sendKeys(2);
goButton.click();
expect(latestResult.getText()).toEqual('3');
});
it('should add one and two (This test case intentionally mocks failed status)', function() {
firstNumber.sendKeys(1);
secondNumber.sendKeys(2);
goButton.click();
expect(latestResult.getText()).toEqual('43');
});
});