Skip to content

Commit

Permalink
fix(login): remove untranslated Notify.warn()
Browse files Browse the repository at this point in the history
This commit removes an annoying Notify.warn() call that happens when the
user is trying to access a substate of the application, but is not
logged in.  Because it is one of the first things loaded, it can never
be translated correctly, making the application look broken.
  • Loading branch information
jniles committed Sep 22, 2017
1 parent 4f5089a commit 791edb7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
5 changes: 0 additions & 5 deletions client/src/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ function startupConfig($rootScope, $state, $uibModalStack, SessionService, amMom
// to the login page.
} else if (!isLoggedIn && !isLoginState) {
event.preventDefault();

if (!isRootState) {
Notify.warn('AUTH.UNAUTHENTICATED');
}

$state.go('login');
}

Expand Down
13 changes: 0 additions & 13 deletions test/end-to-end/login/login.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,6 @@ describe('Login Page', () => {
expect(defaultProject).to.not.be.empty;
});

it('prevents navigation to other pages with a growl notification', () => {
// assert that we are on the login page with no notifications present on the page
expect(helpers.getCurrentPath()).to.eventually.equal('#!/login');
FU.exists(by.css('[data-bh-growl-notification]'), false);

// attempt to navigate to the settings page
helpers.navigate(settings);

// assert that we are still on the login page with a notification
expect(helpers.getCurrentPath()).to.eventually.equal('#!/login');
components.notification.hasWarn();
});

it('allows a valid user to log in to the application', () => {
FU.input('LoginCtrl.credentials.username', 'superuser');
FU.input('LoginCtrl.credentials.password', 'superuser');
Expand Down

0 comments on commit 791edb7

Please sign in to comment.