Merge Request #56

Merged
noosfero-themes/angular-theme!56
Created by Leandro Santos

Add scrap in profile's timeline

scrap_timeline

Assignee: None
Milestone: None

Merged by Leandro Santos

Source branch has been removed
Commits (2)
2 participants
    Me
    Michel Felipe started a discussion on the outdated diff
    last updated by Leandro Santos
    src/app/profile/activities/activity/scrap.html 0 → 100644
      1 +<timeline-badge class="success">
      2 + <i class="fa fa-file-text"></i>
      3 +</timeline-badge>
      4 +<timeline-panel>
      5 + <timeline-heading>
      6 + <h4 class="timeline-title">
      7 + <a ui-sref="main.profile.info({profile: ctrl.activity.user.identifier})"><strong ng-bind="ctrl.activity.user.name"></strong></a>
      8 + <span> {{"activities.scrap.description" | translate}} </span>
    2
    • Me
      Michel Felipe @mfdeveloper (Edited )

      Além do texto wrote(escreveu) não seria interessante um ícone ou algo + visual que diferenciasse esse tipo de conteúdo na timeline? Uma vez que outras coisas podem aparecer misturadas nela, talvez esse diferencial seja importante

      Obs: Tive um pouco de dificuldade (visualmente falando) pela screenshot para entender o q havia de diferente nesse MR :)

      Choose File ...   File name...
      Cancel
    • 5bf9bf341e9d00ebd854cdaf1a4299b2?s=40&d=identicon
      Leandro Santos @leandronunes

      @michel verdade vou ver uma forma melhor de deixar mais claro.

      Choose File ...   File name...
      Cancel
    Me
    Michel Felipe started a discussion on the diff
    last updated by Michel Felipe
    src/app/profile/activities/activity/activity.component.spec.ts
    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
    • Me
      Michel Felipe @mfdeveloper

      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?

      Choose File ...   File name...
      Cancel
    Me
    Michel Felipe started a discussion on the diff
    last updated by Michel Felipe
    src/app/profile/activities/activity/activity.component.spec.ts
      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
    • Me
      Michel Felipe @mfdeveloper

      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?

      Choose File ...   File name...
      Cancel
    • 5bf9bf341e9d00ebd854cdaf1a4299b2?s=40&d=identicon
      Leandro Santos @leandronunes

      @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

      Choose File ...   File name...
      Cancel
    • Me
      Michel Felipe @mfdeveloper (Edited )

      Tranquilo. É só para nos atentarmos a isso na hora de escrever uma descrição dos testes unitários

      Choose File ...   File name...
      Cancel
    Me
    Michel Felipe started a discussion on the diff
    last updated by Michel Felipe
    src/app/profile/activities/activity/activity.component.spec.ts
      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
    • Me
      Michel Felipe @mfdeveloper (Edited )

      @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?

      Choose File ...   File name...
      Cancel
    • 5bf9bf341e9d00ebd854cdaf1a4299b2?s=40&d=identicon
      Leandro Santos @leandronunes

      @mfdeveloper precisou da variavel para fazer os diferentes testes

      Choose File ...   File name...
      Cancel
    • Me
      Michel Felipe @mfdeveloper

      @leandronunes Entendi :)

      Choose File ...   File name...
      Cancel
    Me
    Michel Felipe started a discussion on the outdated diff
    last updated by Leandro Santos
    src/app/profile/activities/activity/scrap.html 0 → 100644
      1 +<timeline-badge class="success">
      2 + <i class="fa fa-file-text"></i>
      3 +</timeline-badge>
      4 +<timeline-panel>
      5 + <timeline-heading>
      6 + <h4 class="timeline-title">
      7 + <a ui-sref="main.profile.info({profile: ctrl.activity.user.identifier})"><strong ng-bind="ctrl.activity.user.name"></strong></a>
    2
    • Me
      Michel Felipe @mfdeveloper (Edited )

      Para binding entre campos do componente e tags HTML, geralmente temos utilizado a notação [campo]="valor" ou [model]="campo", seguindo a syntax do Angular 2, para facilitar uma possível migração no futuro. Algum motivo em especial para essa notação? Alguma restrição do componente de timeline?

      Choose File ...   File name...
      Cancel
    • 5bf9bf341e9d00ebd854cdaf1a4299b2?s=40&d=identicon
      Leandro Santos @leandronunes

      @mfdeveloper Só segui o modelo existente

      Choose File ...   File name...
      Cancel
  • 5bf9bf341e9d00ebd854cdaf1a4299b2?s=40&d=identicon
    Leandro Santos @leandronunes

    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
    Choose File ...   File name...
    Cancel
  • 5bf9bf341e9d00ebd854cdaf1a4299b2?s=40&d=identicon
    Leandro Santos @leandronunes
    Choose File ...   File name...
    Cancel