Skip to content

Commit

Permalink
[ACS-5600]modified the changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasa-Nataliya committed Nov 28, 2023
1 parent 9fb76f6 commit f4211fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/core/src/lib/viewer/components/viewer.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,28 +118,28 @@ describe('ViewerComponent', () => {
describe('originalMimeType', () => {
const getMimeTypeIconElement = () => fixture.nativeElement.querySelector('.adf-viewer__mimeicon');

fit('should set alt attribute to originalMimeType when originalMimeType is provided', () => {
it('should set alt attribute to originalMimeType when originalMimeType is provided', () => {
component.originalMimeType = 'image/png';
fixture.detectChanges();
const altAttribute: string = getMimeTypeIconElement().getAttribute('alt');
expect(altAttribute).toBe('image/png');
});

fit('should set src attribute based on originalMimeType when originalMimeType is provided', () => {
it('should set src attribute based on originalMimeType when originalMimeType is provided', () => {
component.originalMimeType = 'image';
fixture.detectChanges();
const srcAttribute: string = getMimeTypeIconElement().getAttribute('src');
expect(srcAttribute).toContain('image');
});

fit('should set alt attribute to mimeType when originalMimeType is not provided', () => {
it('should set alt attribute to mimeType when originalMimeType is not provided', () => {
component.mimeType = 'application/pdf';
fixture.detectChanges();
const altAttribute: string = getMimeTypeIconElement().getAttribute('alt');
expect(altAttribute).toBe('application/pdf');
});

fit('should set src attribute based on mimeType when originalMimeType is not provided', () => {
it('should set src attribute based on mimeType when originalMimeType is not provided', () => {
component.mimeType = 'image';
fixture.detectChanges();
const srcAttribute: string = getMimeTypeIconElement().getAttribute('src');
Expand Down

0 comments on commit f4211fc

Please sign in to comment.