mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4403] ClipboardDirective - add default translation key and fix styling (#4610)
* [ADF-4403] ClipboardDirective - add default translation key and fix style on sticky header * [ADF-4403] - lint * [ADF-4403] - revert datatable style * [ADF-4403] - fix unit tests * [ADF-4403] - fix e2e tests
This commit is contained in:
committed by
Maurizio Vitale
parent
fafe80c021
commit
834c32f23f
@@ -72,7 +72,7 @@ describe('CopyClipboardDirective', () => {
|
||||
|
||||
@Component({
|
||||
selector: 'adf-copy-conent-test-component',
|
||||
template: `<span adf-clipboard='DOCUMENT_LIST.ACTIONS.DOCUMENT.CLICK_TO_COPY'>{{ mockText }}</span>`
|
||||
template: `<span adf-clipboard>{{ mockText }}</span>`
|
||||
})
|
||||
class TestCopyClipboardComponent {
|
||||
|
||||
@@ -105,16 +105,16 @@ describe('CopyClipboardDirective', () => {
|
||||
const spanHTMLElement: HTMLInputElement = <HTMLInputElement> element.querySelector('span');
|
||||
spanHTMLElement.dispatchEvent(new Event('mouseenter'));
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement.querySelector('.adf-datatable-copy-tooltip')).not.toBeNull();
|
||||
expect(fixture.debugElement.nativeElement.querySelector('.adf-copy-tooltip')).not.toBeNull();
|
||||
}));
|
||||
|
||||
it('should not show tooltip when element it is not hovered', (() => {
|
||||
const spanHTMLElement: HTMLInputElement = <HTMLInputElement> element.querySelector('span');
|
||||
spanHTMLElement.dispatchEvent(new Event('mouseenter'));
|
||||
expect(fixture.debugElement.nativeElement.querySelector('.adf-datatable-copy-tooltip')).not.toBeNull();
|
||||
expect(fixture.debugElement.nativeElement.querySelector('.adf-copy-tooltip')).not.toBeNull();
|
||||
|
||||
spanHTMLElement.dispatchEvent(new Event('mouseleave'));
|
||||
expect(fixture.debugElement.nativeElement.querySelector('.adf-datatable-copy-tooltip')).toBeNull();
|
||||
expect(fixture.debugElement.nativeElement.querySelector('.adf-copy-tooltip')).toBeNull();
|
||||
}));
|
||||
|
||||
it('should copy the content of element when click it', fakeAsync(() => {
|
||||
|
Reference in New Issue
Block a user