mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Protractor configuration
This commit is contained in:
@@ -7,8 +7,13 @@ describe('protractor App', function() {
|
||||
page = new ProtractorPage();
|
||||
});
|
||||
|
||||
it('should display message saying app works', () => {
|
||||
it('should display title "DSpace"', () => {
|
||||
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('/');
|
||||
}
|
||||
|
||||
getParagraphText() {
|
||||
return element(by.css('app-root h1')).getText();
|
||||
getPageTitleText() {
|
||||
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",
|
||||
"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",
|
||||
"postglobal": "npm run webdriver:update -- --standalone",
|
||||
"webdriver:start": "webdriver-manager start",
|
||||
"webdriver:update": "webdriver-manager update"
|
||||
"postglobal": "npm link protractor",
|
||||
"protractor": "protractor",
|
||||
"e2e": "npm run protractor",
|
||||
"webdriver:start": "webdriver-manager start --seleniumPort 4444",
|
||||
"webdriver:update": "webdriver-manager update --standalone"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/common": "2.2.4",
|
||||
@@ -128,6 +130,8 @@
|
||||
"webpack-bundle-analyzer": "1.4.1",
|
||||
"webpack-dev-middleware": "1.8.4",
|
||||
"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 = {
|
||||
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: [
|
||||
'./e2e/**/*.e2e-spec.ts'
|
||||
],
|
||||
capabilities: {
|
||||
'browserName': 'chrome'
|
||||
},
|
||||
directConnect: true,
|
||||
baseUrl: 'http://localhost:4200/',
|
||||
// -----------------------------------------------------------------
|
||||
// Browser and Capabilities: PhantomJS
|
||||
// -----------------------------------------------------------------
|
||||
// capabilities: {
|
||||
// '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',
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
|
Reference in New Issue
Block a user