aboutsummaryrefslogtreecommitdiffstats
path: root/src/angular/form-elements/checkbox
diff options
context:
space:
mode:
Diffstat (limited to 'src/angular/form-elements/checkbox')
-rw-r--r--src/angular/form-elements/checkbox/checkbox.component.html.ts4
-rw-r--r--src/angular/form-elements/checkbox/checkbox.component.spec.ts1
-rw-r--r--src/angular/form-elements/checkbox/checkbox.component.ts3
3 files changed, 4 insertions, 4 deletions
diff --git a/src/angular/form-elements/checkbox/checkbox.component.html.ts b/src/angular/form-elements/checkbox/checkbox.component.html.ts
index f4031db..3fdd53f 100644
--- a/src/angular/form-elements/checkbox/checkbox.component.html.ts
+++ b/src/angular/form-elements/checkbox/checkbox.component.html.ts
@@ -1,7 +1,7 @@
-export default `
+export const template = `
<div class="sdc-checkbox">
<label SdcRippleClickAnimation [rippleClickDisabled]="disabled">
- <input type="checkbox" class="sdc-checkbox__input" [ngModel]="checked" (ngModelChange)="toggleState($event)" [disabled]="disabled">
+ <input type="checkbox" class="sdc-checkbox__input" [ngModel]="checked" (ngModelChange)="toggleState($event)" [disabled]="disabled" [attr.data-tests-id]="testId">
<span class="sdc-checkbox__label">{{ label }}</span>
</label>
</div>
diff --git a/src/angular/form-elements/checkbox/checkbox.component.spec.ts b/src/angular/form-elements/checkbox/checkbox.component.spec.ts
index 36f478e..8fc63e2 100644
--- a/src/angular/form-elements/checkbox/checkbox.component.spec.ts
+++ b/src/angular/form-elements/checkbox/checkbox.component.spec.ts
@@ -3,7 +3,6 @@ import { CheckboxComponent } from "./checkbox.component";
import { AnimationDirectivesModule } from "../../animations/animation-directives.module";
import { FormsModule } from "@angular/forms";
-
describe("Checbox Tests", ()=>{
let component: CheckboxComponent;
beforeEach(async(() => {
diff --git a/src/angular/form-elements/checkbox/checkbox.component.ts b/src/angular/form-elements/checkbox/checkbox.component.ts
index ec05eac..2b50e6d 100644
--- a/src/angular/form-elements/checkbox/checkbox.component.ts
+++ b/src/angular/form-elements/checkbox/checkbox.component.ts
@@ -1,5 +1,5 @@
import { Component, Input, Output, EventEmitter, ViewEncapsulation } from '@angular/core';
-import template from "./checkbox.component.html";
+import { template } from "./checkbox.component.html";
@Component({
selector: 'sdc-checkbox',
@@ -10,6 +10,7 @@ export class CheckboxComponent {
@Input() label:string;
@Input() checked:boolean;
@Input() disabled:boolean;
+ @Input() testId: string;
@Output() checkedChange:EventEmitter<any> = new EventEmitter<any>();
public toggleState(newState:boolean) {