Commit 7b83777a9543a4a7ebe1ab4ca1e825155e1f1944
1 parent
51c69a49
Exists in
master
and in
1 other branch
Fix state to transition after registration
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
src/app/account/register.component.spec.ts
... | ... | @@ -64,7 +64,7 @@ describe("Register Component", () => { |
64 | 64 | helper.detectChanges(); |
65 | 65 | |
66 | 66 | expect(registerService.createAccount).toHaveBeenCalledWith(user_data); |
67 | - expect(stateService.transitionTo).toHaveBeenCalledWith("main.environment"); | |
67 | + expect(stateService.transitionTo).toHaveBeenCalledWith("main.environment.home"); | |
68 | 68 | expect(notificationService.success).toHaveBeenCalled(); |
69 | 69 | |
70 | 70 | done(); |
... | ... | @@ -85,7 +85,7 @@ describe("Register Component", () => { |
85 | 85 | |
86 | 86 | expect(registerService.createAccount).toHaveBeenCalledWith(user_data); |
87 | 87 | |
88 | - expect(stateService.transitionTo).not.toHaveBeenCalledWith("main.environment"); | |
88 | + expect(stateService.transitionTo).not.toHaveBeenCalledWith("main.environment.home"); | |
89 | 89 | expect(notificationService.error).toHaveBeenCalled(); |
90 | 90 | |
91 | 91 | done(); | ... | ... |
src/app/account/register.component.ts
... | ... | @@ -41,7 +41,7 @@ export class RegisterComponent { |
41 | 41 | let field = ''; |
42 | 42 | this.errorMessages = []; |
43 | 43 | this.registerService.createAccount(this.account).then((response) => { |
44 | - this.$state.transitionTo('main.environment'); | |
44 | + this.$state.transitionTo('main.environment.home'); | |
45 | 45 | this.notificationService.success({ title: "account.register.success.title", message: "account.register.success.message" }); |
46 | 46 | }).catch((response) => { |
47 | 47 | if (response.data.error) { | ... | ... |