mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
e2e tests for favourite directive (#4912)
* in progress - favourite directive e2e tests * in progress - favourite directive e2e tests * favourite directive e2e tests * update testcase name * updated test case names * remove unnecessary line spaces * refactored favourites to favorites
This commit is contained in:
committed by
Eugenio Romano
parent
bbe22fd2a7
commit
fadcc19eba
@@ -83,6 +83,9 @@ export class ContentServicesPage {
|
||||
downloadContent = element(by.css('button[data-automation-id*="DOWNLOAD"]'));
|
||||
siteListDropdown = element(by.css(`mat-select[data-automation-id='site-my-files-option']`));
|
||||
downloadButton = element(by.css('button[title="Download"]'));
|
||||
favoriteButton = element(by.css('button[data-automation-id="favorite"]'));
|
||||
markedFavorite = element(by.cssContainingText( 'button[data-automation-id="favorite"] mat-icon', 'star'));
|
||||
notMarkedFavorite = element(by.cssContainingText( 'button[data-automation-id="favorite"] mat-icon', 'star_border'));
|
||||
multiSelectToggle = element(by.cssContainingText('span.mat-slide-toggle-content', ' Multiselect (with checkboxes) '));
|
||||
|
||||
pressContextMenuActionNamed(actionName) {
|
||||
@@ -360,6 +363,21 @@ export class ContentServicesPage {
|
||||
return this;
|
||||
}
|
||||
|
||||
clickOnFavoriteButton() {
|
||||
BrowserActions.click(this.favoriteButton);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkIsMarkedFavorite() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.markedFavorite);
|
||||
return this;
|
||||
}
|
||||
|
||||
checkIsNotMarkedFavorite() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.notMarkedFavorite);
|
||||
return this;
|
||||
}
|
||||
|
||||
clickOnEditFolder() {
|
||||
BrowserActions.click(this.editFolderButton);
|
||||
return this;
|
||||
|
||||
@@ -67,10 +67,19 @@ export class CustomSources {
|
||||
BrowserActions.click(this.getSourceType(source.mySites));
|
||||
}
|
||||
|
||||
selectFavoritesSourceType() {
|
||||
this.clickOnSourceType();
|
||||
BrowserActions.click(this.getSourceType(source.favorites));
|
||||
}
|
||||
|
||||
checkRowIsDisplayed(rowName) {
|
||||
return this.dataTable.checkContentIsDisplayed('Name', rowName);
|
||||
}
|
||||
|
||||
checkRowIsNotDisplayed(rowName) {
|
||||
return this.dataTable.checkContentIsNotDisplayed('Name', rowName);
|
||||
}
|
||||
|
||||
getStatusCell(rowName) {
|
||||
const cell = this.dataTable.getCellByRowContentAndColumn('Name', rowName, column.status);
|
||||
return BrowserActions.getText(cell);
|
||||
|
||||
@@ -15,16 +15,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
import { BrowserActions, BrowserVisibility, DocumentListPage } from '@alfresco/adf-testing';
|
||||
|
||||
import { element, by } from 'protractor';
|
||||
|
||||
export class TrashcanPage {
|
||||
|
||||
contentList = new DocumentListPage(element(by.css('adf-document-list')));
|
||||
rows = by.css('adf-document-list div[class*="adf-datatable-body"] div[class*="adf-datatable-row"]');
|
||||
tableBody = element.all(by.css('adf-document-list div[class="adf-datatable-body"]')).first();
|
||||
pagination = element(by.css('adf-pagination'));
|
||||
emptyTrashcan = element(by.css('adf-empty-content'));
|
||||
restoreButton = element(by.css(`button[title='Restore']`));
|
||||
|
||||
numberOfResultsDisplayed() {
|
||||
return element.all(this.rows).count();
|
||||
@@ -42,4 +44,13 @@ export class TrashcanPage {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.emptyTrashcan);
|
||||
}
|
||||
|
||||
getDocumentList() {
|
||||
return this.contentList;
|
||||
}
|
||||
|
||||
clickRestore() {
|
||||
BrowserActions.click(this.restoreButton);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user