[ACS-180] Add Description column to My libraries / Favorites (#1486)

* [ACS-180] Add Description column to My libraries / Favorites

* Fix e2e test

* Fix datatable selector

* Fix role and visibility selectors

* Add description to search library layout

* Final fix
This commit is contained in:
davidcanonieto 2020-06-16 14:54:26 +01:00 committed by GitHub
parent 7130a5c15c
commit 03b75a5fb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 83 additions and 12 deletions

View File

@ -1340,11 +1340,21 @@
"key": "title", "key": "title",
"title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME",
"type": "text", "type": "text",
"class": "adf-expand-cell-5", "class": "adf-expand-cell-3",
"sortable": true, "sortable": true,
"template": "app.columns.libraryName", "template": "app.columns.libraryName",
"desktopOnly": false "desktopOnly": false
}, },
{
"id": "app.favorite.libraries.description",
"key": "description",
"title": "APP.DOCUMENT_LIST.COLUMNS.DESCRIPTION",
"type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-5",
"sortable": true,
"template": "app.columns.libraryDescription",
"desktopOnly": true
},
{ {
"id": "app.libraries.role", "id": "app.libraries.role",
"key": "role", "key": "role",
@ -1377,11 +1387,21 @@
"key": "title", "key": "title",
"title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME",
"type": "text", "type": "text",
"class": "adf-expand-cell-5", "class": "adf-expand-cell-3",
"sortable": true, "sortable": true,
"template": "app.columns.libraryName", "template": "app.columns.libraryName",
"desktopOnly": false "desktopOnly": false
}, },
{
"id": "app.favorite.libraries.description",
"key": "description",
"title": "APP.DOCUMENT_LIST.COLUMNS.DESCRIPTION",
"type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-5",
"sortable": true,
"template": "app.columns.libraryDescription",
"desktopOnly": true
},
{ {
"id": "app.favorite.libraries.role", "id": "app.favorite.libraries.role",
"key": "role", "key": "role",

View File

@ -1375,11 +1375,21 @@
"key": "title", "key": "title",
"title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME",
"type": "text", "type": "text",
"class": "adf-expand-cell-5", "class": "adf-expand-cell-3",
"sortable": true, "sortable": true,
"template": "app.columns.libraryName", "template": "app.columns.libraryName",
"desktopOnly": false "desktopOnly": false
}, },
{
"id": "app.favorite.libraries.description",
"key": "description",
"title": "APP.DOCUMENT_LIST.COLUMNS.DESCRIPTION",
"type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-5",
"sortable": true,
"template": "app.columns.libraryDescription",
"desktopOnly": true
},
{ {
"id": "app.libraries.role", "id": "app.libraries.role",
"key": "role", "key": "role",
@ -1412,11 +1422,21 @@
"key": "title", "key": "title",
"title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME",
"type": "text", "type": "text",
"class": "adf-expand-cell-5", "class": "adf-expand-cell-3",
"sortable": true, "sortable": true,
"template": "app.columns.libraryName", "template": "app.columns.libraryName",
"desktopOnly": false "desktopOnly": false
}, },
{
"id": "app.favorite.libraries.description",
"key": "description",
"title": "APP.DOCUMENT_LIST.COLUMNS.DESCRIPTION",
"type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-5",
"sortable": true,
"template": "app.columns.libraryDescription",
"desktopOnly": true
},
{ {
"id": "app.favorite.libraries.role", "id": "app.favorite.libraries.role",
"key": "role", "key": "role",

View File

@ -107,7 +107,7 @@ describe('File Libraries', () => {
}); });
it('[C217095] has the correct columns', async () => { it('[C217095] has the correct columns', async () => {
const expectedColumns = [ 'Name', 'My Role', 'Visibility' ]; const expectedColumns = [ 'Name', 'Description', 'My Role', 'Visibility' ];
const actualColumns = await dataTable.getColumnHeadersText(); const actualColumns = await dataTable.getColumnHeadersText();
expect(actualColumns).toEqual(expectedColumns); expect(actualColumns).toEqual(expectedColumns);
@ -176,7 +176,7 @@ describe('File Libraries', () => {
}); });
it('[C289893] has the correct columns', async () => { it('[C289893] has the correct columns', async () => {
const expectedColumns = [ 'Name', 'My Role', 'Visibility' ]; const expectedColumns = [ 'Name', 'Description', 'My Role', 'Visibility' ];
const actualColumns = await dataTable.getColumnHeadersText(); const actualColumns = await dataTable.getColumnHeadersText();
expect(actualColumns).toEqual(expectedColumns); expect(actualColumns).toEqual(expectedColumns);

View File

@ -176,7 +176,7 @@ describe('Search results - libraries', () => {
await searchInput.searchFor(site1.name); await searchInput.searchFor(site1.name);
await dataTable.waitForBody(); await dataTable.waitForBody();
const expectedColumns = [ 'Name', 'My Role', 'Visibility' ]; const expectedColumns = [ 'Name', 'Description', 'My Role', 'Visibility' ];
const actualColumns = await dataTable.getColumnHeadersText(); const actualColumns = await dataTable.getColumnHeadersText();
expect(actualColumns).toEqual(expectedColumns); expect(actualColumns).toEqual(expectedColumns);

View File

@ -438,7 +438,7 @@ export class DataTable extends Component {
async getSitesNameAndVisibility(): Promise<{}> { async getSitesNameAndVisibility(): Promise<{}> {
const data = await this.getEntireDataTableText(); const data = await this.getEntireDataTableText();
return data.reduce((acc, cell) => { return data.reduce((acc, cell) => {
acc[cell[1]] = cell[3].toUpperCase(); acc[cell[1]] = cell[4].toUpperCase();
return acc; return acc;
}, {}); }, {});
} }
@ -446,7 +446,7 @@ export class DataTable extends Component {
async getSitesNameAndRole(): Promise<{}> { async getSitesNameAndRole(): Promise<{}> {
const data = await this.getEntireDataTableText(); const data = await this.getEntireDataTableText();
return data.reduce((acc, cell) => { return data.reduce((acc, cell) => {
acc[cell[1]] = cell[2]; acc[cell[1]] = cell[3];
return acc; return acc;
}, {}); }, {});
} }

View File

@ -1180,11 +1180,21 @@
"key": "title", "key": "title",
"title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME",
"type": "text", "type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-5", "class": "adf-ellipsis-cell adf-expand-cell-3",
"sortable": true, "sortable": true,
"template": "app.columns.libraryName", "template": "app.columns.libraryName",
"desktopOnly": false "desktopOnly": false
}, },
{
"id": "app.favorite.libraries.description",
"key": "description",
"title": "APP.DOCUMENT_LIST.COLUMNS.DESCRIPTION",
"type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-5",
"sortable": true,
"template": "app.columns.libraryDescription",
"desktopOnly": true
},
{ {
"id": "app.libraries.role", "id": "app.libraries.role",
"key": "role", "key": "role",
@ -1219,11 +1229,21 @@
"key": "title", "key": "title",
"title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME",
"type": "text", "type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-5", "class": "adf-ellipsis-cell adf-expand-cell-3",
"sortable": true, "sortable": true,
"template": "app.columns.libraryName", "template": "app.columns.libraryName",
"desktopOnly": false "desktopOnly": false
}, },
{
"id": "app.favorite.libraries.description",
"key": "description",
"title": "APP.DOCUMENT_LIST.COLUMNS.DESCRIPTION",
"type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-5",
"sortable": true,
"template": "app.columns.libraryDescription",
"desktopOnly": true
},
{ {
"id": "app.favorite.libraries.role", "id": "app.favorite.libraries.role",
"key": "role", "key": "role",
@ -1477,11 +1497,21 @@
"key": "title", "key": "title",
"title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME",
"type": "text", "type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-5", "class": "adf-ellipsis-cell adf-expand-cell-3",
"sortable": true, "sortable": true,
"template": "app.columns.libraryName", "template": "app.columns.libraryName",
"desktopOnly": false "desktopOnly": false
}, },
{
"id": "app.favorite.libraries.description",
"key": "description",
"title": "APP.DOCUMENT_LIST.COLUMNS.DESCRIPTION",
"type": "text",
"class": "adf-ellipsis-cell adf-expand-cell-5",
"sortable": true,
"template": "app.columns.libraryDescription",
"desktopOnly": true
},
{ {
"id": "app.libraries.role", "id": "app.libraries.role",
"key": "role", "key": "role",

View File

@ -236,6 +236,7 @@
"COLUMNS": { "COLUMNS": {
"ID": "ID", "ID": "ID",
"NAME": "Name", "NAME": "Name",
"DESCRIPTION": "Description",
"SIZE": "Size", "SIZE": "Size",
"MODIFIED_ON": "Modified", "MODIFIED_ON": "Modified",
"MODIFIED_BY": "Modified by", "MODIFIED_BY": "Modified by",