"with": "src/environments/environment.prod.ts"
}
]
+ },
+ "e2e": {
+ "optimization": false,
+ "outputHashing": "all",
+ "sourceMap": false,
+ "extractCss": true,
+ "namedChunks": false,
+ "aot": true,
+ "extractLicenses": true,
+ "vendorChunk": false,
+ "buildOptimizer": false,
+ "fileReplacements": [
+ {
+ "replace": "src/index.html",
+ "with": "src/index.e2e.html"
+ }
+ ]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
- "browserTarget": "eg:build"
+ "browserTarget": "eg:build",
+ "servePath": "/eg2/en-US/"
},
"configurations": {
"production": {
"browserTarget": "eg:build:production"
+ },
+ "e2e": {
+ "browserTarget": "eg:build:e2e",
+ "publicHost": "http://localhost:4200/eg2/en-US"
}
}
},
export class AppPage {
navigateTo() {
- return browser.get('/');
+ browser.waitForAngularEnabled(false);
+ return browser.get('/eg2/en-US/');
}
getParagraphText() {
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
- 'browserName': 'chrome'
+ 'browserName': 'firefox',
+ 'moz:firefoxOptions': {
+ args: [ "--headless" ]
+ }
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
+
--- /dev/null
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title i18n="Page Title">Evergreen</title>
+ <base href="/eg2">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="icon" type="image/x-icon" href="favicon.ico">
+</head>
+<body>
+ <eg-root></eg-root>
+ <script src="http://127.0.0.1:80/IDL2js"></script>
+ <script src="http://127.0.0.1:80/js/dojo/opensrf/JSON_v1.js"></script>
+ <script src="http://127.0.0.1:80/js/dojo/opensrf/opensrf.js"></script>
+ <script src="http://127.0.0.1:80/js/dojo/opensrf/opensrf_ws.js"></script>
+</body>
+</html>
+
[source,sh]
------------------------------------------------------------------------------
-# build and run tests
ng build --prod
------------------------------------------------------------------------------
+
[source,sh]
------------------------------------------------------------------------------
CHROME_BIN=/path/to/chrome npm run test
+node_modules/protractor/bin/webdriver-manager update && ng e2e --dev-server-target=""
------------------------------------------------------------------------------
Configuration and compilation instructions