summaryrefslogtreecommitdiffstats
path: root/so-monitoring/so-monitoring-ui/src/main/frontend/e2e
diff options
context:
space:
mode:
authorwaqas.ikram <waqas.ikram@ericsson.com>2018-08-21 17:35:35 +0100
committerByung-Woo Jun <byung-woo.jun@ericsson.com>2018-09-12 19:41:01 +0000
commit412309940cfd09a3698feded384340354178f4fe (patch)
tree8e390760d1f05300a23ecf2bb92949831f533eb4 /so-monitoring/so-monitoring-ui/src/main/frontend/e2e
parentdcf0b71f3fd109f2c2e6623ba1d61fffcaa775d2 (diff)
SO Monitoring UI
Change-Id: I6f1c13119d18b8731a02c8559bb1484ec84d6041 Issue-ID: SO-726 Signed-off-by: waqas.ikram <waqas.ikram@ericsson.com> Signed-off-by: Ronan Kenny <ronan.kenny@ericsson.com>
Diffstat (limited to 'so-monitoring/so-monitoring-ui/src/main/frontend/e2e')
-rw-r--r--so-monitoring/so-monitoring-ui/src/main/frontend/e2e/protractor.conf.js28
-rw-r--r--so-monitoring/so-monitoring-ui/src/main/frontend/e2e/src/app.e2e-spec.ts14
-rw-r--r--so-monitoring/so-monitoring-ui/src/main/frontend/e2e/src/app.po.ts11
-rw-r--r--so-monitoring/so-monitoring-ui/src/main/frontend/e2e/tsconfig.e2e.json13
4 files changed, 66 insertions, 0 deletions
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/protractor.conf.js b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/protractor.conf.js
new file mode 100644
index 0000000000..ba328a64b7
--- /dev/null
+++ b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/protractor.conf.js
@@ -0,0 +1,28 @@
+// Protractor configuration file, see link for more information
+// https://github.com/angular/protractor/blob/master/lib/config.ts
+
+const { SpecReporter } = require('jasmine-spec-reporter');
+
+exports.config = {
+ allScriptsTimeout: 11000,
+ specs: [
+ './src/**/*.e2e-spec.ts'
+ ],
+ capabilities: {
+ 'browserName': 'chrome'
+ },
+ directConnect: true,
+ baseUrl: 'http://localhost:4200/',
+ framework: 'jasmine',
+ jasmineNodeOpts: {
+ showColors: true,
+ defaultTimeoutInterval: 30000,
+ print: function() {}
+ },
+ onPrepare() {
+ require('ts-node').register({
+ project: require('path').join(__dirname, './tsconfig.e2e.json')
+ });
+ jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
+ }
+}; \ No newline at end of file
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/src/app.e2e-spec.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/src/app.e2e-spec.ts
new file mode 100644
index 0000000000..ea758985ec
--- /dev/null
+++ b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/src/app.e2e-spec.ts
@@ -0,0 +1,14 @@
+import { AppPage } from './app.po';
+
+describe('workspace-project App', () => {
+ let page: AppPage;
+
+ beforeEach(() => {
+ page = new AppPage();
+ });
+
+ it('should display welcome message', () => {
+ page.navigateTo();
+ expect(page.getParagraphText()).toEqual('Welcome to ONAP-SO-Monitor!');
+ });
+});
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/src/app.po.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/src/app.po.ts
new file mode 100644
index 0000000000..625420f7c1
--- /dev/null
+++ b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/src/app.po.ts
@@ -0,0 +1,11 @@
+import { browser, by, element } from 'protractor';
+
+export class AppPage {
+ navigateTo() {
+ return browser.get('/');
+ }
+
+ getParagraphText() {
+ return element(by.css('app-root h1')).getText();
+ }
+}
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/tsconfig.e2e.json b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/tsconfig.e2e.json
new file mode 100644
index 0000000000..a6dd622028
--- /dev/null
+++ b/so-monitoring/so-monitoring-ui/src/main/frontend/e2e/tsconfig.e2e.json
@@ -0,0 +1,13 @@
+{
+ "extends": "../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../out-tsc/app",
+ "module": "commonjs",
+ "target": "es5",
+ "types": [
+ "jasmine",
+ "jasminewd2",
+ "node"
+ ]
+ }
+} \ No newline at end of file