#71 Add integration test setup
Merged a year ago by a2batic. Opened a year ago by amitosh.
amitosh/Fedora-app integration-testing  into  master

file modified
+9

@@ -89,8 +89,17 @@ 

  

  ### Running unit tests

  

+ #### Unit tests

  `npm test` runs all unit tests defined in the app.

  

+ #### Integration tests

+ 

+ 1. Start the ionic dev server with `npm run ionic:serve -b`. Wait for the dev

+    server to start.

+ 2. In a different terminal window start the tests with `npm run e2e`

+ 

+ 

+ 

  ## For GSoC and Outreachy

  

  Contributors contributing through [GSOC'18](https://docs.fedoraproject.org/mentored-projects/gsoc/2018/application.html) or [Outreachy May-Aug '18](https://www.outreachy.org/apply/project-selection/) are recommended to gothrough the guide links carefully.

file added
+21

@@ -0,0 +1,21 @@ 

+ import { Page } from './app.po';

+ 

+ describe('App', () => {

+   let page: Page;

+ 

+   beforeEach(() => {

+     page = new Page();

+   });

+ 

+   describe('default screen', () => {

+     beforeEach(() => {

+       page.navigateTo('/');

+     });

+ 

+     it('should have a title saying Fedora App', () => {

+       page.getTitle().then(title => {

+         expect(title).toEqual('Fedora App');

+       });

+     });

+   })

+ });

file added
+12

@@ -0,0 +1,12 @@ 

+ import { browser, by, element } from 'protractor';

+ 

+ export class Page {

+ 

+   navigateTo(destination) {

+     return browser.get(destination);

+   }

+ 

+   getTitle() {

+     return browser.getTitle();

+   }

+ }

@@ -0,0 +1,12 @@ 

+ {

+   "extends": "../tsconfig.json",

+   "compilerOptions": {

+     "outDir": "../out-tsc/e2e",

+     "baseUrl": "./",

+     "module": "commonjs",

+     "target": "es5",

+     "typeRoots": [

+       "../node_modules/@types"

+     ]

+   }

+ }

file modified
+447 -4

@@ -215,6 +215,18 @@ 

        "integrity": "sha512-hWzNviaVFIr1TqcRA8ou49JaSHp+Rfabmnqg2kNvusKqLhPU0rIsGPUj5WJJ7ld4Bb7qdgLmIhLfCD1qS08IVA==",

        "dev": true

      },

+     "@types/q": {

+       "version": "0.0.32",

+       "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz",

+       "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=",

+       "dev": true

+     },

+     "@types/selenium-webdriver": {

+       "version": "2.53.43",

+       "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-2.53.43.tgz",

+       "integrity": "sha512-UBYHWph6P3tutkbXpW6XYg9ZPbTKjw/YC2hGG1/GEvWwTbvezBUv3h+mmUFw79T3RFPnmedpiXdOBbXX+4l0jg==",

+       "dev": true

+     },

      "abbrev": {

        "version": "1.1.1",

        "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",

@@ -261,6 +273,12 @@ 

        "dev": true,

        "optional": true

      },

+     "adm-zip": {

+       "version": "0.4.4",

+       "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.4.tgz",

+       "integrity": "sha1-ph7VrmkFw66lizplfSUDMJEFJzY=",

+       "dev": true

+     },

      "after": {

        "version": "0.8.2",

        "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz",

@@ -470,6 +488,21 @@ 

        "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=",

        "dev": true

      },

+     "array-union": {

+       "version": "1.0.2",

+       "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",

+       "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",

+       "dev": true,

+       "requires": {

+         "array-uniq": "^1.0.1"

+       }

+     },

+     "array-uniq": {

+       "version": "1.0.3",

+       "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",

+       "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",

+       "dev": true

+     },

      "array-unique": {

        "version": "0.2.1",

        "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",

@@ -481,6 +514,12 @@ 

        "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==",

        "dev": true

      },

+     "arrify": {

+       "version": "1.0.1",

+       "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",

+       "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",

+       "dev": true

+     },

      "asn1": {

        "version": "0.2.3",

        "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",

@@ -921,6 +960,15 @@ 

          "inherits": "~2.0.0"

        }

      },

+     "blocking-proxy": {

+       "version": "1.0.1",

+       "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-1.0.1.tgz",

+       "integrity": "sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==",

+       "dev": true,

+       "requires": {

+         "minimist": "^1.2.0"

+       }

+     },

      "bluebird": {

        "version": "3.5.1",

        "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",

@@ -1128,6 +1176,12 @@ 

          "isarray": "^1.0.0"

        }

      },

