mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[no-issue] general fix e2e and unit test (#3903)
* add missing import remove creation folder in redirect test in main folder fix update script update node js-api to last alpha before to install improve share dialog test * update gnu * fix notification and search e2e * change name compatible with file name * improve failing test to avoid cdk overlay problems * [ADF-3561] fix Outcome not translatable * increase sleep in user permission checklist missing uppercase comment possible different value in test due time * improve document list actions * improve document list action test * tag refresh bbefore next test comment possible value due the time
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
import Util = require('../../util/util');
|
||||
import ContentList = require('./dialog/contentList');
|
||||
import DatatablePage = require('./dataTablePage');
|
||||
import { element, by, protractor, browser } from 'protractor';
|
||||
|
||||
export class SearchResultsPage {
|
||||
|
||||
@@ -61,7 +62,7 @@ export class SearchResultsPage {
|
||||
}
|
||||
|
||||
navigateToFolder(content) {
|
||||
this.dataTable.navigateToContent(content);
|
||||
this.contentList.doubleClickRow(content);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -86,13 +87,13 @@ export class SearchResultsPage {
|
||||
this.sortBy(sortOrder, 'Name');
|
||||
}
|
||||
|
||||
sortBy(sortOrder) {
|
||||
|
||||
sortBy(sortOrder, sortType) {
|
||||
Util.waitUntilElementIsClickable(this.sortingArrow);
|
||||
this.sortingArrow.click();
|
||||
|
||||
let selectedSortingOption = element(by.xpath('//span [contains(text(), \"Name\")]'));
|
||||
|
||||
selectedSortingOption.click();
|
||||
let selectedSortingOption = element(by.xpath(``));
|
||||
Util.waitUntilElementIsClickable(selectedSortingOption);
|
||||
browser.executeScript(`document.evaluate('//span [contains(text(), "${sortType}")]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.click();`);
|
||||
|
||||
this.sortByOrder(sortOrder);
|
||||
}
|
||||
@@ -102,11 +103,11 @@ export class SearchResultsPage {
|
||||
return element(this.sortArrowLocator).getText().then((result) => {
|
||||
if (sortOrder === true) {
|
||||
if (result !== 'arrow_upward') {
|
||||
element(this.sortArrowLocator).click();
|
||||
browser.executeScript(`document.querySelector('adf-sorting-picker button mat-icon').click();`);
|
||||
}
|
||||
} else {
|
||||
if (result === 'arrow_upward') {
|
||||
element(this.sortArrowLocator).click();
|
||||
browser.executeScript(`document.querySelector('adf-sorting-picker button mat-icon').click();`);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user