This file contains 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
suites: { | |
login: 'tests/e2e/login/**/*Spec.js', | |
transacoes: [ | |
'tests/e2e/transacao_boleto/**/*Spec.js', | |
'tests/e2e/transacao_cartao/**/*Spec.js' | |
] | |
}, |
This file contains 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
var ApiPage = require('./page-object/apiPage.po.js'); | |
var NgBindPage = require('./page-object/ngBindPage.po.js'); | |
var TextAreaPage = require('./page-object/textareaPage.po.js'); | |
describe('Protractor Demo App', function() { | |
var apiPage = new ApiPage(); | |
var ngBindPage = new NgBindPage(); | |
var textAreaPage = new TextAreaPage(); | |
beforeEach(function() { |
This file contains 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
var TextAreaPage = function(){ | |
this.title = 'AngularJS: API: textarea'; | |
this.searchTextArea = element(by.linkText('textarea')); | |
} | |
module.exports = TextAreaPage; |
This file contains 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
var NgBindPage = function(){ | |
this.title = 'AngularJS: API: ngBind'; | |
} | |
module.exports = NgBindPage; |
This file contains 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
var ApiPage = function(){ | |
this.title = 'AngularJS: API: API Reference' | |
this.dirNgBind = element(by.linkText('ngBind')); | |
this.searchField = element(by.name('as_q')); | |
}; | |
ApiPage.prototype.visit = function(){ | |
browser.get('https://docs.angularjs.org/api'); | |
}; |
This file contains 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('Protractor Demo App', function() { | |
beforeEach(function() { | |
browser.get('https://docs.angularjs.org/api'); | |
browser.driver.manage().window().maximize(); | |
}); | |
it('Deve conter um título', function() { | |
expect(browser.getTitle()).toEqual('AngularJS: API: API Reference'); | |
}); |
This file contains 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('Locators', function(){ | |
beforeEach(function() { | |
browser.get('http://juliemr.github.io/protractor-demo/'); | |
browser.driver.manage().window().maximize(); | |
}); | |
it('should locate an element by model', function() { | |
var firstField = element(by.model('first')); | |
expect(firstField.isPresent()).toBe(true); | |
}); |
This file contains 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
it('should locate an element by repeater', function() { | |
var history = element.all(by.repeater('result in memory')); | |
var firstField = element(by.model('first')); | |
var secondField = element.all(by.css('.input-small.ng-pristine.ng-untouched.ng-valid')).get(0); | |
var goButton = element(by.id('gobutton')); | |
firstField.sendKeys(2); | |
secondField.sendKeys(3); | |
goButton.click(); | |
expect(history.count()).toEqual(1); |
This file contains 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
it('should locate an element by model', function() { | |
var firstField = element(by.model('first')); | |
expect(firstField.isPresent()).toBe(true); | |
}); |
This file contains 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
it('should locate an element by binding', function() { | |
var latestResult = element(by.binding('latest')); | |
expect(latestResult.isPresent()).toBe(true); | |
}); |
NewerOlder