+     "buffer-from": {

+       "version": "1.1.0",

+       "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz",

+       "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==",

+       "dev": true

+     },

      "buffer-more-ints": {

        "version": "0.0.2",

        "resolved": "https://registry.npmjs.org/buffer-more-ints/-/buffer-more-ints-0.0.2.tgz",

@@ -2729,6 +2783,21 @@ 

          }

        }

      },

+     "del": {

+       "version": "2.2.2",

+       "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz",

+       "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=",

+       "dev": true,

+       "requires": {

+         "globby": "^5.0.0",

+         "is-path-cwd": "^1.0.0",

+         "is-path-in-cwd": "^1.0.0",

+         "object-assign": "^4.0.1",

+         "pify": "^2.0.0",

+         "pinkie-promise": "^2.0.0",

+         "rimraf": "^2.2.8"

+       }

+     },

      "delayed-stream": {

        "version": "1.0.0",

        "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",

@@ -3715,7 +3784,8 @@ 

          },

          "code-point-at": {

            "version": "1.1.0",

-           "bundled": true

+           "bundled": true,

+           "optional": true

          },

          "concat-map": {

            "version": "0.0.1",

@@ -3723,7 +3793,8 @@ 

          },

          "console-control-strings": {

            "version": "1.1.0",

-           "bundled": true

+           "bundled": true,

+           "optional": true

          },

          "core-util-is": {

            "version": "1.0.2",

@@ -3826,7 +3897,8 @@ 

          },

          "inherits": {

            "version": "2.0.3",

-           "bundled": true

+           "bundled": true,

+           "optional": true

          },

          "ini": {

            "version": "1.3.5",

@@ -3836,6 +3908,7 @@ 

          "is-fullwidth-code-point": {

            "version": "1.0.0",

            "bundled": true,

+           "optional": true,

            "requires": {

              "number-is-nan": "^1.0.0"

            }

@@ -3947,7 +4020,8 @@ 

          },

          "number-is-nan": {

            "version": "1.0.1",

-           "bundled": true

+           "bundled": true,

+           "optional": true

          },

          "object-assign": {

            "version": "4.1.1",

@@ -4062,6 +4136,7 @@ 

          "string-width": {

            "version": "1.0.2",

            "bundled": true,

+           "optional": true,

            "requires": {

              "code-point-at": "^1.0.0",

              "is-fullwidth-code-point": "^1.0.0",

@@ -4307,6 +4382,20 @@ 

        "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",

        "dev": true

      },

+     "globby": {

+       "version": "5.0.0",

+       "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",

+       "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=",

+       "dev": true,

+       "requires": {

+         "array-union": "^1.0.1",

+         "arrify": "^1.0.0",

+         "glob": "^7.0.3",

+         "object-assign": "^4.0.1",

+         "pify": "^2.0.0",

+         "pinkie-promise": "^2.0.0"

+       }

+     },

      "globule": {

        "version": "1.2.0",

        "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz",

@@ -4827,6 +4916,12 @@ 

        "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",

        "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="

      },

+     "ini": {

+       "version": "1.3.5",

+       "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",

+       "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",

+       "dev": true

+     },

      "inline-process-browser": {

        "version": "1.0.0",

        "resolved": "https://registry.npmjs.org/inline-process-browser/-/inline-process-browser-1.0.0.tgz",

@@ -5086,6 +5181,30 @@ 

          }

        }

      },

+     "is-path-cwd": {

+       "version": "1.0.0",

+       "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz",

+       "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=",

+       "dev": true

+     },

+     "is-path-in-cwd": {

+       "version": "1.0.1",

+       "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz",

+       "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==",

+       "dev": true,

+       "requires": {

+         "is-path-inside": "^1.0.0"

+       }

+     },

+     "is-path-inside": {

+       "version": "1.0.1",

+       "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz",

+       "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=",

+       "dev": true,

+       "requires": {

+         "path-is-inside": "^1.0.1"

+       }

+     },

      "is-plain-object": {

        "version": "2.0.4",

        "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",

@@ -5322,6 +5441,12 @@ 

          "colors": "1.1.2"

        }

      },

+     "jasminewd2": {

+       "version": "2.2.0",

+       "resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz",

+       "integrity": "sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=",

+       "dev": true

+     },

      "js-base64": {

        "version": "2.4.3",

        "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.3.tgz",

@@ -5434,6 +5559,68 @@ 

          }

        }

      },

