diff options
author | Saravanan, Madheswaran <msaravanan@in.ibm.com> | 2018-11-07 18:36:41 -0500 |
---|---|---|
committer | Saravanan, Madheswaran <msaravanan@in.ibm.com> | 2018-11-07 18:36:41 -0500 |
commit | f1e9c646787225109f6c7ee66a088889056f89ee (patch) | |
tree | 28e767d1184c0dfe40a8405cc4a120048df74e83 /ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e | |
parent | 97e29f1fe153f283133c560642a9c5fca16c87a0 (diff) |
Bootstrapping hybrid app (Angular v1 and v6)
Issue-ID: PORTAL-356
Change-Id: I1ee7f6a51eb71dff2128a112afdefff5776f2ffe
Change-Id: I1ee7f6a51eb71dff2128a112afdefff5776f2ffe
Signed-off-by: Saravanan, Madheswaran <msaravanan@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e')
4 files changed, 66 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/protractor.conf.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/protractor.conf.js new file mode 100644 index 00000000..86776a39 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/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/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/src/app.e2e-spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/src/app.e2e-spec.ts new file mode 100644 index 00000000..b6f71fee --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/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 ngapp!'); + }); +}); diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/src/app.po.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/src/app.po.ts new file mode 100644 index 00000000..82ea75ba --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/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/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/tsconfig.e2e.json b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/tsconfig.e2e.json new file mode 100644 index 00000000..a6dd6220 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/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 |