Commit 8616dd980b4b17886fcea11f0430b37b77a25cb4

Authored by Victor Costa
1 parent 1894afc0

Add missing type arguments from members and people blocks

src/app/layout/blocks/members-block/members-block.component.spec.ts
... ... @@ -10,7 +10,7 @@ const tcb = new TestComponentBuilder();
10 10 describe("Components", () => {
11 11 describe("Members Block Component", () => {
12 12  
13   - let helper: ComponentTestHelper;
  13 + let helper: ComponentTestHelper<MembersBlockComponent>;
14 14  
15 15 let providers = [
16 16 new Provider('ProfileService', {
... ... @@ -24,7 +24,7 @@ describe(&quot;Components&quot;, () =&gt; {
24 24  
25 25 beforeEach(angular.mock.module("templates"));
26 26  
27   - beforeEach( (done) => {
  27 + beforeEach((done) => {
28 28 // Custom properties for the component
29 29 let properties = { owner: { id: 1 } };
30 30 // Create the component bed for the test.
... ... @@ -34,7 +34,7 @@ describe(&quot;Components&quot;, () =&gt; {
34 34 providers: providers,
35 35 properties: properties
36 36 });
37   - helper = new ComponentTestHelper(cls, done);
  37 + helper = new ComponentTestHelper<MembersBlockComponent>(cls, done);
38 38 });
39 39  
40 40 it("get members of the block owner", () => {
... ... @@ -46,4 +46,4 @@ describe(&quot;Components&quot;, () =&gt; {
46 46 });
47 47  
48 48 });
49   -});
50 49 \ No newline at end of file
  50 +});
... ...
src/app/layout/blocks/people-block/people-block.component.spec.ts
... ... @@ -10,15 +10,15 @@ describe(&quot;Components&quot;, () =&gt; {
10 10  
11 11 describe("People Block Component", () => {
12 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 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 24 * The beforeEach procedure will initialize the helper and parse
... ... @@ -26,7 +26,7 @@ describe(&quot;Components&quot;, () =&gt; {
26 26 * this mode, the providers and properties given to the construtor
27 27 * can't be overriden.
28 28 */
29   - beforeEach( (done) => {
  29 + beforeEach((done) => {
30 30 // Create the component bed for the test. Optionally, this could be done
31 31 // in each test if one needs customization of these parameters per test
32 32 let cls = createClass({
... ... @@ -35,7 +35,7 @@ describe(&quot;Components&quot;, () =&gt; {
35 35 providers: providers,
36 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(&quot;Components&quot;, () =&gt; {
69 69 expect(div.className).toBe('people-block', "The class should be people-block");
70 70 });
71 71 });
72   -});
73 72 \ No newline at end of file
  73 +});
... ...