mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
fix core test after e2e modify
This commit is contained in:
parent
e721c877f2
commit
c6c573bcfb
@ -28,7 +28,7 @@
|
|||||||
(click)="onNavigateBeforeClick()">
|
(click)="onNavigateBeforeClick()">
|
||||||
<mat-icon>navigate_before</mat-icon>
|
<mat-icon>navigate_before</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<img class="adf-viewer__mimeicon" [src]="mimeType | adfMimeTypeIcon " data-automation-id="adf-file-thumbnail">
|
<img class="adf-viewer__mimeicon" [src]="mimeType | adfMimeTypeIcon" data-automation-id="adf-file-thumbnail">
|
||||||
<span class="adf-viewer__display-name" id="adf-viewer-display-name">{{ displayName }}</span>
|
<span class="adf-viewer__display-name" id="adf-viewer-display-name">{{ displayName }}</span>
|
||||||
<button
|
<button
|
||||||
*ngIf="allowNavigate && canNavigateNext"
|
*ngIf="allowNavigate && canNavigateNext"
|
||||||
|
@ -285,27 +285,27 @@ describe('ViewerComponent', () => {
|
|||||||
describe('Toolbar', () => {
|
describe('Toolbar', () => {
|
||||||
|
|
||||||
it('should render fullscreen button', () => {
|
it('should render fullscreen button', () => {
|
||||||
expect(element.querySelector('[data-automation-id="toolbar-fullscreen"]')).toBeDefined();
|
expect(element.querySelector('[data-automation-id="adf-toolbar-fullscreen"]')).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not render fullscreen button', () => {
|
it('should not render fullscreen button', () => {
|
||||||
component.allowFullScreen = false;
|
component.allowFullScreen = false;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(element.querySelector('[data-automation-id="toolbar-fullscreen"]')).toBeNull();
|
expect(element.querySelector('[data-automation-id="adf-toolbar-fullscreen"]')).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render default download button', () => {
|
it('should render default download button', () => {
|
||||||
component.allowDownload = true;
|
component.allowDownload = true;
|
||||||
|
|
||||||
expect(element.querySelector('[data-automation-id="toolbar-download"]')).toBeDefined();
|
expect(element.querySelector('[data-automation-id="adf-toolbar-download"]')).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not render default download button', () => {
|
it('should not render default download button', () => {
|
||||||
component.allowDownload = false;
|
component.allowDownload = false;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(element.querySelector('[data-automation-id="toolbar-download"]')).toBeNull();
|
expect(element.querySelector('[data-automation-id="adf-toolbar-download"]')).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should invoke download action with the toolbar button', () => {
|
it('should invoke download action with the toolbar button', () => {
|
||||||
@ -313,7 +313,7 @@ describe('ViewerComponent', () => {
|
|||||||
spyOn(component, 'downloadContent').and.stub();
|
spyOn(component, 'downloadContent').and.stub();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
const button: HTMLButtonElement = element.querySelector('[data-automation-id="toolbar-download"]') as HTMLButtonElement;
|
const button: HTMLButtonElement = element.querySelector('[data-automation-id="adf-toolbar-download"]') as HTMLButtonElement;
|
||||||
button.click();
|
button.click();
|
||||||
|
|
||||||
expect(component.downloadContent).toHaveBeenCalled();
|
expect(component.downloadContent).toHaveBeenCalled();
|
||||||
@ -327,7 +327,7 @@ describe('ViewerComponent', () => {
|
|||||||
expect(e).not.toBeNull();
|
expect(e).not.toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
const button: HTMLButtonElement = element.querySelector('[data-automation-id="toolbar-download"]') as HTMLButtonElement;
|
const button: HTMLButtonElement = element.querySelector('[data-automation-id="adf-toolbar-download"]') as HTMLButtonElement;
|
||||||
button.click();
|
button.click();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -335,14 +335,14 @@ describe('ViewerComponent', () => {
|
|||||||
component.allowPrint = true;
|
component.allowPrint = true;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(element.querySelector('[data-automation-id="toolbar-print"]')).toBeDefined();
|
expect(element.querySelector('[data-automation-id="adf-toolbar-print"]')).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not render default print button', () => {
|
it('should not render default print button', () => {
|
||||||
component.allowPrint = false;
|
component.allowPrint = false;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(element.querySelector('[data-automation-id="toolbar-print"]')).toBeNull();
|
expect(element.querySelector('[data-automation-id="adf-toolbar-print"]')).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should invoke print action with the toolbar button', () => {
|
it('should invoke print action with the toolbar button', () => {
|
||||||
@ -351,7 +351,7 @@ describe('ViewerComponent', () => {
|
|||||||
|
|
||||||
spyOn(component, 'printContent').and.stub();
|
spyOn(component, 'printContent').and.stub();
|
||||||
|
|
||||||
const button: HTMLButtonElement = element.querySelector('[data-automation-id="toolbar-print"]') as HTMLButtonElement;
|
const button: HTMLButtonElement = element.querySelector('[data-automation-id="adf-toolbar-print"]') as HTMLButtonElement;
|
||||||
button.click();
|
button.click();
|
||||||
|
|
||||||
expect(component.printContent).toHaveBeenCalled();
|
expect(component.printContent).toHaveBeenCalled();
|
||||||
@ -365,7 +365,7 @@ describe('ViewerComponent', () => {
|
|||||||
expect(e).not.toBeNull();
|
expect(e).not.toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
const button: HTMLButtonElement = element.querySelector('[data-automation-id="toolbar-print"]') as HTMLButtonElement;
|
const button: HTMLButtonElement = element.querySelector('[data-automation-id="adf-toolbar-print"]') as HTMLButtonElement;
|
||||||
button.click();
|
button.click();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -373,14 +373,14 @@ describe('ViewerComponent', () => {
|
|||||||
component.allowShare = true;
|
component.allowShare = true;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(element.querySelector('[data-automation-id="toolbar-share"]')).toBeDefined();
|
expect(element.querySelector('[data-automation-id="adf-toolbar-share"]')).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not render default share button', () => {
|
it('should not render default share button', () => {
|
||||||
component.allowShare = false;
|
component.allowShare = false;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(element.querySelector('[data-automation-id="toolbar-share"]')).toBeNull();
|
expect(element.querySelector('[data-automation-id="adf-toolbar-share"]')).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should invoke share action with the toolbar button', () => {
|
it('should invoke share action with the toolbar button', () => {
|
||||||
@ -389,7 +389,7 @@ describe('ViewerComponent', () => {
|
|||||||
|
|
||||||
spyOn(component, 'shareContent').and.stub();
|
spyOn(component, 'shareContent').and.stub();
|
||||||
|
|
||||||
const button: HTMLButtonElement = element.querySelector('[data-automation-id="toolbar-share"]') as HTMLButtonElement;
|
const button: HTMLButtonElement = element.querySelector('[data-automation-id="adf-toolbar-share"]') as HTMLButtonElement;
|
||||||
button.click();
|
button.click();
|
||||||
|
|
||||||
expect(component.shareContent).toHaveBeenCalled();
|
expect(component.shareContent).toHaveBeenCalled();
|
||||||
@ -403,7 +403,7 @@ describe('ViewerComponent', () => {
|
|||||||
expect(e).not.toBeNull();
|
expect(e).not.toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
const button: HTMLButtonElement = element.querySelector('[data-automation-id="toolbar-share"]') as HTMLButtonElement;
|
const button: HTMLButtonElement = element.querySelector('[data-automation-id="adf-toolbar-share"]') as HTMLButtonElement;
|
||||||
button.click();
|
button.click();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user