Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
AjayvirS committed Jan 9, 2025
1 parent 35a09ec commit d9fc794
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ describe('Plagiarism Cases Instructor View Component', () => {
}));

it('should scroll to the correct exercise element when scrollToExercise is called', () => {
component.exerciseId = 1;

const nativeElement1 = { id: 'exercise-with-plagiarism-case-1', scrollIntoView: jest.fn() };
const nativeElement2 = { id: 'exercise-with-plagiarism-case-2', scrollIntoView: jest.fn() };

Expand All @@ -254,7 +252,7 @@ describe('Plagiarism Cases Instructor View Component', () => {

component.exerciseWithPlagCasesElements = signal([elementRef1, elementRef2]);

component.scrollToExercise();
component.scrollToExerciseAfterViewInit(1);

expect(nativeElement1.scrollIntoView).toHaveBeenCalledWith({
behavior: 'smooth',
Expand Down

0 comments on commit d9fc794

Please sign in to comment.