Merge Request #56
-
add_member_in_community
eh um campo/método do backend? Se sim, não seria melhor que na descrição do teste tivesse uma definição do que isso significa para o negócio, ao invés do nome do campo aq? -
new_friendship
eh um campo/método do backend? Se sim, não seria melhor que na descrição do teste tivesse uma definição do que isso significa para o negócio, ao invés do nome do campo aq? -
@michel isso é somente um teste de algo que já existia e não tinha teste. Isso nem fazia parte do escopo deste MR só fiz o teste aproveitando que já estava mexendo nesta funcionalidade
-
Tranquilo. É só para nos atentarmos a isso na hora de escrever uma descrição dos testes unitários
-
@leandronunes Você não utilizou a classe
ComponentTestHelper
por que você queria sobrescrever este atributo do componente para cada teste diferente, ou teve algum outro motivo em específico? -
@mfdeveloper precisou da variavel para fazer os diferentes testes
-
@leandronunes Entendi :)
-
Added 23 new commits:
- 1e4736a4 - added events-hub service
- b3953cbd - improving adding a base interface EventsHubKnownEventNames
- 332c24ec - added changes to allow pass string[] or EventsHubKnownEventNames to EventsHubService constructor
- 328a7a82 - some small refactoring on class naming and changed to allow EVENTS_HUB_KNOW_EVEN…
- fb1e923a - Merge branch 'events-hub' into 'master'
- 3d2172f3 - Adds account register module
- bc91225e - Refactor of the account register component to uses service and restangular instead.
- 42443554 - Fixing registration - it is working now
- 503976b5 - add redirect to home in case of succeded signup
- e10ddb2a - Added notification when user is created
- 716c2a26 - Added welcome message for translation on signup
- 74b67520 - Refactory html template + new environment service property
- 64b0a116 - Added environment fields and ngMessages form validation
- 4c25e839 - Added the ng.ui.bootstrap typescript definitions
- 015b68e2 - Added the modal to show environment terms of use text
- 224b593d - Added module 'angular-password' to check password confir match
- a4dac9ec - Added unit tests and minor refactories
- b4a0a739 - Fix rebase with master adjusts
- 64000ab5 - Merge branch 'register_page' into 'master'
- 26ff5335 - Change txt navbar menuitem from 'Novo Artigo' to 'Novo post' on pt.json
- d3bba43c - Ticket #118: Profile images block
- 6596b7af - adding scrap activity in profile timeline
- e80a93b4 - change scrap timeline visualization
-
mentioned in commit de08c0f67886656d9a6a75eb73679e0e251f1554
30 | 32 | let component: ActivityComponent = fixture.debugElement.componentViewChildren[0].componentInstance; |
31 | 33 | expect(component.getActivityTemplate()).toEqual('app/profile/activities/activity/create_article.html'); |
34 | + done(); | |
35 | + }); | |
36 | + }); | |
37 | + | |
38 | + it("render create article template correctly", done => { | |
39 | + activity = { name: "activity1", verb: "create_article" }; | |
40 | + tcb.createAsync(BlockContainerComponent).then(fixture => { | |
41 | + let component: ActivityComponent = fixture.debugElement.componentViewChildren[0].componentInstance; | |
32 | 42 | expect(fixture.debugElement.queryAll(".activity.create_article").length).toEqual(1); |
33 | 43 | done(); |
34 | 44 | }); |
35 | 45 | }); |
46 | + | |
47 | + it("render add_member_in_community template correctly", done => { | |
1 |
|
41 | + let component: ActivityComponent = fixture.debugElement.componentViewChildren[0].componentInstance; | |
32 | 42 | expect(fixture.debugElement.queryAll(".activity.create_article").length).toEqual(1); |
33 | 43 | done(); |
34 | 44 | }); |
35 | 45 | }); |
46 | + | |
47 | + it("render add_member_in_community template correctly", done => { | |
48 | + activity = { name: "add_member_in_community1", verb: "add_member_in_community" }; | |
49 | + tcb.createAsync(BlockContainerComponent).then(fixture => { | |
50 | + let component: ActivityComponent = fixture.debugElement.componentViewChildren[0].componentInstance; | |
51 | + expect(fixture.debugElement.queryAll(".activity.add_member_in_community").length).toEqual(1); | |
52 | + done(); | |
53 | + }); | |
54 | + }); | |
55 | + | |
56 | + it("render new_friendship template correctly", done => { | |
3 |
|
25 | + | |
24 | 26 | class BlockContainerComponent { |
25 | - activity = { name: "activity1", verb: "create_article" }; | |
27 | + activity = activity; | |
26 | 28 | } |
27 | 29 | |
28 | 30 | it("render the specific template for an activity verb", done => { |
29 | 31 | tcb.createAsync(BlockContainerComponent).then(fixture => { |
30 | 32 | let component: ActivityComponent = fixture.debugElement.componentViewChildren[0].componentInstance; |
31 | 33 | expect(component.getActivityTemplate()).toEqual('app/profile/activities/activity/create_article.html'); |
34 | + done(); | |
35 | + }); | |
36 | + }); | |
37 | + | |
38 | + it("render create article template correctly", done => { | |
39 | + activity = { name: "activity1", verb: "create_article" }; | |
3 |
|