mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-4511] search layout update (#2272)
* [ACA-4511] search layout update * * separate description column * * enable path and fix e2e * * revert lock changes
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
import { browser, by, ElementArrayFinder, ElementFinder, protractor } from 'protractor';
|
||||
import { BrowserVisibility, Logger } from '@alfresco/adf-testing';
|
||||
import { BrowserActions, BrowserVisibility, Logger } from '@alfresco/adf-testing';
|
||||
import { BROWSER_WAIT_TIMEOUT } from '../../configs';
|
||||
import { Component } from '../component';
|
||||
import { Menu } from '../menu/menu';
|
||||
@@ -41,7 +41,7 @@ export class DataTable extends Component {
|
||||
cell: '.adf-datatable-cell-container',
|
||||
lockOwner: '.aca-locked-by',
|
||||
searchResultsRow: 'aca-search-results-row',
|
||||
searchResultsRowLine: '.line'
|
||||
searchResultsRowLine: 'span'
|
||||
};
|
||||
|
||||
head = this.byCss('.adf-datatable-header');
|
||||
@@ -213,6 +213,14 @@ export class DataTable extends Component {
|
||||
return '';
|
||||
}
|
||||
|
||||
async getLockOwnerToolTip(itemName: string, location: string = ''): Promise<string> {
|
||||
if (await this.hasLockIcon(itemName, location)) {
|
||||
const row = this.getRowByName(itemName, location);
|
||||
return BrowserActions.getAttribute(row.element(by.css('img[src*="lock"]')), 'alt');
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
private getNameLink(itemName: string): ElementFinder {
|
||||
return this.getRowNameCell(itemName).$('.adf-datatable-link [role="link"]');
|
||||
}
|
||||
@@ -419,34 +427,6 @@ export class DataTable extends Component {
|
||||
return this.body.element(by.cssContainingText(DataTable.selectors.searchResultsRow, name));
|
||||
}
|
||||
|
||||
private getSearchResultRowLines(name: string, location: string = ''): ElementArrayFinder {
|
||||
return this.getSearchResultsRowByName(name, location).all(by.css(DataTable.selectors.searchResultsRowLine));
|
||||
}
|
||||
|
||||
async getSearchResultLinesCount(name: string, location: string = ''): Promise<number> {
|
||||
return this.getSearchResultRowLines(name, location).count();
|
||||
}
|
||||
|
||||
private getSearchResultNthLine(name: string, location: string = '', index: number): ElementFinder {
|
||||
return this.getSearchResultRowLines(name, location).get(index);
|
||||
}
|
||||
|
||||
async getSearchResultNameAndTitle(name: string, location: string = ''): Promise<string> {
|
||||
return this.getSearchResultNthLine(name, location, 0).getText();
|
||||
}
|
||||
|
||||
async getSearchResultDescription(name: string, location: string = ''): Promise<string> {
|
||||
return this.getSearchResultNthLine(name, location, 1).getText();
|
||||
}
|
||||
|
||||
async getSearchResultModified(name: string, location: string = ''): Promise<string> {
|
||||
return this.getSearchResultNthLine(name, location, 2).getText();
|
||||
}
|
||||
|
||||
async getSearchResultLocation(name: string, location: string = ''): Promise<string> {
|
||||
return this.getSearchResultNthLine(name, location, 3).getText();
|
||||
}
|
||||
|
||||
private getSearchResultNameLink(itemName: string, location: string = ''): ElementFinder {
|
||||
return this.getSearchResultsRowByName(itemName, location).$('.link');
|
||||
}
|
||||
|
@@ -45,6 +45,30 @@ export class SearchResultsPage extends BrowsingPage {
|
||||
return this.infoText.getText();
|
||||
}
|
||||
|
||||
async getName(name: string): Promise<string> {
|
||||
return this.dataTable.getRowByName(name).element(by.css('[title="Name"] div.search-file-name')).getText();
|
||||
}
|
||||
|
||||
async getDescription(name: string): Promise<string> {
|
||||
return this.dataTable.getRowByName(name).element(by.css('[title="Description"]')).getText();
|
||||
}
|
||||
|
||||
async getModified(name: string): Promise<string> {
|
||||
return BrowserActions.getAttribute(this.dataTable.getRowByName(name).element(by.css('[title="Modified"] span')), 'title');
|
||||
}
|
||||
|
||||
async getSize(name: string): Promise<string> {
|
||||
return this.dataTable.getRowByName(name).element(by.css('[title="Size"]')).getText();
|
||||
}
|
||||
|
||||
async getModifiedBy(name: string): Promise<string> {
|
||||
return this.dataTable.getRowByName(name).element(by.css('[title="Modified by"]')).getText();
|
||||
}
|
||||
|
||||
async getLocation(name: string): Promise<string> {
|
||||
return this.dataTable.getRowByName(name).element(by.css('[title="Name"] a')).getText();
|
||||
}
|
||||
|
||||
async getResultsChipsValues(): Promise<string[]> {
|
||||
const chips = this.chipList.all(by.css('.mat-chip'));
|
||||
return chips.map(async (elem) => {
|
||||
|
Reference in New Issue
Block a user