Commit c240443c226220c1de2762e298711d2d4aca4df3

Authored by ABNER SILVA DE OLIVEIRA
1 parent a3e051be
Exists in master and in 1 other branch dev-fixes

Renamed Components which were missing suffix Component

src/app/article/content-viewer/content-viewer-actions.component.spec.ts
@@ -5,7 +5,7 @@ import {Input, Component, provide} from 'ng-forward'; @@ -5,7 +5,7 @@ import {Input, Component, provide} from 'ng-forward';
5 import * as helpers from "../../../spec/helpers"; 5 import * as helpers from "../../../spec/helpers";
6 6
7 import {ComponentFixture} from 'ng-forward/cjs/testing/test-component-builder'; 7 import {ComponentFixture} from 'ng-forward/cjs/testing/test-component-builder';
8 -import {ContentViewerActions} from './content-viewer-actions.component'; 8 +import {ContentViewerActionsComponent} from './content-viewer-actions.component';
9 9
10 // this htmlTemplate will be re-used between the container components in this spec file 10 // this htmlTemplate will be re-used between the container components in this spec file
11 const htmlTemplate: string = '<content-viewer-actions [article]="ctrl.article" [profile]="ctrl.profile"></content-viewer-actions>'; 11 const htmlTemplate: string = '<content-viewer-actions [article]="ctrl.article" [profile]="ctrl.profile"></content-viewer-actions>';
@@ -31,7 +31,7 @@ describe(&#39;Content Viewer Actions Component&#39;, () =&gt; { @@ -31,7 +31,7 @@ describe(&#39;Content Viewer Actions Component&#39;, () =&gt; {
31 helpers.provideEmptyObjects('Restangular'), 31 helpers.provideEmptyObjects('Restangular'),
32 helpers.provideFilters('translateFilter') 32 helpers.provideFilters('translateFilter')
33 ], 33 ],
34 - directives: [ContentViewerActions], 34 + directives: [ContentViewerActionsComponent],
35 template: htmlTemplate 35 template: htmlTemplate
36 }); 36 });
37 }; 37 };
@@ -56,7 +56,7 @@ describe(&#39;Content Viewer Actions Component&#39;, () =&gt; { @@ -56,7 +56,7 @@ describe(&#39;Content Viewer Actions Component&#39;, () =&gt; {
56 }; 56 };
57 57
58 buildComponent().then((fixture: ComponentFixture) => { 58 buildComponent().then((fixture: ComponentFixture) => {
59 - let contentViewerComp: ContentViewerActions = fixture.debugElement.componentViewChildren[0].componentInstance; 59 + let contentViewerComp: ContentViewerActionsComponent = fixture.debugElement.componentViewChildren[0].componentInstance;
60 60
61 expect(contentViewerComp.profile).toEqual(jasmine.objectContaining(profile)); 61 expect(contentViewerComp.profile).toEqual(jasmine.objectContaining(profile));
62 62
src/app/article/content-viewer/content-viewer-actions.component.ts
@@ -7,7 +7,7 @@ import {ProfileService} from &quot;../../../lib/ng-noosfero-api/http/profile.service&quot; @@ -7,7 +7,7 @@ import {ProfileService} from &quot;../../../lib/ng-noosfero-api/http/profile.service&quot;
7 providers: [provide('profileService', { useClass: ProfileService })] 7 providers: [provide('profileService', { useClass: ProfileService })]
8 }) 8 })
9 @Inject(ProfileService) 9 @Inject(ProfileService)
10 -export class ContentViewerActions { 10 +export class ContentViewerActionsComponent {
11 11
12 article: noosfero.Article; 12 article: noosfero.Article;
13 profile: noosfero.Profile; 13 profile: noosfero.Profile;
src/app/index.ts
@@ -2,7 +2,7 @@ import {NoosferoApp} from &quot;./index.module&quot;; @@ -2,7 +2,7 @@ import {NoosferoApp} from &quot;./index.module&quot;;
2 import {noosferoModuleConfig} from "./index.config"; 2 import {noosferoModuleConfig} from "./index.config";
3 import {noosferoAngularRunBlock} from "./index.run"; 3 import {noosferoAngularRunBlock} from "./index.run";
4 4
5 -import {Main} from "./main/main.component"; 5 +import {MainComponent} from "./main/main.component";
6 import {bootstrap, bundle} from "ng-forward"; 6 import {bootstrap, bundle} from "ng-forward";
7 7
8 import {AUTH_EVENTS} from "./login/auth-events"; 8 import {AUTH_EVENTS} from "./login/auth-events";
@@ -12,7 +12,7 @@ import {Navbar} from &quot;./layout/navbar/navbar&quot;; @@ -12,7 +12,7 @@ import {Navbar} from &quot;./layout/navbar/navbar&quot;;
12 12
13 declare var moment: any; 13 declare var moment: any;
14 14
15 -let noosferoApp: any = bundle("noosferoApp", Main, ["ngAnimate", "ngCookies", "ngStorage", "ngTouch", 15 +let noosferoApp: any = bundle("noosferoApp", MainComponent, ["ngAnimate", "ngCookies", "ngStorage", "ngTouch",
16 "ngSanitize", "ngMessages", "ngAria", "restangular", 16 "ngSanitize", "ngMessages", "ngAria", "restangular",
17 "ui.router", "ui.bootstrap", "toastr", 17 "ui.router", "ui.bootstrap", "toastr",
18 "angularMoment", "angular.filter", "akoenig.deckgrid", 18 "angularMoment", "angular.filter", "akoenig.deckgrid",
src/app/layout/language-selector/language-selector.component.spec.ts
1 import {ComponentFixture} from 'ng-forward/cjs/testing/test-component-builder'; 1 import {ComponentFixture} from 'ng-forward/cjs/testing/test-component-builder';
2 import {provide} from 'ng-forward'; 2 import {provide} from 'ng-forward';
3 3
4 -import {LanguageSelectorService} from './language-selector.component'; 4 +import {LanguageSelectorComponent} from './language-selector.component';
5 5
6 import * as helpers from "../../../spec/helpers"; 6 import * as helpers from "../../../spec/helpers";
7 7
@@ -17,7 +17,7 @@ describe(&quot;Components&quot;, () =&gt; { @@ -17,7 +17,7 @@ describe(&quot;Components&quot;, () =&gt; {
17 translatorService = jasmine.createSpyObj("translatorService", ["availableLanguages", "currentLanguage"]); 17 translatorService = jasmine.createSpyObj("translatorService", ["availableLanguages", "currentLanguage"]);
18 return helpers.quickCreateComponent({ 18 return helpers.quickCreateComponent({
19 template: "<language-selector></language-selector>", 19 template: "<language-selector></language-selector>",
20 - directives: [LanguageSelectorService], 20 + directives: [LanguageSelectorComponent],
21 providers: [ 21 providers: [
22 provide('TranslatorService', { 22 provide('TranslatorService', {
23 useValue: translatorService 23 useValue: translatorService
@@ -36,7 +36,7 @@ describe(&quot;Components&quot;, () =&gt; { @@ -36,7 +36,7 @@ describe(&quot;Components&quot;, () =&gt; {
36 36
37 it("call the translator service when change the language", (done) => { 37 it("call the translator service when change the language", (done) => {
38 let translatorService = jasmine.createSpyObj("translatorService", ["changeLanguage"]); 38 let translatorService = jasmine.createSpyObj("translatorService", ["changeLanguage"]);
39 - let languageSelector = new LanguageSelectorService(<any>translatorService); 39 + let languageSelector = new LanguageSelectorComponent(<any>translatorService);
40 languageSelector.changeLanguage("en"); 40 languageSelector.changeLanguage("en");
41 expect(translatorService.changeLanguage).toHaveBeenCalledWith("en"); 41 expect(translatorService.changeLanguage).toHaveBeenCalledWith("en");
42 done(); 42 done();
src/app/layout/language-selector/language-selector.component.ts
@@ -6,7 +6,7 @@ import {TranslatorService} from &quot;../../shared/services/translator.service&quot;; @@ -6,7 +6,7 @@ import {TranslatorService} from &quot;../../shared/services/translator.service&quot;;
6 templateUrl: "app/layout/language-selector/language-selector.html" 6 templateUrl: "app/layout/language-selector/language-selector.html"
7 }) 7 })
8 @Inject(TranslatorService) 8 @Inject(TranslatorService)
9 -export class LanguageSelectorService { 9 +export class LanguageSelectorComponent {
10 10
11 constructor(private translatorService: TranslatorService) { } 11 constructor(private translatorService: TranslatorService) { }
12 12
src/app/layout/navbar/navbar.ts
1 import {Component, Inject} from "ng-forward"; 1 import {Component, Inject} from "ng-forward";
2 -import {LanguageSelectorService} from "../language-selector/language-selector.component"; 2 +import {LanguageSelectorComponent} from "../language-selector/language-selector.component";
3 3
4 4
5 import {SessionService, AuthService, AuthController, IAuthEvents, AUTH_EVENTS} from "./../../login"; 5 import {SessionService, AuthService, AuthController, IAuthEvents, AUTH_EVENTS} from "./../../login";
@@ -7,7 +7,7 @@ import {SessionService, AuthService, AuthController, IAuthEvents, AUTH_EVENTS} f @@ -7,7 +7,7 @@ import {SessionService, AuthService, AuthController, IAuthEvents, AUTH_EVENTS} f
7 @Component({ 7 @Component({
8 selector: "acme-navbar", 8 selector: "acme-navbar",
9 templateUrl: "app/layout/navbar/navbar.html", 9 templateUrl: "app/layout/navbar/navbar.html",
10 - directives: [LanguageSelectorService], 10 + directives: [LanguageSelectorComponent],
11 providers: [AuthService, SessionService] 11 providers: [AuthService, SessionService]
12 }) 12 })
13 @Inject("$modal", AuthService, "SessionService", "$scope", "$state") 13 @Inject("$modal", AuthService, "SessionService", "$scope", "$state")
src/app/main/main.component.ts
@@ -28,7 +28,7 @@ import {MainBlockComponent} from &quot;../layout/blocks/main-block/main-block.compone @@ -28,7 +28,7 @@ import {MainBlockComponent} from &quot;../layout/blocks/main-block/main-block.compone
28 28
29 /** 29 /**
30 * @ngdoc controller 30 * @ngdoc controller
31 - * @name main.MainContent 31 + * @name main.MainContentComponent
32 * @requires AuthService, Session 32 * @requires AuthService, Session
33 * @descrition 33 * @descrition
34 * This controller actually contains the main content of Noosfero Angular Theme: 34 * This controller actually contains the main content of Noosfero Angular Theme:
@@ -41,7 +41,7 @@ import {MainBlockComponent} from &quot;../layout/blocks/main-block/main-block.compone @@ -41,7 +41,7 @@ import {MainBlockComponent} from &quot;../layout/blocks/main-block/main-block.compone
41 templateUrl: "app/main/main.html", 41 templateUrl: "app/main/main.html",
42 providers: [AuthService, SessionService] 42 providers: [AuthService, SessionService]
43 }) 43 })
44 -export class MainContent { 44 +export class MainContentComponent {
45 45
46 } 46 }
47 47
@@ -55,7 +55,7 @@ export class MainContent { @@ -55,7 +55,7 @@ export class MainContent {
55 * The Main controller for the Noosfero Angular Theme application. 55 * The Main controller for the Noosfero Angular Theme application.
56 * 56 *
57 * The main route '/' is defined as the URL for this controller, which routes 57 * The main route '/' is defined as the URL for this controller, which routes
58 - * requests to the {@link main.MainContent} controller and also, the '/profile' route, 58 + * requests to the {@link main.MainContentComponent} controller and also, the '/profile' route,
59 * which routes requests to the {@link profile.Profile} controller. See {@link profile.Profile} 59 * which routes requests to the {@link profile.Profile} controller. See {@link profile.Profile}
60 * for more details on how various Noosfero profiles are rendered. 60 * for more details on how various Noosfero profiles are rendered.
61 */ 61 */
@@ -72,7 +72,7 @@ export class MainContent { @@ -72,7 +72,7 @@ export class MainContent {
72 @StateConfig([ 72 @StateConfig([
73 { 73 {
74 url: '/', 74 url: '/',
75 - component: MainContent, 75 + component: MainContentComponent,
76 name: 'main', 76 name: 'main',
77 }, 77 },
78 { 78 {
@@ -89,6 +89,6 @@ export class MainContent { @@ -89,6 +89,6 @@ export class MainContent {
89 } 89 }
90 } 90 }
91 ]) 91 ])
92 -export class Main { 92 +export class MainComponent {
93 93
94 } 94 }
src/app/profile/myprofile.component.ts
@@ -4,6 +4,6 @@ import {Component} from &quot;ng-forward&quot;; @@ -4,6 +4,6 @@ import {Component} from &quot;ng-forward&quot;;
4 selector: 'profile', 4 selector: 'profile',
5 templateUrl: "app/profile/profile.html", 5 templateUrl: "app/profile/profile.html",
6 }) 6 })
7 -export class MyProfile { 7 +export class MyProfileComponent {
8 8
9 } 9 }
src/app/profile/profile-home.component.ts
@@ -8,7 +8,7 @@ import {ProfileService} from &quot;../../lib/ng-noosfero-api/http/profile.service&quot;; @@ -8,7 +8,7 @@ import {ProfileService} from &quot;../../lib/ng-noosfero-api/http/profile.service&quot;;
8 providers: [provide('profileService', { useClass: ProfileService })] 8 providers: [provide('profileService', { useClass: ProfileService })]
9 }) 9 })
10 @Inject(ProfileService, "$state") 10 @Inject(ProfileService, "$state")
11 -export class ProfileHome { 11 +export class ProfileHomeComponent {
12 12
13 profile: noosfero.Profile; 13 profile: noosfero.Profile;
14 14
src/app/profile/profile.component.ts
1 import {StateConfig, Component, Inject, provide} from 'ng-forward'; 1 import {StateConfig, Component, Inject, provide} from 'ng-forward';
2 import {ProfileInfoComponent} from './info/profile-info.component'; 2 import {ProfileInfoComponent} from './info/profile-info.component';
3 -import {ProfileHome} from './profile-home.component'; 3 +import {ProfileHomeComponent} from './profile-home.component';
4 import {BasicEditorComponent} from '../article/basic-editor.component'; 4 import {BasicEditorComponent} from '../article/basic-editor.component';
5 import {ContentViewerComponent} from "../article/content-viewer/content-viewer.component"; 5 import {ContentViewerComponent} from "../article/content-viewer/content-viewer.component";
6 -import {ContentViewerActions} from "../article/content-viewer/content-viewer-actions.component"; 6 +import {ContentViewerActionsComponent} from "../article/content-viewer/content-viewer-actions.component";
7 import {ActivitiesComponent} from "./activities/activities.component"; 7 import {ActivitiesComponent} from "./activities/activities.component";
8 import {ProfileService} from "../../lib/ng-noosfero-api/http/profile.service"; 8 import {ProfileService} from "../../lib/ng-noosfero-api/http/profile.service";
9 import {NotificationService} from "../shared/services/notification.service"; 9 import {NotificationService} from "../shared/services/notification.service";
10 -import {MyProfile} from "./myprofile.component"; 10 +import {MyProfileComponent} from "./myprofile.component";
11 11
12 12
13 /** 13 /**
@@ -42,7 +42,7 @@ import {MyProfile} from &quot;./myprofile.component&quot;; @@ -42,7 +42,7 @@ import {MyProfile} from &quot;./myprofile.component&quot;;
42 { 42 {
43 name: 'main.profile.settings', 43 name: 'main.profile.settings',
44 url: "^/myprofile/:profile", 44 url: "^/myprofile/:profile",
45 - component: MyProfile 45 + component: MyProfileComponent
46 }, 46 },
47 { 47 {
48 name: 'main.profile.cms', 48 name: 'main.profile.cms',
@@ -59,10 +59,10 @@ import {MyProfile} from &quot;./myprofile.component&quot;; @@ -59,10 +59,10 @@ import {MyProfile} from &quot;./myprofile.component&quot;;
59 { 59 {
60 name: 'main.profile.home', 60 name: 'main.profile.home',
61 url: "", 61 url: "",
62 - component: ProfileHome, 62 + component: ProfileHomeComponent,
63 views: { 63 views: {
64 "mainBlockContent": { 64 "mainBlockContent": {
65 - controller: ProfileHome, 65 + controller: ProfileHomeComponent,
66 controllerAs: "vm" 66 controllerAs: "vm"
67 } 67 }
68 } 68 }
@@ -79,7 +79,7 @@ import {MyProfile} from &quot;./myprofile.component&quot;; @@ -79,7 +79,7 @@ import {MyProfile} from &quot;./myprofile.component&quot;;
79 }, 79 },
80 "actions@main": { 80 "actions@main": {
81 templateUrl: "app/article/content-viewer/navbar-actions.html", 81 templateUrl: "app/article/content-viewer/navbar-actions.html",
82 - controller: ContentViewerActions, 82 + controller: ContentViewerActionsComponent,
83 controllerAs: "vm" 83 controllerAs: "vm"
84 } 84 }
85 } 85 }