mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4394]Add two more tests on copyContent (#4630)
* Add two more tests * Update data-table-component.page.ts * Fix lint issues
This commit is contained in:
committed by
Eugenio Romano
parent
6e4adfb09a
commit
b58e040d7e
@@ -164,10 +164,30 @@ describe('Datatable component', () => {
|
||||
expect(copyContentDataTablePage.getClipboardInputText()).toEqual('1');
|
||||
copyContentDataTablePage.clickOnIdColumn('2');
|
||||
notificationPage.checkNotifyContains('Text copied to clipboard');
|
||||
copyContentDataTablePage.mouseOverIdColumn('3');
|
||||
copyContentDataTablePage.clickOnIdColumn('3');
|
||||
notificationPage.checkNotifyContains('Text copied to clipboard');
|
||||
copyContentDataTablePage.pasteClipboard();
|
||||
expect(copyContentDataTablePage.getClipboardInputText()).toEqual('3');
|
||||
});
|
||||
|
||||
it('[C307100] A column value of type text and with copyContent set to true is copied when clicking on it', () => {
|
||||
dataTablePage.mouseOverIdColumn('1');
|
||||
expect(dataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
dataTablePage.clickOnIdColumn('1');
|
||||
notificationPage.checkNotifyContains('Text copied to clipboard');
|
||||
dataTablePage.pasteClipboard();
|
||||
expect(dataTablePage.getClipboardInputText()).toEqual('1');
|
||||
});
|
||||
|
||||
it('[C307101] A column value of type json and with copyContent set to true is copied when clicking on it', () => {
|
||||
const jsonValue = `{ "id": 4 }`;
|
||||
copyContentDataTablePage.mouseOverJsonColumn(2);
|
||||
expect(copyContentDataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
copyContentDataTablePage.clickOnJsonColumn(2);
|
||||
notificationPage.checkNotifyContains('Text copied to clipboard');
|
||||
copyContentDataTablePage.pasteClipboard();
|
||||
expect(copyContentDataTablePage.getClipboardInputText()).toContain(jsonValue);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user