From a73d7e96648b4cd166229e1f4d55befde7178f68 Mon Sep 17 00:00:00 2001 From: Zak Henry Date: Fri, 23 Oct 2020 09:29:40 +0100 Subject: [PATCH] feat(Rewrite): @NgxSubForm() decorator is no longer needed and is not exported --- .../deprecated/ngx-sub-form.component.spec.ts | 4 +- src/app/app.spec.e2e.ts | 56 +++++++++---------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/projects/ngx-sub-form/src/lib/deprecated/ngx-sub-form.component.spec.ts b/projects/ngx-sub-form/src/lib/deprecated/ngx-sub-form.component.spec.ts index 1afd7e9f..9798e1d2 100644 --- a/projects/ngx-sub-form/src/lib/deprecated/ngx-sub-form.component.spec.ts +++ b/projects/ngx-sub-form/src/lib/deprecated/ngx-sub-form.component.spec.ts @@ -453,7 +453,7 @@ describe(`NgxSubFormComponent`, () => { numberTwo: number; } - @Directive() + @Component({ template: '' }) class ValidatedSubComponent extends NgxSubFormComponent { protected getFormControls() { return { @@ -486,7 +486,7 @@ describe(`NgxSubFormComponent`, () => { passwordRepeat: string; } - @Directive() + @Component({ template: '' }) class PasswordSubComponent extends NgxSubFormComponent { protected getFormControls() { return { diff --git a/src/app/app.spec.e2e.ts b/src/app/app.spec.e2e.ts index ff7f3f92..f60c80b9 100644 --- a/src/app/app.spec.e2e.ts +++ b/src/app/app.spec.e2e.ts @@ -61,25 +61,25 @@ context(`EJawa demo`, () => { DOM.list.elements.cy.eq(0).click(); DOM.list.elements.cy.eq(1).click(); - const x = hardCodedListings[1] as VehicleListing; - const v = x.product as Speeder; + const vehicle = hardCodedListings[1] as VehicleListing; + const speeder = vehicle.product as Speeder; const expectedObj: FormElement = { - title: x.title, - price: '£' + x.price.toLocaleString(), + title: vehicle.title, + price: '£' + vehicle.price.toLocaleString(), inputs: { - id: x.id, - title: x.title, - imageUrl: x.imageUrl, - price: x.price + '', - listingType: x.listingType, + id: vehicle.id, + title: vehicle.title, + imageUrl: vehicle.imageUrl, + price: vehicle.price + '', + listingType: vehicle.listingType, vehicleForm: { - vehicleType: x.product.vehicleType, + vehicleType: vehicle.product.vehicleType, speederForm: { - color: v.color, - canFire: v.canFire, - crewMembers: v.crewMembers, - maximumSpeed: v.maximumSpeed, + color: speeder.color, + canFire: speeder.canFire, + crewMembers: speeder.crewMembers, + maximumSpeed: speeder.maximumSpeed, }, }, }, @@ -95,25 +95,25 @@ context(`EJawa demo`, () => { DOM.list.elements.cy.eq(1).click(); DOM.list.elements.cy.eq(0).click(); - const x = hardCodedListings[0] as VehicleListing; - const s = x.product as Spaceship; + const vehicle = hardCodedListings[0] as VehicleListing; + const spaceship = vehicle.product as Spaceship; const expectedObj: FormElement = { - title: x.title, - price: '£' + x.price.toLocaleString(), + title: vehicle.title, + price: '£' + vehicle.price.toLocaleString(), inputs: { - id: x.id, - title: x.title, - imageUrl: x.imageUrl, - price: x.price + '', - listingType: x.listingType, + id: vehicle.id, + title: vehicle.title, + imageUrl: vehicle.imageUrl, + price: vehicle.price + '', + listingType: vehicle.listingType, vehicleForm: { - vehicleType: x.product.vehicleType, + vehicleType: vehicle.product.vehicleType, spaceshipForm: { - color: s.color, - canFire: s.canFire, - crewMembers: s.crewMembers, - wingCount: s.wingCount, + color: spaceship.color, + canFire: spaceship.canFire, + crewMembers: spaceship.crewMembers, + wingCount: spaceship.wingCount, }, }, },