+     "jszip": {

+       "version": "3.1.5",

+       "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz",

+       "integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==",

+       "dev": true,

+       "requires": {

+         "core-js": "~2.3.0",

+         "es6-promise": "~3.0.2",

+         "lie": "~3.1.0",

+         "pako": "~1.0.2",

+         "readable-stream": "~2.0.6"

+       },

+       "dependencies": {

+         "core-js": {

+           "version": "2.3.0",

+           "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz",

+           "integrity": "sha1-+rg/uwstjchfpjbEudNMdUIMbWU=",

+           "dev": true

+         },

+         "es6-promise": {

+           "version": "3.0.2",

+           "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz",

+           "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=",

+           "dev": true

+         },

+         "lie": {

+           "version": "3.1.1",

+           "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",

+           "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=",

+           "dev": true,

+           "requires": {

+             "immediate": "~3.0.5"

+           }

+         },

+         "process-nextick-args": {

+           "version": "1.0.7",

+           "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",

+           "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",

+           "dev": true

+         },

+         "readable-stream": {

+           "version": "2.0.6",

+           "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",

+           "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",

+           "dev": true,

+           "requires": {

+             "core-util-is": "~1.0.0",

+             "inherits": "~2.0.1",

+             "isarray": "~1.0.0",

+             "process-nextick-args": "~1.0.6",

+             "string_decoder": "~0.10.x",

+             "util-deprecate": "~1.0.1"

+           }

+         },

+         "string_decoder": {

+           "version": "0.10.31",

+           "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",

+           "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",

+           "dev": true

+         }

+       }

+     },

      "karma": {

        "version": "2.0.2",

        "resolved": "https://registry.npmjs.org/karma/-/karma-2.0.2.tgz",

@@ -6058,6 +6245,12 @@ 

          }

        }

      },

+     "make-error": {

+       "version": "1.3.4",

+       "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz",

+       "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==",

+       "dev": true

+     },

      "map-cache": {

        "version": "0.2.2",

        "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",

@@ -6928,6 +7121,12 @@ 

          }

        }

      },

+     "options": {

+       "version": "0.0.6",

+       "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz",

+       "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=",

+       "dev": true

+     },

      "os-browserify": {

        "version": "0.3.0",

        "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",

@@ -7146,6 +7345,12 @@ 

        "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",

        "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="

      },

+     "path-is-inside": {

+       "version": "1.0.2",

+       "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",

+       "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=",

+       "dev": true

+     },

      "path-key": {

        "version": "2.0.1",

        "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",

@@ -7301,6 +7506,104 @@ 

          "with-callback": "^1.0.2"

        }

      },

+     "protractor": {

+       "version": "5.3.2",

+       "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.2.tgz",

+       "integrity": "sha512-pw4uwwiy5lHZjIguxNpkEwJJa7hVz+bJsvaTI+IbXlfn2qXwzbF8eghW/RmrZwE2sGx82I8etb8lVjQ+JrjejA==",

+       "dev": true,

+       "requires": {

+         "@types/node": "^6.0.46",

+         "@types/q": "^0.0.32",

+         "@types/selenium-webdriver": "~2.53.39",

+         "blocking-proxy": "^1.0.0",

+         "chalk": "^1.1.3",

+         "glob": "^7.0.3",

+         "jasmine": "2.8.0",

+         "jasminewd2": "^2.1.0",

+         "optimist": "~0.6.0",

+         "q": "1.4.1",

+         "saucelabs": "^1.5.0",

+         "selenium-webdriver": "3.6.0",

+         "source-map-support": "~0.4.0",

+         "webdriver-js-extender": "^1.0.0",

+         "webdriver-manager": "^12.0.6"

+       },

+       "dependencies": {

+         "@types/node": {

+           "version": "6.0.112",

+           "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.112.tgz",

+           "integrity": "sha512-HnekQWq9t3Gl5aBYYi8sGyOWm85M5ub2llMrpQkRY94eJEUhsUr8qYNaeefv22cxxm+D67a+5zIzpl+dpFxdjQ==",

+           "dev": true

+         },

+         "adm-zip": {

+           "version": "0.4.11",

+           "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.11.tgz",

+           "integrity": "sha512-L8vcjDTCOIJk7wFvmlEUN7AsSb8T+2JrdP7KINBjzr24TJ5Mwj590sLu3BC7zNZowvJWa/JtPmD8eJCzdtDWjA==",

+           "dev": true

+         },

+         "ansi-styles": {

+           "version": "2.2.1",

+           "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",

+           "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",

+           "dev": true

+         },

+         "chalk": {

+           "version": "1.1.3",

+           "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",

+           "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",

+           "dev": true,

+           "requires": {

+             "ansi-styles": "^2.2.1",

+             "escape-string-regexp": "^1.0.2",

+             "has-ansi": "^2.0.0",

+             "strip-ansi": "^3.0.0",

+             "supports-color": "^2.0.0"

+           }

+         },

+         "jasmine": {

+           "version": "2.8.0",

+           "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz",

+           "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=",

+           "dev": true,

+           "requires": {

+             "exit": "^0.1.2",

+             "glob": "^7.0.6",

+             "jasmine-core": "~2.8.0"

+           }

+         },

+         "jasmine-core": {

+           "version": "2.8.0",

+           "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz",

+           "integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=",

+           "dev": true

+         },

+         "supports-color": {

+           "version": "2.0.0",

+           "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",

+           "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",

+           "dev": true

+         },

+         "webdriver-manager": {

+           "version": "12.0.6",

+           "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.0.6.tgz",

+           "integrity": "sha1-PfGkgZdwELTL+MnYXHpXeCjA5ws=",

+           "dev": true,

+           "requires": {

+             "adm-zip": "^0.4.7",

+             "chalk": "^1.1.1",

+             "del": "^2.2.0",

+             "glob": "^7.0.3",

+             "ini": "^1.3.4",

+             "minimist": "^1.2.0",

+             "q": "^1.4.1",

+             "request": "^2.78.0",

+             "rimraf": "^2.5.2",

+             "semver": "^5.3.0",

+             "xml2js": "^0.4.17"

+           }

+         }

+       }

+     },

      "proxy-addr": {

        "version": "2.0.3",

        "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz",

@@ -7394,6 +7697,12 @@ 

        "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",

        "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="

      },

