Commit 8616dd980b4b17886fcea11f0430b37b77a25cb4
1 parent
1894afc0
Exists in
master
and in
27 other branches
Add missing type arguments from members and people blocks
Showing
2 changed files
with
13 additions
and
13 deletions
Show diff stats
src/app/layout/blocks/members-block/members-block.component.spec.ts
@@ -10,7 +10,7 @@ const tcb = new TestComponentBuilder(); | @@ -10,7 +10,7 @@ const tcb = new TestComponentBuilder(); | ||
10 | describe("Components", () => { | 10 | describe("Components", () => { |
11 | describe("Members Block Component", () => { | 11 | describe("Members Block Component", () => { |
12 | 12 | ||
13 | - let helper: ComponentTestHelper; | 13 | + let helper: ComponentTestHelper<MembersBlockComponent>; |
14 | 14 | ||
15 | let providers = [ | 15 | let providers = [ |
16 | new Provider('ProfileService', { | 16 | new Provider('ProfileService', { |
@@ -24,7 +24,7 @@ describe("Components", () => { | @@ -24,7 +24,7 @@ describe("Components", () => { | ||
24 | 24 | ||
25 | beforeEach(angular.mock.module("templates")); | 25 | beforeEach(angular.mock.module("templates")); |
26 | 26 | ||
27 | - beforeEach( (done) => { | 27 | + beforeEach((done) => { |
28 | // Custom properties for the component | 28 | // Custom properties for the component |
29 | let properties = { owner: { id: 1 } }; | 29 | let properties = { owner: { id: 1 } }; |
30 | // Create the component bed for the test. | 30 | // Create the component bed for the test. |
@@ -34,7 +34,7 @@ describe("Components", () => { | @@ -34,7 +34,7 @@ describe("Components", () => { | ||
34 | providers: providers, | 34 | providers: providers, |
35 | properties: properties | 35 | properties: properties |
36 | }); | 36 | }); |
37 | - helper = new ComponentTestHelper(cls, done); | 37 | + helper = new ComponentTestHelper<MembersBlockComponent>(cls, done); |
38 | }); | 38 | }); |
39 | 39 | ||
40 | it("get members of the block owner", () => { | 40 | it("get members of the block owner", () => { |
@@ -46,4 +46,4 @@ describe("Components", () => { | @@ -46,4 +46,4 @@ describe("Components", () => { | ||
46 | }); | 46 | }); |
47 | 47 | ||
48 | }); | 48 | }); |
49 | -}); | ||
50 | \ No newline at end of file | 49 | \ No newline at end of file |
50 | +}); |
src/app/layout/blocks/people-block/people-block.component.spec.ts
@@ -10,15 +10,15 @@ describe("Components", () => { | @@ -10,15 +10,15 @@ describe("Components", () => { | ||
10 | 10 | ||
11 | describe("People Block Component", () => { | 11 | describe("People Block Component", () => { |
12 | let serviceMock = { | 12 | let serviceMock = { |
13 | - getEnvironmentPeople: (filters: any): any => { | ||
14 | - return Promise.resolve([{ identifier: "person1" }]); | ||
15 | - } | ||
16 | - }; | 13 | + getEnvironmentPeople: (filters: any): any => { |
14 | + return Promise.resolve([{ identifier: "person1" }]); | ||
15 | + } | ||
16 | + }; | ||
17 | let providers = [new Provider('EnvironmentService', { useValue: serviceMock })]; | 17 | let providers = [new Provider('EnvironmentService', { useValue: serviceMock })]; |
18 | 18 | ||
19 | - let helper: ComponentTestHelper; | 19 | + let helper: ComponentTestHelper<PeopleBlockComponent>; |
20 | 20 | ||
21 | - beforeEach( angular.mock.module("templates") ); | 21 | + beforeEach(angular.mock.module("templates")); |
22 | 22 | ||
23 | /** | 23 | /** |
24 | * The beforeEach procedure will initialize the helper and parse | 24 | * The beforeEach procedure will initialize the helper and parse |
@@ -26,7 +26,7 @@ describe("Components", () => { | @@ -26,7 +26,7 @@ describe("Components", () => { | ||
26 | * this mode, the providers and properties given to the construtor | 26 | * this mode, the providers and properties given to the construtor |
27 | * can't be overriden. | 27 | * can't be overriden. |
28 | */ | 28 | */ |
29 | - beforeEach( (done) => { | 29 | + beforeEach((done) => { |
30 | // Create the component bed for the test. Optionally, this could be done | 30 | // Create the component bed for the test. Optionally, this could be done |
31 | // in each test if one needs customization of these parameters per test | 31 | // in each test if one needs customization of these parameters per test |
32 | let cls = createClass({ | 32 | let cls = createClass({ |
@@ -35,7 +35,7 @@ describe("Components", () => { | @@ -35,7 +35,7 @@ describe("Components", () => { | ||
35 | providers: providers, | 35 | providers: providers, |
36 | properties: {} | 36 | properties: {} |
37 | }); | 37 | }); |
38 | - helper = new ComponentTestHelper(cls, done); | 38 | + helper = new ComponentTestHelper<PeopleBlockComponent>(cls, done); |
39 | }); | 39 | }); |
40 | 40 | ||
41 | /** | 41 | /** |
@@ -69,4 +69,4 @@ describe("Components", () => { | @@ -69,4 +69,4 @@ describe("Components", () => { | ||
69 | expect(div.className).toBe('people-block', "The class should be people-block"); | 69 | expect(div.className).toBe('people-block', "The class should be people-block"); |
70 | }); | 70 | }); |
71 | }); | 71 | }); |
72 | -}); | ||
73 | \ No newline at end of file | 72 | \ No newline at end of file |
73 | +}); |