mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4122] Improve Datatable and fix broken e2e tests (#4398)
* [ADF-4122] Improve Datatable and fix broken e2e tests * [ADF-4122] Fix e2e element selector
This commit is contained in:
committed by
Eugenio Romano
parent
f6341e31a0
commit
5d3f47eacf
@@ -10,7 +10,7 @@
|
|||||||
Sticky header
|
Sticky header
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
|
|
||||||
<div style="height: 300px; overflow-y: auto;">
|
<div style="height: 310px; overflow-y: auto;">
|
||||||
<adf-datatable
|
<adf-datatable
|
||||||
#dataTable
|
#dataTable
|
||||||
[data]="data"
|
[data]="data"
|
||||||
|
@@ -81,7 +81,12 @@ export class DataTableComponent {
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: 'Name 1',
|
name: `Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
||||||
|
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||||
|
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
||||||
|
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
||||||
|
Excepteur sint occaecat cupidatat non proident,
|
||||||
|
sunt in culpa qui officia deserunt mollit anim id est laborum.`,
|
||||||
createdOn: new Date(2016, 6, 2, 15, 8, 1),
|
createdOn: new Date(2016, 6, 2, 15, 8, 1),
|
||||||
createdBy: this._createdBy,
|
createdBy: this._createdBy,
|
||||||
icon: 'material-icons://folder_open'
|
icon: 'material-icons://folder_open'
|
||||||
@@ -112,7 +117,7 @@ export class DataTableComponent {
|
|||||||
{ type: 'image', key: 'icon', title: '', srTitle: 'Thumbnail' },
|
{ type: 'image', key: 'icon', title: '', srTitle: 'Thumbnail' },
|
||||||
{ type: 'text', key: 'id', title: 'Id', sortable: true , cssClass: 'adf-ellipsis-cell' },
|
{ type: 'text', key: 'id', title: 'Id', sortable: true , cssClass: 'adf-ellipsis-cell' },
|
||||||
{ type: 'text', key: 'createdOn', title: 'Created On', sortable: true, cssClass: 'adf-ellipsis-cell adf-expand-cell-5' },
|
{ type: 'text', key: 'createdOn', title: 'Created On', sortable: true, cssClass: 'adf-ellipsis-cell adf-expand-cell-5' },
|
||||||
{ type: 'text', key: 'name', title: 'Name', cssClass: '', sortable: true },
|
{ type: 'text', key: 'name', title: 'Name', cssClass: 'adf-ellipsis-cell', sortable: true },
|
||||||
{ type: 'text', key: 'createdBy.name', title: 'Created By', sortable: true, cssClass: ''}
|
{ type: 'text', key: 'createdBy.name', title: 'Created By', sortable: true, cssClass: ''}
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
@@ -65,8 +65,8 @@ export class DataTablePage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getRowByRowNumber(rowNumber) {
|
getRowByRowNumber(rowNumber) {
|
||||||
Util.waitUntilElementIsVisible(element(by.css(`div[data-automation-id='text_` + rowNumber + `']`)));
|
Util.waitUntilElementIsVisible(element(by.css(`div[data-automation-id='text_` + rowNumber + `'] span`)));
|
||||||
return element(by.css(`div[data-automation-id='text_` + rowNumber + `']`));
|
return element(by.css(`div[data-automation-id='text_` + rowNumber + `'] span`));
|
||||||
}
|
}
|
||||||
|
|
||||||
getRowCheckbox(rowNumber) {
|
getRowCheckbox(rowNumber) {
|
||||||
|
@@ -370,7 +370,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.adf-ellipsis-cell {
|
.adf-ellipsis-cell {
|
||||||
overflow: hidden;
|
position: sticky;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
@@ -387,6 +387,8 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
display: block;
|
display: block;
|
||||||
width: calc(100% - 2em);
|
width: calc(100% - 2em);
|
||||||
|
position: absolute;
|
||||||
|
margin-top: -10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user