+     "q": {

+       "version": "1.4.1",

+       "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz",

+       "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=",

+       "dev": true

+     },

      "qjobs": {

        "version": "1.2.0",

        "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz",

@@ -7856,6 +8165,15 @@ 

          "yargs": "^7.0.0"

        }

      },

+     "saucelabs": {

+       "version": "1.5.0",

+       "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.5.0.tgz",

+       "integrity": "sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ==",

+       "dev": true,

+       "requires": {

+         "https-proxy-agent": "^2.2.1"

+       }

+     },

      "sax": {

        "version": "1.2.4",

        "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",

@@ -7892,6 +8210,29 @@ 

          }

        }

      },

+     "selenium-webdriver": {

+       "version": "3.6.0",

+       "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz",

+       "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==",

+       "dev": true,

+       "requires": {

+         "jszip": "^3.1.3",

+         "rimraf": "^2.5.4",

+         "tmp": "0.0.30",

+         "xml2js": "^0.4.17"

+       },

+       "dependencies": {

+         "tmp": {

+           "version": "0.0.30",

+           "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz",

+           "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=",

+           "dev": true,

+           "requires": {

+             "os-tmpdir": "~1.0.1"

+           }

+         }

+       }

+     },

      "semver": {

        "version": "5.5.0",

        "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",

@@ -8982,6 +9323,39 @@ 

          }

        }

      },

+     "ts-node": {

+       "version": "6.1.0",

+       "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-6.1.0.tgz",

+       "integrity": "sha512-mw11Bq08RZgrU/bzcVw/Ti9wNyefpOanXgWsHg008wyVHjvFhWxNatVVrciOAu8BcWSECoNOSunRzUokKH8Mmw==",

+       "dev": true,

+       "requires": {

+         "arrify": "^1.0.0",

+         "diff": "^3.1.0",

+         "make-error": "^1.1.1",

+         "minimist": "^1.2.0",

+         "mkdirp": "^0.5.1",

+         "source-map-support": "^0.5.6",

+         "yn": "^2.0.0"

+       },

+       "dependencies": {

+         "source-map": {

+           "version": "0.6.1",

+           "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",

+           "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",

+           "dev": true

+         },

+         "source-map-support": {

+           "version": "0.5.6",

+           "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz",

+           "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==",

+           "dev": true,

+           "requires": {

+             "buffer-from": "^1.0.0",

+             "source-map": "^0.6.0"

+           }

+         }

+       }

+     },

      "tsickle": {

        "version": "0.24.1",

        "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.24.1.tgz",

@@ -9498,6 +9872,69 @@ 

          "graceful-fs": "^4.1.2"

        }

      },

