diff --git a/ng2-components/ng2-alfresco-login/README.md b/ng2-components/ng2-alfresco-login/README.md
index d06660d9e5..98921b5be6 100644
--- a/ng2-components/ng2-alfresco-login/README.md
+++ b/ng2-components/ng2-alfresco-login/README.md
@@ -166,8 +166,8 @@ platformBrowserDynamic().bootstrapModule(AppModule);
| `logoImageUrl` | string | Alfresco logo image | To change the logo image with a customised image |
| `backgroundImageUrl` | string | Alfresco background image | To change the background image with a customised image |
| `fieldsValidation` | { [key: string]: any; }, extra?: { [key: string]: any; } | | Use it to customise the validation rules of the login form |
-| `showRememberMe` | boolean | false | Toggle `Remember me` checkbox visibility |
-| `showLoginActions` | boolean | false | Toggle extra actions visibility (`Need Help`, `Register`, etc.) |
+| `showRememberMe` | boolean | true | Toggle `Remember me` checkbox visibility |
+| `showLoginActions` | boolean | true | Toggle extra actions visibility (`Need Help`, `Register`, etc.) |
#### Events
diff --git a/ng2-components/ng2-alfresco-login/package.json b/ng2-components/ng2-alfresco-login/package.json
index 2febe1aaf6..315c91b373 100644
--- a/ng2-components/ng2-alfresco-login/package.json
+++ b/ng2-components/ng2-alfresco-login/package.json
@@ -10,7 +10,7 @@
"tslint": "../node_modules/tslint/bin/tslint -c ../config/assets/tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts'",
"tsc": "../node_modules/typescript/bin/tsc",
"test": "../node_modules/karma/bin/karma start ../config/karma.conf.js --reporters mocha,coverage --single-run --component ng2-alfresco-login",
- "test-browser": "concurrently \"../node_modules/karma/bin/karma start ../config/karma.conf.js --reporters kjhtml --component ng2-alfresco-login\"",
+ "test-browser": "../node_modules/karma/bin/karma start ../config/karma.conf.js --reporters kjhtml --component ng2-alfresco-login",
"coverage": "npm run test && ../node_modules/wsrv/bin/wsrv -o -p 9875 ./coverage/report",
"publish:prod": "npm run test && npm publish"
},
diff --git a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.html b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.html
index 7cf4430e4b..a9fa74f8c5 100644
--- a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.html
+++ b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.html
@@ -63,18 +63,18 @@
-
+
{{'LOGIN.LABEL.REMEMBER' | translate }}
-
+
-
+
diff --git a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.spec.ts b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.spec.ts
index db7499d9d9..bb482568b8 100644
--- a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.spec.ts
+++ b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.spec.ts
@@ -63,17 +63,15 @@ describe('AlfrescoLogin', () => {
expect(element.querySelector('[for="username"]')).toBeDefined();
expect(element.querySelector('[for="username"]').innerText).toEqual('LOGIN.LABEL.USERNAME');
+ expect(element.querySelector('#login-remember')).toBeDefined();
+ expect(element.querySelector('#login-remember').innerText).toContain('LOGIN.LABEL.REMEMBER');
+
expect(element.querySelector('[for="password"]')).toBeDefined();
expect(element.querySelector('[for="password"]').innerText).toEqual('LOGIN.LABEL.PASSWORD');
expect(element.querySelector('#login-button')).toBeDefined();
expect(element.querySelector('#login-button').innerText).toEqual('LOGIN.BUTTON.LOGIN');
- /*
- expect(element.querySelector('#login-remember')).toBeDefined();
- expect(element.querySelector('#login-remember').innerText).toEqual('LOGIN.LABEL.REMEMBER');
- */
-
expect(element.querySelector('#login-action-help')).toBeDefined();
expect(element.querySelector('#login-action-help').innerText).toEqual('LOGIN.ACTION.HELP');
@@ -89,6 +87,23 @@ describe('AlfrescoLogin', () => {
expect(element.querySelector('input[type="text"]').value).toEqual('');
});
+ it('should hide remember me if showRememberMe is false', () => {
+ component.showRememberMe = false;
+
+ fixture.detectChanges();
+
+ expect(element.querySelector('#login-remember')).toBe(null);
+ });
+
+ it('should hide login actions if showLoginActions is false', () => {
+ component.showLoginActions = false;
+
+ fixture.detectChanges();
+
+ expect(element.querySelector('#login-action-help')).toBe(null);
+ expect(element.querySelector('#login-action-register')).toBe(null);
+ });
+
it('should render validation min-length error when the username is just 1 character', () => {
usernameInput.value = '1';
usernameInput.dispatchEvent(new Event('input'));
diff --git a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts
index 40c3b6fccf..a9076422b5 100644
--- a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts
+++ b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts
@@ -33,10 +33,10 @@ export class AlfrescoLoginComponent implements OnInit {
isPasswordShow: boolean = false;
@Input()
- showRememberMe: boolean = false;
+ showRememberMe: boolean = true;
@Input()
- showLoginActions: boolean = false;
+ showLoginActions: boolean = true;
@Input()
needHelpLink: string = '';