Skip to content

Commit

Permalink
Fixing FAQ component for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckinghamAJ committed Nov 18, 2024
1 parent 24f3aeb commit 1d9f35a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/app/help/faq/faq.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,10 @@ describe('FaqComponent', () => {
const mockElement = document.createElement('div');
mockElement.id = 'test';
spyOn(document, 'getElementById').and.returnValue(mockElement);
spyOn($.fn, 'animate');
spyOn(mockElement, 'scrollIntoView');
component.scroll('test');
expect(document.getElementById).toHaveBeenCalledWith('test');
expect($.fn.animate).toHaveBeenCalledWith({
scrollTop: $(mockElement).offset().top - 80
});
expect(mockElement.scrollIntoView).toHaveBeenCalledWith({ behavior: 'smooth', block: 'start' });
});

it('should search for text', () => {
Expand Down

1 comment on commit 1d9f35a

@collinschreyer-dev
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go!

Please sign in to comment.