+     "webdriver-js-extender": {

+       "version": "1.0.0",

+       "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz",

+       "integrity": "sha1-gcUzqeM9W/tZe05j4s2yW1R3dRU=",

+       "dev": true,

+       "requires": {

+         "@types/selenium-webdriver": "^2.53.35",

+         "selenium-webdriver": "^2.53.2"

+       },

+       "dependencies": {

+         "sax": {

+           "version": "0.6.1",

+           "resolved": "https://registry.npmjs.org/sax/-/sax-0.6.1.tgz",

+           "integrity": "sha1-VjsZx8HeiS4Jv8Ty/DDjwn8JUrk=",

+           "dev": true

+         },

+         "selenium-webdriver": {

+           "version": "2.53.3",

+           "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz",

+           "integrity": "sha1-0p/1qVff8aG0ncRXdW5OS/vc4IU=",

+           "dev": true,

+           "requires": {

+             "adm-zip": "0.4.4",

+             "rimraf": "^2.2.8",

+             "tmp": "0.0.24",

+             "ws": "^1.0.1",

+             "xml2js": "0.4.4"

+           }

+         },

+         "tmp": {

+           "version": "0.0.24",

+           "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.24.tgz",

+           "integrity": "sha1-1qXhmNFKmDXMby18PZ4wJCjIzxI=",

+           "dev": true

+         },

+         "ultron": {

+           "version": "1.0.2",

+           "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz",

+           "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=",

+           "dev": true

+         },

+         "ws": {

+           "version": "1.1.5",

+           "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz",

+           "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==",

+           "dev": true,

+           "requires": {

+             "options": ">=0.0.5",

+             "ultron": "1.0.x"

+           }

+         },

+         "xml2js": {

+           "version": "0.4.4",

+           "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.4.tgz",

+           "integrity": "sha1-MREBAAMAiuGSQOuhdJe1fHKcVV0=",

+           "dev": true,

+           "requires": {

+             "sax": "0.6.x",

+             "xmlbuilder": ">=1.0.0"

+           }

+         }

+       }

+     },

      "webpack": {

        "version": "3.8.1",

        "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.8.1.tgz",

@@ -9939,6 +10376,12 @@ 

        "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=",

        "dev": true

      },

+     "yn": {

+       "version": "2.0.0",

+       "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz",

+       "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=",

+       "dev": true

+     },

      "zone.js": {

        "version": "0.8.18",

        "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.18.tgz",

file modified
+7 -2

@@ -15,7 +15,10 @@ 

      "ionic:serve": "ionic-app-scripts serve",

      "test": "karma start ./test/karma.conf.js",

      "test-ci": "karma start ./test/karma.conf.js --single-run",

-     "test-coverage": "karma start ./test/karma.conf.js --coverage"

+     "test-coverage": "karma start ./test/karma.conf.js --coverage",

+     "e2e": "npm run e2e-update && npm run e2e-test",

+     "e2e-test": "protractor ./test/protractor.conf.js",

+     "e2e-update": "webdriver-manager update --standalone false --gecko false"

    },

    "repository": {

      "type": "git",

@@ -87,7 +90,9 @@ 

      "karma-sourcemap-loader": "^0.3.7",

      "karma-webpack": "^3.0.0",

      "null-loader": "^0.1.1",

+     "protractor": "^5.3.2",

      "ts-loader": "^3.5.0",

+     "ts-node": "^6.1.0",

      "typescript": "2.4.2"

    },

    "cordova": {

@@ -110,4 +115,4 @@ 

        "android"

      ]

    }

- } 

\ No newline at end of file

+ }

file modified
+1 -1

@@ -2,7 +2,7 @@ 

  <html lang="en" dir="ltr">

  <head>

    <meta charset="UTF-8">

-   <title>Ionic App</title>

+   <title>Fedora App</title>

    <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <meta name="format-detection" content="telephone=no">

    <meta name="msapplication-tap-highlight" content="no">

@@ -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: [

+     '../e2e/**/*.e2e-spec.ts'

+   ],

+   capabilities: {

+     'browserName': 'chrome'

+   },

+   directConnect: true,

+   baseUrl: 'http://localhost:8100/',

+   framework: 'jasmine',

+   jasmineNodeOpts: {

+     showColors: true,

+     defaultTimeoutInterval: 30000,

+     print: function() {}

+   },

+   onPrepare() {

+     require('ts-node').register({

+       project: 'e2e/tsconfig.e2e.json'

+     });

+     jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));

+   }

+ };

See #66

Uses protractor and selenium to set up integration tests.

Run npm run ionic:serve -b, wait for the server to start and then run npm run e2e in two different terminal windows to run the integration tests. You need chromium/google-chrome installed.

We specifically target Chromium here because the target platforms will invariably use WebKit.

rebased onto 293e45a

a year ago

Pull-Request has been merged by a2batic

a year ago