mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 10:34:15 +00:00
Protractor configuration
This commit is contained in:
@@ -7,8 +7,13 @@ describe('protractor App', function() {
|
|||||||
page = new ProtractorPage();
|
page = new ProtractorPage();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should display message saying app works', () => {
|
it('should display title "DSpace"', () => {
|
||||||
page.navigateTo();
|
page.navigateTo();
|
||||||
expect(page.getParagraphText()).toEqual('app works!');
|
expect(page.getPageTitleText()).toEqual('DSpace');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should display title "Hello, World!"', () => {
|
||||||
|
page.navigateTo();
|
||||||
|
expect(page.getFirstPText()).toEqual('Hello, World!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -5,7 +5,11 @@ export class ProtractorPage {
|
|||||||
return browser.get('/');
|
return browser.get('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
getParagraphText() {
|
getPageTitleText() {
|
||||||
return element(by.css('app-root h1')).getText();
|
return browser.getTitle();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
getFirstPText() {
|
||||||
|
return element(by.xpath('//p[1]')).getText();
|
||||||
|
}
|
||||||
|
}
|
12
package.json
12
package.json
@@ -46,9 +46,11 @@
|
|||||||
"debug:build:prod": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js --config webpack.prod.config.ts",
|
"debug:build:prod": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js --config webpack.prod.config.ts",
|
||||||
"lint": "tslint \"src/**/*.ts\" || true",
|
"lint": "tslint \"src/**/*.ts\" || true",
|
||||||
"global": "npm install -g angular-cli nodemon npm-check-updates rimraf ts-node typedoc typescript webpack webpack-bundle-size-analyzer marked node-gyp protractor",
|
"global": "npm install -g angular-cli nodemon npm-check-updates rimraf ts-node typedoc typescript webpack webpack-bundle-size-analyzer marked node-gyp protractor",
|
||||||
"postglobal": "npm run webdriver:update -- --standalone",
|
"postglobal": "npm link protractor",
|
||||||
"webdriver:start": "webdriver-manager start",
|
"protractor": "protractor",
|
||||||
"webdriver:update": "webdriver-manager update"
|
"e2e": "npm run protractor",
|
||||||
|
"webdriver:start": "webdriver-manager start --seleniumPort 4444",
|
||||||
|
"webdriver:update": "webdriver-manager update --standalone"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.2.4",
|
"@angular/common": "2.2.4",
|
||||||
@@ -128,6 +130,8 @@
|
|||||||
"webpack-bundle-analyzer": "1.4.1",
|
"webpack-bundle-analyzer": "1.4.1",
|
||||||
"webpack-dev-middleware": "1.8.4",
|
"webpack-dev-middleware": "1.8.4",
|
||||||
"webpack-dev-server": "2.1.0-beta.11",
|
"webpack-dev-server": "2.1.0-beta.11",
|
||||||
"webpack-merge": "1.0.2"
|
"webpack-merge": "1.0.2",
|
||||||
|
"jasmine-spec-reporter": "~2.7.0",
|
||||||
|
"protractor-istanbul-plugin": "~2.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -6,14 +6,67 @@ var SpecReporter = require('jasmine-spec-reporter');
|
|||||||
|
|
||||||
exports.config = {
|
exports.config = {
|
||||||
allScriptsTimeout: 11000,
|
allScriptsTimeout: 11000,
|
||||||
|
// -----------------------------------------------------------------
|
||||||
|
// Uncomment to run tests using a remote Selenium server
|
||||||
|
//seleniumAddress: 'http://selenium.address:4444/wd/hub',
|
||||||
|
// Change to 'false' to run tests using a remote Selenium server
|
||||||
|
directConnect: true,
|
||||||
|
// Change if the website to test is not on the localhost
|
||||||
|
baseUrl: 'http://localhost:4200/',
|
||||||
|
// -----------------------------------------------------------------
|
||||||
specs: [
|
specs: [
|
||||||
'./e2e/**/*.e2e-spec.ts'
|
'./e2e/**/*.e2e-spec.ts'
|
||||||
],
|
],
|
||||||
capabilities: {
|
// -----------------------------------------------------------------
|
||||||
'browserName': 'chrome'
|
// Browser and Capabilities: PhantomJS
|
||||||
},
|
// -----------------------------------------------------------------
|
||||||
directConnect: true,
|
// capabilities: {
|
||||||
baseUrl: 'http://localhost:4200/',
|
// 'browserName': 'phantomjs',
|
||||||
|
// 'version': '',
|
||||||
|
// 'platform': 'ANY'
|
||||||
|
// },
|
||||||
|
// -----------------------------------------------------------------
|
||||||
|
// Browser and Capabilities: Chrome
|
||||||
|
// -----------------------------------------------------------------
|
||||||
|
capabilities: {
|
||||||
|
'browserName': 'chrome',
|
||||||
|
'version': '',
|
||||||
|
'platform': 'ANY'
|
||||||
|
},
|
||||||
|
// -----------------------------------------------------------------
|
||||||
|
// Browser and Capabilities: Firefox
|
||||||
|
// -----------------------------------------------------------------
|
||||||
|
// capabilities: {
|
||||||
|
// 'browserName': 'firefox',
|
||||||
|
// 'version': '',
|
||||||
|
// 'platform': 'ANY'
|
||||||
|
// },
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------
|
||||||
|
// Browser and Capabilities: MultiCapabilities
|
||||||
|
// -----------------------------------------------------------------
|
||||||
|
//multiCapabilities: [
|
||||||
|
// {
|
||||||
|
// 'browserName': 'phantomjs',
|
||||||
|
// 'version': '',
|
||||||
|
// 'platform': 'ANY'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// 'browserName': 'chrome',
|
||||||
|
// 'version': '',
|
||||||
|
// 'platform': 'ANY'
|
||||||
|
// }
|
||||||
|
// {
|
||||||
|
// 'browserName': 'firefox',
|
||||||
|
// 'version': '',
|
||||||
|
// 'platform': 'ANY'
|
||||||
|
// }
|
||||||
|
//],
|
||||||
|
|
||||||
|
plugins : [{
|
||||||
|
path: 'node_modules/protractor-istanbul-plugin'
|
||||||
|
}],
|
||||||
|
|
||||||
framework: 'jasmine',
|
framework: 'jasmine',
|
||||||
jasmineNodeOpts: {
|
jasmineNodeOpts: {
|
||||||
showColors: true,
|
showColors: true,
|
||||||
|
Reference in New Issue
Block a user