Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Commit

Permalink
test: fix failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dsifford committed Jan 20, 2017
1 parent 6403e89 commit 11a4392
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/lib/js/__tests__/Frontend-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@ describe('Frontend', () => {
});
it('should toggle on click', () => {
const heading = <HTMLHeadingElement>document.querySelector('.abt-bibliography__heading');
expect(heading.classList.contains('abt-hidden')).toBe(true);
const bibContainer = <HTMLHeadingElement>document.querySelector('.abt-bibliography__container');
expect(heading.classList.contains('abt-bibliography__heading_toggle--closed')).toBe(true);
expect(bibContainer.classList.contains('abt-bibligraphy__container--hidden')).toBe(true);
heading.click();
expect(heading.classList.contains('abt-hidden')).toBe(false);
expect(heading.classList.contains('abt-bibliography__heading_toggle--closed')).toBe(false);
expect(bibContainer.classList.contains('abt-bibligraphy__container--hidden')).toBe(false);
heading.click();
expect(heading.classList.contains('abt-hidden')).toBe(true);
expect(heading.classList.contains('abt-bibliography__heading_toggle--closed')).toBe(true);
expect(bibContainer.classList.contains('abt-bibligraphy__container--hidden')).toBe(true);
});
});
});

0 comments on commit 11a4392

Please sign in to comment.