mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-10 06:52:05 +01:00
Started to implement webdriver tests
This commit is contained in:
17
conf.js
Normal file
17
conf.js
Normal 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: []
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -14,7 +14,7 @@ module.exports = function(config) {
|
|||||||
'src/js/app.js',
|
'src/js/app.js',
|
||||||
'src/js/components/*.js',
|
'src/js/components/*.js',
|
||||||
'src/js/app/**/*.js',
|
'src/js/app/**/*.js',
|
||||||
'tests/**/*.js'
|
'tests/unit/**/*.js'
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
29
tests/integration/spec.js
Normal file
29
tests/integration/spec.js
Normal 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')
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user