Skip to content

Commit

Permalink
tests fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepakSap14 committed Apr 16, 2020
1 parent c925f18 commit 047ed4f
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,16 @@ describe('Checkbox test Component', () => {
expect(fdElem.nativeElement.getAttribute('ng-reflect-name')).toEqual('fdp-checkbox-0');
expect(fdElem.nativeElement.getAttribute('ng-reflect-label')).toEqual('test checkbox');
expect(fdElem.nativeElement.getAttribute('ng-reflect-input-id')).toEqual('id0');
expect(fdElem.nativeElement.getAttribute('ng-reflect-state')).toEqual('default');
expect(fdElem.nativeElement.getAttribute('ng-reflect-compact')).toBeTruthy();
expect(fdElem.nativeElement.getAttribute('ng-reflect-tristate')).toBeTruthy();

// Input Element
expect(checkboxInput.nativeElement.getAttribute('ng-reflect-name')).toEqual('fdp-checkbox-0');
expect(checkboxInput.nativeElement.getAttribute('ng-reflect-ng-class')).toEqual('is-default');
expect(checkboxInput.nativeElement.getAttribute('type')).toEqual('checkbox');
expect(checkboxInput.nativeElement.getAttribute('id')).toEqual('id0');
expect(checkboxLable.nativeElement.classList.contains('fd-checkbox__label--compact')).toBeTruthy();
expect(checkboxInput.nativeElement.classList.contains('fd-checkbox--compact')).toBeTruthy();
expect(checkboxLable.nativeElement.classList.contains('fd-checkbox__label')).toBeTruthy();
expect(checkboxInput.nativeElement.classList.contains('is-default')).toBeTruthy();
expect(checkboxInput.nativeElement.classList.contains('fd-checkbox')).toBeTruthy();
});

Expand Down Expand Up @@ -225,18 +222,15 @@ describe('Checkbox test Component with Template driven form', () => {
expect(fdElem.nativeElement.getAttribute('ng-reflect-name')).toEqual('fdp-checkbox-1');
expect(fdElem.nativeElement.getAttribute('ng-reflect-label')).toEqual('test checkbox');
expect(fdElem.nativeElement.getAttribute('ng-reflect-input-id')).toEqual('id1');
expect(fdElem.nativeElement.getAttribute('ng-reflect-state')).toEqual('default');
expect(fdElem.nativeElement.getAttribute('ng-reflect-compact')).toBeTruthy();

// Input Element
expect(checkboxInput.nativeElement.getAttribute('ng-reflect-name')).toEqual('fdp-checkbox-1');
expect(checkboxInput.nativeElement.getAttribute('ng-reflect-ng-class')).toEqual('is-default');
expect(checkboxInput.nativeElement.getAttribute('type')).toEqual('checkbox');
expect(checkboxInput.nativeElement.getAttribute('id')).toEqual('id1');
expect(checkboxLable.nativeElement.classList.contains('fd-checkbox__label--compact')).toBeTruthy();
expect(checkboxInput.nativeElement.classList.contains('fd-checkbox--compact')).toBeTruthy();
expect(checkboxLable.nativeElement.classList.contains('fd-checkbox__label')).toBeTruthy();
expect(checkboxInput.nativeElement.classList.contains('is-default')).toBeTruthy();
expect(checkboxInput.nativeElement.classList.contains('fd-checkbox')).toBeTruthy();
});

Expand Down

0 comments on commit 047ed4f

Please sign in to comment.