Commit a3e051beaea2edb94373754bcd0152af7a92ff21
1 parent
27d8cca6
Exists in
master
and in
1 other branch
fixed paths after folders changes
Showing
3 changed files
with
4 additions
and
50 deletions
Show diff stats
src/app/components/language-selector/language-selector.component.spec.ts
@@ -1,46 +0,0 @@ | @@ -1,46 +0,0 @@ | ||
1 | -import {ComponentFixture} from 'ng-forward/cjs/testing/test-component-builder'; | ||
2 | -import {provide} from 'ng-forward'; | ||
3 | - | ||
4 | -import {LanguageSelector} from './language-selector.component'; | ||
5 | - | ||
6 | -import * as helpers from "../../../spec/helpers"; | ||
7 | - | ||
8 | -describe("Components", () => { | ||
9 | - | ||
10 | - describe("Language Selector Component", () => { | ||
11 | - | ||
12 | - beforeEach(angular.mock.module("templates")); | ||
13 | - | ||
14 | - let translatorService: any; | ||
15 | - | ||
16 | - let buildComponent = (): Promise<ComponentFixture> => { | ||
17 | - translatorService = jasmine.createSpyObj("translatorService", ["availableLanguages", "currentLanguage"]); | ||
18 | - return helpers.quickCreateComponent({ | ||
19 | - template: "<language-selector></language-selector>", | ||
20 | - directives: [LanguageSelector], | ||
21 | - providers: [ | ||
22 | - provide('TranslatorService', { | ||
23 | - useValue: translatorService | ||
24 | - }) | ||
25 | - ].concat(helpers.provideFilters("translateFilter")) | ||
26 | - }); | ||
27 | - }; | ||
28 | - | ||
29 | - it("display language options", (done) => { | ||
30 | - buildComponent().then(fixture => { | ||
31 | - fixture.debugElement.getLocal("$rootScope").$apply(); | ||
32 | - expect(fixture.debugElement.queryAll('li.language').length).toEqual(2); | ||
33 | - done(); | ||
34 | - }); | ||
35 | - }); | ||
36 | - | ||
37 | - it("call the translator service when change the language", (done) => { | ||
38 | - let translatorService = jasmine.createSpyObj("translatorService", ["changeLanguage"]); | ||
39 | - let languageSelector = new LanguageSelector(<any>translatorService); | ||
40 | - languageSelector.changeLanguage("en"); | ||
41 | - expect(translatorService.changeLanguage).toHaveBeenCalledWith("en"); | ||
42 | - done(); | ||
43 | - }); | ||
44 | - | ||
45 | - }); | ||
46 | -}); |
src/app/profile/info/profile-info.component.ts
@@ -3,7 +3,7 @@ import {ProfileService} from "../../../lib/ng-noosfero-api/http/profile.service" | @@ -3,7 +3,7 @@ import {ProfileService} from "../../../lib/ng-noosfero-api/http/profile.service" | ||
3 | 3 | ||
4 | @Component({ | 4 | @Component({ |
5 | selector: 'profile', | 5 | selector: 'profile', |
6 | - templateUrl: "app/profile-info/profile-info.html", | 6 | + templateUrl: "app/profile/info/profile-info.html", |
7 | providers: [provide('profileService', { useClass: ProfileService })] | 7 | providers: [provide('profileService', { useClass: ProfileService })] |
8 | }) | 8 | }) |
9 | @Inject(ProfileService) | 9 | @Inject(ProfileService) |
src/app/profile/profile.component.ts
@@ -33,7 +33,7 @@ import {MyProfile} from "./myprofile.component"; | @@ -33,7 +33,7 @@ import {MyProfile} from "./myprofile.component"; | ||
33 | component: ProfileInfoComponent, | 33 | component: ProfileInfoComponent, |
34 | views: { | 34 | views: { |
35 | "mainBlockContent": { | 35 | "mainBlockContent": { |
36 | - templateUrl: "app/profile-info/profile-info.html", | 36 | + templateUrl: "app/profile/info/profile-info.html", |
37 | controller: ProfileInfoComponent, | 37 | controller: ProfileInfoComponent, |
38 | controllerAs: "vm" | 38 | controllerAs: "vm" |
39 | } | 39 | } |
@@ -73,12 +73,12 @@ import {MyProfile} from "./myprofile.component"; | @@ -73,12 +73,12 @@ import {MyProfile} from "./myprofile.component"; | ||
73 | component: ContentViewerComponent, | 73 | component: ContentViewerComponent, |
74 | views: { | 74 | views: { |
75 | "mainBlockContent": { | 75 | "mainBlockContent": { |
76 | - templateUrl: "app/content-viewer/page.html", | 76 | + templateUrl: "app/article/content-viewer/page.html", |
77 | controller: ContentViewerComponent, | 77 | controller: ContentViewerComponent, |
78 | controllerAs: "vm" | 78 | controllerAs: "vm" |
79 | }, | 79 | }, |
80 | "actions@main": { | 80 | "actions@main": { |
81 | - templateUrl: "app/content-viewer/navbar-actions.html", | 81 | + templateUrl: "app/article/content-viewer/navbar-actions.html", |
82 | controller: ContentViewerActions, | 82 | controller: ContentViewerActions, |
83 | controllerAs: "vm" | 83 | controllerAs: "vm" |
84 | } | 84 | } |