Skip to content

Commit

Permalink
adapt client tests
Browse files Browse the repository at this point in the history
  • Loading branch information
edkaya committed Oct 8, 2024
1 parent 182626b commit 7ee076e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@ describe('FileUploadExamSubmissionComponent', () => {
expect(FileUploadExamSubmissionComponent).not.toBeNull();
});

it('should show exercise group title', () => {
comp.exercise.exerciseGroup = { title: 'Test Group' } as ExerciseGroup;
it('should show static text in header', () => {
fixture.detectChanges();
const el = fixture.debugElement.query((de) => de.nativeElement.textContent === comp.exercise.exerciseGroup?.title);
const el = fixture.debugElement.query((de) => de.nativeElement.textContent === 'artemisApp.exam.yourSolution');
expect(el).not.toBeNull();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { ArtemisTestModule } from '../../../../test.module';
import { IncludedInScoreBadgeComponent } from 'app/exercises/shared/exercise-headers/included-in-score-badge.component';
import { ExamExerciseUpdateHighlighterComponent } from 'app/exam/participate/exercises/exam-exercise-update-highlighter/exam-exercise-update-highlighter.component';
import { NgbTooltipMocksModule } from '../../../../helpers/mocks/directive/ngbTooltipMocks.module';
import { ExerciseGroup } from 'app/entities/exercise-group.model';
import { SubmissionVersion } from 'app/entities/submission-version.model';

describe('ModelingExamSubmissionComponent', () => {
Expand Down Expand Up @@ -69,10 +68,9 @@ describe('ModelingExamSubmissionComponent', () => {
expect(ModelingExamSubmissionComponent).not.toBeNull();
});

it('should show exercise group title', () => {
comp.exercise.exerciseGroup = { title: 'Test Group' } as ExerciseGroup;
it('should show static text in header', () => {
fixture.detectChanges();
const el = fixture.debugElement.query((de) => de.nativeElement.textContent === comp.exercise.exerciseGroup?.title);
const el = fixture.debugElement.query((de) => de.nativeElement.textContent === 'artemisApp.exam.yourSolution');
expect(el).not.toBeNull();
});

Expand Down

0 comments on commit 7ee076e

Please sign in to comment.