Skip to content

Commit

Permalink
List by year in Angular
Browse files Browse the repository at this point in the history
  • Loading branch information
JhonSmithRomeroSolorzano committed Jul 22, 2020
1 parent 030cbeb commit b43e852
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/movie-list/movie-list.component.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<div class="layout-column align-items-center mt-50">
<section class="layout-row align-items-center justify-content-center">
<input
#appInput
type="number"
[(ngModel)]="movieYear"
[value]="movieYear"
class="large"
placeholder="Enter Year eg 2015"
data-test-id="app-input"
/>
<button
class=""
data-test-id="submit-button"
(click)="searchMovies($event, movieYear)"
(click)="searchMovies($event, appInput.value)"
>
Search
</button>
Expand Down
167 changes: 167 additions & 0 deletions unit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<?xml version="1.0"?>
<testsuite name="HeadlessChrome 83.0.4103 (Windows 10.0.0)" package="unit" timestamp="2020-07-21T00:54:29" id="0" hostname="DESKTOP-468OG17" tests="4" errors="1" failures="4" time="15.904">
<properties>
<property name="browser.fullName" value="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/83.0.4103.116 Safari/537.36"/>
</properties>
<testcase name="MovieListComponent Should render the Initial UI" time="0.578" classname=".MovieListComponent">
<failure type="">NullInjectorError: R3InjectorError(DynamicTestModule)[MoviesService -&gt; HttpClient -&gt; HttpClient]:
NullInjectorError: No provider for HttpClient!
error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 'MoviesService', 'HttpClient', 'HttpClient' ] })
at &lt;Jasmine&gt;
at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:1076:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16629:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16629:1)
at injectInjectorOnly (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:931:1)
at ɵɵinject (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:941:1)
at Object.MoviesService_Factory [as factory] (ng:///MoviesService/ɵfac.js:5:41)
at R3Injector.hydrate (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16865:42)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16617:1)
at NgModuleRef$1.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:36027:1)
at Object.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:33779:1)
</failure>
<failure type="">TypeError: Cannot read property 'value' of undefined
at &lt;Jasmine&gt;
at http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:52:18
at &lt;Jasmine&gt;
at http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:74:1
at new ZoneAwarePromise (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:960:1)
at __awaiter (http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:70:1)
at UserContext.&lt;anonymous&gt; (http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:51:50)
at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:364:1)
at ProxyZoneSpec.push../node_modules/zone.js/dist/zone-testing.js.ProxyZoneSpec.onInvoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-testing.js:292:1)
at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:363:1)
at Zone.run (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:123:1)
</failure>
</testcase>
<testcase name="MovieListComponent Should search and render the movies - 2" time="5.111" classname=".MovieListComponent">
<failure type="">NullInjectorError: R3InjectorError(DynamicTestModule)[MoviesService -&gt; HttpClient -&gt; HttpClient]:
NullInjectorError: No provider for HttpClient!
error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 'MoviesService', 'HttpClient', 'HttpClient' ] })
at &lt;Jasmine&gt;
at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:1076:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16629:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16629:1)
at injectInjectorOnly (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:931:1)
at ɵɵinject (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:941:1)
at Object.MoviesService_Factory [as factory] (ng:///MoviesService/ɵfac.js:5:41)
at R3Injector.hydrate (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16865:42)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16617:1)
at NgModuleRef$1.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:36027:1)
at Object.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:33779:1)
</failure>
<failure type="">Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL)
at &lt;Jasmine&gt;
</failure>
</testcase>
<testcase name="MovieListComponent Should search and render the movies - 1" time="5.127" classname=".MovieListComponent">
<failure type="">NullInjectorError: R3InjectorError(DynamicTestModule)[MoviesService -&gt; HttpClient -&gt; HttpClient]:
NullInjectorError: No provider for HttpClient!
error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 'MoviesService', 'HttpClient', 'HttpClient' ] })
at &lt;Jasmine&gt;
at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:1076:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16629:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16629:1)
at injectInjectorOnly (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:931:1)
at ɵɵinject (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:941:1)
at Object.MoviesService_Factory [as factory] (ng:///MoviesService/ɵfac.js:5:41)
at R3Injector.hydrate (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16865:42)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16617:1)
at NgModuleRef$1.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:36027:1)
at Object.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:33779:1)
</failure>
<failure type="">Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL)
at &lt;Jasmine&gt;
</failure>
</testcase>
<testcase name="MovieListComponent Should show No Results Found when there are no results from API" time="5.088" classname=".MovieListComponent">
<failure type="">NullInjectorError: R3InjectorError(DynamicTestModule)[MoviesService -&gt; HttpClient -&gt; HttpClient]:
NullInjectorError: No provider for HttpClient!
error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 'MoviesService', 'HttpClient', 'HttpClient' ] })
at &lt;Jasmine&gt;
at NullInjector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:1076:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16629:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16629:1)
at injectInjectorOnly (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:931:1)
at ɵɵinject (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:941:1)
at Object.MoviesService_Factory [as factory] (ng:///MoviesService/ɵfac.js:5:41)
at R3Injector.hydrate (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16865:42)
at R3Injector.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:16617:1)
at NgModuleRef$1.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:36027:1)
at Object.get (http://localhost:9876/_karma_webpack_/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:33779:1)
</failure>
<failure type="">Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL)
at &lt;Jasmine&gt;
</failure>
</testcase>
<system-out>
<![CDATA[HeadlessChrome 83.0.4103 (Windows 10.0.0) ERROR: 'Unhandled Promise rejection:', 'Cannot set property 'value' of undefined', '; Zone:', 'ProxyZone', '; Task:', 'Promise.then', '; Value:', TypeError: Cannot set property 'value' of undefined
TypeError: Cannot set property 'value' of undefined
at http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:16:16
at Generator.next (<anonymous>)
at http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:74:1
at new ZoneAwarePromise (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:960:1)
at __awaiter (http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:70:1)
at pushValue (http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:15:38)
at http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:127:11
at Generator.next (<anonymous>)
at http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:74:1
at new ZoneAwarePromise (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:960:1), 'TypeError: Cannot set property 'value' of undefined
at http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:16:16
at Generator.next (<anonymous>)
at http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:74:1
at new ZoneAwarePromise (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:960:1)
at __awaiter (http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:70:1)
at pushValue (http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:15:38)
at http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:127:11
at Generator.next (<anonymous>)
at http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:74:1
at new ZoneAwarePromise (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:960:1)'
,HeadlessChrome 83.0.4103 (Windows 10.0.0) ERROR: 'Unhandled Promise rejection:', 'Cannot set property 'value' of undefined', '; Zone:', 'ProxyZone', '; Task:', 'Promise.then', '; Value:', TypeError: Cannot set property 'value' of undefined
TypeError: Cannot set property 'value' of undefined
at http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:16:16
at Generator.next (<anonymous>)
at http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:74:1
at new ZoneAwarePromise (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:960:1)
at __awaiter (http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:70:1)
at pushValue (http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:15:38)
at http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:87:11
at Generator.next (<anonymous>)
at http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:74:1
at new ZoneAwarePromise (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:960:1), 'TypeError: Cannot set property 'value' of undefined
at http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:16:16
at Generator.next (<anonymous>)
at http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:74:1
at new ZoneAwarePromise (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:960:1)
at __awaiter (http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:70:1)
at pushValue (http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:15:38)
at http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:87:11
at Generator.next (<anonymous>)
at http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:74:1
at new ZoneAwarePromise (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:960:1)'
,HeadlessChrome 83.0.4103 (Windows 10.0.0) ERROR: 'Unhandled Promise rejection:', 'Cannot set property 'value' of undefined', '; Zone:', 'ProxyZone', '; Task:', 'Promise.then', '; Value:', TypeError: Cannot set property 'value' of undefined
TypeError: Cannot set property 'value' of undefined
at http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:16:16
at Generator.next (<anonymous>)
at http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:74:1
at new ZoneAwarePromise (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:960:1)
at __awaiter (http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:70:1)
at pushValue (http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:15:38)
at http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:61:11
at Generator.next (<anonymous>)
at http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:74:1
at new ZoneAwarePromise (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:960:1), 'TypeError: Cannot set property 'value' of undefined
at http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:16:16
at Generator.next (<anonymous>)
at http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:74:1
at new ZoneAwarePromise (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:960:1)
at __awaiter (http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:70:1)
at pushValue (http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:15:38)
at http://localhost:9876/_karma_webpack_/src/app/movie-list/movie-list.component.spec.ts:61:11
at Generator.next (<anonymous>)
at http://localhost:9876/_karma_webpack_/node_modules/tslib/tslib.es6.js:74:1
at new ZoneAwarePromise (http://localhost:9876/_karma_webpack_/node_modules/zone.js/dist/zone-evergreen.js:960:1)'
]]>
</system-out>
<system-err/>
</testsuite>

0 comments on commit b43e852

Please sign in to comment.