Skip to content

Commit

Permalink
fix image tab missing text
Browse files Browse the repository at this point in the history
  • Loading branch information
lukavdplas committed Oct 25, 2023
1 parent e7cde60 commit 8ffbd2e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<ng-template iaTabPanel *ngFor="let field of contentFields" [id]="field.name" [title]="field.displayName" [icon]="tabIcons.text">
<div class="content" [innerHtml]="highlightedInnerHtml(field)"></div>
</ng-template>
<ng-template iaTabPanel id="scan" *ngIf="showScanTab">
<ng-template iaTabPanel id="scan" *ngIf="showScanTab" title="Image" [icon]="tabIcons.scan">
<ia-image-view [corpus]="corpus" [document]="document"></ia-image-view>
</ng-template>
</ia-tabs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,11 @@ describe('DocumentViewComponent', () => {
const element = debug[0].nativeElement;
expect(element.textContent).toBe('Hello world!');
});

it('should create tabs', () => {
const debug = fixture.debugElement.queryAll(By.css('a[role=tab]'));
expect(debug.length).toBe(2);
expect(debug[0].attributes['id']).toBe('tab-speech');
expect(debug[1].attributes['id']).toBe('tab-scan');
});
});
3 changes: 3 additions & 0 deletions frontend/src/app/services/corpus.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ describe('CorpusService', () => {
expect(items.length).toBe(1);
const corpus = _.first(items);

expect(corpus.scan_image_type).toBe('png');

const fieldData = [
{
description: 'Banking concern to which the report belongs.',
Expand Down Expand Up @@ -275,6 +277,7 @@ describe('CorpusService', () => {
expect(result[key]).toEqual(expected[key]);
});
});

});
});
});

0 comments on commit 8ffbd2e

Please sign in to comment.