mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3886] Adding small changes (#4135)
This commit is contained in:
committed by
Eugenio Romano
parent
ad5dcfe7c3
commit
10e58322ae
@@ -731,7 +731,7 @@ describe('Document List Component', () => {
|
||||
});
|
||||
|
||||
it('[C291843] Should be able to navigate using nodes hyperlink when activated', () => {
|
||||
contentServicesPage.enableHyperlinkNavigation()
|
||||
contentServicesPage.clickHyperlinkNavigationToggle()
|
||||
.checkFileHyperlinkIsEnabled(file.entry.name)
|
||||
.clickFileHyperlink(file.entry.name);
|
||||
viewer.checkFileIsLoaded();
|
||||
|
@@ -66,19 +66,19 @@ export class ContentServicesPage {
|
||||
shareNodeButton = element(by.cssContainingText('mat-icon', ' share '));
|
||||
|
||||
clickFileHyperlink(fileName) {
|
||||
let hyperlink = element(by.cssContainingText('adf-name-column[class*="adf-datatable-link"] span', fileName));
|
||||
let hyperlink = this.contentList.getFileHyperlink(fileName);
|
||||
Util.waitUntilElementIsClickable(hyperlink);
|
||||
hyperlink.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
checkFileHyperlinkIsEnabled(fileName) {
|
||||
let hyperlink = element(by.cssContainingText('adf-name-column[class*="adf-datatable-link"] span', fileName));
|
||||
let hyperlink = this.contentList.getFileHyperlink(fileName);
|
||||
Util.waitUntilElementIsVisible(hyperlink);
|
||||
return this;
|
||||
}
|
||||
|
||||
enableHyperlinkNavigation() {
|
||||
clickHyperlinkNavigationToggle() {
|
||||
let hyperlinkToggle = element(by.cssContainingText('.mat-slide-toggle-content', 'Hyperlink navigation'));
|
||||
Util.waitUntilElementIsVisible(hyperlinkToggle);
|
||||
hyperlinkToggle.click();
|
||||
|
@@ -44,6 +44,10 @@ export class DataTablePage {
|
||||
this.list = this.rootElement.all(by.css(`div[class*=adf-datatable-body] div[class*=adf-datatable-row]`));
|
||||
}
|
||||
|
||||
getFileHyperlink(filename) {
|
||||
return element(by.cssContainingText('adf-name-column[class*="adf-datatable-link"] span', filename));
|
||||
}
|
||||
|
||||
getAllDisplayedRows() {
|
||||
return element.all(this.rows).count();
|
||||
}
|
||||
|
@@ -16,10 +16,12 @@
|
||||
*/
|
||||
|
||||
import { browser, by, element, protractor } from 'protractor';
|
||||
import { DataTablePage } from '../dataTablePage';
|
||||
import { Util } from '../../../util/util';
|
||||
|
||||
export class ContentListPage {
|
||||
|
||||
dataTable = new DataTablePage();
|
||||
deleteContentElement = element(by.css('button[data-automation-id*="DELETE"]'));
|
||||
metadataAction = element(by.css('button[data-automation-id*="METADATA"]'));
|
||||
versionManagerAction = element(by.css('button[data-automation-id*="VERSIONS"]'));
|
||||
@@ -42,6 +44,10 @@ export class ContentListPage {
|
||||
table = element.all(by.css('adf-datatable')).first();
|
||||
tableBody = element.all(by.css('adf-document-list div[class="adf-datatable-body"]')).first();
|
||||
|
||||
getFileHyperlink(fileName) {
|
||||
return this.dataTable.getFileHyperlink(fileName);
|
||||
}
|
||||
|
||||
getColumnLocator(column) {
|
||||
return by.css(`div[id*='document-list-container'] div[class*='adf-datatable-row'] div[title='${column}'] span`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user