Started to implement webdriver tests

This commit is contained in:
Borys Levytskyi
2015-04-12 12:43:01 +03:00
parent 3f4756463e
commit 66b3b9e344
7 changed files with 47 additions and 1 deletions

17
conf.js Normal file
View File

@@ -0,0 +1,17 @@
exports.config = {
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
specs: [
'./tests/integration/spec.js'
],
capabilities: {
'browserName': 'chrome'
},
chromeOptions: {
binary: "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",
args: [],
extensions: []
}
};

View File

@@ -14,7 +14,7 @@ module.exports = function(config) {
'src/js/app.js',
'src/js/components/*.js',
'src/js/app/**/*.js',
'tests/**/*.js'
'tests/unit/**/*.js'
]
});
};

29
tests/integration/spec.js Normal file
View File

@@ -0,0 +1,29 @@
var By = protractor.By;
var driver = browser.driver;
var appUrl = 'http://localhost:63342/BitwiseCmd/src/';
describe('a quick test', function(){
it('should be true', function(){
expect(true).toBe(true);
});
});
describe('launch of application', function() {
it('should have title', function() {
driver.get(appUrl).then(function() {
expect(driver.getTitle()).toEqual('BitwiseCmd');
});
});
it('should have no errors title', function() {
driver.get(appUrl).then(function() {
driver.findElements(By.css('.result .error')).then(function(els) {
expect(els.length).toBe(0, "There should be no errors on autolaunch");
});
});
});
//el.sendKey('asd');
//expect(el.text()).toBe('asd')
});