mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix e2e tests and cleanup e2e typings (#5770)
* cleanup e2e typings * fix e2e tests
This commit is contained in:
@@ -15,25 +15,25 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions, CardTextItemPage, DropdownPage, CardBooleanItemPage } from '@alfresco/adf-testing';
|
||||
|
||||
export class CardViewComponentPage {
|
||||
|
||||
addButton: ElementFinder = element(by.className('adf-card-view__key-value-pairs__add-btn'));
|
||||
nameCardTextItem: CardTextItemPage = new CardTextItemPage('name');
|
||||
booleanCardBooleanItem: CardBooleanItemPage = new CardBooleanItemPage('boolean');
|
||||
intField: ElementFinder = element(by.css(`input[data-automation-id='card-textitem-editinput-int']`));
|
||||
floatField: ElementFinder = element(by.css(`input[data-automation-id='card-textitem-editinput-float']`));
|
||||
valueInputField: ElementFinder = element(by.xpath(`//*[contains(@id,'input') and @placeholder='Value']`));
|
||||
nameInputField: ElementFinder = element(by.xpath(`//*[contains(@id,'input') and @placeholder='Name']`));
|
||||
consoleLog: ElementFinder = element(by.className('app-console'));
|
||||
deleteButton: ElementFinder = element.all(by.className('adf-card-view__key-value-pairs__remove-btn')).first();
|
||||
resetButton: ElementFinder = element(by.css(`#adf-reset-card-log`));
|
||||
editableSwitch: ElementFinder = element(by.id('app-toggle-editable'));
|
||||
clearDateSwitch: ElementFinder = element(by.id('app-toggle-clear-date'));
|
||||
noneOptionSwitch: ElementFinder = element(by.id('app-toggle-none-option'));
|
||||
clickableField: ElementFinder = element(by.css(`[data-automation-id="card-textitem-toggle-click"]`));
|
||||
addButton = element(by.className('adf-card-view__key-value-pairs__add-btn'));
|
||||
nameCardTextItem = new CardTextItemPage('name');
|
||||
booleanCardBooleanItem = new CardBooleanItemPage('boolean');
|
||||
intField = element(by.css(`input[data-automation-id='card-textitem-editinput-int']`));
|
||||
floatField = element(by.css(`input[data-automation-id='card-textitem-editinput-float']`));
|
||||
valueInputField = element(by.xpath(`//*[contains(@id,'input') and @placeholder='Value']`));
|
||||
nameInputField = element(by.xpath(`//*[contains(@id,'input') and @placeholder='Name']`));
|
||||
consoleLog = element(by.className('app-console'));
|
||||
deleteButton = element.all(by.className('adf-card-view__key-value-pairs__remove-btn')).first();
|
||||
resetButton = element(by.css(`#adf-reset-card-log`));
|
||||
editableSwitch = element(by.id('app-toggle-editable'));
|
||||
clearDateSwitch = element(by.id('app-toggle-clear-date'));
|
||||
noneOptionSwitch = element(by.id('app-toggle-none-option'));
|
||||
clickableField = element(by.css(`[data-automation-id="card-textitem-toggle-click"]`));
|
||||
|
||||
selectDropdown = new DropdownPage(element(by.css('mat-select[data-automation-class="select-box"]')));
|
||||
|
||||
@@ -66,18 +66,18 @@ export class CardViewComponentPage {
|
||||
}
|
||||
|
||||
async clickOnIntField(): Promise<void> {
|
||||
const toggleText: ElementFinder = element(by.css('div[data-automation-id="card-textitem-toggle-int"]'));
|
||||
const toggleText = element(by.css('div[data-automation-id="card-textitem-toggle-int"]'));
|
||||
await BrowserActions.click(toggleText);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.intField);
|
||||
}
|
||||
|
||||
async clickOnIntClearIcon(): Promise<void> {
|
||||
const clearIcon: ElementFinder = element(by.css('button[data-automation-id="card-textitem-reset-int"]'));
|
||||
const clearIcon = element(by.css('button[data-automation-id="card-textitem-reset-int"]'));
|
||||
await BrowserActions.click(clearIcon);
|
||||
}
|
||||
|
||||
async clickOnIntSaveIcon(): Promise<void> {
|
||||
const saveIcon: ElementFinder = element(by.css('button[data-automation-id="card-textitem-update-int"]'));
|
||||
const saveIcon = element(by.css('button[data-automation-id="card-textitem-update-int"]'));
|
||||
await BrowserActions.click(saveIcon);
|
||||
}
|
||||
|
||||
@@ -86,28 +86,28 @@ export class CardViewComponentPage {
|
||||
}
|
||||
|
||||
getIntFieldText(): Promise<string> {
|
||||
const textField: ElementFinder = element(by.css('span[data-automation-id="card-textitem-value-int"]'));
|
||||
const textField = element(by.css('span[data-automation-id="card-textitem-value-int"]'));
|
||||
return BrowserActions.getText(textField);
|
||||
}
|
||||
|
||||
getErrorInt(): Promise<string> {
|
||||
const errorElement: ElementFinder = element(by.css('mat-error[data-automation-id="card-textitem-error-int"]'));
|
||||
const errorElement = element(by.css('mat-error[data-automation-id="card-textitem-error-int"]'));
|
||||
return BrowserActions.getText(errorElement);
|
||||
}
|
||||
|
||||
async clickOnFloatField(): Promise<void> {
|
||||
const toggleText: ElementFinder = element(by.css('div[data-automation-id="card-textitem-toggle-float"]'));
|
||||
const toggleText = element(by.css('div[data-automation-id="card-textitem-toggle-float"]'));
|
||||
await BrowserActions.click(toggleText);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.floatField);
|
||||
}
|
||||
|
||||
async clickOnFloatClearIcon(): Promise<void> {
|
||||
const clearIcon: ElementFinder = element(by.css(`button[data-automation-id="card-textitem-reset-float"]`));
|
||||
const clearIcon = element(by.css(`button[data-automation-id="card-textitem-reset-float"]`));
|
||||
await BrowserActions.click(clearIcon);
|
||||
}
|
||||
|
||||
async clickOnFloatSaveIcon(): Promise<void> {
|
||||
const saveIcon: ElementFinder = element(by.css(`button[data-automation-id="card-textitem-update-float"]`));
|
||||
const saveIcon = element(by.css(`button[data-automation-id="card-textitem-update-float"]`));
|
||||
await BrowserActions.click(saveIcon);
|
||||
}
|
||||
|
||||
@@ -116,12 +116,12 @@ export class CardViewComponentPage {
|
||||
}
|
||||
|
||||
getFloatFieldText(): Promise<string> {
|
||||
const textField: ElementFinder = element(by.css('span[data-automation-id="card-textitem-value-float"]'));
|
||||
const textField = element(by.css('span[data-automation-id="card-textitem-value-float"]'));
|
||||
return BrowserActions.getText(textField);
|
||||
}
|
||||
|
||||
getErrorFloat(): Promise<string> {
|
||||
const errorElement: ElementFinder = element(by.css('mat-error[data-automation-id="card-textitem-error-float"]'));
|
||||
const errorElement = element(by.css('mat-error[data-automation-id="card-textitem-error-float"]'));
|
||||
return BrowserActions.getText(errorElement);
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ export class CardViewComponentPage {
|
||||
}
|
||||
|
||||
async isErrorNotDisplayed(): Promise<boolean> {
|
||||
const errorElement: ElementFinder = element(by.css('mat-error[data-automation-id="card-textitem-error-int"]'));
|
||||
const errorElement = element(by.css('mat-error[data-automation-id="card-textitem-error-int"]'));
|
||||
try {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(errorElement);
|
||||
return true;
|
||||
|
@@ -16,18 +16,18 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, TabsPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementArrayFinder, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
|
||||
export class CommentsPage {
|
||||
|
||||
tabsPage: TabsPage = new TabsPage();
|
||||
numberOfComments: ElementFinder = element(by.id('comment-header'));
|
||||
commentUserIcon: ElementArrayFinder = element.all(by.id('comment-user-icon'));
|
||||
commentUserName: ElementArrayFinder = element.all(by.id('comment-user'));
|
||||
commentMessage: ElementArrayFinder = element.all(by.id('comment-message'));
|
||||
commentTime: ElementArrayFinder = element.all(by.id('comment-time'));
|
||||
commentInput: ElementFinder = element(by.id('comment-input'));
|
||||
addCommentButton: ElementFinder = element(by.css("[data-automation-id='comments-input-add']"));
|
||||
tabsPage = new TabsPage();
|
||||
numberOfComments = element(by.id('comment-header'));
|
||||
commentUserIcon = element.all(by.id('comment-user-icon'));
|
||||
commentUserName = element.all(by.id('comment-user'));
|
||||
commentMessage = element.all(by.id('comment-message'));
|
||||
commentTime = element.all(by.id('comment-time'));
|
||||
commentInput = element(by.id('comment-input'));
|
||||
addCommentButton = element(by.css("[data-automation-id='comments-input-add']"));
|
||||
|
||||
async getTotalNumberOfComments(): Promise<string> {
|
||||
return BrowserActions.getText(this.numberOfComments);
|
||||
@@ -37,16 +37,16 @@ export class CommentsPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.commentUserIcon.first());
|
||||
}
|
||||
|
||||
getUserName(position): Promise<string> {
|
||||
getUserName(position: number): Promise<string> {
|
||||
return BrowserActions.getText(this.commentUserName.get(position));
|
||||
}
|
||||
|
||||
getMessage(position): Promise<string> {
|
||||
getMessage(position: number): Promise<string> {
|
||||
return BrowserActions.getText(this.commentMessage.get(position));
|
||||
|
||||
}
|
||||
|
||||
getTime(position): Promise<string> {
|
||||
getTime(position: number): Promise<string> {
|
||||
return BrowserActions.getText(this.commentTime.get(position));
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ export class CommentsPage {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.commentInput);
|
||||
}
|
||||
|
||||
async addComment(comment): Promise<void> {
|
||||
async addComment(comment: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.commentInput, comment);
|
||||
await BrowserActions.click(this.addCommentButton);
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { DropActions, BrowserActions, BrowserVisibility, DateUtil, DocumentListPage, TogglePage, DropdownPage } from '@alfresco/adf-testing';
|
||||
import { $$, browser, by, element, ElementFinder, ElementArrayFinder, protractor } from 'protractor';
|
||||
import { $$, browser, by, element, ElementFinder, protractor } from 'protractor';
|
||||
import { CreateLibraryDialogPage } from './dialog/create-library-dialog.page';
|
||||
import { FolderDialogPage } from './dialog/folder-dialog.page';
|
||||
import { NavigationBarPage } from './navigation-bar.page';
|
||||
@@ -33,60 +33,60 @@ export class ContentServicesPage {
|
||||
created: 'Created'
|
||||
};
|
||||
|
||||
contentList: DocumentListPage = new DocumentListPage(element.all(by.css('adf-upload-drag-area adf-document-list')).first());
|
||||
togglePage: TogglePage = new TogglePage();
|
||||
createFolderDialog: FolderDialogPage = new FolderDialogPage();
|
||||
createLibraryDialog: CreateLibraryDialogPage = new CreateLibraryDialogPage();
|
||||
contentList = new DocumentListPage(element.all(by.css('adf-upload-drag-area adf-document-list')).first());
|
||||
togglePage = new TogglePage();
|
||||
createFolderDialog = new FolderDialogPage();
|
||||
createLibraryDialog = new CreateLibraryDialogPage();
|
||||
|
||||
multipleFileUploadToggle: ElementFinder = element(by.id('adf-document-list-enable-drop-files'));
|
||||
uploadBorder: ElementFinder = element(by.id('document-list-container'));
|
||||
contentServices: ElementFinder = element(by.css('.app-sidenav-link[data-automation-id="Content Services"]'));
|
||||
currentFolder: ElementFinder = element(by.css('div[class*="adf-breadcrumb-item adf-active"] div'));
|
||||
createFolderButton: ElementFinder = element(by.css('button[data-automation-id="create-new-folder"]'));
|
||||
editFolderButton: ElementFinder = element(by.css('button[data-automation-id="edit-folder"]'));
|
||||
deleteNodesButton: ElementFinder = element(by.css('button[data-automation-id="delete-toolbar-button"]'));
|
||||
createLibraryButton: ElementFinder = element(by.css('button[data-automation-id="create-new-library"]'));
|
||||
activeBreadcrumb: ElementFinder = element(by.css('div[class*="active"]'));
|
||||
multipleFileUploadToggle = element(by.id('adf-document-list-enable-drop-files'));
|
||||
uploadBorder = element(by.id('document-list-container'));
|
||||
contentServices = element(by.css('.app-sidenav-link[data-automation-id="Content Services"]'));
|
||||
currentFolder = element(by.css('div[class*="adf-breadcrumb-item adf-active"] div'));
|
||||
createFolderButton = element(by.css('button[data-automation-id="create-new-folder"]'));
|
||||
editFolderButton = element(by.css('button[data-automation-id="edit-folder"]'));
|
||||
deleteNodesButton = element(by.css('button[data-automation-id="delete-toolbar-button"]'));
|
||||
createLibraryButton = element(by.css('button[data-automation-id="create-new-library"]'));
|
||||
activeBreadcrumb = element(by.css('div[class*="active"]'));
|
||||
tooltip = by.css('div[class*="--text adf-full-width"] span');
|
||||
uploadFileButton: ElementFinder = element(by.css('.adf-upload-button-file-container button'));
|
||||
uploadFileButtonInput: ElementFinder = element(by.css('input[data-automation-id="upload-single-file"]'));
|
||||
uploadMultipleFileButton: ElementFinder = element(by.css('input[data-automation-id="upload-multiple-files"]'));
|
||||
uploadFolderButton: ElementFinder = element(by.css('input[data-automation-id="uploadFolder"]'));
|
||||
errorSnackBar: ElementFinder = element(by.css('simple-snack-bar[class*="mat-simple-snackbar"]'));
|
||||
emptyPagination: ElementFinder = element(by.css('adf-pagination[class*="adf-pagination__empty"]'));
|
||||
dragAndDrop: ElementFinder = element.all(by.css('adf-upload-drag-area div')).first();
|
||||
nameHeader: ElementFinder = element.all(by.css('div[data-automation-id="auto_id_name"] > span')).first();
|
||||
sizeHeader: ElementFinder = element.all(by.css('div[data-automation-id="auto_id_content.sizeInBytes"] > span')).first();
|
||||
createdByHeader: ElementFinder = element.all(by.css('div[data-automation-id="auto_id_createdByUser.displayName"] > span')).first();
|
||||
createdHeader: ElementFinder = element.all(by.css('div[data-automation-id="auto_id_createdAt"] > span')).first();
|
||||
recentFiles: ElementFinder = element(by.css('.app-container-recent'));
|
||||
recentFilesExpanded: ElementFinder = element(by.css('.app-container-recent mat-expansion-panel-header.mat-expanded'));
|
||||
recentFilesClosed: ElementFinder = element(by.css('.app-container-recent mat-expansion-panel-header'));
|
||||
recentFileIcon: ElementFinder = element(by.css('.app-container-recent mat-expansion-panel-header mat-icon'));
|
||||
emptyFolder: ElementFinder = element(by.css('.adf-empty-folder-this-space-is-empty'));
|
||||
emptyFolderImage: ElementFinder = element(by.css('.adf-empty-folder-image'));
|
||||
emptyRecent: ElementFinder = element(by.css('.app-container-recent .app-empty-list__title'));
|
||||
gridViewButton: ElementFinder = element(by.css('button[data-automation-id="document-list-grid-view"]'));
|
||||
cardViewContainer: ElementFinder = element(by.css('div.app-document-list-container div.adf-datatable-card'));
|
||||
shareNodeButton: ElementFinder = element(by.cssContainingText('mat-icon', ' share '));
|
||||
uploadFileButton = element(by.css('.adf-upload-button-file-container button'));
|
||||
uploadFileButtonInput = element(by.css('input[data-automation-id="upload-single-file"]'));
|
||||
uploadMultipleFileButton = element(by.css('input[data-automation-id="upload-multiple-files"]'));
|
||||
uploadFolderButton = element(by.css('input[data-automation-id="uploadFolder"]'));
|
||||
errorSnackBar = element(by.css('simple-snack-bar[class*="mat-simple-snackbar"]'));
|
||||
emptyPagination = element(by.css('adf-pagination[class*="adf-pagination__empty"]'));
|
||||
dragAndDrop = element.all(by.css('adf-upload-drag-area div')).first();
|
||||
nameHeader = element.all(by.css('div[data-automation-id="auto_id_name"] > span')).first();
|
||||
sizeHeader = element.all(by.css('div[data-automation-id="auto_id_content.sizeInBytes"] > span')).first();
|
||||
createdByHeader = element.all(by.css('div[data-automation-id="auto_id_createdByUser.displayName"] > span')).first();
|
||||
createdHeader = element.all(by.css('div[data-automation-id="auto_id_createdAt"] > span')).first();
|
||||
recentFiles = element(by.css('.app-container-recent'));
|
||||
recentFilesExpanded = element(by.css('.app-container-recent mat-expansion-panel-header.mat-expanded'));
|
||||
recentFilesClosed = element(by.css('.app-container-recent mat-expansion-panel-header'));
|
||||
recentFileIcon = element(by.css('.app-container-recent mat-expansion-panel-header mat-icon'));
|
||||
emptyFolder = element(by.css('.adf-empty-folder-this-space-is-empty'));
|
||||
emptyFolderImage = element(by.css('.adf-empty-folder-image'));
|
||||
emptyRecent = element(by.css('.app-container-recent .app-empty-list__title'));
|
||||
gridViewButton = element(by.css('button[data-automation-id="document-list-grid-view"]'));
|
||||
cardViewContainer = element(by.css('div.app-document-list-container div.adf-datatable-card'));
|
||||
shareNodeButton = element(by.cssContainingText('mat-icon', ' share '));
|
||||
nameColumnHeader = 'name';
|
||||
createdByColumnHeader = 'createdByUser.displayName';
|
||||
createdColumnHeader = 'createdAt';
|
||||
deleteContentElement: ElementFinder = element(by.css('button[data-automation-id*="DELETE"]'));
|
||||
metadataAction: ElementFinder = element(by.css('button[data-automation-id*="METADATA"]'));
|
||||
versionManagerAction: ElementFinder = element(by.css('button[data-automation-id*="VERSIONS"]'));
|
||||
moveContentElement: ElementFinder = element(by.css('button[data-automation-id*="MOVE"]'));
|
||||
copyContentElement: ElementFinder = element(by.css('button[data-automation-id*="COPY"]'));
|
||||
lockContentElement: ElementFinder = element(by.css('button[data-automation-id="DOCUMENT_LIST.ACTIONS.LOCK"]'));
|
||||
downloadContent: ElementFinder = element(by.css('button[data-automation-id*="DOWNLOAD"]'));
|
||||
downloadButton: ElementFinder = element(by.css('button[title="Download"]'));
|
||||
favoriteButton: ElementFinder = element(by.css('button[data-automation-id="favorite"]'));
|
||||
markedFavorite: ElementFinder = element(by.cssContainingText('button[data-automation-id="favorite"] mat-icon', 'star'));
|
||||
notMarkedFavorite: ElementFinder = element(by.cssContainingText('button[data-automation-id="favorite"] mat-icon', 'star_border'));
|
||||
multiSelectToggle: ElementFinder = element(by.cssContainingText('span.mat-slide-toggle-content', ' Multiselect (with checkboxes) '));
|
||||
selectAllCheckbox: ElementFinder = element.all(by.css('.adf-checkbox-sr-only')).first();
|
||||
selectionModeDropdown: ElementFinder = element(by.css('.mat-select[aria-label="Selection Mode"]'));
|
||||
selectedNodesList: ElementArrayFinder = element.all(by.css('.app-content-service-settings li'));
|
||||
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"]'));
|
||||
moveContentElement = element(by.css('button[data-automation-id*="MOVE"]'));
|
||||
copyContentElement = element(by.css('button[data-automation-id*="COPY"]'));
|
||||
lockContentElement = element(by.css('button[data-automation-id="DOCUMENT_LIST.ACTIONS.LOCK"]'));
|
||||
downloadContent = element(by.css('button[data-automation-id*="DOWNLOAD"]'));
|
||||
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) '));
|
||||
selectAllCheckbox = element.all(by.css('.adf-checkbox-sr-only')).first();
|
||||
selectionModeDropdown = element(by.css('.mat-select[aria-label="Selection Mode"]'));
|
||||
selectedNodesList = element.all(by.css('.app-content-service-settings li'));
|
||||
|
||||
siteListDropdown = new DropdownPage(element(by.css(`mat-select[data-automation-id='site-my-files-option']`)));
|
||||
sortingDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="grid-view-sorting"]')));
|
||||
@@ -96,12 +96,12 @@ export class ContentServicesPage {
|
||||
}
|
||||
|
||||
async checkContextActionIsVisible(actionName) {
|
||||
const actionButton: ElementFinder = element(by.css(`button[data-automation-id="context-${actionName}"`));
|
||||
const actionButton = element(by.css(`button[data-automation-id="context-${actionName}"`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(actionButton);
|
||||
}
|
||||
|
||||
async isContextActionEnabled(actionName): Promise<boolean> {
|
||||
const actionButton: ElementFinder = element(by.css(`button[data-automation-id="context-${actionName}"`));
|
||||
const actionButton = element(by.css(`button[data-automation-id="context-${actionName}"`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(actionButton);
|
||||
return actionButton.isEnabled();
|
||||
}
|
||||
@@ -125,7 +125,7 @@ export class ContentServicesPage {
|
||||
async checkDeleteIsDisabled(content): Promise<void> {
|
||||
await this.contentList.clickOnActionMenu(content);
|
||||
await this.waitForContentOptions();
|
||||
const disabledDelete: ElementFinder = element(by.css(`button[data-automation-id*='DELETE'][disabled='true']`));
|
||||
const disabledDelete = element(by.css(`button[data-automation-id*='DELETE'][disabled='true']`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(disabledDelete);
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ export class ContentServicesPage {
|
||||
}
|
||||
|
||||
async clickHyperlinkNavigationToggle(): Promise<void> {
|
||||
const hyperlinkToggle: ElementFinder = element(by.cssContainingText('.mat-slide-toggle-content', 'Hyperlink navigation'));
|
||||
const hyperlinkToggle = element(by.cssContainingText('.mat-slide-toggle-content', 'Hyperlink navigation'));
|
||||
await BrowserActions.click(hyperlinkToggle);
|
||||
}
|
||||
|
||||
@@ -477,22 +477,22 @@ export class ContentServicesPage {
|
||||
}
|
||||
|
||||
async enableInfiniteScrolling(): Promise<void> {
|
||||
const infiniteScrollButton: ElementFinder = element(by.cssContainingText('.mat-slide-toggle-content', 'Enable Infinite Scrolling'));
|
||||
const infiniteScrollButton = element(by.cssContainingText('.mat-slide-toggle-content', 'Enable Infinite Scrolling'));
|
||||
await BrowserActions.click(infiniteScrollButton);
|
||||
}
|
||||
|
||||
async enableCustomPermissionMessage(): Promise<void> {
|
||||
const customPermissionMessage: ElementFinder = element(by.cssContainingText('.mat-slide-toggle-content', 'Enable custom permission message'));
|
||||
const customPermissionMessage = element(by.cssContainingText('.mat-slide-toggle-content', 'Enable custom permission message'));
|
||||
await BrowserActions.click(customPermissionMessage);
|
||||
}
|
||||
|
||||
async enableMediumTimeFormat(): Promise<void> {
|
||||
const mediumTimeFormat: ElementFinder = element(by.css('#enableMediumTimeFormat'));
|
||||
const mediumTimeFormat = element(by.css('#enableMediumTimeFormat'));
|
||||
await BrowserActions.click(mediumTimeFormat);
|
||||
}
|
||||
|
||||
async enableThumbnails(): Promise<void> {
|
||||
const thumbnailSlide: ElementFinder = element(by.id('adf-thumbnails-upload-switch'));
|
||||
const thumbnailSlide = element(by.id('adf-thumbnails-upload-switch'));
|
||||
await BrowserActions.click(thumbnailSlide);
|
||||
}
|
||||
|
||||
@@ -501,7 +501,7 @@ export class ContentServicesPage {
|
||||
}
|
||||
|
||||
async getDocumentListRowNumber(): Promise<number> {
|
||||
const documentList: ElementFinder = element(by.css('adf-upload-drag-area adf-document-list'));
|
||||
const documentList = element(by.css('adf-upload-drag-area adf-document-list'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(documentList);
|
||||
return $$('adf-upload-drag-area adf-document-list .adf-datatable-row').count();
|
||||
}
|
||||
@@ -537,7 +537,7 @@ export class ContentServicesPage {
|
||||
}
|
||||
|
||||
async checkLockIsDisplayedForElement(name): Promise<void> {
|
||||
const lockButton: ElementFinder = element(by.css(`div.adf-datatable-cell[data-automation-id="${name}"] button`));
|
||||
const lockButton = element(by.css(`div.adf-datatable-cell[data-automation-id="${name}"] button`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(lockButton);
|
||||
}
|
||||
|
||||
@@ -546,7 +546,7 @@ export class ContentServicesPage {
|
||||
}
|
||||
|
||||
async getStyleValueForRowText(rowName, styleName): Promise<string> {
|
||||
const row: ElementFinder = element(by.css(`div.adf-datatable-cell[data-automation-id="${rowName}"] span.adf-datatable-cell-value[title="${rowName}"]`));
|
||||
const row = element(by.css(`div.adf-datatable-cell[data-automation-id="${rowName}"] span.adf-datatable-cell-value[title="${rowName}"]`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(row);
|
||||
return row.getCssValue(styleName);
|
||||
}
|
||||
@@ -566,7 +566,7 @@ export class ContentServicesPage {
|
||||
}
|
||||
|
||||
async getRowIconImageUrl(fileName): Promise<string> {
|
||||
const iconRow: ElementFinder = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${fileName}"] img`));
|
||||
const iconRow = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${fileName}"] img`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(iconRow);
|
||||
return iconRow.getAttribute('src');
|
||||
}
|
||||
@@ -590,12 +590,12 @@ export class ContentServicesPage {
|
||||
}
|
||||
|
||||
async getDocumentCardIconForElement(elementName): Promise<string> {
|
||||
const elementIcon: ElementFinder = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"] img`));
|
||||
const elementIcon = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"] img`));
|
||||
return elementIcon.getAttribute('src');
|
||||
}
|
||||
|
||||
async checkDocumentCardPropertyIsShowed(elementName, propertyName): Promise<void> {
|
||||
const elementProperty: ElementFinder = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"][title="${propertyName}"]`));
|
||||
const elementProperty = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"][title="${propertyName}"]`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(elementProperty);
|
||||
}
|
||||
|
||||
@@ -605,15 +605,15 @@ export class ContentServicesPage {
|
||||
}
|
||||
|
||||
async checkMenuIsShowedForElementIndex(elementIndex): Promise<void> {
|
||||
const elementMenu: ElementFinder = element(by.css(`button[data-automation-id="action_menu_${elementIndex}"]`));
|
||||
const elementMenu = element(by.css(`button[data-automation-id="action_menu_${elementIndex}"]`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(elementMenu);
|
||||
}
|
||||
|
||||
async navigateToCardFolder(folderName): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
const folderCard: ElementFinder = element(by.css(`.app-document-list-container div.adf-image-table-cell.adf-datatable-cell[data-automation-id="${folderName}"]`));
|
||||
const folderCard = element(by.css(`.app-document-list-container div.adf-image-table-cell.adf-datatable-cell[data-automation-id="${folderName}"]`));
|
||||
await BrowserActions.click(folderCard);
|
||||
const folderSelected: ElementFinder = element(by.css(`.adf-datatable-row.adf-is-selected div[data-automation-id="${folderName}"].adf-datatable-cell--image`));
|
||||
const folderSelected = element(by.css(`.adf-datatable-row.adf-is-selected div[data-automation-id="${folderName}"].adf-datatable-cell--image`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(folderSelected);
|
||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||
}
|
||||
@@ -656,12 +656,12 @@ export class ContentServicesPage {
|
||||
await BrowserActions.click(this.selectAllCheckbox);
|
||||
}
|
||||
|
||||
getRowByName(rowName): ElementFinder {
|
||||
getRowByName(rowName: string): ElementFinder {
|
||||
return this.contentList.dataTable.getRow(this.columns.name, rowName);
|
||||
}
|
||||
|
||||
async selectFolder(folderName: string): Promise<void> {
|
||||
const folderSelected: ElementFinder = element(by.css(`div[data-automation-id="${folderName}"] .adf-datatable-center-img-ie`));
|
||||
const folderSelected = element(by.css(`div[data-automation-id="${folderName}"] .adf-datatable-center-img-ie`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(folderSelected);
|
||||
await BrowserActions.click(folderSelected);
|
||||
}
|
||||
@@ -682,13 +682,13 @@ export class ContentServicesPage {
|
||||
}
|
||||
|
||||
async selectItemWithCheckbox(itemName: string): Promise<void> {
|
||||
const item: ElementFinder = element(by.css(`adf-datatable-row[aria-label="${itemName}"] mat-checkbox .mat-checkbox-input`));
|
||||
const item = element(by.css(`adf-datatable-row[aria-label="${itemName}"] mat-checkbox .mat-checkbox-input`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(item);
|
||||
await BrowserActions.clickScript(item);
|
||||
}
|
||||
|
||||
async unSelectItemWithCheckbox(itemName: string): Promise<void> {
|
||||
const item: ElementFinder = element(by.css(`adf-datatable-row[aria-label="${itemName} selected"] mat-checkbox .mat-checkbox-input`));
|
||||
const item = element(by.css(`adf-datatable-row[aria-label="${itemName} selected"] mat-checkbox .mat-checkbox-input`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(item);
|
||||
await BrowserActions.click(item);
|
||||
}
|
||||
|
@@ -15,18 +15,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserActions, DropdownPage } from '@alfresco/adf-testing';
|
||||
|
||||
export class BreadCrumbDropdownPage {
|
||||
|
||||
breadCrumb: ElementFinder = element(by.css(`adf-dropdown-breadcrumb[data-automation-id='content-node-selector-content-breadcrumb']`));
|
||||
breadCrumb = element(by.css(`adf-dropdown-breadcrumb[data-automation-id='content-node-selector-content-breadcrumb']`));
|
||||
parentFolder = this.breadCrumb.element(by.css(`button[data-automation-id='dropdown-breadcrumb-trigger']`));
|
||||
currentFolder = this.breadCrumb.element(by.css(`div span[data-automation-id="current-folder"]`));
|
||||
|
||||
breadCrumbDropdown = new DropdownPage(element.all(by.css(`div[class*='mat-select-panel']`)).first());
|
||||
|
||||
async choosePath(pathName): Promise<void> {
|
||||
async choosePath(pathName: string): Promise<void> {
|
||||
await this.breadCrumbDropdown.selectOption(pathName);
|
||||
}
|
||||
|
||||
|
@@ -15,15 +15,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder, ElementArrayFinder, protractor } from 'protractor';
|
||||
import { element, by, protractor } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class TreeViewPage {
|
||||
|
||||
treeViewTitle: ElementFinder = element(by.cssContainingText('app-tree-view div', 'TREE VIEW TEST'));
|
||||
nodeIdInput: ElementFinder = element(by.css('input[placeholder="Node Id"]'));
|
||||
noNodeMessage: ElementFinder = element(by.id('adf-tree-view-missing-node'));
|
||||
nodesOnPage: ElementArrayFinder = element.all(by.css('mat-tree-node'));
|
||||
treeViewTitle = element(by.cssContainingText('app-tree-view div', 'TREE VIEW TEST'));
|
||||
nodeIdInput = element(by.css('input[placeholder="Node Id"]'));
|
||||
noNodeMessage = element(by.id('adf-tree-view-missing-node'));
|
||||
nodesOnPage = element.all(by.css('mat-tree-node'));
|
||||
|
||||
async checkTreeViewTitleIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.treeViewTitle);
|
||||
@@ -34,28 +34,28 @@ export class TreeViewPage {
|
||||
return this.nodeIdInput.getAttribute('value');
|
||||
}
|
||||
|
||||
async clickNode(nodeName): Promise<void> {
|
||||
const node: ElementFinder = element(by.css('mat-tree-node[id="' + nodeName + '-tree-child-node"] button'));
|
||||
async clickNode(nodeName: string): Promise<void> {
|
||||
const node = element(by.css('mat-tree-node[id="' + nodeName + '-tree-child-node"] button'));
|
||||
await BrowserActions.click(node);
|
||||
}
|
||||
|
||||
async checkNodeIsDisplayedAsClosed(nodeName): Promise<void> {
|
||||
const node: ElementFinder = element(by.css('mat-tree-node[id="' + nodeName + '-tree-child-node"][aria-expanded="false"]'));
|
||||
async checkNodeIsDisplayedAsClosed(nodeName: string): Promise<void> {
|
||||
const node = element(by.css('mat-tree-node[id="' + nodeName + '-tree-child-node"][aria-expanded="false"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(node);
|
||||
}
|
||||
|
||||
async checkNodeIsDisplayedAsOpen(nodeName): Promise<void> {
|
||||
const node: ElementFinder = element(by.css('mat-tree-node[id="' + nodeName + '-tree-child-node"][aria-expanded="true"]'));
|
||||
async checkNodeIsDisplayedAsOpen(nodeName: string): Promise<void> {
|
||||
const node = element(by.css('mat-tree-node[id="' + nodeName + '-tree-child-node"][aria-expanded="true"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(node);
|
||||
}
|
||||
|
||||
async checkClickedNodeName(nodeName): Promise<void> {
|
||||
const clickedNode: ElementFinder = element(by.cssContainingText('span', ' CLICKED NODE: ' + nodeName + ''));
|
||||
async checkClickedNodeName(nodeName: string): Promise<void> {
|
||||
const clickedNode = element(by.cssContainingText('span', ' CLICKED NODE: ' + nodeName + ''));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(clickedNode);
|
||||
}
|
||||
|
||||
async checkNodeIsNotDisplayed(nodeName): Promise<void> {
|
||||
const node: ElementFinder = element(by.id('' + nodeName + '-tree-child-node'));
|
||||
async checkNodeIsNotDisplayed(nodeName: string): Promise<void> {
|
||||
const node = element(by.id('' + nodeName + '-tree-child-node'));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(node);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ export class TreeViewPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.noNodeMessage);
|
||||
}
|
||||
|
||||
async addNodeId(nodeId): Promise<void> {
|
||||
async addNodeId(nodeId: string): Promise<void> {
|
||||
await BrowserActions.click(this.nodeIdInput);
|
||||
await BrowserActions.clearSendKeys(this.nodeIdInput, nodeId);
|
||||
await this.nodeIdInput.sendKeys('a');
|
||||
@@ -76,11 +76,11 @@ export class TreeViewPage {
|
||||
}
|
||||
|
||||
async checkErrorMessageIsDisplayed(): Promise<void> {
|
||||
const clickedNode: ElementFinder = element(by.cssContainingText('span', 'An Error Occurred '));
|
||||
const clickedNode = element(by.cssContainingText('span', 'An Error Occurred '));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(clickedNode);
|
||||
}
|
||||
|
||||
async getTotalNodes() {
|
||||
async getTotalNodes(): Promise<number> {
|
||||
return this.nodesOnPage.count();
|
||||
}
|
||||
}
|
||||
|
@@ -15,23 +15,22 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, protractor, ElementFinder } from 'protractor';
|
||||
|
||||
import { element, by, protractor } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class HeaderPage {
|
||||
|
||||
checkBox: ElementFinder = element(by.cssContainingText('.mat-checkbox-label', 'Show menu button'));
|
||||
headerColor: ElementFinder = element(by.css('option[value="primary"]'));
|
||||
titleInput: ElementFinder = element(by.css('input[name="title"]'));
|
||||
iconInput: ElementFinder = element(by.css('input[placeholder="URL path"]'));
|
||||
hexColorInput: ElementFinder = element(by.css('input[placeholder="hex color code"]'));
|
||||
logoHyperlinkInput: ElementFinder = element(by.css('input[placeholder="Redirect URL"]'));
|
||||
logoTooltipInput: ElementFinder = element(by.css('input[placeholder="Tooltip text"]'));
|
||||
positionStart: ElementFinder = element.all(by.css('mat-radio-button[value="start"]')).first();
|
||||
positionEnd: ElementFinder = element.all(by.css('mat-radio-button[value="end"]')).first();
|
||||
sideBarPositionRight: ElementFinder = element(by.css('mat-sidenav.mat-drawer.mat-sidenav.mat-drawer-end'));
|
||||
sideBarPositionLeft: ElementFinder = element(by.css('mat-sidenav.mat-drawer.mat-sidenav'));
|
||||
checkBox = element(by.cssContainingText('.mat-checkbox-label', 'Show menu button'));
|
||||
headerColor = element(by.css('option[value="primary"]'));
|
||||
titleInput = element(by.css('input[name="title"]'));
|
||||
iconInput = element(by.css('input[placeholder="URL path"]'));
|
||||
hexColorInput = element(by.css('input[placeholder="hex color code"]'));
|
||||
logoHyperlinkInput = element(by.css('input[placeholder="Redirect URL"]'));
|
||||
logoTooltipInput = element(by.css('input[placeholder="Tooltip text"]'));
|
||||
positionStart = element.all(by.css('mat-radio-button[value="start"]')).first();
|
||||
positionEnd = element.all(by.css('mat-radio-button[value="end"]')).first();
|
||||
sideBarPositionRight = element(by.css('mat-sidenav.mat-drawer.mat-sidenav.mat-drawer-end'));
|
||||
sideBarPositionLeft = element(by.css('mat-sidenav.mat-drawer.mat-sidenav'));
|
||||
|
||||
async checkShowMenuCheckBoxIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.checkBox);
|
||||
@@ -50,32 +49,32 @@ export class HeaderPage {
|
||||
}
|
||||
|
||||
async clickShowMenuButton(): Promise<void> {
|
||||
const checkBox: ElementFinder = element(by.css('mat-checkbox'));
|
||||
const checkBox = element(by.css('mat-checkbox'));
|
||||
await BrowserActions.click(checkBox.get(0));
|
||||
}
|
||||
|
||||
async changeHeaderColor(color): Promise<void> {
|
||||
const headerColor: ElementFinder = element(by.css('option[value="' + color + '"]'));
|
||||
async changeHeaderColor(color: string): Promise<void> {
|
||||
const headerColor = element(by.css('option[value="' + color + '"]'));
|
||||
await BrowserActions.click(headerColor);
|
||||
}
|
||||
|
||||
async checkAppTitle(name): Promise<void> {
|
||||
const title: ElementFinder = element(by.cssContainingText('.adf-app-title', name));
|
||||
async checkAppTitle(name: string): Promise<void> {
|
||||
const title = element(by.cssContainingText('.adf-app-title', name));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(title);
|
||||
}
|
||||
|
||||
async addTitle(title): Promise<void> {
|
||||
async addTitle(title: string): Promise<void> {
|
||||
await BrowserActions.click(this.titleInput);
|
||||
await BrowserActions.clearSendKeys(this.titleInput, title);
|
||||
await this.titleInput.sendKeys(protractor.Key.ENTER);
|
||||
}
|
||||
|
||||
async checkIconIsDisplayed(url): Promise<void> {
|
||||
const icon: ElementFinder = element(by.css('img[src="' + url + '"]'));
|
||||
async checkIconIsDisplayed(url: string): Promise<void> {
|
||||
const icon = element(by.css('img[src="' + url + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(icon);
|
||||
}
|
||||
|
||||
async addIcon(url): Promise<void> {
|
||||
async addIcon(url: string): Promise<void> {
|
||||
await BrowserActions.click(this.iconInput);
|
||||
await BrowserActions.clearSendKeys(this.iconInput, url);
|
||||
await this.iconInput.sendKeys(protractor.Key.ENTER);
|
||||
@@ -93,19 +92,19 @@ export class HeaderPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.logoTooltipInput);
|
||||
}
|
||||
|
||||
async addHexCodeColor(hexCode): Promise<void> {
|
||||
async addHexCodeColor(hexCode: string): Promise<void> {
|
||||
await BrowserActions.click(this.hexColorInput);
|
||||
await this.hexColorInput.sendKeys(hexCode);
|
||||
await this.hexColorInput.sendKeys(protractor.Key.ENTER);
|
||||
}
|
||||
|
||||
async addLogoHyperlink(hyperlink): Promise<void> {
|
||||
async addLogoHyperlink(hyperlink: string): Promise<void> {
|
||||
await BrowserActions.click(this.logoHyperlinkInput);
|
||||
await this.logoHyperlinkInput.sendKeys(hyperlink);
|
||||
await this.logoHyperlinkInput.sendKeys(protractor.Key.ENTER);
|
||||
}
|
||||
|
||||
async addLogoTooltip(tooltip): Promise<void> {
|
||||
async addLogoTooltip(tooltip: string): Promise<void> {
|
||||
await BrowserActions.click(this.logoTooltipInput);
|
||||
await this.logoTooltipInput.sendKeys(tooltip);
|
||||
await this.logoTooltipInput.sendKeys(protractor.Key.ENTER);
|
||||
|
@@ -23,7 +23,7 @@ export class InfinitePaginationPage {
|
||||
rootElement: ElementFinder;
|
||||
loadMoreButton;
|
||||
|
||||
constructor(rootElement: ElementFinder = element.all(by.css('adf-infinite-pagination')).first()) {
|
||||
constructor(rootElement = element.all(by.css('adf-infinite-pagination')).first()) {
|
||||
this.rootElement = rootElement;
|
||||
this.loadMoreButton = this.rootElement.element(by.css('button[data-automation-id="adf-infinite-pagination-button"]'));
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage, DropdownPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { NavigationBarPage } from '../navigation-bar.page';
|
||||
|
||||
const source = {
|
||||
@@ -36,10 +36,10 @@ const column = {
|
||||
};
|
||||
|
||||
export class CustomSourcesPage {
|
||||
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
||||
navigationBarPage: NavigationBarPage = new NavigationBarPage();
|
||||
dataTable = new DataTableComponentPage();
|
||||
navigationBarPage = new NavigationBarPage();
|
||||
|
||||
toolbar: ElementFinder = element(by.css('app-custom-sources .adf-toolbar-title'));
|
||||
toolbar = element(by.css('app-custom-sources .adf-toolbar-title'));
|
||||
selectModeDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="custom-sources-select"]')));
|
||||
|
||||
async waitForToolbarToBeVisible(): Promise<void> {
|
||||
@@ -63,15 +63,15 @@ export class CustomSourcesPage {
|
||||
await this.selectModeDropdown.selectDropdownOption(source.sharedLinks);
|
||||
}
|
||||
|
||||
checkRowIsDisplayed(rowName): Promise<void> {
|
||||
checkRowIsDisplayed(rowName: string): Promise<void> {
|
||||
return this.dataTable.checkContentIsDisplayed('Name', rowName);
|
||||
}
|
||||
|
||||
checkRowIsNotDisplayed(rowName): Promise<void> {
|
||||
checkRowIsNotDisplayed(rowName: string): Promise<void> {
|
||||
return this.dataTable.checkContentIsNotDisplayed('Name', rowName);
|
||||
}
|
||||
|
||||
async getStatusCell(rowName): Promise<string> {
|
||||
async getStatusCell(rowName: string): Promise<string> {
|
||||
const cell = this.dataTable.getCellByRowContentAndColumn('Name', rowName, column.status);
|
||||
return BrowserActions.getText(cell);
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage, DropdownPage } from '@alfresco/adf-testing';
|
||||
import { browser, by, element, ElementArrayFinder, ElementFinder, protractor } from 'protractor';
|
||||
import { browser, by, element, ElementFinder, protractor } from 'protractor';
|
||||
|
||||
export class DataTablePage {
|
||||
|
||||
@@ -33,17 +33,17 @@ export class DataTablePage {
|
||||
};
|
||||
|
||||
dataTable: DataTableComponentPage;
|
||||
multiSelect: ElementFinder = element(by.css(`div[data-automation-id='multiselect'] label > div[class='mat-checkbox-inner-container']`));
|
||||
reset: ElementFinder = element(by.xpath(`//span[contains(text(),'Reset to default')]/..`));
|
||||
allSelectedRows: ElementArrayFinder = element.all(by.css(`adf-datatable-row[class*='is-selected']`));
|
||||
selectedRowNumber: ElementFinder = element(by.css(`adf-datatable-row[class*='is-selected'] div[data-automation-id*='text_']`));
|
||||
selectAll: ElementFinder = element(by.css(`div[class*='header'] label`));
|
||||
addRowElement: ElementFinder = element(by.xpath(`//span[contains(text(),'Add row')]/..`));
|
||||
replaceRowsElement: ElementFinder = element(by.xpath(`//span[contains(text(),'Replace rows')]/..`));
|
||||
replaceColumnsElement: ElementFinder = element(by.xpath(`//span[contains(text(),'Replace columns')]/..`));
|
||||
createdOnColumn: ElementFinder = element(by.css(`div[data-automation-id='auto_id_createdOn']`));
|
||||
idColumnHeader: ElementFinder = element(by.css(`div[data-automation-id='auto_id_id']`));
|
||||
pasteClipboardInput: ElementFinder = element(by.css(`input[data-automation-id='paste clipboard input']`));
|
||||
multiSelect = element(by.css(`div[data-automation-id='multiselect'] label > div[class='mat-checkbox-inner-container']`));
|
||||
reset = element(by.xpath(`//span[contains(text(),'Reset to default')]/..`));
|
||||
allSelectedRows = element.all(by.css(`adf-datatable-row[class*='is-selected']`));
|
||||
selectedRowNumber = element(by.css(`adf-datatable-row[class*='is-selected'] div[data-automation-id*='text_']`));
|
||||
selectAll = element(by.css(`div[class*='header'] label`));
|
||||
addRowElement = element(by.xpath(`//span[contains(text(),'Add row')]/..`));
|
||||
replaceRowsElement = element(by.xpath(`//span[contains(text(),'Replace rows')]/..`));
|
||||
replaceColumnsElement = element(by.xpath(`//span[contains(text(),'Replace columns')]/..`));
|
||||
createdOnColumn = element(by.css(`div[data-automation-id='auto_id_createdOn']`));
|
||||
idColumnHeader = element(by.css(`div[data-automation-id='auto_id_id']`));
|
||||
pasteClipboardInput = element(by.css(`input[data-automation-id='paste clipboard input']`));
|
||||
|
||||
selectModeDropdown = new DropdownPage(element(by.css(`mat-select[data-automation-id='datatable-selection-mode']`)));
|
||||
|
||||
@@ -55,8 +55,8 @@ export class DataTablePage {
|
||||
}
|
||||
}
|
||||
|
||||
async insertFilter(filterText): Promise<void> {
|
||||
const inputFilter: ElementFinder = element(by.css(`#adf-datatable-filter-input`));
|
||||
async insertFilter(filterText: string): Promise<void> {
|
||||
const inputFilter = element(by.css(`#adf-datatable-filter-input`));
|
||||
await BrowserActions.clearSendKeys(inputFilter, filterText);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ export class DataTablePage {
|
||||
await BrowserActions.click(this.addRowElement);
|
||||
}
|
||||
|
||||
async replaceRows(id): Promise<void> {
|
||||
async replaceRows(id: string): Promise<void> {
|
||||
const rowID = this.dataTable.getCellElementByValue(this.columns.id, id);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(rowID);
|
||||
await BrowserActions.click(this.replaceRowsElement);
|
||||
@@ -128,7 +128,7 @@ export class DataTablePage {
|
||||
await browser.actions().sendKeys(protractor.Key.NULL).perform();
|
||||
}
|
||||
|
||||
async selectSelectionMode(selectionMode): Promise<void> {
|
||||
async selectSelectionMode(selectionMode: string): Promise<void> {
|
||||
await this.selectModeDropdown.selectDropdownOption(selectionMode);
|
||||
}
|
||||
|
||||
@@ -174,11 +174,11 @@ export class DataTablePage {
|
||||
await BrowserActions.click(this.dataTable.getCellByRowNumberAndColumnName(rowNumber - 1, this.columns.json));
|
||||
}
|
||||
|
||||
async clickOnNameColumn(name): Promise<void> {
|
||||
async clickOnNameColumn(name: string): Promise<void> {
|
||||
await this.dataTable.clickColumn(this.columns.name, name);
|
||||
}
|
||||
|
||||
async clickOnCreatedByColumn(name): Promise<void> {
|
||||
async clickOnCreatedByColumn(name: string): Promise<void> {
|
||||
await this.dataTable.clickColumn(this.columns.createdBy, name);
|
||||
}
|
||||
|
||||
|
@@ -15,41 +15,41 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, element, ElementFinder } from 'protractor';
|
||||
import { browser, by, element } from 'protractor';
|
||||
import { TogglePage, BrowserActions, BrowserVisibility, LoginSSOPage } from '@alfresco/adf-testing';
|
||||
|
||||
export class LoginPage {
|
||||
|
||||
loginURL: string = browser.baseUrl + '/login';
|
||||
loginURL = browser.baseUrl + '/login';
|
||||
|
||||
loginSSOPage: LoginSSOPage = new LoginSSOPage();
|
||||
loginSSOPage = new LoginSSOPage();
|
||||
|
||||
togglePage: TogglePage = new TogglePage();
|
||||
txtUsername: ElementFinder = element(by.css('input[id="username"]'));
|
||||
txtPassword: ElementFinder = element(by.css('input[id="password"]'));
|
||||
logoImg: ElementFinder = element(by.css('img[id="adf-login-img-logo"]'));
|
||||
successRouteTxt: ElementFinder = element(by.css('input[data-automation-id="adf-success-route"]'));
|
||||
logoTxt: ElementFinder = element(by.css('input[data-automation-id="adf-url-logo"]'));
|
||||
usernameTooltip: ElementFinder = element(by.css('span[data-automation-id="username-error"]'));
|
||||
passwordTooltip: ElementFinder = element(by.css('span[data-automation-id="password-required"]'));
|
||||
loginTooltip: ElementFinder = element(by.css('span[class="adf-login-error-message"]'));
|
||||
usernameInactive: ElementFinder = element(by.css('input[id="username"][aria-invalid="false"]'));
|
||||
passwordInactive: ElementFinder = element(by.css('input[id="password"][aria-invalid="false"]'));
|
||||
adfLogo: ElementFinder = element(by.css('img[class="adf-img-logo ng-star-inserted"]'));
|
||||
usernameHighlighted: ElementFinder = element(by.css('input[id="username"][aria-invalid="true"]'));
|
||||
passwordHighlighted: ElementFinder = element(by.css('input[id="password"][aria-invalid="true"]'));
|
||||
signInButton: ElementFinder = element(by.id('login-button'));
|
||||
showPasswordElement: ElementFinder = element(by.css('button[data-automation-id="show_password"]'));
|
||||
hidePasswordElement: ElementFinder = element(by.css('button[data-automation-id="hide_password"]'));
|
||||
rememberMe: ElementFinder = element(by.css('mat-checkbox[id="adf-login-remember"]'));
|
||||
needHelp: ElementFinder = element(by.css('div[id="adf-login-action-left"]'));
|
||||
register: ElementFinder = element(by.css('div[id="adf-login-action-right"]'));
|
||||
footerSwitch: ElementFinder = element(by.id('switch4'));
|
||||
rememberMeSwitch: ElementFinder = element(by.id('adf-toggle-show-rememberme'));
|
||||
successRouteSwitch: ElementFinder = element(by.id('adf-toggle-show-successRoute'));
|
||||
logoSwitch: ElementFinder = element(by.id('adf-toggle-logo'));
|
||||
header: ElementFinder = element(by.id('adf-header'));
|
||||
settingsIcon: ElementFinder = element(by.cssContainingText('a[data-automation-id="settings"] mat-icon', 'settings'));
|
||||
togglePage = new TogglePage();
|
||||
txtUsername = element(by.css('input[id="username"]'));
|
||||
txtPassword = element(by.css('input[id="password"]'));
|
||||
logoImg = element(by.css('img[id="adf-login-img-logo"]'));
|
||||
successRouteTxt = element(by.css('input[data-automation-id="adf-success-route"]'));
|
||||
logoTxt = element(by.css('input[data-automation-id="adf-url-logo"]'));
|
||||
usernameTooltip = element(by.css('span[data-automation-id="username-error"]'));
|
||||
passwordTooltip = element(by.css('span[data-automation-id="password-required"]'));
|
||||
loginTooltip = element(by.css('span[class="adf-login-error-message"]'));
|
||||
usernameInactive = element(by.css('input[id="username"][aria-invalid="false"]'));
|
||||
passwordInactive = element(by.css('input[id="password"][aria-invalid="false"]'));
|
||||
adfLogo = element(by.css('img[class="adf-img-logo ng-star-inserted"]'));
|
||||
usernameHighlighted = element(by.css('input[id="username"][aria-invalid="true"]'));
|
||||
passwordHighlighted = element(by.css('input[id="password"][aria-invalid="true"]'));
|
||||
signInButton = element(by.id('login-button'));
|
||||
showPasswordElement = element(by.css('button[data-automation-id="show_password"]'));
|
||||
hidePasswordElement = element(by.css('button[data-automation-id="hide_password"]'));
|
||||
rememberMe = element(by.css('mat-checkbox[id="adf-login-remember"]'));
|
||||
needHelp = element(by.css('div[id="adf-login-action-left"]'));
|
||||
register = element(by.css('div[id="adf-login-action-right"]'));
|
||||
footerSwitch = element(by.id('switch4'));
|
||||
rememberMeSwitch = element(by.id('adf-toggle-show-rememberme'));
|
||||
successRouteSwitch = element(by.id('adf-toggle-show-successRoute'));
|
||||
logoSwitch = element(by.id('adf-toggle-logo'));
|
||||
header = element(by.id('adf-header'));
|
||||
settingsIcon = element(by.cssContainingText('a[data-automation-id="settings"] mat-icon', 'settings'));
|
||||
sidenavLayout = element(by.css(`[data-automation-id="sidenav-layout"]`));
|
||||
|
||||
async goToLoginPage(): Promise<void> {
|
||||
@@ -62,11 +62,11 @@ export class LoginPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.txtPassword);
|
||||
}
|
||||
|
||||
async enterUsername(username): Promise<void> {
|
||||
async enterUsername(username: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.txtUsername, username);
|
||||
}
|
||||
|
||||
async enterPassword(password): Promise<void> {
|
||||
async enterPassword(password: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.txtPassword, password);
|
||||
}
|
||||
|
||||
@@ -195,11 +195,11 @@ export class LoginPage {
|
||||
await this.togglePage.enableToggle(this.logoSwitch);
|
||||
}
|
||||
|
||||
async enterSuccessRoute(route): Promise<void> {
|
||||
async enterSuccessRoute(route: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.successRouteTxt, route);
|
||||
}
|
||||
|
||||
async enterLogo(logo): Promise<void> {
|
||||
async enterLogo(logo: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.logoTxt, logo);
|
||||
}
|
||||
|
||||
|
@@ -15,12 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class MonacoExtensionPage {
|
||||
|
||||
monacoPlugin: ElementFinder = element(by.cssContainingText('mat-row > mat-cell', 'monaco plugin'));
|
||||
monacoPlugin = element(by.cssContainingText('mat-row > mat-cell', 'monaco plugin'));
|
||||
|
||||
async checkMonacoPluginIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.monacoPlugin);
|
||||
|
@@ -15,20 +15,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, browser, ElementFinder } from 'protractor';
|
||||
import { element, by, browser } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions, DropdownPage, SnackbarPage } from '@alfresco/adf-testing';
|
||||
|
||||
export class NotificationDemoPage {
|
||||
|
||||
snackbarPage = new SnackbarPage();
|
||||
|
||||
messageField: ElementFinder = element(by.css('input[data-automation-id="notification-message"]'));
|
||||
durationField: ElementFinder = element(by.css('input[data-automation-id="notification-duration"]'));
|
||||
actionToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="notification-action-toggle"]'));
|
||||
notificationSnackBar: ElementFinder = element.all(by.css('simple-snack-bar')).first();
|
||||
actionOutput: ElementFinder = element(by.css('div[data-automation-id="notification-action-output"]'));
|
||||
notificationsPage: ElementFinder = element(by.css('.app-sidenav-link[data-automation-id="Notifications"]'));
|
||||
notificationConfig: ElementFinder = element(by.css('p[data-automation-id="notification-custom-object"]'));
|
||||
messageField = element(by.css('input[data-automation-id="notification-message"]'));
|
||||
durationField = element(by.css('input[data-automation-id="notification-duration"]'));
|
||||
actionToggle = element(by.css('mat-slide-toggle[data-automation-id="notification-action-toggle"]'));
|
||||
notificationSnackBar = element.all(by.css('simple-snack-bar')).first();
|
||||
actionOutput = element(by.css('div[data-automation-id="notification-action-output"]'));
|
||||
notificationsPage = element(by.css('.app-sidenav-link[data-automation-id="Notifications"]'));
|
||||
notificationConfig = element(by.css('p[data-automation-id="notification-custom-object"]'));
|
||||
|
||||
horizontalPositionDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="notification-horizontal-position"]')));
|
||||
verticalPositionDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="notification-vertical-position"]')));
|
||||
@@ -58,28 +58,28 @@ export class NotificationDemoPage {
|
||||
await this.snackbarPage.waitForSnackBarToClose();
|
||||
}
|
||||
|
||||
async enterMessageField(text): Promise<void> {
|
||||
async enterMessageField(text: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.messageField, text);
|
||||
}
|
||||
|
||||
async enterDurationField(time): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.durationField, time);
|
||||
async enterDurationField(time: number): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.durationField, time.toString());
|
||||
}
|
||||
|
||||
async selectHorizontalPosition(selectItem): Promise<void> {
|
||||
async selectHorizontalPosition(selectItem: string): Promise<void> {
|
||||
await this.horizontalPositionDropdown.selectDropdownOption(selectItem);
|
||||
}
|
||||
|
||||
async selectVerticalPosition(selectItem): Promise<void> {
|
||||
async selectVerticalPosition(selectItem: string): Promise<void> {
|
||||
await this.verticalPositionDropdown.selectDropdownOption(selectItem);
|
||||
}
|
||||
|
||||
async selectDirection(selectItem): Promise<void> {
|
||||
async selectDirection(selectItem: string): Promise<void> {
|
||||
await this.directionDropdown.selectDropdownOption(selectItem);
|
||||
}
|
||||
|
||||
async clickNotificationButton(): Promise<void> {
|
||||
const button: ElementFinder = element(by.css('button[data-automation-id="notification-custom-config-button"]'));
|
||||
const button = element(by.css('button[data-automation-id="notification-custom-config-button"]'));
|
||||
await BrowserActions.click(button);
|
||||
}
|
||||
|
||||
|
@@ -16,12 +16,12 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, ConfigEditorPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
|
||||
export class FormDemoPage {
|
||||
|
||||
formCloudEditor: ElementFinder = element.all(by.css('.mat-tab-list .mat-tab-label')).get(1);
|
||||
formCloudRender: ElementFinder = element.all(by.css('.mat-tab-list .mat-tab-label')).get(0);
|
||||
formCloudEditor = element.all(by.css('.mat-tab-list .mat-tab-label')).get(1);
|
||||
formCloudRender = element.all(by.css('.mat-tab-list .mat-tab-label')).get(0);
|
||||
|
||||
configEditorPage = new ConfigEditorPage();
|
||||
|
||||
@@ -33,7 +33,7 @@ export class FormDemoPage {
|
||||
await BrowserActions.click(this.formCloudRender);
|
||||
}
|
||||
|
||||
async setConfigToEditor(text): Promise<void> {
|
||||
async setConfigToEditor(text: string): Promise<void> {
|
||||
const configEditor = element(by.id('adf-form-config-editor'));
|
||||
const form = element(by.css('adf-form'));
|
||||
await this.goToEditor();
|
||||
|
@@ -15,30 +15,30 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class PeopleGroupCloudComponentPage {
|
||||
|
||||
peopleCloudSingleSelectionChecked: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-people-single-mode"][class*="mat-radio-checked"]'));
|
||||
peopleCloudMultipleSelectionChecked: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-people-multiple-mode"][class*="mat-radio-checked"]'));
|
||||
peopleCloudSingleSelection: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-people-single-mode"]'));
|
||||
peopleCloudMultipleSelection: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-people-multiple-mode"]'));
|
||||
peopleCloudFilterRole: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-people-filter-role"]'));
|
||||
groupCloudSingleSelection: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-group-single-mode"]'));
|
||||
groupCloudMultipleSelection: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-group-multiple-mode"]'));
|
||||
groupCloudFilterRole: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-group-filter-role"]'));
|
||||
peopleRoleInput: ElementFinder = element(by.css('input[data-automation-id="app-people-roles-input"]'));
|
||||
peopleAppInput: ElementFinder = element(by.css('input[data-automation-id="app-people-app-input"]'));
|
||||
peoplePreselect: ElementFinder = element(by.css('input[data-automation-id="app-people-preselect-input"]'));
|
||||
groupRoleInput: ElementFinder = element(by.css('input[data-automation-id="app-group-roles-input"]'));
|
||||
groupAppInput: ElementFinder = element(by.css('input[data-automation-id="app-group-app-input"]'));
|
||||
peopleCloudComponentTitle: ElementFinder = element(by.cssContainingText('mat-card-title', 'People Cloud Component'));
|
||||
groupCloudComponentTitle: ElementFinder = element(by.cssContainingText('mat-card-title', 'Groups Cloud Component'));
|
||||
preselectValidation: ElementFinder = element.all(by.css('mat-checkbox.app-preselect-value')).first();
|
||||
preselectValidationStatus: ElementFinder = element.all(by.css('mat-checkbox.app-preselect-value label input')).first();
|
||||
peopleFilterByAppName: ElementFinder = element(by.css('.app-people-control-options mat-radio-button[value="appName"]'));
|
||||
groupFilterByAppName: ElementFinder = element(by.css('.app-groups-control-options mat-radio-button[value="appName"]'));
|
||||
peopleCloudSingleSelectionChecked = element(by.css('mat-radio-button[data-automation-id="app-people-single-mode"][class*="mat-radio-checked"]'));
|
||||
peopleCloudMultipleSelectionChecked = element(by.css('mat-radio-button[data-automation-id="app-people-multiple-mode"][class*="mat-radio-checked"]'));
|
||||
peopleCloudSingleSelection = element(by.css('mat-radio-button[data-automation-id="app-people-single-mode"]'));
|
||||
peopleCloudMultipleSelection = element(by.css('mat-radio-button[data-automation-id="app-people-multiple-mode"]'));
|
||||
peopleCloudFilterRole = element(by.css('mat-radio-button[data-automation-id="app-people-filter-role"]'));
|
||||
groupCloudSingleSelection = element(by.css('mat-radio-button[data-automation-id="app-group-single-mode"]'));
|
||||
groupCloudMultipleSelection = element(by.css('mat-radio-button[data-automation-id="app-group-multiple-mode"]'));
|
||||
groupCloudFilterRole = element(by.css('mat-radio-button[data-automation-id="app-group-filter-role"]'));
|
||||
peopleRoleInput = element(by.css('input[data-automation-id="app-people-roles-input"]'));
|
||||
peopleAppInput = element(by.css('input[data-automation-id="app-people-app-input"]'));
|
||||
peoplePreselect = element(by.css('input[data-automation-id="app-people-preselect-input"]'));
|
||||
groupRoleInput = element(by.css('input[data-automation-id="app-group-roles-input"]'));
|
||||
groupAppInput = element(by.css('input[data-automation-id="app-group-app-input"]'));
|
||||
peopleCloudComponentTitle = element(by.cssContainingText('mat-card-title', 'People Cloud Component'));
|
||||
groupCloudComponentTitle = element(by.cssContainingText('mat-card-title', 'Groups Cloud Component'));
|
||||
preselectValidation = element.all(by.css('mat-checkbox.app-preselect-value')).first();
|
||||
preselectValidationStatus = element.all(by.css('mat-checkbox.app-preselect-value label input')).first();
|
||||
peopleFilterByAppName = element(by.css('.app-people-control-options mat-radio-button[value="appName"]'));
|
||||
groupFilterByAppName = element(by.css('.app-groups-control-options mat-radio-button[value="appName"]'));
|
||||
|
||||
async checkPeopleCloudComponentTitleIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudComponentTitle);
|
||||
@@ -76,11 +76,11 @@ export class PeopleGroupCloudComponentPage {
|
||||
await BrowserActions.click(this.groupCloudFilterRole);
|
||||
}
|
||||
|
||||
async enterPeopleRoles(roles): Promise<void> {
|
||||
async enterPeopleRoles(roles: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.peopleRoleInput, roles);
|
||||
}
|
||||
|
||||
async enterPeoplePreselect(preselect): Promise<void> {
|
||||
async enterPeoplePreselect(preselect: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.peoplePreselect, preselect);
|
||||
}
|
||||
|
||||
@@ -117,11 +117,11 @@ export class PeopleGroupCloudComponentPage {
|
||||
await BrowserActions.click(this.groupFilterByAppName);
|
||||
}
|
||||
|
||||
async enterPeopleAppName(appName): Promise<void> {
|
||||
async enterPeopleAppName(appName: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.peopleAppInput, appName);
|
||||
}
|
||||
|
||||
async enterGroupAppName(appName): Promise<void> {
|
||||
async enterGroupAppName(appName: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.groupAppInput, appName);
|
||||
}
|
||||
|
||||
|
@@ -16,12 +16,12 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, EditProcessFilterCloudComponentPage, ProcessFiltersCloudComponentPage, ProcessListCloudComponentPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
|
||||
export class ProcessCloudDemoPage {
|
||||
|
||||
createButton: ElementFinder = element(by.css('button[data-automation-id="create-button"'));
|
||||
newProcessButton: ElementFinder = element(by.css('button[data-automation-id="btn-start-process"]'));
|
||||
createButton = element(by.css('button[data-automation-id="create-button"'));
|
||||
newProcessButton = element(by.css('button[data-automation-id="btn-start-process"]'));
|
||||
|
||||
processListCloud = new ProcessListCloudComponentPage();
|
||||
editProcessFilterCloud = new EditProcessFilterCloudComponentPage();
|
||||
|
@@ -16,20 +16,20 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage, DropdownPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementFinder, protractor } from 'protractor';
|
||||
import { by, element, protractor } from 'protractor';
|
||||
|
||||
export class ProcessListDemoPage {
|
||||
|
||||
appIdInput: ElementFinder = element(by.css('input[data-automation-id="app-id"]'));
|
||||
resetButton: ElementFinder = element(by.cssContainingText('button span', 'Reset'));
|
||||
emptyProcessContent: ElementFinder = element(by.css('div[class="adf-empty-content"]'));
|
||||
processDefinitionInput: ElementFinder = element(by.css('input[data-automation-id="process-definition-id"]'));
|
||||
processInstanceInput: ElementFinder = element(by.css('input[data-automation-id="process-instance-id"]'));
|
||||
appIdInput = element(by.css('input[data-automation-id="app-id"]'));
|
||||
resetButton = element(by.cssContainingText('button span', 'Reset'));
|
||||
emptyProcessContent = element(by.css('div[class="adf-empty-content"]'));
|
||||
processDefinitionInput = element(by.css('input[data-automation-id="process-definition-id"]'));
|
||||
processInstanceInput = element(by.css('input[data-automation-id="process-instance-id"]'));
|
||||
|
||||
stateDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="state"')));
|
||||
sortDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="sort"')));
|
||||
|
||||
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
||||
dataTable = new DataTableComponentPage();
|
||||
|
||||
getDisplayedProcessesNames(): Promise<any> {
|
||||
return this.dataTable.getAllRowsColumnValues('Name');
|
||||
@@ -55,7 +55,7 @@ export class ProcessListDemoPage {
|
||||
}
|
||||
|
||||
async checkErrorMessageIsDisplayed(error): Promise<void> {
|
||||
const errorMessage: ElementFinder = element(by.cssContainingText('mat-error', error));
|
||||
const errorMessage = element(by.cssContainingText('mat-error', error));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(errorMessage);
|
||||
}
|
||||
|
||||
@@ -63,11 +63,11 @@ export class ProcessListDemoPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.emptyProcessContent);
|
||||
}
|
||||
|
||||
async checkProcessIsNotDisplayed(processName): Promise<void> {
|
||||
async checkProcessIsNotDisplayed(processName: string): Promise<void> {
|
||||
await this.dataTable.checkContentIsNotDisplayed('Name', processName);
|
||||
}
|
||||
|
||||
async checkProcessIsDisplayed(processName): Promise<void> {
|
||||
async checkProcessIsDisplayed(processName: string): Promise<void> {
|
||||
await this.dataTable.checkContentIsDisplayed('Name', processName);
|
||||
}
|
||||
|
||||
|
@@ -16,16 +16,16 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions } from '@alfresco/adf-testing';
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { TaskFiltersPage } from '../../process-services/task-filters.page';
|
||||
|
||||
export class TaskFiltersDemoPage {
|
||||
|
||||
myTasks: ElementFinder = element(by.css('button[data-automation-id="My Tasks_filter"]'));
|
||||
queuedTask: ElementFinder = element(by.css('button[data-automation-id="Queued Tasks_filter"]'));
|
||||
completedTask: ElementFinder = element(by.css('button[data-automation-id="Completed Tasks_filter"]'));
|
||||
involvedTask: ElementFinder = element(by.css('button[data-automation-id="Involved Tasks_filter"]'));
|
||||
activeFilter: ElementFinder = element(by.css('adf-task-filters .adf-active'));
|
||||
myTasks = element(by.css('button[data-automation-id="My Tasks_filter"]'));
|
||||
queuedTask = element(by.css('button[data-automation-id="Queued Tasks_filter"]'));
|
||||
completedTask = element(by.css('button[data-automation-id="Completed Tasks_filter"]'));
|
||||
involvedTask = element(by.css('button[data-automation-id="Involved Tasks_filter"]'));
|
||||
activeFilter = element(by.css('adf-task-filters .adf-active'));
|
||||
|
||||
myTasksFilter(): TaskFiltersPage {
|
||||
return new TaskFiltersPage(this.myTasks);
|
||||
@@ -43,7 +43,7 @@ export class TaskFiltersDemoPage {
|
||||
return new TaskFiltersPage(this.involvedTask);
|
||||
}
|
||||
|
||||
customTaskFilter(filterName): TaskFiltersPage {
|
||||
customTaskFilter(filterName: string): TaskFiltersPage {
|
||||
return new TaskFiltersPage(element(by.css(`button[data-automation-id="${filterName}_filter"]`)));
|
||||
}
|
||||
|
||||
|
@@ -16,26 +16,26 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DropdownPage, PaginationPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { TasksListPage } from '../../process-services/tasks-list.page';
|
||||
|
||||
export class TaskListDemoPage {
|
||||
|
||||
taskListPage: TasksListPage = new TasksListPage();
|
||||
appId: ElementFinder = element(by.css("input[data-automation-id='appId input']"));
|
||||
itemsPerPage: ElementFinder = element(by.css("input[data-automation-id='items per page']"));
|
||||
itemsPerPageForm: ElementFinder = element(by.css("mat-form-field[data-automation-id='items per page']"));
|
||||
processDefinitionId: ElementFinder = element(by.css("input[data-automation-id='process definition id']"));
|
||||
processInstanceId: ElementFinder = element(by.css("input[data-automation-id='process instance id']"));
|
||||
page: ElementFinder = element(by.css("input[data-automation-id='page']"));
|
||||
pageForm: ElementFinder = element(by.css("mat-form-field[data-automation-id='page']"));
|
||||
taskName: ElementFinder = element(by.css("input[data-automation-id='task name']"));
|
||||
resetButton: ElementFinder = element(by.css("div[class='app-reset-button'] button"));
|
||||
dueBefore: ElementFinder = element(by.css("input[data-automation-id='due before']"));
|
||||
dueAfter: ElementFinder = element(by.css("input[data-automation-id='due after']"));
|
||||
taskId: ElementFinder = element(by.css("input[data-automation-id='task id']"));
|
||||
appId = element(by.css("input[data-automation-id='appId input']"));
|
||||
itemsPerPage = element(by.css("input[data-automation-id='items per page']"));
|
||||
itemsPerPageForm = element(by.css("mat-form-field[data-automation-id='items per page']"));
|
||||
processDefinitionId = element(by.css("input[data-automation-id='process definition id']"));
|
||||
processInstanceId = element(by.css("input[data-automation-id='process instance id']"));
|
||||
page = element(by.css("input[data-automation-id='page']"));
|
||||
pageForm = element(by.css("mat-form-field[data-automation-id='page']"));
|
||||
taskName = element(by.css("input[data-automation-id='task name']"));
|
||||
resetButton = element(by.css("div[class='app-reset-button'] button"));
|
||||
dueBefore = element(by.css("input[data-automation-id='due before']"));
|
||||
dueAfter = element(by.css("input[data-automation-id='due after']"));
|
||||
taskId = element(by.css("input[data-automation-id='task id']"));
|
||||
|
||||
stateDropDownArrow: ElementFinder = element(by.css("mat-form-field[data-automation-id='state']"));
|
||||
stateDropDownArrow = element(by.css("mat-form-field[data-automation-id='state']"));
|
||||
stateDropdown = new DropdownPage(this.stateDropDownArrow);
|
||||
|
||||
taskList(): TasksListPage {
|
||||
@@ -46,7 +46,7 @@ export class TaskListDemoPage {
|
||||
return new PaginationPage();
|
||||
}
|
||||
|
||||
async typeAppId(input): Promise<void> {
|
||||
async typeAppId(input: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.appId, input);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ export class TaskListDemoPage {
|
||||
return this.appId.getAttribute('value');
|
||||
}
|
||||
|
||||
async typeTaskId(input): Promise<void> {
|
||||
async typeTaskId(input: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.taskId, input);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ export class TaskListDemoPage {
|
||||
return this.taskId.getAttribute('value');
|
||||
}
|
||||
|
||||
async typeTaskName(input): Promise<void> {
|
||||
async typeTaskName(input: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.taskName, input);
|
||||
}
|
||||
|
||||
@@ -77,11 +77,11 @@ export class TaskListDemoPage {
|
||||
return this.taskName.getAttribute('value');
|
||||
}
|
||||
|
||||
async typeItemsPerPage(input): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.itemsPerPage, input);
|
||||
async typeItemsPerPage(input: number): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.itemsPerPage, input.toString());
|
||||
}
|
||||
|
||||
async typeProcessDefinitionId(input): Promise<void> {
|
||||
async typeProcessDefinitionId(input: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.processDefinitionId, input);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class TaskListDemoPage {
|
||||
return this.processInstanceId.getAttribute('value');
|
||||
}
|
||||
|
||||
async typeProcessInstanceId(input): Promise<void> {
|
||||
async typeProcessInstanceId(input: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.processInstanceId, input);
|
||||
}
|
||||
|
||||
@@ -105,8 +105,8 @@ export class TaskListDemoPage {
|
||||
return BrowserActions.getText(errorMessage);
|
||||
}
|
||||
|
||||
async typePage(input): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.page, input);
|
||||
async typePage(input: number): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.page, input.toString());
|
||||
}
|
||||
|
||||
async getPage(): Promise<string> {
|
||||
@@ -120,11 +120,11 @@ export class TaskListDemoPage {
|
||||
return BrowserActions.getText(errorMessage);
|
||||
}
|
||||
|
||||
async typeDueAfter(input): Promise<void> {
|
||||
async typeDueAfter(input: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.dueAfter, input);
|
||||
}
|
||||
|
||||
async typeDueBefore(input): Promise<void> {
|
||||
async typeDueBefore(input: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.dueBefore, input);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ export class TaskListDemoPage {
|
||||
await BrowserActions.click(this.resetButton);
|
||||
}
|
||||
|
||||
async selectState(state): Promise<void> {
|
||||
async selectState(state: string): Promise<void> {
|
||||
await this.stateDropdown.selectDropdownOption(state);
|
||||
}
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, browser, ElementFinder, ElementArrayFinder } from 'protractor';
|
||||
import { element, by, browser } from 'protractor';
|
||||
import {
|
||||
TogglePage,
|
||||
TaskFiltersCloudComponentPage,
|
||||
@@ -27,31 +27,31 @@ import {
|
||||
|
||||
export class TasksCloudDemoPage {
|
||||
|
||||
createButton: ElementFinder = element(by.css('button[data-automation-id="create-button"'));
|
||||
newTaskButton: ElementFinder = element(by.css('button[data-automation-id="btn-start-task"]'));
|
||||
settingsButton: ElementFinder = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Settings')).first();
|
||||
appButton: ElementFinder = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'App')).first();
|
||||
displayTaskDetailsToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="taskDetailsRedirection"]'));
|
||||
displayProcessDetailsToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="processDetailsRedirection"]'));
|
||||
actionMenuToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="actionmenu"]'));
|
||||
contextMenuToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="contextmenu"]'));
|
||||
multiSelectionToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="multiSelection"]'));
|
||||
testingModeToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="testingMode"]'));
|
||||
selectedRows: ElementFinder = element(by.xpath("//div[text()=' Selected Rows: ']"));
|
||||
noOfSelectedRows: ElementArrayFinder = element.all(by.xpath("//div[text()=' Selected Rows: ']//li"));
|
||||
addActionTitle: ElementFinder = element(by.cssContainingText('.mat-card-title', 'Add Action'));
|
||||
keyInputField: ElementFinder = element(by.css('input[placeholder="Key"]'));
|
||||
titleInputField: ElementFinder = element(by.css('input[placeholder="Title"]'));
|
||||
iconInputField: ElementFinder = element(by.css('input[placeholder="Icon"]'));
|
||||
addActionButton: ElementFinder = element(by.cssContainingText('button span', 'Add'));
|
||||
disableCheckbox: ElementFinder = element(by.css(`mat-checkbox[formcontrolname='disabled']`));
|
||||
visibleCheckbox: ElementFinder = element(by.css(`mat-checkbox[formcontrolname='visible']`));
|
||||
createButton = element(by.css('button[data-automation-id="create-button"'));
|
||||
newTaskButton = element(by.css('button[data-automation-id="btn-start-task"]'));
|
||||
settingsButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Settings')).first();
|
||||
appButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'App')).first();
|
||||
displayTaskDetailsToggle = element(by.css('mat-slide-toggle[data-automation-id="taskDetailsRedirection"]'));
|
||||
displayProcessDetailsToggle = element(by.css('mat-slide-toggle[data-automation-id="processDetailsRedirection"]'));
|
||||
actionMenuToggle = element(by.css('mat-slide-toggle[data-automation-id="actionmenu"]'));
|
||||
contextMenuToggle = element(by.css('mat-slide-toggle[data-automation-id="contextmenu"]'));
|
||||
multiSelectionToggle = element(by.css('mat-slide-toggle[data-automation-id="multiSelection"]'));
|
||||
testingModeToggle = element(by.css('mat-slide-toggle[data-automation-id="testingMode"]'));
|
||||
selectedRows = element(by.xpath("//div[text()=' Selected Rows: ']"));
|
||||
noOfSelectedRows = element.all(by.xpath("//div[text()=' Selected Rows: ']//li"));
|
||||
addActionTitle = element(by.cssContainingText('.mat-card-title', 'Add Action'));
|
||||
keyInputField = element(by.css('input[placeholder="Key"]'));
|
||||
titleInputField = element(by.css('input[placeholder="Title"]'));
|
||||
iconInputField = element(by.css('input[placeholder="Icon"]'));
|
||||
addActionButton = element(by.cssContainingText('button span', 'Add'));
|
||||
disableCheckbox = element(by.css(`mat-checkbox[formcontrolname='disabled']`));
|
||||
visibleCheckbox = element(by.css(`mat-checkbox[formcontrolname='visible']`));
|
||||
|
||||
modeDropdown = new DropdownPage(element(by.css('mat-form-field[data-automation-id="selectionMode"]')));
|
||||
|
||||
togglePage: TogglePage = new TogglePage();
|
||||
togglePage = new TogglePage();
|
||||
|
||||
editTaskFilterCloud: EditTaskFilterCloudComponentPage = new EditTaskFilterCloudComponentPage();
|
||||
editTaskFilterCloud = new EditTaskFilterCloudComponentPage();
|
||||
|
||||
taskFilterCloudComponent = new TaskFiltersCloudComponentPage();
|
||||
|
||||
@@ -103,7 +103,7 @@ export class TasksCloudDemoPage {
|
||||
await BrowserActions.click(this.appButton);
|
||||
}
|
||||
|
||||
async selectSelectionMode(mode): Promise<void> {
|
||||
async selectSelectionMode(mode: string): Promise<void> {
|
||||
await this.modeDropdown.clickDropdown();
|
||||
await this.modeDropdown.selectOption(mode);
|
||||
}
|
||||
@@ -119,7 +119,7 @@ export class TasksCloudDemoPage {
|
||||
|
||||
async getSelectedTaskRowText(rowNo: string): Promise<string> {
|
||||
await this.checkSelectedRowsIsDisplayed();
|
||||
const row: ElementFinder = element(by.xpath(`//div[text()=' Selected Rows: ']//li[${rowNo}]`));
|
||||
const row = element(by.xpath(`//div[text()=' Selected Rows: ']//li[${rowNo}]`));
|
||||
return BrowserActions.getText(row);
|
||||
}
|
||||
|
||||
|
@@ -15,12 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { BrowserActions, BrowserVisibility } from '@alfresco/adf-testing';
|
||||
|
||||
export class SocialPage {
|
||||
|
||||
nodeIdField: ElementFinder = element(by.css(`input[id="nodeId"]`));
|
||||
nodeIdField = element(by.css(`input[id="nodeId"]`));
|
||||
|
||||
async getNodeIdFieldValue(): Promise<string> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.nodeIdField);
|
||||
|
@@ -15,26 +15,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, browser, protractor, ElementFinder, ElementArrayFinder } from 'protractor';
|
||||
import { by, element, browser, protractor } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class CreateLibraryDialogPage {
|
||||
libraryDialog: ElementFinder = element(by.css('[role="dialog"]'));
|
||||
libraryTitle: ElementFinder = element(by.css('.adf-library-dialog>h2'));
|
||||
libraryNameField: ElementFinder = element(by.css('input[formcontrolname="title"]'));
|
||||
libraryIdField: ElementFinder = element(by.css('input[formcontrolname="id"]'));
|
||||
libraryDescriptionField: ElementFinder = element(by.css('textarea[formcontrolname="description"]'));
|
||||
publicRadioButton: ElementFinder = element(by.css('[data-automation-id="PUBLIC"]>label'));
|
||||
privateRadioButton: ElementFinder = element(by.css('[data-automation-id="PRIVATE"]>label'));
|
||||
moderatedRadioButton: ElementFinder = element(by.css('[data-automation-id="MODERATED"]>label'));
|
||||
cancelButton: ElementFinder = element(by.css('button[data-automation-id="cancel-library-id"]'));
|
||||
createButton: ElementFinder = element(by.css('button[data-automation-id="create-library-id"]'));
|
||||
errorMessage: ElementFinder = element(by.css('.mat-dialog-content .mat-error'));
|
||||
errorMessages: ElementArrayFinder = element.all(by.css('.mat-dialog-content .mat-error'));
|
||||
libraryNameHint: ElementFinder = element(by.css('adf-library-dialog .mat-hint'));
|
||||
libraryDialog = element(by.css('[role="dialog"]'));
|
||||
libraryTitle = element(by.css('.adf-library-dialog>h2'));
|
||||
libraryNameField = element(by.css('input[formcontrolname="title"]'));
|
||||
libraryIdField = element(by.css('input[formcontrolname="id"]'));
|
||||
libraryDescriptionField = element(by.css('textarea[formcontrolname="description"]'));
|
||||
publicRadioButton = element(by.css('[data-automation-id="PUBLIC"]>label'));
|
||||
privateRadioButton = element(by.css('[data-automation-id="PRIVATE"]>label'));
|
||||
moderatedRadioButton = element(by.css('[data-automation-id="MODERATED"]>label'));
|
||||
cancelButton = element(by.css('button[data-automation-id="cancel-library-id"]'));
|
||||
createButton = element(by.css('button[data-automation-id="create-library-id"]'));
|
||||
errorMessage = element(by.css('.mat-dialog-content .mat-error'));
|
||||
errorMessages = element.all(by.css('.mat-dialog-content .mat-error'));
|
||||
libraryNameHint = element(by.css('adf-library-dialog .mat-hint'));
|
||||
|
||||
async getSelectedRadio(): Promise<string> {
|
||||
const radio: ElementFinder = element(by.css('.mat-radio-button[class*="checked"]'));
|
||||
const radio = element(by.css('.mat-radio-button[class*="checked"]'));
|
||||
return BrowserActions.getText(radio);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ export class CreateLibraryDialogPage {
|
||||
return BrowserActions.getText(this.errorMessage);
|
||||
}
|
||||
|
||||
async getErrorMessages(position): Promise<string> {
|
||||
async getErrorMessages(position: number): Promise<string> {
|
||||
return BrowserActions.getText(this.errorMessages.get(position));
|
||||
}
|
||||
|
||||
@@ -122,11 +122,11 @@ export class CreateLibraryDialogPage {
|
||||
await BrowserActions.clearSendKeys(this.libraryNameField, libraryName);
|
||||
}
|
||||
|
||||
async typeLibraryId(libraryId): Promise<void> {
|
||||
async typeLibraryId(libraryId: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.libraryIdField, libraryId);
|
||||
}
|
||||
|
||||
async typeLibraryDescription(libraryDescription): Promise<void> {
|
||||
async typeLibraryDescription(libraryDescription: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.libraryDescriptionField, libraryDescription);
|
||||
}
|
||||
|
||||
|
@@ -19,13 +19,13 @@ import { by, element, ElementFinder } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class FolderDialogPage {
|
||||
folderDialog: ElementFinder = element(by.css('adf-folder-dialog'));
|
||||
folderNameField: ElementFinder = this.folderDialog.element(by.id('adf-folder-name-input'));
|
||||
folderDescriptionField: ElementFinder = this.folderDialog.element(by.id('adf-folder-description-input'));
|
||||
createUpdateButton: ElementFinder = this.folderDialog.element(by.id('adf-folder-create-button'));
|
||||
cancelButton: ElementFinder = this.folderDialog.element(by.id('adf-folder-cancel-button'));
|
||||
folderTitle: ElementFinder = this.folderDialog.element((by.css('h2.mat-dialog-title')));
|
||||
validationMessage: ElementFinder = this.folderDialog.element(by.css('div.mat-form-field-subscript-wrapper mat-hint span'));
|
||||
folderDialog = element(by.css('adf-folder-dialog'));
|
||||
folderNameField = this.folderDialog.element(by.id('adf-folder-name-input'));
|
||||
folderDescriptionField = this.folderDialog.element(by.id('adf-folder-description-input'));
|
||||
createUpdateButton = this.folderDialog.element(by.id('adf-folder-create-button'));
|
||||
cancelButton = this.folderDialog.element(by.id('adf-folder-cancel-button'));
|
||||
folderTitle = this.folderDialog.element((by.css('h2.mat-dialog-title')));
|
||||
validationMessage = this.folderDialog.element(by.css('div.mat-form-field-subscript-wrapper mat-hint span'));
|
||||
|
||||
async getDialogTitle(): Promise<string> {
|
||||
return BrowserActions.getText(this.folderTitle);
|
||||
|
@@ -15,19 +15,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, element, ElementFinder, Locator, protractor } from 'protractor';
|
||||
import { browser, by, element, ElementFinder, protractor } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class SearchDialogPage {
|
||||
|
||||
searchIcon: ElementFinder = element(by.css(`button[class*='adf-search-button']`));
|
||||
searchBar: ElementFinder = element(by.css(`adf-search-control input`));
|
||||
searchBarExpanded: ElementFinder = element(by.css(`adf-search-control mat-form-field[class*="mat-focused"] input`));
|
||||
noResultMessage: ElementFinder = element(by.css(`p[class*='adf-search-fixed-text']`));
|
||||
rowsAuthor: Locator = by.css(`div[class='mat-list-text'] p[class*='adf-search-fixed-text']`);
|
||||
completeName: Locator = by.css(`h4[class*='adf-search-fixed-text']`);
|
||||
highlightName: Locator = by.css(`.adf-highlight`);
|
||||
searchDialog: ElementFinder = element(by.css(`mat-list[id='autocomplete-search-result-list']`));
|
||||
searchIcon = element(by.css(`button[class*='adf-search-button']`));
|
||||
searchBar = element(by.css(`adf-search-control input`));
|
||||
searchBarExpanded = element(by.css(`adf-search-control mat-form-field[class*="mat-focused"] input`));
|
||||
noResultMessage = element(by.css(`p[class*='adf-search-fixed-text']`));
|
||||
rowsAuthor = by.css(`div[class='mat-list-text'] p[class*='adf-search-fixed-text']`);
|
||||
completeName = by.css(`h4[class*='adf-search-fixed-text']`);
|
||||
highlightName = by.css(`.adf-highlight`);
|
||||
searchDialog = element(by.css(`mat-list[id='autocomplete-search-result-list']`));
|
||||
|
||||
async pressDownArrowAndEnter(): Promise<void> {
|
||||
await element(by.css(`adf-search-control div input`)).sendKeys(protractor.Key.ARROW_DOWN);
|
||||
@@ -58,40 +58,40 @@ export class SearchDialogPage {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.noResultMessage);
|
||||
}
|
||||
|
||||
async enterText(text): Promise<void> {
|
||||
async enterText(text: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchBar);
|
||||
await this.searchBar.sendKeys(text);
|
||||
}
|
||||
|
||||
async enterTextAndPressEnter(text): Promise<void> {
|
||||
async enterTextAndPressEnter(text: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchBar);
|
||||
await this.searchBar.sendKeys(text);
|
||||
await this.searchBar.sendKeys(protractor.Key.ENTER);
|
||||
}
|
||||
|
||||
async resultTableContainsRow(name): Promise<void> {
|
||||
async resultTableContainsRow(name: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchDialog);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.getRowByRowName(name));
|
||||
}
|
||||
|
||||
async clickOnSpecificRow(name): Promise<void> {
|
||||
async clickOnSpecificRow(name: string): Promise<void> {
|
||||
await this.resultTableContainsRow(name);
|
||||
await BrowserActions.click(this.getRowByRowName(name));
|
||||
}
|
||||
|
||||
getRowByRowName(name): ElementFinder {
|
||||
getRowByRowName(name: string): ElementFinder {
|
||||
return element(by.css(`mat-list-item[data-automation-id='autocomplete_for_${name}']`));
|
||||
}
|
||||
|
||||
async getSpecificRowsHighlightName(name): Promise<string> {
|
||||
async getSpecificRowsHighlightName(name: string): Promise<string> {
|
||||
return BrowserActions.getText(this.getRowByRowName(name).element(this.highlightName));
|
||||
}
|
||||
|
||||
async getSpecificRowsCompleteName(name): Promise<string> {
|
||||
async getSpecificRowsCompleteName(name: string): Promise<string> {
|
||||
return BrowserActions.getText(this.getRowByRowName(name).element(this.completeName));
|
||||
}
|
||||
|
||||
async getSpecificRowsAuthor(name): Promise<string> {
|
||||
async getSpecificRowsAuthor(name: string): Promise<string> {
|
||||
return BrowserActions.getText(this.getRowByRowName(name).element(this.rowsAuthor));
|
||||
}
|
||||
|
||||
|
@@ -15,28 +15,28 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, browser, ElementFinder, Locator } from 'protractor';
|
||||
import { element, by, browser, ElementFinder } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class UploadDialogPage {
|
||||
|
||||
closeButton: ElementFinder = element((by.css('footer[class*="upload-dialog__actions"] button[id="adf-upload-dialog-close"]')));
|
||||
dialog: ElementFinder = element(by.css('div[id="upload-dialog"]'));
|
||||
minimizedDialog: ElementFinder = element(by.css('div[class*="upload-dialog--minimized"]'));
|
||||
uploadedStatusIcon: Locator = by.css('mat-icon[class*="status--done"]');
|
||||
cancelledStatusIcon: Locator = by.css('div[class*="status--cancelled"]');
|
||||
closeButton = element((by.css('footer[class*="upload-dialog__actions"] button[id="adf-upload-dialog-close"]')));
|
||||
dialog = element(by.css('div[id="upload-dialog"]'));
|
||||
minimizedDialog = element(by.css('div[class*="upload-dialog--minimized"]'));
|
||||
uploadedStatusIcon = by.css('mat-icon[class*="status--done"]');
|
||||
cancelledStatusIcon = by.css('div[class*="status--cancelled"]');
|
||||
errorStatusIcon = by.css('div[class*="status--error"] mat-icon');
|
||||
errorTooltip: ElementFinder = element(by.css('div.mat-tooltip'));
|
||||
errorTooltip = element(by.css('div.mat-tooltip'));
|
||||
rowByRowName = by.xpath('ancestor::adf-file-uploading-list-row');
|
||||
title: ElementFinder = element(by.css('span[class*="upload-dialog__title"]'));
|
||||
minimizeButton: ElementFinder = element(by.css('mat-icon[title="Minimize"]'));
|
||||
maximizeButton: ElementFinder = element(by.css('mat-icon[title="Maximize"]'));
|
||||
canUploadConfirmationTitle: ElementFinder = element(by.css('p[class="upload-dialog__confirmation--title"]'));
|
||||
canUploadConfirmationDescription: ElementFinder = element(by.css('p[class="upload-dialog__confirmation--text"]'));
|
||||
confirmationDialogNoButton: ElementFinder = element(by.partialButtonText('No'));
|
||||
confirmationDialogYesButton: ElementFinder = element(by.partialButtonText('Yes'));
|
||||
cancelUploadsElement: ElementFinder = element((by.css('footer[class*="upload-dialog__actions"] button[id="adf-upload-dialog-cancel-all"]')));
|
||||
cancelUploadInProgressButton: ElementFinder = element(by.css('div[data-automation-id="cancel-upload-progress"]'));
|
||||
title = element(by.css('span[class*="upload-dialog__title"]'));
|
||||
minimizeButton = element(by.css('mat-icon[title="Minimize"]'));
|
||||
maximizeButton = element(by.css('mat-icon[title="Maximize"]'));
|
||||
canUploadConfirmationTitle = element(by.css('p[class="upload-dialog__confirmation--title"]'));
|
||||
canUploadConfirmationDescription = element(by.css('p[class="upload-dialog__confirmation--text"]'));
|
||||
confirmationDialogNoButton = element(by.partialButtonText('No'));
|
||||
confirmationDialogYesButton = element(by.partialButtonText('Yes'));
|
||||
cancelUploadsElement = element((by.css('footer[class*="upload-dialog__actions"] button[id="adf-upload-dialog-cancel-all"]')));
|
||||
cancelUploadInProgressButton = element(by.css('div[data-automation-id="cancel-upload-progress"]'));
|
||||
|
||||
async clickOnCloseButton(): Promise<void> {
|
||||
await this.checkCloseButtonIsDisplayed();
|
||||
@@ -59,32 +59,32 @@ export class UploadDialogPage {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.dialog);
|
||||
}
|
||||
|
||||
getRowsByName(content): ElementFinder {
|
||||
getRowsByName(content: string): ElementFinder {
|
||||
return element.all(by.css(`div[class*='uploading-row'] span[title="${content}"]`)).first();
|
||||
}
|
||||
|
||||
getRowByRowName(content) {
|
||||
getRowByRowName(content: string) {
|
||||
const rows = this.getRowsByName(content);
|
||||
return rows.element(this.rowByRowName);
|
||||
}
|
||||
|
||||
async fileIsUploaded(content): Promise<void> {
|
||||
async fileIsUploaded(content: string): Promise<void> {
|
||||
const row = await this.getRowByRowName(content);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.uploadedStatusIcon));
|
||||
}
|
||||
|
||||
async fileIsError(content) {
|
||||
async fileIsError(content: string) {
|
||||
const row = await this.getRowByRowName(content);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.errorStatusIcon));
|
||||
}
|
||||
|
||||
async filesAreUploaded(content): Promise<void> {
|
||||
async filesAreUploaded(content: string[]): Promise<void> {
|
||||
for (let i = 0; i < content.length; i++) {
|
||||
await this.fileIsUploaded(content[i]);
|
||||
}
|
||||
}
|
||||
|
||||
async fileIsNotDisplayedInDialog(content): Promise<void> {
|
||||
async fileIsNotDisplayedInDialog(content: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.css(`div[class*='uploading-row'] span[title="${content}"]`)));
|
||||
}
|
||||
|
||||
@@ -100,12 +100,12 @@ export class UploadDialogPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.cancelUploadInProgressButton);
|
||||
}
|
||||
|
||||
async fileIsCancelled(content): Promise<void> {
|
||||
async fileIsCancelled(content: string): Promise<void> {
|
||||
const row = await this.getRowByRowName(content);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.cancelledStatusIcon), 10000);
|
||||
}
|
||||
|
||||
async removeUploadedFile(content): Promise<void> {
|
||||
async removeUploadedFile(content: string): Promise<void> {
|
||||
const row = await this.getRowByRowName(content);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.uploadedStatusIcon));
|
||||
const elementRow = await this.getRowByRowName(content);
|
||||
|
@@ -15,20 +15,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, element, ElementFinder } from 'protractor';
|
||||
import { browser, by, element } from 'protractor';
|
||||
import { BrowserActions, BrowserVisibility, TogglePage } from '@alfresco/adf-testing';
|
||||
|
||||
export class UploadTogglesPage {
|
||||
|
||||
togglePage: TogglePage = new TogglePage();
|
||||
multipleFileUploadToggle: ElementFinder = element(by.id('adf-multiple-upload-switch'));
|
||||
uploadFolderToggle: ElementFinder = element(by.css('#adf-folder-upload-switch'));
|
||||
extensionFilterToggle: ElementFinder = element(by.id('adf-extension-filter-upload-switch'));
|
||||
maxSizeToggle: ElementFinder = element(by.id('adf-max-size-filter-upload-switch'));
|
||||
versioningToggle: ElementFinder = element(by.id('adf-version-upload-switch'));
|
||||
extensionAcceptedField: ElementFinder = element(by.css('input[data-automation-id="accepted-files-type"]'));
|
||||
maxSizeField: ElementFinder = element(by.css('input[data-automation-id="max-files-size"]'));
|
||||
disableUploadCheckbox: ElementFinder = element(by.css('[id="adf-disable-upload"]'));
|
||||
togglePage = new TogglePage();
|
||||
multipleFileUploadToggle = element(by.id('adf-multiple-upload-switch'));
|
||||
uploadFolderToggle = element(by.css('#adf-folder-upload-switch'));
|
||||
extensionFilterToggle = element(by.id('adf-extension-filter-upload-switch'));
|
||||
maxSizeToggle = element(by.id('adf-max-size-filter-upload-switch'));
|
||||
versioningToggle = element(by.id('adf-version-upload-switch'));
|
||||
extensionAcceptedField = element(by.css('input[data-automation-id="accepted-files-type"]'));
|
||||
maxSizeField = element(by.css('input[data-automation-id="max-files-size"]'));
|
||||
disableUploadCheckbox = element(by.css('[id="adf-disable-upload"]'));
|
||||
|
||||
async enableMultipleFileUpload(): Promise<void> {
|
||||
await browser.executeScript('arguments[0].scrollIntoView()', this.multipleFileUploadToggle);
|
||||
@@ -46,7 +46,7 @@ export class UploadTogglesPage {
|
||||
|
||||
async checkFolderUploadToggleIsEnabled(): Promise<boolean> {
|
||||
try {
|
||||
const enabledFolderUpload: ElementFinder = element(by.css('mat-slide-toggle[id="adf-folder-upload-switch"][class*="mat-checked"]'));
|
||||
const enabledFolderUpload = element(by.css('mat-slide-toggle[id="adf-folder-upload-switch"][class*="mat-checked"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(enabledFolderUpload);
|
||||
return true;
|
||||
} catch {
|
||||
@@ -55,17 +55,17 @@ export class UploadTogglesPage {
|
||||
}
|
||||
|
||||
async checkMultipleFileUploadToggleIsEnabled(): Promise<void> {
|
||||
const enabledToggle: ElementFinder = element(by.css('mat-slide-toggle[id="adf-multiple-upload-switch"][class*="mat-checked"]'));
|
||||
const enabledToggle = element(by.css('mat-slide-toggle[id="adf-multiple-upload-switch"][class*="mat-checked"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(enabledToggle);
|
||||
}
|
||||
|
||||
async checkMaxSizeToggleIsEnabled(): Promise<void> {
|
||||
const enabledToggle: ElementFinder = element(by.css('mat-slide-toggle[id="adf-max-size-filter-upload-switch"][class*="mat-checked"]'));
|
||||
const enabledToggle = element(by.css('mat-slide-toggle[id="adf-max-size-filter-upload-switch"][class*="mat-checked"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(enabledToggle);
|
||||
}
|
||||
|
||||
async checkVersioningToggleIsEnabled(): Promise<void> {
|
||||
const enabledToggle: ElementFinder = element(by.css('mat-slide-toggle[id="adf-version-upload-switch"][class*="mat-checked"]'));
|
||||
const enabledToggle = element(by.css('mat-slide-toggle[id="adf-version-upload-switch"][class*="mat-checked"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(enabledToggle);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export class UploadTogglesPage {
|
||||
}
|
||||
async checkFolderUploadToggleIsNotEnabled(): Promise<boolean> {
|
||||
try {
|
||||
const inactiveToggleFolder: ElementFinder = element(by.css('#adf-folder-upload-switch .mat-slide-toggle-label'));
|
||||
const inactiveToggleFolder = element(by.css('#adf-folder-upload-switch .mat-slide-toggle-label'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(inactiveToggleFolder);
|
||||
return true;
|
||||
} catch {
|
||||
@@ -112,7 +112,7 @@ export class UploadTogglesPage {
|
||||
await BrowserActions.click(this.disableUploadCheckbox);
|
||||
}
|
||||
|
||||
async addExtension(extension): Promise<void> {
|
||||
async addExtension(extension: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.extensionAcceptedField);
|
||||
await this.extensionAcceptedField.sendKeys(',' + extension);
|
||||
}
|
||||
|
@@ -19,15 +19,15 @@ import { browser, by, element, ElementFinder } from 'protractor';
|
||||
|
||||
export class IconsPage {
|
||||
|
||||
locateCustomIcon(name): ElementFinder {
|
||||
locateCustomIcon(name: string): ElementFinder {
|
||||
return element(by.css(`adf-icon[value='${name}'] svg`));
|
||||
}
|
||||
|
||||
locateLigatureIcon(name): ElementFinder {
|
||||
locateLigatureIcon(name: string): ElementFinder {
|
||||
return element(by.css(`adf-icon[value='${name}'] .material-icons`));
|
||||
}
|
||||
|
||||
async isCustomIconDisplayed(name) {
|
||||
async isCustomIconDisplayed(name: string) {
|
||||
const present = await browser.isElementPresent(this.locateCustomIcon(name));
|
||||
if (present) {
|
||||
return this.locateCustomIcon(name).isDisplayed();
|
||||
@@ -36,7 +36,7 @@ export class IconsPage {
|
||||
}
|
||||
}
|
||||
|
||||
async isLigatureIconDisplayed(name) {
|
||||
async isLigatureIconDisplayed(name: string) {
|
||||
const present = await browser.isElementPresent(this.locateLigatureIcon(name));
|
||||
if (present) {
|
||||
return this.locateLigatureIcon(name).isDisplayed();
|
||||
|
@@ -15,16 +15,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class LockFilePage {
|
||||
|
||||
cancelButton: ElementFinder = element(by.css('button[data-automation-id="lock-dialog-btn-cancel"]'));
|
||||
saveButton: ElementFinder = element(by.cssContainingText('button span', 'Save'));
|
||||
lockFileCheckboxText: ElementFinder = element(by.cssContainingText('mat-checkbox label span', ' Lock file '));
|
||||
lockFileCheckbox: ElementFinder = element(by.css('mat-checkbox[data-automation-id="adf-lock-node-checkbox"]'));
|
||||
allowOwnerCheckbox: ElementFinder = element(by.cssContainingText('mat-checkbox[class*="adf-lock-file-name"] span', ' Allow the owner to modify this file '));
|
||||
cancelButton = element(by.css('button[data-automation-id="lock-dialog-btn-cancel"]'));
|
||||
saveButton = element(by.cssContainingText('button span', 'Save'));
|
||||
lockFileCheckboxText = element(by.cssContainingText('mat-checkbox label span', ' Lock file '));
|
||||
lockFileCheckbox = element(by.css('mat-checkbox[data-automation-id="adf-lock-node-checkbox"]'));
|
||||
allowOwnerCheckbox = element(by.cssContainingText('mat-checkbox[class*="adf-lock-file-name"] span', ' Allow the owner to modify this file '));
|
||||
|
||||
async checkLockFileCheckboxIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.lockFileCheckboxText);
|
||||
|
@@ -15,38 +15,38 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder, Key, protractor } from 'protractor';
|
||||
import { by, element, Key, protractor } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class MetadataViewPage {
|
||||
|
||||
title: ElementFinder = element(by.css(`div[info-drawer-title]`));
|
||||
expandedAspect: ElementFinder = element(by.css(`mat-expansion-panel-header[aria-expanded='true']`));
|
||||
title = element(by.css(`div[info-drawer-title]`));
|
||||
expandedAspect = element(by.css(`mat-expansion-panel-header[aria-expanded='true']`));
|
||||
aspectTitle = by.css(`mat-panel-title`);
|
||||
name: ElementFinder = element(by.css(`[data-automation-id='card-textitem-value-name']`));
|
||||
creator: ElementFinder = element(by.css(`[data-automation-id='card-textitem-value-createdByUser.displayName']`));
|
||||
createdDate: ElementFinder = element(by.css(`span[data-automation-id='card-dateitem-createdAt'] span`));
|
||||
modifier: ElementFinder = element(by.css(`[data-automation-id='card-textitem-value-modifiedByUser.displayName']`));
|
||||
modifiedDate: ElementFinder = element(by.css(`span[data-automation-id='card-dateitem-modifiedAt'] span`));
|
||||
mimetypeName: ElementFinder = element(by.css(`[data-automation-id='card-textitem-value-content.mimeTypeName']`));
|
||||
size: ElementFinder = element(by.css(`[data-automation-id='card-textitem-value-content.sizeInBytes']`));
|
||||
description: ElementFinder = element(by.css(`span[data-automation-id='card-textitem-value-properties.cm:description']`));
|
||||
author: ElementFinder = element(by.css(`[data-automation-id='card-textitem-value-properties.cm:author']`));
|
||||
titleProperty: ElementFinder = element(by.css(`span[data-automation-id='card-textitem-value-properties.cm:title'] span`));
|
||||
editIcon: ElementFinder = element(by.css(`button[data-automation-id='meta-data-card-toggle-edit']`));
|
||||
informationButton: ElementFinder = element(by.css(`button[data-automation-id='meta-data-card-toggle-expand']`));
|
||||
informationSpan: ElementFinder = element(by.css(`span[data-automation-id='meta-data-card-toggle-expand-label']`));
|
||||
informationIcon: ElementFinder = element(by.css(`span[data-automation-id='meta-data-card-toggle-expand-label'] ~ mat-icon`));
|
||||
displayEmptySwitch: ElementFinder = element(by.id(`adf-metadata-empty`));
|
||||
readonlySwitch: ElementFinder = element(by.id(`adf-metadata-readonly`));
|
||||
multiSwitch: ElementFinder = element(by.id(`adf-metadata-multi`));
|
||||
presetSwitch: ElementFinder = element(by.id('adf-toggle-custom-preset'));
|
||||
defaultPropertiesSwitch: ElementFinder = element(by.id('adf-metadata-default-properties'));
|
||||
closeButton: ElementFinder = element(by.cssContainingText('button.mat-button span', 'Close'));
|
||||
displayAspect: ElementFinder = element(by.css(`input[placeholder='Display Aspect']`));
|
||||
applyAspect: ElementFinder = element(by.cssContainingText(`button span.mat-button-wrapper`, 'Apply Aspect'));
|
||||
saveMetadataButton: ElementFinder = element(by.css(`[data-automation-id='save-metadata']`));
|
||||
resetMetadataButton: ElementFinder = element(by.css(`[data-automation-id='reset-metadata']`));
|
||||
name = element(by.css(`[data-automation-id='card-textitem-value-name']`));
|
||||
creator = element(by.css(`[data-automation-id='card-textitem-value-createdByUser.displayName']`));
|
||||
createdDate = element(by.css(`span[data-automation-id='card-dateitem-createdAt'] span`));
|
||||
modifier = element(by.css(`[data-automation-id='card-textitem-value-modifiedByUser.displayName']`));
|
||||
modifiedDate = element(by.css(`span[data-automation-id='card-dateitem-modifiedAt'] span`));
|
||||
mimetypeName = element(by.css(`[data-automation-id='card-textitem-value-content.mimeTypeName']`));
|
||||
size = element(by.css(`[data-automation-id='card-textitem-value-content.sizeInBytes']`));
|
||||
description = element(by.css(`span[data-automation-id='card-textitem-value-properties.cm:description']`));
|
||||
author = element(by.css(`[data-automation-id='card-textitem-value-properties.cm:author']`));
|
||||
titleProperty = element(by.css(`span[data-automation-id='card-textitem-value-properties.cm:title'] span`));
|
||||
editIcon = element(by.css(`button[data-automation-id='meta-data-card-toggle-edit']`));
|
||||
informationButton = element(by.css(`button[data-automation-id='meta-data-card-toggle-expand']`));
|
||||
informationSpan = element(by.css(`span[data-automation-id='meta-data-card-toggle-expand-label']`));
|
||||
informationIcon = element(by.css(`span[data-automation-id='meta-data-card-toggle-expand-label'] ~ mat-icon`));
|
||||
displayEmptySwitch = element(by.id(`adf-metadata-empty`));
|
||||
readonlySwitch = element(by.id(`adf-metadata-readonly`));
|
||||
multiSwitch = element(by.id(`adf-metadata-multi`));
|
||||
presetSwitch = element(by.id('adf-toggle-custom-preset'));
|
||||
defaultPropertiesSwitch = element(by.id('adf-metadata-default-properties'));
|
||||
closeButton = element(by.cssContainingText('button.mat-button span', 'Close'));
|
||||
displayAspect = element(by.css(`input[placeholder='Display Aspect']`));
|
||||
applyAspect = element(by.cssContainingText(`button span.mat-button-wrapper`, 'Apply Aspect'));
|
||||
saveMetadataButton = element(by.css(`[data-automation-id='save-metadata']`));
|
||||
resetMetadataButton = element(by.css(`[data-automation-id='reset-metadata']`));
|
||||
|
||||
async getTitle(): Promise<string> {
|
||||
return BrowserActions.getText(this.title);
|
||||
@@ -129,7 +129,7 @@ export class MetadataViewPage {
|
||||
}
|
||||
|
||||
async clickOnPropertiesTab(): Promise<void> {
|
||||
const propertiesTab: ElementFinder = element(by.cssContainingText(`.adf-info-drawer-layout-content div.mat-tab-labels div .mat-tab-label-content`, `Properties`));
|
||||
const propertiesTab = element(by.cssContainingText(`.adf-info-drawer-layout-content div.mat-tab-labels div .mat-tab-label-content`, `Properties`));
|
||||
await BrowserActions.click(propertiesTab);
|
||||
}
|
||||
|
||||
@@ -138,70 +138,70 @@ export class MetadataViewPage {
|
||||
}
|
||||
|
||||
async editPropertyIconIsDisplayed(propertyName: string) {
|
||||
const editPropertyIcon: ElementFinder = element(by.css('[data-automation-id="header-' + propertyName + '"] .adf-textitem-edit-icon'));
|
||||
const editPropertyIcon = element(by.css('[data-automation-id="header-' + propertyName + '"] .adf-textitem-edit-icon'));
|
||||
await BrowserVisibility.waitUntilElementIsPresent(editPropertyIcon);
|
||||
}
|
||||
|
||||
async clickResetButton(): Promise<void> {
|
||||
const clearPropertyIcon: ElementFinder = element(by.css('button[data-automation-id="reset-metadata"]'));
|
||||
const clearPropertyIcon = element(by.css('button[data-automation-id="reset-metadata"]'));
|
||||
await BrowserActions.click(clearPropertyIcon);
|
||||
}
|
||||
|
||||
async enterPropertyText(propertyName: string, text: string | number): Promise<void> {
|
||||
const textField: ElementFinder = element(by.css('input[data-automation-id="card-textitem-value-' + propertyName + '"]'));
|
||||
const textField = element(by.css('input[data-automation-id="card-textitem-value-' + propertyName + '"]'));
|
||||
await BrowserActions.clearSendKeys(textField, text.toString());
|
||||
await textField.sendKeys(protractor.Key.ENTER);
|
||||
}
|
||||
|
||||
async enterPresetText(text: string): Promise<void> {
|
||||
const presetField: ElementFinder = element(by.css('input[data-automation-id="adf-text-custom-preset"]'));
|
||||
const presetField = element(by.css('input[data-automation-id="adf-text-custom-preset"]'));
|
||||
await BrowserActions.clearSendKeys(presetField, text.toString());
|
||||
await presetField.sendKeys(protractor.Key.ENTER);
|
||||
const applyButton: ElementFinder = element(by.css('button[id="adf-metadata-aplly"]'));
|
||||
const applyButton = element(by.css('button[id="adf-metadata-aplly"]'));
|
||||
await BrowserActions.click(applyButton);
|
||||
}
|
||||
|
||||
async enterDescriptionText(text: string): Promise<void> {
|
||||
const textField: ElementFinder = element(by.css('textarea[data-automation-id="card-textitem-value-properties.cm:description"]'));
|
||||
const textField = element(by.css('textarea[data-automation-id="card-textitem-value-properties.cm:description"]'));
|
||||
await BrowserActions.clearSendKeys(textField, text);
|
||||
await textField.sendKeys(Key.TAB);
|
||||
}
|
||||
|
||||
async getPropertyText(propertyName: string, type?: string): Promise<string> {
|
||||
const propertyType = type || 'textitem';
|
||||
const textField: ElementFinder = element(by.css('[data-automation-id="card-' + propertyType + '-value-' + propertyName + '"]'));
|
||||
const textField = element(by.css('[data-automation-id="card-' + propertyType + '-value-' + propertyName + '"]'));
|
||||
|
||||
return BrowserActions.getInputValue(textField);
|
||||
}
|
||||
|
||||
async getPropertyIconTooltip(propertyName: string): Promise<string> {
|
||||
const editPropertyIcon: ElementFinder = element(by.css('[data-automation-id="header-' + propertyName + '"] .adf-textitem-edit-icon'));
|
||||
const editPropertyIcon = element(by.css('[data-automation-id="header-' + propertyName + '"] .adf-textitem-edit-icon'));
|
||||
return editPropertyIcon.getAttribute('title');
|
||||
}
|
||||
|
||||
async clickMetadataGroup(groupName: string): Promise<void> {
|
||||
const group: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="adf-metadata-group-' + groupName + '"]'));
|
||||
const group = element(by.css('mat-expansion-panel[data-automation-id="adf-metadata-group-' + groupName + '"]'));
|
||||
await BrowserActions.click(group);
|
||||
}
|
||||
|
||||
async checkMetadataGroupIsPresent(groupName: string): Promise<void> {
|
||||
const group: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="adf-metadata-group-' + groupName + '"]'));
|
||||
const group = element(by.css('mat-expansion-panel[data-automation-id="adf-metadata-group-' + groupName + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(group);
|
||||
}
|
||||
|
||||
async checkMetadataGroupIsNotPresent(groupName: string): Promise<void> {
|
||||
const group: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="adf-metadata-group-' + groupName + '"]'));
|
||||
const group = element(by.css('mat-expansion-panel[data-automation-id="adf-metadata-group-' + groupName + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(group);
|
||||
}
|
||||
|
||||
async checkMetadataGroupIsExpand(groupName: string): Promise<void> {
|
||||
const group: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="adf-metadata-group-' + groupName + '"] > mat-expansion-panel-header'));
|
||||
const group = element(by.css('mat-expansion-panel[data-automation-id="adf-metadata-group-' + groupName + '"] > mat-expansion-panel-header'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(group);
|
||||
await expect(await group.getAttribute('class')).toContain('mat-expanded');
|
||||
}
|
||||
|
||||
async checkMetadataGroupIsNotExpand(groupName: string): Promise<void> {
|
||||
const group: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="adf-metadata-group-' + groupName + '"] > mat-expansion-panel-header'));
|
||||
const group = element(by.css('mat-expansion-panel[data-automation-id="adf-metadata-group-' + groupName + '"] > mat-expansion-panel-header'));
|
||||
await BrowserVisibility.waitUntilElementIsPresent(group);
|
||||
await expect(await group.getAttribute('class')).not.toContain('mat-expanded');
|
||||
}
|
||||
@@ -212,12 +212,12 @@ export class MetadataViewPage {
|
||||
}
|
||||
|
||||
async checkPropertyIsVisible(propertyName: string, type: string): Promise<void> {
|
||||
const property: ElementFinder = element(by.css('div[data-automation-id="card-' + type + '-label-' + propertyName + '"]'));
|
||||
const property = element(by.css('div[data-automation-id="card-' + type + '-label-' + propertyName + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(property);
|
||||
}
|
||||
|
||||
async checkPropertyIsNotVisible(propertyName: string, type: string): Promise<void> {
|
||||
const property: ElementFinder = element(by.css('div[data-automation-id="card-' + type + '-label-' + propertyName + '"]'));
|
||||
const property = element(by.css('div[data-automation-id="card-' + type + '-label-' + propertyName + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(property);
|
||||
}
|
||||
|
||||
|
@@ -22,22 +22,22 @@ import { ProcessServicesPage } from './process-services/process-services.page';
|
||||
|
||||
export class NavigationBarPage {
|
||||
|
||||
linkListContainer: ElementFinder = element(by.css('.app-sidenav-linklist'));
|
||||
linkMenuChildrenContainer: ElementFinder = element(by.css('.nestedMenu'));
|
||||
linkListContainer = element(by.css('.app-sidenav-linklist'));
|
||||
linkMenuChildrenContainer = element(by.css('.nestedMenu'));
|
||||
dataTableNestedButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Datatable"]'));
|
||||
dataTableCopyContentButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Copy Content"]'));
|
||||
dataTableDragAndDropButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Drag and Drop"]'));
|
||||
processServicesNestedButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="App"]'));
|
||||
processServicesCloudHomeButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Home"]'));
|
||||
themeButton: ElementFinder = element(by.css('button[data-automation-id="theme menu"]'));
|
||||
themeMenuContent: ElementFinder = element(by.css('div[class*="mat-menu-panel"]'));
|
||||
languageMenuButton: ElementFinder = element(by.css('button[data-automation-id="language-menu-button"]'));
|
||||
appTitle: ElementFinder = element(by.css('.adf-app-title'));
|
||||
menuButton: ElementFinder = element(by.css('button[data-automation-id="adf-menu-icon"]'));
|
||||
themeButton = element(by.css('button[data-automation-id="theme menu"]'));
|
||||
themeMenuContent = element(by.css('div[class*="mat-menu-panel"]'));
|
||||
languageMenuButton = element(by.css('button[data-automation-id="language-menu-button"]'));
|
||||
appTitle = element(by.css('.adf-app-title'));
|
||||
menuButton = element(by.css('button[data-automation-id="adf-menu-icon"]'));
|
||||
formButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Form"]'));
|
||||
peopleGroupCloudButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="People/Group Cloud"]'));
|
||||
|
||||
async clickNavigationBarItem(title): Promise<void> {
|
||||
async clickNavigationBarItem(title: string): Promise<void> {
|
||||
const menu = element(by.css(`.app-sidenav-link[data-automation-id="${title}"]`));
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click(menu);
|
||||
@@ -185,7 +185,7 @@ export class NavigationBarPage {
|
||||
}
|
||||
|
||||
async clickOnSpecificThemeButton(themeName): Promise<void> {
|
||||
const themeElement: ElementFinder = element(by.css(`button[data-automation-id="${themeName}"]`));
|
||||
const themeElement = element(by.css(`button[data-automation-id="${themeName}"]`));
|
||||
await BrowserActions.click(themeElement);
|
||||
await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
|
||||
}
|
||||
@@ -201,7 +201,7 @@ export class NavigationBarPage {
|
||||
}
|
||||
|
||||
async chooseLanguage(language): Promise<void> {
|
||||
const buttonLanguage: ElementFinder = element(by.xpath(`//adf-language-menu//button[contains(text(), '${language}')]`));
|
||||
const buttonLanguage = element(by.xpath(`//adf-language-menu//button[contains(text(), '${language}')]`));
|
||||
await BrowserActions.click(buttonLanguage);
|
||||
await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
|
||||
}
|
||||
@@ -214,13 +214,13 @@ export class NavigationBarPage {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.menuButton);
|
||||
}
|
||||
|
||||
async checkToolbarColor(color): Promise<void> {
|
||||
const toolbarColor: ElementFinder = element(by.css(`mat-toolbar[class*="mat-${color}"]`));
|
||||
async checkToolbarColor(color: string): Promise<void> {
|
||||
const toolbarColor = element(by.css(`mat-toolbar[class*="mat-${color}"]`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(toolbarColor);
|
||||
}
|
||||
|
||||
async clickAppLogo(logoTitle): Promise<void> {
|
||||
const appLogo: ElementFinder = element(by.css('a[title="' + logoTitle + '"]'));
|
||||
async clickAppLogo(logoTitle: string): Promise<void> {
|
||||
const appLogo = element(by.css('a[title="' + logoTitle + '"]'));
|
||||
await BrowserActions.click(appLogo);
|
||||
}
|
||||
|
||||
@@ -228,12 +228,12 @@ export class NavigationBarPage {
|
||||
await BrowserActions.click(this.appTitle);
|
||||
}
|
||||
|
||||
async checkLogoTooltip(logoTooltipTitle): Promise<void> {
|
||||
const logoTooltip: ElementFinder = element(by.css('a[title="' + logoTooltipTitle + '"]'));
|
||||
async checkLogoTooltip(logoTooltipTitle: string): Promise<void> {
|
||||
const logoTooltip = element(by.css('a[title="' + logoTooltipTitle + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(logoTooltip);
|
||||
}
|
||||
|
||||
async openViewer(nodeId): Promise<void> {
|
||||
async openViewer(nodeId: string): Promise<void> {
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + `/files(overlay:files/${nodeId}/view`);
|
||||
}
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage, DropdownPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
|
||||
const column = {
|
||||
role: 'Role'
|
||||
@@ -26,16 +26,16 @@ export class PermissionsPage {
|
||||
|
||||
dataTableComponentPage: DataTableComponentPage = new DataTableComponentPage();
|
||||
|
||||
addPermissionButton: ElementFinder = element(by.css("button[data-automation-id='adf-add-permission-button']"));
|
||||
addPermissionDialog: ElementFinder = element(by.css('adf-add-permission-dialog'));
|
||||
searchUserInput: ElementFinder = element(by.id('searchInput'));
|
||||
searchResults: ElementFinder = element(by.css('#adf-add-permission-authority-results #adf-search-results-content'));
|
||||
addButton: ElementFinder = element(by.id('add-permission-dialog-confirm-button'));
|
||||
permissionInheritedButton: ElementFinder = element.all(by.css("div[class='app-inherit_permission_button'] button")).first();
|
||||
noPermissions: ElementFinder = element(by.css('div[id="adf-no-permissions-template"]'));
|
||||
deletePermissionButton: ElementFinder = element(by.css(`button[data-automation-id='adf-delete-permission-button']`));
|
||||
permissionDisplayContainer: ElementFinder = element(by.css(`div[id='adf-permission-display-container']`));
|
||||
closeButton: ElementFinder = element(by.id('add-permission-dialog-close-button'));
|
||||
addPermissionButton = element(by.css("button[data-automation-id='adf-add-permission-button']"));
|
||||
addPermissionDialog = element(by.css('adf-add-permission-dialog'));
|
||||
searchUserInput = element(by.id('searchInput'));
|
||||
searchResults = element(by.css('#adf-add-permission-authority-results #adf-search-results-content'));
|
||||
addButton = element(by.id('add-permission-dialog-confirm-button'));
|
||||
permissionInheritedButton = element.all(by.css("div[class='app-inherit_permission_button'] button")).first();
|
||||
noPermissions = element(by.css('div[id="adf-no-permissions-template"]'));
|
||||
deletePermissionButton = element(by.css(`button[data-automation-id='adf-delete-permission-button']`));
|
||||
permissionDisplayContainer = element(by.css(`div[id='adf-permission-display-container']`));
|
||||
closeButton = element(by.id('add-permission-dialog-close-button'));
|
||||
|
||||
async clickCloseButton(): Promise<void> {
|
||||
await BrowserActions.click(this.closeButton);
|
||||
@@ -57,7 +57,7 @@ export class PermissionsPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchUserInput);
|
||||
}
|
||||
|
||||
async searchUserOrGroup(name): Promise<void> {
|
||||
async searchUserOrGroup(name: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.searchUserInput, name);
|
||||
}
|
||||
|
||||
@@ -65,19 +65,19 @@ export class PermissionsPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchResults);
|
||||
}
|
||||
|
||||
async clickUserOrGroup(name): Promise<void> {
|
||||
const userOrGroupName: ElementFinder = element(by.cssContainingText('mat-list-option .mat-list-text', name));
|
||||
async clickUserOrGroup(name: string): Promise<void> {
|
||||
const userOrGroupName = element(by.cssContainingText('mat-list-option .mat-list-text', name));
|
||||
await BrowserActions.clickScript(userOrGroupName);
|
||||
await BrowserActions.click(this.addButton);
|
||||
}
|
||||
|
||||
async checkUserOrGroupIsAdded(name): Promise<void> {
|
||||
const userOrGroupName: ElementFinder = element(by.css('div[data-automation-id="text_' + name + '"]'));
|
||||
async checkUserOrGroupIsAdded(name: string): Promise<void> {
|
||||
const userOrGroupName = element(by.css('div[data-automation-id="text_' + name + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(userOrGroupName);
|
||||
}
|
||||
|
||||
async checkUserOrGroupIsDeleted(name): Promise<void> {
|
||||
const userOrGroupName: ElementFinder = element(by.css('div[data-automation-id="text_' + name + '"]'));
|
||||
async checkUserOrGroupIsDeleted(name: string): Promise<void> {
|
||||
const userOrGroupName = element(by.css('div[data-automation-id="text_' + name + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(userOrGroupName);
|
||||
}
|
||||
|
||||
@@ -105,12 +105,12 @@ export class PermissionsPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.css('[class*="adf-datatable-permission"]')));
|
||||
}
|
||||
|
||||
async getRoleCellValue(rowName): Promise<string> {
|
||||
async getRoleCellValue(rowName: string): Promise<string> {
|
||||
const locator = this.dataTableComponentPage.getCellByRowContentAndColumn('Authority ID', rowName, column.role);
|
||||
return BrowserActions.getText(locator);
|
||||
}
|
||||
|
||||
async clickRoleDropdownByUserOrGroupName(name): Promise<void> {
|
||||
async clickRoleDropdownByUserOrGroupName(name: string): Promise<void> {
|
||||
const row = this.dataTableComponentPage.getRow('Authority ID', name);
|
||||
await BrowserActions.click(row.element(by.id('adf-select-role-permission')));
|
||||
}
|
||||
@@ -119,7 +119,7 @@ export class PermissionsPage {
|
||||
return element.all(by.css('.mat-option-text'));
|
||||
}
|
||||
|
||||
async selectOption(name): Promise<void> {
|
||||
async selectOption(name: string): Promise<void> {
|
||||
await new DropdownPage().selectOption(name);
|
||||
}
|
||||
|
||||
@@ -127,8 +127,8 @@ export class PermissionsPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.permissionDisplayContainer);
|
||||
}
|
||||
|
||||
async checkUserOrGroupIsDisplayed(name): Promise<void> {
|
||||
const userOrGroupName: ElementFinder = element(by.cssContainingText('mat-list-option .mat-list-text', name));
|
||||
async checkUserOrGroupIsDisplayed(name: string): Promise<void> {
|
||||
const userOrGroupName = element(by.cssContainingText('mat-list-option .mat-list-text', name));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(userOrGroupName);
|
||||
}
|
||||
}
|
||||
|
@@ -15,18 +15,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, protractor, ElementFinder } from 'protractor';
|
||||
import { element, by, protractor } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class AnalyticsPage {
|
||||
|
||||
toolbarTitleInput: ElementFinder = element(by.css('input[data-automation-id="reportName"]'));
|
||||
toolbarTitleContainer: ElementFinder = element(by.css('adf-toolbar-title'));
|
||||
toolbarTitle: ElementFinder = element(by.xpath('//mat-toolbar/adf-toolbar-title/div/h4'));
|
||||
reportMessage: ElementFinder = element(by.css('div[class="ng-star-inserted"] span'));
|
||||
toolbarTitleInput = element(by.css('input[data-automation-id="reportName"]'));
|
||||
toolbarTitleContainer = element(by.css('adf-toolbar-title'));
|
||||
toolbarTitle = element(by.xpath('//mat-toolbar/adf-toolbar-title/div/h4'));
|
||||
reportMessage = element(by.css('div[class="ng-star-inserted"] span'));
|
||||
|
||||
async getReport(title): Promise<void> {
|
||||
const reportTitle: ElementFinder = element(by.css(`mat-icon[data-automation-id="${title}_filter"]`));
|
||||
async getReport(title: string): Promise<void> {
|
||||
const reportTitle = element(by.css(`mat-icon[data-automation-id="${title}_filter"]`));
|
||||
await BrowserActions.click(reportTitle);
|
||||
}
|
||||
|
||||
|
@@ -15,17 +15,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions, DropdownPage } from '@alfresco/adf-testing';
|
||||
|
||||
export class AttachFormPage {
|
||||
|
||||
noFormMessage: ElementFinder = element(by.css('.adf-empty-content__title'));
|
||||
attachFormButton: ElementFinder = element(by.id('adf-attach-form-attach-button'));
|
||||
completeButton: ElementFinder = element(by.id('adf-attach-form-complete-button'));
|
||||
formDropdown: ElementFinder = element(by.id('form_id'));
|
||||
cancelButton: ElementFinder = element(by.id('adf-attach-form-cancel-button'));
|
||||
defaultTitle: ElementFinder = element(by.css('mat-card-title[class="mat-card-title mat-card-title"]'));
|
||||
noFormMessage = element(by.css('.adf-empty-content__title'));
|
||||
attachFormButton = element(by.id('adf-attach-form-attach-button'));
|
||||
completeButton = element(by.id('adf-attach-form-complete-button'));
|
||||
formDropdown = element(by.id('form_id'));
|
||||
cancelButton = element(by.id('adf-attach-form-cancel-button'));
|
||||
defaultTitle = element(by.css('mat-card-title[class="mat-card-title mat-card-title"]'));
|
||||
attachFormDropdown = new DropdownPage(element(by.css("div[class='adf-attach-form-row']")));
|
||||
|
||||
async checkNoFormMessageIsDisplayed(): Promise<void> {
|
||||
|
@@ -15,33 +15,33 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, protractor, browser, ElementFinder } from 'protractor';
|
||||
import { element, by, protractor, browser } from 'protractor';
|
||||
import * as path from 'path';
|
||||
import * as remote from 'selenium-webdriver/remote';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class AttachmentListPage {
|
||||
|
||||
attachFileButton: ElementFinder = element(by.css("input[type='file']"));
|
||||
buttonMenu: ElementFinder = element(by.css("button[data-automation-id='action_menu_0']"));
|
||||
viewButton: ElementFinder = element(by.css("button[data-automation-id*='MENU_ACTIONS.VIEW_CONTENT']"));
|
||||
removeButton: ElementFinder = element(by.css("button[data-automation-id*='MENU_ACTIONS.REMOVE_CONTENT']"));
|
||||
downloadButton: ElementFinder = element(by.css("button[data-automation-id*='MENU_ACTIONS.DOWNLOAD_CONTENT']"));
|
||||
noContentContainer: ElementFinder = element(by.css("div[class*='adf-no-content-container']"));
|
||||
attachFileButton = element(by.css("input[type='file']"));
|
||||
buttonMenu = element(by.css("button[data-automation-id='action_menu_0']"));
|
||||
viewButton = element(by.css("button[data-automation-id*='MENU_ACTIONS.VIEW_CONTENT']"));
|
||||
removeButton = element(by.css("button[data-automation-id*='MENU_ACTIONS.REMOVE_CONTENT']"));
|
||||
downloadButton = element(by.css("button[data-automation-id*='MENU_ACTIONS.DOWNLOAD_CONTENT']"));
|
||||
noContentContainer = element(by.css("div[class*='adf-no-content-container']"));
|
||||
|
||||
async checkEmptyAttachmentList(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.noContentContainer);
|
||||
}
|
||||
|
||||
async clickAttachFileButton(fileLocation): Promise<void> {
|
||||
async clickAttachFileButton(fileLocation: string): Promise<void> {
|
||||
browser.setFileDetector(new remote.FileDetector());
|
||||
|
||||
await BrowserVisibility.waitUntilElementIsPresent(this.attachFileButton);
|
||||
await this.attachFileButton.sendKeys(path.resolve(path.join(browser.params.testConfig.main.rootPath, fileLocation)));
|
||||
}
|
||||
|
||||
async checkFileIsAttached(name): Promise<void> {
|
||||
const fileAttached: ElementFinder = element.all(by.css('div[data-automation-id="' + name + '"]')).first();
|
||||
async checkFileIsAttached(name: string): Promise<void> {
|
||||
const fileAttached = element.all(by.css('div[data-automation-id="' + name + '"]')).first();
|
||||
await BrowserVisibility.waitUntilElementIsVisible(fileAttached);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export class AttachmentListPage {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.attachFileButton);
|
||||
}
|
||||
|
||||
async viewFile(name): Promise<void> {
|
||||
async viewFile(name: string): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
|
||||
await BrowserActions.click(this.buttonMenu);
|
||||
@@ -58,7 +58,7 @@ export class AttachmentListPage {
|
||||
await browser.sleep(500);
|
||||
}
|
||||
|
||||
async removeFile(name): Promise<void> {
|
||||
async removeFile(name: string): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
|
||||
await BrowserActions.click(this.buttonMenu);
|
||||
@@ -67,7 +67,7 @@ export class AttachmentListPage {
|
||||
await browser.sleep(500);
|
||||
}
|
||||
|
||||
async downloadFile(name): Promise<void> {
|
||||
async downloadFile(name: string): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
|
||||
await BrowserActions.click(this.buttonMenu);
|
||||
@@ -75,16 +75,16 @@ export class AttachmentListPage {
|
||||
await BrowserActions.click(this.downloadButton);
|
||||
}
|
||||
|
||||
async doubleClickFile(name): Promise<void> {
|
||||
async doubleClickFile(name: string): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
|
||||
const fileAttached: ElementFinder = element.all(by.css('div[data-automation-id="' + name + '"]')).first();
|
||||
const fileAttached = element.all(by.css('div[data-automation-id="' + name + '"]')).first();
|
||||
await BrowserActions.click(fileAttached);
|
||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||
}
|
||||
|
||||
async checkFileIsRemoved(name): Promise<void> {
|
||||
const fileAttached: ElementFinder = element.all(by.css('div[data-automation-id="' + name + '"]')).first();
|
||||
async checkFileIsRemoved(name: string): Promise<void> {
|
||||
const fileAttached = element.all(by.css('div[data-automation-id="' + name + '"]')).first();
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(fileAttached);
|
||||
}
|
||||
|
||||
|
@@ -16,15 +16,15 @@
|
||||
*/
|
||||
|
||||
import { TogglePage } from '@alfresco/adf-testing';
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
|
||||
export class AppSettingsTogglesPage {
|
||||
|
||||
togglePage: TogglePage = new TogglePage();
|
||||
togglePage = new TogglePage();
|
||||
|
||||
showDetailsHeaderToggle: ElementFinder = element(by.id('adf-show-header'));
|
||||
showTaskFilterIconsToggle: ElementFinder = element(by.id('adf-show-task-filter-icon'));
|
||||
showProcessFilterIconsToggle: ElementFinder = element(by.id('adf-show-process-filter-icon'));
|
||||
showDetailsHeaderToggle = element(by.id('adf-show-header'));
|
||||
showTaskFilterIconsToggle = element(by.id('adf-show-task-filter-icon'));
|
||||
showProcessFilterIconsToggle = element(by.id('adf-show-process-filter-icon'));
|
||||
|
||||
async enableShowHeader(): Promise<void> {
|
||||
await this.togglePage.enableToggle(this.showDetailsHeaderToggle);
|
||||
|
@@ -15,17 +15,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class ChecklistDialog {
|
||||
|
||||
nameField: ElementFinder = element(by.css('input[data-automation-id="checklist-name"]'));
|
||||
addChecklistButton: ElementFinder = element(by.css('button[id="add-check"] span'));
|
||||
closeButton: ElementFinder = element(by.css('button[id="close-check-dialog"] span'));
|
||||
dialogTitle: ElementFinder = element(by.id('add-checklist-title'));
|
||||
nameField = element(by.css('input[data-automation-id="checklist-name"]'));
|
||||
addChecklistButton = element(by.css('button[id="add-check"] span'));
|
||||
closeButton = element(by.css('button[id="close-check-dialog"] span'));
|
||||
dialogTitle = element(by.id('add-checklist-title'));
|
||||
|
||||
async addName(name): Promise<void> {
|
||||
async addName(name: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.nameField, name);
|
||||
}
|
||||
|
||||
|
@@ -20,13 +20,13 @@ import { BrowserVisibility, BrowserActions, DropdownPage } from '@alfresco/adf-t
|
||||
|
||||
export class StartTaskDialogPage {
|
||||
|
||||
name: ElementFinder = element(by.css('input[id="name_id"]'));
|
||||
dueDate: ElementFinder = element(by.css('input[id="date_id"]'));
|
||||
description: ElementFinder = element(by.css('textarea[id="description_id"]'));
|
||||
assignee: ElementFinder = element(by.css('div#people-widget-content input'));
|
||||
startButton: ElementFinder = element(by.css('button[id="button-start"]'));
|
||||
startButtonEnabled: ElementFinder = element(by.css('button[id="button-start"]:not(disabled)'));
|
||||
cancelButton: ElementFinder = element(by.css('button[id="button-cancel"]'));
|
||||
name = element(by.css('input[id="name_id"]'));
|
||||
dueDate = element(by.css('input[id="date_id"]'));
|
||||
description = element(by.css('textarea[id="description_id"]'));
|
||||
assignee = element(by.css('div#people-widget-content input'));
|
||||
startButton = element(by.css('button[id="button-start"]'));
|
||||
startButtonEnabled = element(by.css('button[id="button-start"]:not(disabled)'));
|
||||
cancelButton = element(by.css('button[id="button-cancel"]'));
|
||||
|
||||
selectFormDropdown = new DropdownPage(element(by.css('mat-select[id="form_id"]')));
|
||||
selectAssigneeDropdown = new DropdownPage();
|
||||
@@ -88,7 +88,7 @@ export class StartTaskDialogPage {
|
||||
}
|
||||
|
||||
async checkValidationErrorIsDisplayed(error: string, elementRef = 'mat-error'): Promise<void> {
|
||||
const errorElement: ElementFinder = element(by.cssContainingText(elementRef, error));
|
||||
const errorElement = element(by.cssContainingText(elementRef, error));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(errorElement);
|
||||
}
|
||||
}
|
||||
|
@@ -16,11 +16,11 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
|
||||
export class FiltersPage {
|
||||
|
||||
activeFilter: ElementFinder = element(by.css('.adf-active'));
|
||||
activeFilter = element(by.css('.adf-active'));
|
||||
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
||||
|
||||
async getActiveFilter(): Promise<string> {
|
||||
@@ -41,7 +41,7 @@ export class FiltersPage {
|
||||
}
|
||||
|
||||
async checkFilterIsHighlighted(filterName: string): Promise<void> {
|
||||
const highlightedFilter: ElementFinder = element(by.css(`.adf-active [data-automation-id='${filterName}_filter']`));
|
||||
const highlightedFilter = element(by.css(`.adf-active [data-automation-id='${filterName}_filter']`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(highlightedFilter);
|
||||
}
|
||||
}
|
||||
|
@@ -15,32 +15,32 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder, protractor } from 'protractor';
|
||||
import { by, element, protractor } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class ProcessDetailsPage {
|
||||
processTitle: ElementFinder = element(by.css('mat-card-title[class="mat-card-title"]'));
|
||||
processDetailsMessage: ElementFinder = element(by.css('adf-process-instance-details div[class="ng-star-inserted"]'));
|
||||
processStatusField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-status"]'));
|
||||
processEndDateField: ElementFinder = element(by.css('span[data-automation-id="card-dateitem-ended"]'));
|
||||
processCategoryField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-category"]'));
|
||||
processBusinessKeyField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-businessKey"]'));
|
||||
processCreatedByField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-assignee"]'));
|
||||
processCreatedField: ElementFinder = element(by.css('span[data-automation-id="card-dateitem-created"]'));
|
||||
processIdField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-id"]'));
|
||||
processDescription: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-description"]'));
|
||||
showDiagramButtonDisabled: ElementFinder = element(by.css('button[id="show-diagram-button"][disabled]'));
|
||||
propertiesList: ElementFinder = element(by.css('div[class="adf-property-list"]'));
|
||||
showDiagramButton: ElementFinder = element(by.id('show-diagram-button'));
|
||||
diagramCanvas: ElementFinder = element(by.css('svg[xmlns="http://www.w3.org/2000/svg"]'));
|
||||
backButton: ElementFinder = element(by.css('app-show-diagram button[class="mat-mini-fab mat-accent"]'));
|
||||
commentInput: ElementFinder = element(by.id('comment-input'));
|
||||
auditLogButton: ElementFinder = element(by.css('button[adf-process-audit]'));
|
||||
auditLogEmptyListMessage: ElementFinder = element(by.css('.app-empty-list-header'));
|
||||
cancelProcessButton: ElementFinder = element(by.css('div[data-automation-id="header-status"] > button'));
|
||||
activeTask: ElementFinder = element(by.css('div[data-automation-id="active-tasks"]'));
|
||||
completedTask: ElementFinder = element(by.css('div[data-automation-id="completed-tasks"]'));
|
||||
taskTitle: ElementFinder = element(by.css('h2[class="adf-activiti-task-details__header"]'));
|
||||
processTitle = element(by.css('mat-card-title[class="mat-card-title"]'));
|
||||
processDetailsMessage = element(by.css('adf-process-instance-details div[class="ng-star-inserted"]'));
|
||||
processStatusField = element(by.css('[data-automation-id="card-textitem-value-status"]'));
|
||||
processEndDateField = element(by.css('span[data-automation-id="card-dateitem-ended"]'));
|
||||
processCategoryField = element(by.css('[data-automation-id="card-textitem-value-category"]'));
|
||||
processBusinessKeyField = element(by.css('[data-automation-id="card-textitem-value-businessKey"]'));
|
||||
processCreatedByField = element(by.css('[data-automation-id="card-textitem-value-assignee"]'));
|
||||
processCreatedField = element(by.css('span[data-automation-id="card-dateitem-created"]'));
|
||||
processIdField = element(by.css('[data-automation-id="card-textitem-value-id"]'));
|
||||
processDescription = element(by.css('[data-automation-id="card-textitem-value-description"]'));
|
||||
showDiagramButtonDisabled = element(by.css('button[id="show-diagram-button"][disabled]'));
|
||||
propertiesList = element(by.css('div[class="adf-property-list"]'));
|
||||
showDiagramButton = element(by.id('show-diagram-button'));
|
||||
diagramCanvas = element(by.css('svg[xmlns="http://www.w3.org/2000/svg"]'));
|
||||
backButton = element(by.css('app-show-diagram button[class="mat-mini-fab mat-accent"]'));
|
||||
commentInput = element(by.id('comment-input'));
|
||||
auditLogButton = element(by.css('button[adf-process-audit]'));
|
||||
auditLogEmptyListMessage = element(by.css('.app-empty-list-header'));
|
||||
cancelProcessButton = element(by.css('div[data-automation-id="header-status"] > button'));
|
||||
activeTask = element(by.css('div[data-automation-id="active-tasks"]'));
|
||||
completedTask = element(by.css('div[data-automation-id="completed-tasks"]'));
|
||||
taskTitle = element(by.css('h2[class="adf-activiti-task-details__header"]'));
|
||||
|
||||
async checkDetailsAreDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.processStatusField);
|
||||
@@ -115,8 +115,8 @@ export class ProcessDetailsPage {
|
||||
await this.commentInput.sendKeys(protractor.Key.ENTER);
|
||||
}
|
||||
|
||||
async checkCommentIsDisplayed(comment): Promise<void> {
|
||||
const commentInserted: ElementFinder = element(by.cssContainingText('div[id="comment-message"]', comment));
|
||||
async checkCommentIsDisplayed(comment: string): Promise<void> {
|
||||
const commentInserted = element(by.cssContainingText('div[id="comment-message"]', comment));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(commentInserted);
|
||||
}
|
||||
|
||||
|
@@ -16,23 +16,23 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage, StartProcessPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementFinder, Locator } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
|
||||
export class ProcessFiltersPage {
|
||||
|
||||
dataTable = new DataTableComponentPage();
|
||||
runningFilter: ElementFinder = element(by.css('button[data-automation-id="Running_filter"]'));
|
||||
completedFilter: ElementFinder = element(by.css('button[data-automation-id="Completed_filter"]'));
|
||||
allFilter: ElementFinder = element(by.css('button[data-automation-id="All_filter"]'));
|
||||
createProcessButton: ElementFinder = element(by.css('.app-processes-menu button[data-automation-id="create-button"] > span'));
|
||||
newProcessButton: ElementFinder = element(by.css('div > button[data-automation-id="btn-start-process"]'));
|
||||
processesPage: ElementFinder = element(by.css('div[class="app-grid"] > div[class="app-grid-item app-processes-menu"]'));
|
||||
accordionMenu: ElementFinder = element(by.css('.app-processes-menu mat-accordion'));
|
||||
buttonWindow: ElementFinder = element(by.css('div > button[data-automation-id="btn-start-process"] > div'));
|
||||
noContentMessage: ElementFinder = element.all(by.css('div[class="adf-empty-content__title"]')).first();
|
||||
rows: Locator = by.css('adf-process-instance-list div[class="adf-datatable-body"] adf-datatable-row[class*="adf-datatable-row"]');
|
||||
tableBody: ElementFinder = element.all(by.css('adf-datatable div[class="adf-datatable-body"]')).first();
|
||||
nameColumn: Locator = by.css('div[class*="adf-datatable-body"] adf-datatable-row[class*="adf-datatable-row"] div[title="Name"] span');
|
||||
runningFilter = element(by.css('button[data-automation-id="Running_filter"]'));
|
||||
completedFilter = element(by.css('button[data-automation-id="Completed_filter"]'));
|
||||
allFilter = element(by.css('button[data-automation-id="All_filter"]'));
|
||||
createProcessButton = element(by.css('.app-processes-menu button[data-automation-id="create-button"] > span'));
|
||||
newProcessButton = element(by.css('div > button[data-automation-id="btn-start-process"]'));
|
||||
processesPage = element(by.css('div[class="app-grid"] > div[class="app-grid-item app-processes-menu"]'));
|
||||
accordionMenu = element(by.css('.app-processes-menu mat-accordion'));
|
||||
buttonWindow = element(by.css('div > button[data-automation-id="btn-start-process"] > div'));
|
||||
noContentMessage = element.all(by.css('div[class="adf-empty-content__title"]')).first();
|
||||
rows = by.css('adf-process-instance-list div[class="adf-datatable-body"] adf-datatable-row[class*="adf-datatable-row"]');
|
||||
tableBody = element.all(by.css('adf-datatable div[class="adf-datatable-body"]')).first();
|
||||
nameColumn = by.css('div[class*="adf-datatable-body"] adf-datatable-row[class*="adf-datatable-row"] div[title="Name"] span');
|
||||
processIcon = by.css('adf-icon[data-automation-id="adf-filter-icon"]');
|
||||
|
||||
async startProcess(): Promise<StartProcessPage> {
|
||||
@@ -71,14 +71,14 @@ export class ProcessFiltersPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.noContentMessage);
|
||||
}
|
||||
|
||||
async selectFromProcessList(title): Promise<void> {
|
||||
async selectFromProcessList(title: string): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
const processName: ElementFinder = element.all(by.css(`div[data-automation-id="text_${title}"]`)).first();
|
||||
const processName = element.all(by.css(`div[data-automation-id="text_${title}"]`)).first();
|
||||
await BrowserActions.click(processName);
|
||||
}
|
||||
|
||||
async checkFilterIsHighlighted(filterName): Promise<void> {
|
||||
const processNameHighlighted: ElementFinder = element(by.css(`adf-process-instance-filters .adf-active button[data-automation-id='${filterName}_filter']`));
|
||||
async checkFilterIsHighlighted(filterName: string): Promise<void> {
|
||||
const processNameHighlighted = element(by.css(`adf-process-instance-filters .adf-active button[data-automation-id='${filterName}_filter']`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(processNameHighlighted);
|
||||
}
|
||||
|
||||
@@ -103,26 +103,26 @@ export class ProcessFiltersPage {
|
||||
return this.dataTable.getAllRowsColumnValues('Name');
|
||||
}
|
||||
|
||||
async checkFilterIsDisplayed(name): Promise<void> {
|
||||
const filterName: ElementFinder = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||
async checkFilterIsDisplayed(name: string): Promise<void> {
|
||||
const filterName = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
||||
}
|
||||
|
||||
async checkFilterHasNoIcon(name): Promise<void> {
|
||||
const filterName: ElementFinder = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||
async checkFilterHasNoIcon(name: string): Promise<void> {
|
||||
const filterName = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(filterName.element(this.processIcon));
|
||||
}
|
||||
|
||||
async getFilterIcon(name): Promise<string> {
|
||||
const filterName: ElementFinder = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||
async getFilterIcon(name: string): Promise<string> {
|
||||
const filterName = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
||||
const icon = filterName.element(this.processIcon);
|
||||
return BrowserActions.getText(icon);
|
||||
}
|
||||
|
||||
async checkFilterIsNotDisplayed(name): Promise<void> {
|
||||
const filterName: ElementFinder = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||
async checkFilterIsNotDisplayed(name: string): Promise<void> {
|
||||
const filterName = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(filterName);
|
||||
}
|
||||
|
||||
|
@@ -16,12 +16,12 @@
|
||||
*/
|
||||
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
|
||||
export class ProcessListPage {
|
||||
|
||||
processListTitle: ElementFinder = element(by.css('div[class="adf-empty-content__title"]'));
|
||||
processInstanceList: ElementFinder = element(by.css('adf-process-instance-list'));
|
||||
processListTitle = element(by.css('div[class="adf-empty-content__title"]'));
|
||||
processInstanceList = element(by.css('adf-process-instance-list'));
|
||||
|
||||
getDisplayedProcessListTitle(): Promise<string> {
|
||||
return BrowserActions.getText(this.processListTitle);
|
||||
|
@@ -16,15 +16,15 @@
|
||||
*/
|
||||
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { element, by, browser, ElementFinder } from 'protractor';
|
||||
import { element, by, browser } from 'protractor';
|
||||
|
||||
export class ProcessServiceTabBarPage {
|
||||
|
||||
tasksButton: ElementFinder = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Tasks')).first();
|
||||
processButton: ElementFinder = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Process')).first();
|
||||
reportsButton: ElementFinder = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Reports')).first();
|
||||
settingsButton: ElementFinder = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Settings')).first();
|
||||
reportsButtonSelected: ElementFinder = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div[aria-selected="true"]', 'Reports')).first();
|
||||
tasksButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Tasks')).first();
|
||||
processButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Process')).first();
|
||||
reportsButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Reports')).first();
|
||||
settingsButton = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Settings')).first();
|
||||
reportsButtonSelected = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div[aria-selected="true"]', 'Reports')).first();
|
||||
|
||||
async clickTasksButton(): Promise<void> {
|
||||
await BrowserActions.click(this.tasksButton);
|
||||
|
@@ -17,14 +17,14 @@
|
||||
|
||||
import { ProcessServiceTabBarPage } from './process-service-tab-bar.page';
|
||||
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { __await } from 'tslib';
|
||||
|
||||
export class ProcessServicesPage {
|
||||
|
||||
apsAppsContainer: ElementFinder = element(by.css('div[class="adf-app-listgrid ng-star-inserted"]'));
|
||||
taskApp: ElementFinder = element(by.css('mat-card[title="Task App"]'));
|
||||
apsAppsContainer = element(by.css('div[class="adf-app-listgrid ng-star-inserted"]'));
|
||||
taskApp = element(by.css('mat-card[title="Task App"]'));
|
||||
iconTypeLocator = by.css('mat-icon[class*="card-logo-icon"]');
|
||||
descriptionLocator = by.css('mat-card-subtitle[class*="subtitle"]');
|
||||
|
||||
@@ -32,8 +32,8 @@ export class ProcessServicesPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.apsAppsContainer);
|
||||
}
|
||||
|
||||
async goToApp(applicationName): Promise<ProcessServiceTabBarPage> {
|
||||
const app: ElementFinder = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
async goToApp(applicationName: string): Promise<ProcessServiceTabBarPage> {
|
||||
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
await BrowserActions.click(app);
|
||||
return new ProcessServiceTabBarPage();
|
||||
}
|
||||
@@ -43,33 +43,33 @@ export class ProcessServicesPage {
|
||||
return new ProcessServiceTabBarPage();
|
||||
}
|
||||
|
||||
async getAppIconType(applicationName): Promise<string> {
|
||||
const app: ElementFinder = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
async getAppIconType(applicationName: string): Promise<string> {
|
||||
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(app);
|
||||
const iconType = app.element(this.iconTypeLocator);
|
||||
return BrowserActions.getText(iconType);
|
||||
}
|
||||
|
||||
async getBackgroundColor(applicationName): Promise<string> {
|
||||
const app: ElementFinder = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
async getBackgroundColor(applicationName: string): Promise<string> {
|
||||
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(app);
|
||||
return app.getCssValue('background-color');
|
||||
}
|
||||
|
||||
async getDescription(applicationName): Promise<string> {
|
||||
const app: ElementFinder = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
async getDescription(applicationName: string): Promise<string> {
|
||||
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(app);
|
||||
const description = app.element(this.descriptionLocator);
|
||||
return BrowserActions.getText(description);
|
||||
}
|
||||
|
||||
async checkAppIsNotDisplayed(applicationName): Promise<void> {
|
||||
const app: ElementFinder = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
async checkAppIsNotDisplayed(applicationName: string): Promise<void> {
|
||||
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(app);
|
||||
}
|
||||
|
||||
async checkAppIsDisplayed(applicationName): Promise<void> {
|
||||
const app: ElementFinder = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
async checkAppIsDisplayed(applicationName: string): Promise<void> {
|
||||
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(app);
|
||||
}
|
||||
|
||||
|
@@ -16,55 +16,55 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DropdownPage, TabsPage } from '@alfresco/adf-testing';
|
||||
import { browser, by, element, ElementFinder, Key } from 'protractor';
|
||||
import { browser, by, element, Key } from 'protractor';
|
||||
import { AppSettingsTogglesPage } from './dialog/app-settings-toggles.page';
|
||||
|
||||
export class TaskDetailsPage {
|
||||
|
||||
appSettingsTogglesClass = new AppSettingsTogglesPage();
|
||||
|
||||
formContent: ElementFinder = element(by.css('adf-form'));
|
||||
formNameField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-formName"]'));
|
||||
formNameButton: ElementFinder = element(by.css('[data-automation-id="card-textitem-toggle-formName"]'));
|
||||
assigneeField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-assignee"]'));
|
||||
assigneeButton: ElementFinder = element(by.css('[data-automation-id="card-textitem-toggle-assignee"]'));
|
||||
statusField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-status"]'));
|
||||
categoryField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-category"] '));
|
||||
parentNameField: ElementFinder = element(by.css('span[data-automation-id*="parentName"] span'));
|
||||
parentTaskIdField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-parentTaskId"] '));
|
||||
durationField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-duration"] '));
|
||||
endDateField: ElementFinder = element.all(by.css('span[data-automation-id*="endDate"] span')).first();
|
||||
createdField: ElementFinder = element(by.css('span[data-automation-id="card-dateitem-created"] span'));
|
||||
idField: ElementFinder = element.all(by.css('[data-automation-id="card-textitem-value-id"]')).first();
|
||||
descriptionField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-description"]'));
|
||||
dueDateField: ElementFinder = element.all(by.css('span[data-automation-id*="dueDate"] span')).first();
|
||||
activitiesTitle: ElementFinder = element(by.css('div[class*="adf-info-drawer-layout-header-title"] div'));
|
||||
commentField: ElementFinder = element(by.id('comment-input'));
|
||||
addCommentButton: ElementFinder = element(by.css('[data-automation-id="comments-input-add"]'));
|
||||
involvePeopleButton: ElementFinder = element(by.css('div[class*="add-people"]'));
|
||||
addPeopleField: ElementFinder = element(by.css('input[data-automation-id="adf-people-search-input"]'));
|
||||
addInvolvedUserButton: ElementFinder = element(by.css('button[id="add-people"] span'));
|
||||
formContent = element(by.css('adf-form'));
|
||||
formNameField = element(by.css('[data-automation-id="card-textitem-value-formName"]'));
|
||||
formNameButton = element(by.css('[data-automation-id="card-textitem-toggle-formName"]'));
|
||||
assigneeField = element(by.css('[data-automation-id="card-textitem-value-assignee"]'));
|
||||
assigneeButton = element(by.css('[data-automation-id="card-textitem-toggle-assignee"]'));
|
||||
statusField = element(by.css('[data-automation-id="card-textitem-value-status"]'));
|
||||
categoryField = element(by.css('[data-automation-id="card-textitem-value-category"] '));
|
||||
parentNameField = element(by.css('span[data-automation-id*="parentName"] span'));
|
||||
parentTaskIdField = element(by.css('[data-automation-id="card-textitem-value-parentTaskId"] '));
|
||||
durationField = element(by.css('[data-automation-id="card-textitem-value-duration"] '));
|
||||
endDateField = element.all(by.css('span[data-automation-id*="endDate"] span')).first();
|
||||
createdField = element(by.css('span[data-automation-id="card-dateitem-created"] span'));
|
||||
idField = element.all(by.css('[data-automation-id="card-textitem-value-id"]')).first();
|
||||
descriptionField = element(by.css('[data-automation-id="card-textitem-value-description"]'));
|
||||
dueDateField = element.all(by.css('span[data-automation-id*="dueDate"] span')).first();
|
||||
activitiesTitle = element(by.css('div[class*="adf-info-drawer-layout-header-title"] div'));
|
||||
commentField = element(by.id('comment-input'));
|
||||
addCommentButton = element(by.css('[data-automation-id="comments-input-add"]'));
|
||||
involvePeopleButton = element(by.css('div[class*="add-people"]'));
|
||||
addPeopleField = element(by.css('input[data-automation-id="adf-people-search-input"]'));
|
||||
addInvolvedUserButton = element(by.css('button[id="add-people"] span'));
|
||||
emailInvolvedUser = by.xpath('following-sibling::div[@class="adf-people-email"]');
|
||||
taskDetailsInfoDrawer: ElementFinder = element(by.tagName('adf-info-drawer'));
|
||||
taskDetailsSection: ElementFinder = element(by.css('div[data-automation-id="app-tasks-details"]'));
|
||||
taskDetailsEmptySection: ElementFinder = element(by.css('div[data-automation-id="adf-tasks-details--empty"]'));
|
||||
completeTask: ElementFinder = element(by.css('button[id="adf-no-form-complete-button"]'));
|
||||
completeFormTask: ElementFinder = element(by.css('button[id="adf-form-complete"]'));
|
||||
taskDetailsTitle: ElementFinder = element(by.css('h2[class="adf-activiti-task-details__header"] span'));
|
||||
auditLogButton: ElementFinder = element(by.css('button[adf-task-audit]'));
|
||||
noPeopleInvolved: ElementFinder = element(by.id('no-people-label'));
|
||||
cancelInvolvePeopleButton: ElementFinder = element(by.id('close-people-search'));
|
||||
involvePeopleHeader: ElementFinder = element(by.css('div[class="adf-search-text-header"]'));
|
||||
removeInvolvedPeople: ElementFinder = element(by.css('button[data-automation-id="Remove"]'));
|
||||
peopleTitle: ElementFinder = element(by.id('people-title'));
|
||||
noFormMessage: ElementFinder = element(by.css('span[id*="no-form-message"]'));
|
||||
cancelAttachForm: ElementFinder = element(by.id('adf-no-form-cancel-button'));
|
||||
attachFormButton: ElementFinder = element(by.id('adf-no-form-attach-form-button'));
|
||||
disabledAttachFormButton: ElementFinder = element(by.css('button[id="adf-no-form-attach-form-button"][disabled]'));
|
||||
removeAttachForm: ElementFinder = element(by.id('adf-attach-form-remove-button'));
|
||||
attachFormName: ElementFinder = element(by.css('span[class="adf-form-title ng-star-inserted"]'));
|
||||
emptyTaskDetails: ElementFinder = element(by.css('adf-task-details > div > div'));
|
||||
priority: ElementFinder = element(by.css('[data-automation-id*="card-textitem-value-priority"]'));
|
||||
taskDetailsInfoDrawer = element(by.tagName('adf-info-drawer'));
|
||||
taskDetailsSection = element(by.css('div[data-automation-id="app-tasks-details"]'));
|
||||
taskDetailsEmptySection = element(by.css('div[data-automation-id="adf-tasks-details--empty"]'));
|
||||
completeTask = element(by.css('button[id="adf-no-form-complete-button"]'));
|
||||
completeFormTask = element(by.css('button[id="adf-form-complete"]'));
|
||||
taskDetailsTitle = element(by.css('h2[class="adf-activiti-task-details__header"] span'));
|
||||
auditLogButton = element(by.css('button[adf-task-audit]'));
|
||||
noPeopleInvolved = element(by.id('no-people-label'));
|
||||
cancelInvolvePeopleButton = element(by.id('close-people-search'));
|
||||
involvePeopleHeader = element(by.css('div[class="adf-search-text-header"]'));
|
||||
removeInvolvedPeople = element(by.css('button[data-automation-id="Remove"]'));
|
||||
peopleTitle = element(by.id('people-title'));
|
||||
noFormMessage = element(by.css('span[id*="no-form-message"]'));
|
||||
cancelAttachForm = element(by.id('adf-no-form-cancel-button'));
|
||||
attachFormButton = element(by.id('adf-no-form-attach-form-button'));
|
||||
disabledAttachFormButton = element(by.css('button[id="adf-no-form-attach-form-button"][disabled]'));
|
||||
removeAttachForm = element(by.id('adf-attach-form-remove-button'));
|
||||
attachFormName = element(by.css('span[class="adf-form-title ng-star-inserted"]'));
|
||||
emptyTaskDetails = element(by.css('adf-task-details > div > div'));
|
||||
priority = element(by.css('[data-automation-id*="card-textitem-value-priority"]'));
|
||||
editableAssignee = element(by.css('[data-automation-id="card-textitem-value-assignee"][class*="clickable"]'));
|
||||
claimElement = element(by.css('[data-automation-id="header-claim-button"]'));
|
||||
releaseElement = element(by.css('[data-automation-id="header-unclaim-button"]'));
|
||||
@@ -261,18 +261,18 @@ export class TaskDetailsPage {
|
||||
await tabsPage.clickTabByTitle('Details');
|
||||
}
|
||||
|
||||
async addComment(comment): Promise<void> {
|
||||
async addComment(comment: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.commentField, comment);
|
||||
await BrowserActions.click(this.addCommentButton);
|
||||
}
|
||||
|
||||
async checkCommentIsDisplayed(comment): Promise<void> {
|
||||
const row: ElementFinder = element(by.cssContainingText('div[id="comment-message"]', comment));
|
||||
async checkCommentIsDisplayed(comment: string): Promise<void> {
|
||||
const row = element(by.cssContainingText('div[id="comment-message"]', comment));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(row);
|
||||
}
|
||||
|
||||
async checkIsEmptyCommentListDisplayed(): Promise<void> {
|
||||
const emptyList: ElementFinder = element(by.cssContainingText('div[id="comment-header"]', '(0)'));
|
||||
const emptyList = element(by.cssContainingText('div[id="comment-header"]', '(0)'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(emptyList);
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ export class TaskDetailsPage {
|
||||
await BrowserActions.click(this.involvePeopleButton);
|
||||
}
|
||||
|
||||
async typeUser(user): Promise<void> {
|
||||
async typeUser(user: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.addPeopleField, user);
|
||||
}
|
||||
|
||||
@@ -292,8 +292,8 @@ export class TaskDetailsPage {
|
||||
await BrowserActions.click(row);
|
||||
}
|
||||
|
||||
async checkUserIsSelected(user): Promise<void> {
|
||||
const row: ElementFinder = element(by.cssContainingText('div[class*="search-list-container"] div[class*="people-full-name"]', user));
|
||||
async checkUserIsSelected(user: string): Promise<void> {
|
||||
const row = element(by.cssContainingText('div[class*="search-list-container"] div[class*="people-full-name"]', user));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(row);
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ export class TaskDetailsPage {
|
||||
await BrowserActions.click(this.addInvolvedUserButton);
|
||||
}
|
||||
|
||||
getRowsUser(user) {
|
||||
getRowsUser(user: string) {
|
||||
return element(by.cssContainingText('div[class*="people-full-name"]', user));
|
||||
}
|
||||
|
||||
|
@@ -16,15 +16,15 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
|
||||
export class TasksListPage {
|
||||
|
||||
taskList: ElementFinder = element(by.css('adf-tasklist'));
|
||||
noTasksFound: ElementFinder = element.all(by.css("div[class='adf-empty-content__title']")).first();
|
||||
dataTable: DataTableComponentPage = new DataTableComponentPage(this.taskList);
|
||||
taskList = element(by.css('adf-tasklist'));
|
||||
noTasksFound = element.all(by.css("div[class='adf-empty-content__title']")).first();
|
||||
dataTable = new DataTableComponentPage(this.taskList);
|
||||
|
||||
getDataTable() {
|
||||
getDataTable(): DataTableComponentPage {
|
||||
return this.dataTable;
|
||||
}
|
||||
|
||||
|
@@ -21,22 +21,22 @@ import { TaskDetailsPage } from './task-details.page';
|
||||
import { FiltersPage } from './filters.page';
|
||||
import { ChecklistDialog } from './dialog/create-checklist-dialog.page';
|
||||
import { TasksListPage } from './tasks-list.page';
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions, FormFields } from '@alfresco/adf-testing';
|
||||
|
||||
export class TasksPage {
|
||||
|
||||
createButton: ElementFinder = element(by.css('button[data-automation-id="create-button"'));
|
||||
newTaskButton: ElementFinder = element(by.css('button[data-automation-id="btn-start-task"]'));
|
||||
addChecklistButton: ElementFinder = element(by.css('button[class*="adf-add-to-checklist-button"]'));
|
||||
createButton = element(by.css('button[data-automation-id="create-button"'));
|
||||
newTaskButton = element(by.css('button[data-automation-id="btn-start-task"]'));
|
||||
addChecklistButton = element(by.css('button[class*="adf-add-to-checklist-button"]'));
|
||||
rowByRowName = by.xpath('ancestor::mat-chip');
|
||||
checklistContainer = by.css('div[class*="checklist-menu"]');
|
||||
taskTitle = 'h2[class="adf-activiti-task-details__header"] span';
|
||||
rows = by.css('div[class*="adf-datatable-body"] adf-datatable-row[class*="adf-datatable-row"] div[class*="adf-datatable-cell"]');
|
||||
completeButtonNoForm: ElementFinder = element(by.id('adf-no-form-complete-button'));
|
||||
checklistDialog: ElementFinder = element(by.id('checklist-dialog'));
|
||||
checklistNoMessage: ElementFinder = element(by.id('checklist-none-message'));
|
||||
numberOfChecklists: ElementFinder = element(by.css('[data-automation-id="checklist-label"] mat-chip'));
|
||||
completeButtonNoForm = element(by.id('adf-no-form-complete-button'));
|
||||
checklistDialog = element(by.id('checklist-dialog'));
|
||||
checklistNoMessage = element(by.id('checklist-none-message'));
|
||||
numberOfChecklists = element(by.css('[data-automation-id="checklist-label"] mat-chip'));
|
||||
sortByName = by.css('div[data-automation-id="auto_id_name"]');
|
||||
|
||||
async createNewTask(): Promise<StartTaskDialogPage> {
|
||||
@@ -90,7 +90,7 @@ export class TasksPage {
|
||||
}
|
||||
|
||||
getRowsName(name) {
|
||||
const row: ElementFinder = element(this.checklistContainer).element(by.cssContainingText('span', name));
|
||||
const row = element(this.checklistContainer).element(by.cssContainingText('span', name));
|
||||
return row;
|
||||
}
|
||||
|
||||
@@ -105,13 +105,13 @@ export class TasksPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(checklistEle);
|
||||
}
|
||||
|
||||
async checkChecklistIsNotDisplayed(checklist): Promise<void> {
|
||||
async checkChecklistIsNotDisplayed(checklist: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element(this.checklistContainer).element(by.cssContainingText('span', checklist)));
|
||||
}
|
||||
|
||||
async checkTaskTitle(taskName): Promise<void> {
|
||||
async checkTaskTitle(taskName: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.css(this.taskTitle)));
|
||||
const title: ElementFinder = element(by.cssContainingText(this.taskTitle, taskName));
|
||||
const title = element(by.cssContainingText(this.taskTitle, taskName));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(title);
|
||||
}
|
||||
|
||||
|
@@ -16,28 +16,28 @@
|
||||
*/
|
||||
|
||||
import { BrowserVisibility, DateRangeFilterPage, NumberRangeFilterPage, SearchCategoriesPage, SearchCheckListPage, SearchRadioPage, SearchSliderPage, SearchTextPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
|
||||
export class SearchFiltersPage {
|
||||
|
||||
searchCategoriesPage: SearchCategoriesPage = new SearchCategoriesPage();
|
||||
|
||||
searchFilters: ElementFinder = element(by.css('adf-search-filter'));
|
||||
fileTypeFilter: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.TYPE"]'));
|
||||
creatorFilter: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.CREATOR"]'));
|
||||
fileSizeFilter: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.SIZE"]'));
|
||||
nameFilter: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Name"]'));
|
||||
checkListFilter: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Check List"]'));
|
||||
createdDateRangeFilter: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Created Date (range)"]'));
|
||||
typeFilter: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Type"]'));
|
||||
sizeRangeFilter: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Content Size (range)"]'));
|
||||
sizeSliderFilter: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Content Size"]'));
|
||||
facetQueriesDefaultGroup: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_QUERIES.MY_FACET_QUERIES"],' +
|
||||
searchFilters = element(by.css('adf-search-filter'));
|
||||
fileTypeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.TYPE"]'));
|
||||
creatorFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.CREATOR"]'));
|
||||
fileSizeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.SIZE"]'));
|
||||
nameFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Name"]'));
|
||||
checkListFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Check List"]'));
|
||||
createdDateRangeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Created Date (range)"]'));
|
||||
typeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Type"]'));
|
||||
sizeRangeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Content Size (range)"]'));
|
||||
sizeSliderFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Content Size"]'));
|
||||
facetQueriesDefaultGroup = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_QUERIES.MY_FACET_QUERIES"],' +
|
||||
'mat-expansion-panel[data-automation-id="expansion-panel-My facet queries"]'));
|
||||
facetQueriesTypeGroup: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Type facet queries"]'));
|
||||
facetQueriesSizeGroup: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Size facet queries"]'));
|
||||
facetIntervalsByCreated: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-The Created"]'));
|
||||
facetIntervalsByModified: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-TheModified"]'));
|
||||
facetQueriesTypeGroup = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Type facet queries"]'));
|
||||
facetQueriesSizeGroup = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Size facet queries"]'));
|
||||
facetIntervalsByCreated = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-The Created"]'));
|
||||
facetIntervalsByModified = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-TheModified"]'));
|
||||
|
||||
async checkSearchFiltersIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchFilters);
|
||||
@@ -71,7 +71,7 @@ export class SearchFiltersPage {
|
||||
return SearchCategoriesPage.radioFiltersPage(this.typeFilter);
|
||||
}
|
||||
|
||||
async checkCustomFacetFieldLabelIsDisplayed(fieldLabel): Promise<void> {
|
||||
async checkCustomFacetFieldLabelIsDisplayed(fieldLabel: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.css(`mat-expansion-panel[data-automation-id="expansion-panel-${fieldLabel}"]`)));
|
||||
}
|
||||
|
||||
|
@@ -16,17 +16,17 @@
|
||||
*/
|
||||
|
||||
import { BrowserVisibility, DataTableComponentPage, SearchSortingPickerPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { ContentServicesPage } from './content-services.page';
|
||||
|
||||
export class SearchResultsPage {
|
||||
|
||||
noResultsMessage: ElementFinder = element(by.css('div[class="app-no-result-message"]'));
|
||||
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
||||
searchSortingPicker: SearchSortingPickerPage = new SearchSortingPickerPage();
|
||||
contentServices: ContentServicesPage = new ContentServicesPage();
|
||||
noResultsMessage = element(by.css('div[class="app-no-result-message"]'));
|
||||
dataTable = new DataTableComponentPage();
|
||||
searchSortingPicker = new SearchSortingPickerPage();
|
||||
contentServices = new ContentServicesPage();
|
||||
|
||||
getNodeHighlight(content) {
|
||||
getNodeHighlight(content: string) {
|
||||
return this.dataTable.getCellByRowContentAndColumn('Display name', content, 'Search');
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ export class SearchResultsPage {
|
||||
await this.dataTable.tableIsLoaded();
|
||||
}
|
||||
|
||||
async checkContentIsDisplayed(content): Promise<void> {
|
||||
async checkContentIsDisplayed(content: string): Promise<void> {
|
||||
await this.dataTable.checkContentIsDisplayed('Display name', content);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ export class SearchResultsPage {
|
||||
return this.dataTable.numberOfRows();
|
||||
}
|
||||
|
||||
async checkContentIsNotDisplayed(content): Promise<void> {
|
||||
async checkContentIsNotDisplayed(content: string): Promise<void> {
|
||||
await this.dataTable.checkContentIsNotDisplayed('Display name', content);
|
||||
}
|
||||
|
||||
@@ -54,11 +54,11 @@ export class SearchResultsPage {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.noResultsMessage);
|
||||
}
|
||||
|
||||
async navigateToFolder(content): Promise<void> {
|
||||
async navigateToFolder(content: string): Promise<void> {
|
||||
await this.dataTable.doubleClickRow('Display name', content);
|
||||
}
|
||||
|
||||
async deleteContent(content): Promise<void> {
|
||||
async deleteContent(content: string): Promise<void> {
|
||||
await this.contentServices.deleteContent(content);
|
||||
}
|
||||
|
||||
|
@@ -15,25 +15,25 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, protractor, browser, ElementFinder, ElementArrayFinder } from 'protractor';
|
||||
import { element, by, protractor, browser } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class TagPage {
|
||||
|
||||
addTagButton: ElementFinder = element(by.css('button[id="add-tag"]'));
|
||||
insertNodeIdElement: ElementFinder = element(by.css('input[id="nodeId"]'));
|
||||
newTagInput: ElementFinder = element(by.css('input[id="new-tag-text"]'));
|
||||
tagListRow: ElementFinder = element(by.css('adf-tag-node-actions-list mat-list-item'));
|
||||
tagListByNodeIdRow: ElementFinder = element(by.css('adf-tag-node-list mat-chip'));
|
||||
errorMessage: ElementFinder = element(by.css('mat-hint[data-automation-id="errorMessage"]'));
|
||||
addTagButton = element(by.css('button[id="add-tag"]'));
|
||||
insertNodeIdElement = element(by.css('input[id="nodeId"]'));
|
||||
newTagInput = element(by.css('input[id="new-tag-text"]'));
|
||||
tagListRow = element(by.css('adf-tag-node-actions-list mat-list-item'));
|
||||
tagListByNodeIdRow = element(by.css('adf-tag-node-list mat-chip'));
|
||||
errorMessage = element(by.css('mat-hint[data-automation-id="errorMessage"]'));
|
||||
tagListRowLocator = by.css('adf-tag-node-actions-list mat-list-item div');
|
||||
tagListByNodeIdRowLocator = by.css('adf-tag-node-list mat-chip span');
|
||||
tagListContentServicesRowLocator = by.css('div[class*="adf-list-tag"]');
|
||||
showDeleteButton: ElementFinder = element(by.id('adf-remove-button-tag'));
|
||||
showMoreButton: ElementFinder = element(by.css('button[data-automation-id="show-more-tags"]'));
|
||||
showLessButton: ElementFinder = element(by.css('button[data-automation-id="show-fewer-tags"]'));
|
||||
tagsOnPage: ElementArrayFinder = element.all(by.css('div[class*="adf-list-tag"]'));
|
||||
confirmTag: ElementFinder = element(by.id('adf-tag-node-send'));
|
||||
showDeleteButton = element(by.id('adf-remove-button-tag'));
|
||||
showMoreButton = element(by.css('button[data-automation-id="show-more-tags"]'));
|
||||
showLessButton = element(by.css('button[data-automation-id="show-fewer-tags"]'));
|
||||
tagsOnPage = element.all(by.css('div[class*="adf-list-tag"]'));
|
||||
confirmTag = element(by.id('adf-tag-node-send'));
|
||||
|
||||
async getNodeId(): Promise<string> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.insertNodeIdElement);
|
||||
@@ -59,13 +59,13 @@ export class TagPage {
|
||||
await BrowserActions.click(this.addTagButton);
|
||||
}
|
||||
|
||||
async deleteTagFromTagListByNodeId(name): Promise<void> {
|
||||
const deleteChip: ElementFinder = element(by.id('tag_chips_delete_' + name));
|
||||
async deleteTagFromTagListByNodeId(name: string): Promise<void> {
|
||||
const deleteChip = element(by.id('tag_chips_delete_' + name));
|
||||
await BrowserActions.click(deleteChip);
|
||||
}
|
||||
|
||||
async deleteTagFromTagList(name): Promise<void> {
|
||||
const deleteChip: ElementFinder = element(by.id('tag_chips_delete_' + name));
|
||||
async deleteTagFromTagList(name: string): Promise<void> {
|
||||
const deleteChip = element(by.id('tag_chips_delete_' + name));
|
||||
await BrowserActions.click(deleteChip);
|
||||
}
|
||||
|
||||
@@ -84,23 +84,23 @@ export class TagPage {
|
||||
return this.addTagButton.isEnabled();
|
||||
}
|
||||
|
||||
async checkTagIsDisplayedInTagList(tagName): Promise<void> {
|
||||
const tag: ElementFinder = element(by.cssContainingText('div[id*="tag_name"]', tagName));
|
||||
async checkTagIsDisplayedInTagList(tagName: string): Promise<void> {
|
||||
const tag = element(by.cssContainingText('div[id*="tag_name"]', tagName));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(tag);
|
||||
}
|
||||
|
||||
async checkTagIsNotDisplayedInTagList(tagName): Promise<void> {
|
||||
const tag: ElementFinder = element(by.cssContainingText('div[id*="tag_name"]', tagName));
|
||||
async checkTagIsNotDisplayedInTagList(tagName: string): Promise<void> {
|
||||
const tag = element(by.cssContainingText('div[id*="tag_name"]', tagName));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(tag);
|
||||
}
|
||||
|
||||
async checkTagIsNotDisplayedInTagListByNodeId(tagName): Promise<void> {
|
||||
const tag: ElementFinder = element(by.cssContainingText('span[id*="tag_name"]', tagName));
|
||||
const tag = element(by.cssContainingText('span[id*="tag_name"]', tagName));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(tag);
|
||||
}
|
||||
|
||||
async checkTagIsDisplayedInTagListByNodeId(tagName): Promise<void> {
|
||||
const tag: ElementFinder = element(by.cssContainingText('span[id*="tag_name"]', tagName));
|
||||
const tag = element(by.cssContainingText('span[id*="tag_name"]', tagName));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(tag);
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ export class TagPage {
|
||||
}
|
||||
|
||||
async checkTagIsDisplayedInTagListContentServices(tagName): Promise<void> {
|
||||
const tag: ElementFinder = element(by.cssContainingText('div[class="adf-list-tag"][id*="tag_name"]', tagName));
|
||||
const tag = element(by.cssContainingText('div[class="adf-list-tag"][id*="tag_name"]', tagName));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(tag);
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ export class TagPage {
|
||||
}
|
||||
|
||||
async checkListIsSorted(sortOrder, locator): Promise<boolean> {
|
||||
const tagList: ElementArrayFinder = element.all(locator);
|
||||
const tagList = element.all(locator);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(tagList.first());
|
||||
const initialList = [];
|
||||
await tagList.each(async (currentElement) => {
|
||||
@@ -149,13 +149,13 @@ export class TagPage {
|
||||
return initialList.toString() === sortedList.toString();
|
||||
}
|
||||
|
||||
async checkDeleteTagFromTagListByNodeIdIsDisplayed(name): Promise<void> {
|
||||
const deleteChip: ElementFinder = element(by.id('tag_chips_delete_' + name));
|
||||
async checkDeleteTagFromTagListByNodeIdIsDisplayed(name: string): Promise<void> {
|
||||
const deleteChip = element(by.id('tag_chips_delete_' + name));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(deleteChip);
|
||||
}
|
||||
|
||||
async checkDeleteTagFromTagListByNodeIdIsNotDisplayed(name): Promise<void> {
|
||||
const deleteChip: ElementFinder = element(by.id('tag_chips_delete_' + name));
|
||||
async checkDeleteTagFromTagListByNodeIdIsNotDisplayed(name: string): Promise<void> {
|
||||
const deleteChip = element(by.id('tag_chips_delete_' + name));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(deleteChip);
|
||||
}
|
||||
|
||||
|
@@ -16,17 +16,16 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DocumentListPage } from '@alfresco/adf-testing';
|
||||
|
||||
import { element, by, ElementFinder, Locator } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
|
||||
export class TrashcanPage {
|
||||
|
||||
contentList: DocumentListPage = new DocumentListPage(element(by.css('adf-document-list')));
|
||||
rows: Locator = by.css('adf-document-list div[class*="adf-datatable-body"] adf-datatable-row[class*="adf-datatable-row"]');
|
||||
tableBody: ElementFinder = element.all(by.css('adf-document-list div[class="adf-datatable-body"]')).first();
|
||||
pagination: ElementFinder = element(by.css('adf-pagination'));
|
||||
emptyTrashcan: ElementFinder = element(by.css('adf-empty-content'));
|
||||
restoreButton: ElementFinder = element(by.css(`button[title='Restore']`));
|
||||
contentList = new DocumentListPage(element(by.css('adf-document-list')));
|
||||
rows = by.css('adf-document-list div[class*="adf-datatable-body"] adf-datatable-row[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']`));
|
||||
|
||||
async numberOfResultsDisplayed(): Promise<number> {
|
||||
return element.all(this.rows).count();
|
||||
|
@@ -17,23 +17,23 @@
|
||||
|
||||
import * as path from 'path';
|
||||
import { BrowserActions, BrowserVisibility, TogglePage } from '@alfresco/adf-testing';
|
||||
import { browser, by, element, ElementFinder } from 'protractor';
|
||||
import { browser, by, element } from 'protractor';
|
||||
|
||||
export class VersionManagePage {
|
||||
|
||||
togglePage: TogglePage = new TogglePage();
|
||||
togglePage = new TogglePage();
|
||||
|
||||
showNewVersionButton: ElementFinder = element(by.id('adf-show-version-upload-button'));
|
||||
uploadNewVersionInput: ElementFinder = element(by.css('adf-upload-version-button input[data-automation-id="upload-single-file"]'));
|
||||
uploadNewVersionButton: ElementFinder = element(by.css('adf-upload-version-button'));
|
||||
uploadNewVersionContainer: ElementFinder = element(by.id('adf-new-version-uploader-container'));
|
||||
cancelButton: ElementFinder = element(by.id('adf-new-version-cancel'));
|
||||
majorRadio: ElementFinder = element(by.id('adf-new-version-major'));
|
||||
minorRadio: ElementFinder = element(by.id('adf-new-version-minor'));
|
||||
commentText: ElementFinder = element(by.id('adf-new-version-text-area'));
|
||||
readOnlySwitch: ElementFinder = element(by.id('adf-version-manager-switch-readonly'));
|
||||
downloadSwitch: ElementFinder = element(by.id('adf-version-manager-switch-download'));
|
||||
commentsSwitch: ElementFinder = element(by.id('adf-version-manager-switch-comments'));
|
||||
showNewVersionButton = element(by.id('adf-show-version-upload-button'));
|
||||
uploadNewVersionInput = element(by.css('adf-upload-version-button input[data-automation-id="upload-single-file"]'));
|
||||
uploadNewVersionButton = element(by.css('adf-upload-version-button'));
|
||||
uploadNewVersionContainer = element(by.id('adf-new-version-uploader-container'));
|
||||
cancelButton = element(by.id('adf-new-version-cancel'));
|
||||
majorRadio = element(by.id('adf-new-version-major'));
|
||||
minorRadio = element(by.id('adf-new-version-minor'));
|
||||
commentText = element(by.id('adf-new-version-text-area'));
|
||||
readOnlySwitch = element(by.id('adf-version-manager-switch-readonly'));
|
||||
downloadSwitch = element(by.id('adf-version-manager-switch-download'));
|
||||
commentsSwitch = element(by.id('adf-version-manager-switch-comments'));
|
||||
|
||||
async checkUploadNewVersionsButtonIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.showNewVersionButton);
|
||||
@@ -43,48 +43,48 @@ export class VersionManagePage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.cancelButton);
|
||||
}
|
||||
|
||||
async uploadNewVersionFile(fileLocation): Promise<void> {
|
||||
async uploadNewVersionFile(fileLocation: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsPresent(this.uploadNewVersionInput);
|
||||
await this.uploadNewVersionInput.sendKeys(path.resolve(path.join(browser.params.testConfig.main.rootPath, fileLocation)));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.showNewVersionButton);
|
||||
}
|
||||
|
||||
async getFileVersionName(version): Promise<string> {
|
||||
const fileElement: ElementFinder = element(by.css(`[id="adf-version-list-item-name-${version}"]`));
|
||||
async getFileVersionName(version: string): Promise<string> {
|
||||
const fileElement = element(by.css(`[id="adf-version-list-item-name-${version}"]`));
|
||||
return BrowserActions.getText(fileElement);
|
||||
}
|
||||
|
||||
async checkFileVersionExist(version): Promise<void> {
|
||||
const fileVersion: ElementFinder = element(by.id(`adf-version-list-item-version-${version}`));
|
||||
async checkFileVersionExist(version: string): Promise<void> {
|
||||
const fileVersion = element(by.id(`adf-version-list-item-version-${version}`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(fileVersion);
|
||||
}
|
||||
|
||||
async checkFileVersionNotExist(version): Promise<void> {
|
||||
const fileVersion: ElementFinder = element(by.id(`adf-version-list-item-version-${version}`));
|
||||
async checkFileVersionNotExist(version: string): Promise<void> {
|
||||
const fileVersion = element(by.id(`adf-version-list-item-version-${version}`));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(fileVersion);
|
||||
}
|
||||
|
||||
async getFileVersionComment(version): Promise<string> {
|
||||
const fileComment: ElementFinder = element(by.id(`adf-version-list-item-comment-${version}`));
|
||||
async getFileVersionComment(version: string): Promise<string> {
|
||||
const fileComment = element(by.id(`adf-version-list-item-comment-${version}`));
|
||||
return BrowserActions.getText(fileComment);
|
||||
}
|
||||
|
||||
async getFileVersionDate(version): Promise<string> {
|
||||
const fileDate: ElementFinder = element(by.id(`adf-version-list-item-date-${version}`));
|
||||
async getFileVersionDate(version: string): Promise<string> {
|
||||
const fileDate = element(by.id(`adf-version-list-item-date-${version}`));
|
||||
return BrowserActions.getText(fileDate);
|
||||
}
|
||||
|
||||
async enterCommentText(text): Promise<void> {
|
||||
async enterCommentText(text: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.commentText, text);
|
||||
}
|
||||
|
||||
async clickMajorChange(): Promise<void> {
|
||||
const radioMajor: ElementFinder = element(by.id(`adf-new-version-major`));
|
||||
const radioMajor = element(by.id(`adf-new-version-major`));
|
||||
await BrowserActions.click(radioMajor);
|
||||
}
|
||||
|
||||
async clickMinorChange(): Promise<void> {
|
||||
const radioMinor: ElementFinder = element(by.id(`adf-new-version-minor`));
|
||||
const radioMinor = element(by.id(`adf-new-version-minor`));
|
||||
await BrowserActions.click(radioMinor);
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ export class VersionManagePage {
|
||||
await this.togglePage.enableToggle(this.commentsSwitch);
|
||||
}
|
||||
|
||||
async clickActionButton(version): Promise<void> {
|
||||
async clickActionButton(version: string): Promise<void> {
|
||||
await BrowserActions.click(element(by.id(`adf-version-list-action-menu-button-${version}`)));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.css('.cdk-overlay-container .mat-menu-content')));
|
||||
}
|
||||
@@ -149,31 +149,31 @@ export class VersionManagePage {
|
||||
}
|
||||
|
||||
async closeDisabledActionsMenu(): Promise<void> {
|
||||
const container: ElementFinder = element(by.css('div.cdk-overlay-backdrop.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing'));
|
||||
const container = element(by.css('div.cdk-overlay-backdrop.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing'));
|
||||
await BrowserActions.closeDisabledMenu();
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(container);
|
||||
}
|
||||
|
||||
async downloadFileVersion(version): Promise<void> {
|
||||
async downloadFileVersion(version: string): Promise<void> {
|
||||
await this.clickActionButton(version);
|
||||
const downloadButton: ElementFinder = element(by.id(`adf-version-list-action-download-${version}`));
|
||||
const downloadButton = element(by.id(`adf-version-list-action-download-${version}`));
|
||||
await BrowserActions.click(downloadButton);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(downloadButton);
|
||||
}
|
||||
|
||||
async deleteFileVersion(version): Promise<void> {
|
||||
async deleteFileVersion(version: string): Promise<void> {
|
||||
await this.clickActionButton(version);
|
||||
const deleteButton: ElementFinder = element(by.id(`adf-version-list-action-delete-${version}`));
|
||||
const deleteButton = element(by.id(`adf-version-list-action-delete-${version}`));
|
||||
await BrowserActions.click(deleteButton);
|
||||
}
|
||||
|
||||
async restoreFileVersion(version): Promise<void> {
|
||||
async restoreFileVersion(version: string): Promise<void> {
|
||||
await this.clickActionButton(version);
|
||||
const restoreButton: ElementFinder = element(by.id(`adf-version-list-action-restore-${version}`));
|
||||
const restoreButton = element(by.id(`adf-version-list-action-restore-${version}`));
|
||||
await BrowserActions.click(restoreButton);
|
||||
}
|
||||
|
||||
async checkActionsArePresent(version): Promise<void> {
|
||||
async checkActionsArePresent(version: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.id(`adf-version-list-action-download-${version}`)));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.id(`adf-version-list-action-delete-${version}`)));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.id(`adf-version-list-action-restore-${version}`)));
|
||||
|
@@ -251,7 +251,7 @@ describe('Start Task - Custom App', () => {
|
||||
});
|
||||
|
||||
it('[C286406] Invalid values for items per page', async () => {
|
||||
await taskListSinglePage.typeItemsPerPage('0');
|
||||
await taskListSinglePage.typeItemsPerPage(0);
|
||||
await taskListSinglePage.clickAppId();
|
||||
await expect(await taskListSinglePage.getItemsPerPageFieldErrorMessage()).toEqual('Value must be greater than or equal to 1');
|
||||
});
|
||||
@@ -304,12 +304,12 @@ describe('Start Task - Custom App', () => {
|
||||
});
|
||||
|
||||
it('[C286405] Type invalid values to page field', async () => {
|
||||
await taskListSinglePage.typePage('0');
|
||||
await taskListSinglePage.typePage(0);
|
||||
await taskListSinglePage.clickAppId();
|
||||
await expect(await taskListSinglePage.getPageFieldErrorMessage()).toEqual('Value must be greater than or equal to 1');
|
||||
|
||||
await taskListSinglePage.clickResetButton();
|
||||
await taskListSinglePage.typePage('2');
|
||||
await taskListSinglePage.typePage(2);
|
||||
await taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { DataTableComponentPage, DatePickerCalendarPage, DateUtil, LocalStorageUtil, LoginSSOPage } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { browser, ElementFinder } from 'protractor';
|
||||
import { SearchDialogPage } from '../../pages/adf/dialog/search-dialog.page';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
||||
@@ -121,9 +121,9 @@ describe('Search Date Range Filter', () => {
|
||||
|
||||
await searchResults.sortByCreated('ASC');
|
||||
|
||||
const results: any = dataTable.geCellElementDetail('Created');
|
||||
const results = await dataTable.geCellElementDetail('Created') as ElementFinder[];
|
||||
for (const currentResult of results) {
|
||||
const currentDate = currentResult.getAttribute('title');
|
||||
const currentDate = await currentResult.getAttribute('title');
|
||||
const currentDateFormatted = DateUtil.parse(currentDate, 'MMM DD, YYYY, h:mm:ss a');
|
||||
|
||||
await expect(currentDateFormatted <= DateUtil.parse(toDate, 'DD-MM-YY')).toBe(true);
|
||||
|
@@ -29,7 +29,7 @@ import { SearchResultsPage } from '../../pages/adf/search-results.page';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { browser } from 'protractor';
|
||||
import { browser, ElementFinder } from 'protractor';
|
||||
import { SearchConfiguration } from '../search.config';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
|
||||
@@ -173,7 +173,7 @@ describe('Search Number Range Filter', () => {
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.sortBySize('DESC');
|
||||
|
||||
const results: any = dataTable.geCellElementDetail('Size');
|
||||
const results = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||
for (const currentResult of results) {
|
||||
try {
|
||||
const currentSize = await currentResult.getAttribute('title');
|
||||
@@ -202,7 +202,7 @@ describe('Search Number Range Filter', () => {
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
await searchResults.sortBySize('DESC');
|
||||
|
||||
const results: any = dataTable.geCellElementDetail('Size');
|
||||
const results = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||
for (const currentResult of results) {
|
||||
try {
|
||||
const currentSize = await currentResult.getAttribute('title');
|
||||
@@ -218,7 +218,7 @@ describe('Search Number Range Filter', () => {
|
||||
await nameFilter.searchByName('z*');
|
||||
await searchResults.sortBySize('DESC');
|
||||
|
||||
const resultsSize: any = dataTable.geCellElementDetail('Size');
|
||||
const resultsSize = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||
for (const currentResult of resultsSize) {
|
||||
try {
|
||||
const currentSize = await currentResult.getAttribute('title');
|
||||
@@ -229,7 +229,7 @@ describe('Search Number Range Filter', () => {
|
||||
}
|
||||
}
|
||||
|
||||
const resultsDisplay: any = dataTable.geCellElementDetail('Display name');
|
||||
const resultsDisplay = await dataTable.geCellElementDetail('Display name') as ElementFinder[];
|
||||
for (const currentResult of resultsDisplay) {
|
||||
try {
|
||||
const name = await currentResult.getAttribute('title');
|
||||
@@ -269,7 +269,7 @@ describe('Search Number Range Filter', () => {
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.sortBySize('DESC');
|
||||
|
||||
const results: any = dataTable.geCellElementDetail('Size');
|
||||
const results = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||
for (const currentResult of results) {
|
||||
try {
|
||||
const currentSize = await currentResult.getAttribute('title');
|
||||
@@ -311,7 +311,7 @@ describe('Search Number Range Filter', () => {
|
||||
await sizeRangeFilter.clickApplyButton();
|
||||
await searchResults.sortBySize('DESC');
|
||||
|
||||
const results: any = dataTable.geCellElementDetail('Size');
|
||||
const results = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||
for (const currentResult of results) {
|
||||
try {
|
||||
const currentSize = await currentResult.getAttribute('title');
|
||||
@@ -327,7 +327,7 @@ describe('Search Number Range Filter', () => {
|
||||
await expect(await sizeRangeFilter.getFromNumber()).toEqual('');
|
||||
await expect(await sizeRangeFilter.getToNumber()).toEqual('');
|
||||
|
||||
const resultsSize: any = dataTable.geCellElementDetail('Size');
|
||||
const resultsSize = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||
for (const currentResult of resultsSize) {
|
||||
try {
|
||||
const currentSize = await currentResult.getAttribute('title');
|
||||
@@ -415,7 +415,7 @@ describe('Search Number Range Filter', () => {
|
||||
await searchResults.tableIsLoaded();
|
||||
await searchResults.sortByCreated('DESC');
|
||||
|
||||
const results: any = dataTable.geCellElementDetail('Created');
|
||||
const results = await dataTable.geCellElementDetail('Created') as ElementFinder[];
|
||||
for (const currentResult of results) {
|
||||
const currentDate = await currentResult.getAttribute('title');
|
||||
const currentDateFormatted = DateUtil.parse(currentDate, 'MMM DD, YYYY, h:mm:ss a');
|
||||
|
@@ -28,7 +28,7 @@ import { SearchResultsPage } from '../../pages/adf/search-results.page';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { browser } from 'protractor';
|
||||
import { browser, ElementFinder } from 'protractor';
|
||||
import { SearchConfiguration } from '../search.config';
|
||||
import { UsersActions } from '../../actions/users.actions';
|
||||
|
||||
@@ -124,7 +124,7 @@ describe('Search Slider Filter', () => {
|
||||
await searchResults.sortBySize('DESC');
|
||||
await searchResults.tableIsLoaded();
|
||||
|
||||
const results: any = dataTable.geCellElementDetail('Size');
|
||||
const results = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||
for (const currentResult of results) {
|
||||
try {
|
||||
const currentSize = await currentResult.getAttribute('title');
|
||||
@@ -141,7 +141,7 @@ describe('Search Slider Filter', () => {
|
||||
await searchResults.sortBySize('DESC');
|
||||
await searchResults.tableIsLoaded();
|
||||
|
||||
const resultsSize: any = dataTable.geCellElementDetail('Size');
|
||||
const resultsSize = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||
for (const currentResult of resultsSize) {
|
||||
try {
|
||||
const currentSize = await currentResult.getAttribute('title');
|
||||
|
@@ -180,13 +180,13 @@ describe('Search Sorting Picker', () => {
|
||||
|
||||
it('[C277286] Should be able to sort the search results by "Created Date" ASC', async () => {
|
||||
await searchResults.sortByCreated('ASC');
|
||||
const results: any = searchResults.dataTable.geCellElementDetail('Created');
|
||||
const results = await searchResults.dataTable.geCellElementDetail('Created');
|
||||
await expect(contentServices.checkElementsDateSortedAsc(results)).toBe(true);
|
||||
});
|
||||
|
||||
it('[C277287] Should be able to sort the search results by "Created Date" DESC', async () => {
|
||||
await searchResults.sortByCreated('DESC');
|
||||
const results = searchResults.dataTable.geCellElementDetail('Created');
|
||||
const results = await searchResults.dataTable.geCellElementDetail('Created');
|
||||
await expect(contentServices.checkElementsDateSortedDesc(results)).toBe(true);
|
||||
});
|
||||
|
||||
|
@@ -15,24 +15,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { DocumentListPage } from '../pages/document-list.page';
|
||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
import { DropdownPage } from '../../core/pages/material/dropdown.page';
|
||||
import { DataTableComponentPage } from '../../core/pages/data-table-component.page';
|
||||
|
||||
export class ContentNodeSelectorDialogPage {
|
||||
dialog: ElementFinder = element(by.css(`adf-content-node-selector`));
|
||||
header: ElementFinder = this.dialog.element(by.css(`header[data-automation-id='content-node-selector-title']`));
|
||||
searchInputElement: ElementFinder = this.dialog.element(by.css(`input[data-automation-id='content-node-selector-search-input']`));
|
||||
searchLabel: ElementFinder = this.searchInputElement.element(by.xpath("ancestor::div[@class='mat-form-field-infix']/span/label"));
|
||||
selectedRow: ElementFinder = this.dialog.element(by.css(`adf-datatable-row[class*="adf-is-selected"]`));
|
||||
cancelButton: ElementFinder = element(by.css(`button[data-automation-id='content-node-selector-actions-cancel']`));
|
||||
moveCopyButton: ElementFinder = element(by.css(`button[data-automation-id='content-node-selector-actions-choose']`));
|
||||
dialog = element(by.css(`adf-content-node-selector`));
|
||||
header = this.dialog.element(by.css(`header[data-automation-id='content-node-selector-title']`));
|
||||
searchInputElement = this.dialog.element(by.css(`input[data-automation-id='content-node-selector-search-input']`));
|
||||
searchLabel = this.searchInputElement.element(by.xpath("ancestor::div[@class='mat-form-field-infix']/span/label"));
|
||||
selectedRow = this.dialog.element(by.css(`adf-datatable-row[class*="adf-is-selected"]`));
|
||||
cancelButton = element(by.css(`button[data-automation-id='content-node-selector-actions-cancel']`));
|
||||
moveCopyButton = element(by.css(`button[data-automation-id='content-node-selector-actions-choose']`));
|
||||
|
||||
contentList: DocumentListPage = new DocumentListPage(this.dialog);
|
||||
dataTable: DataTableComponentPage = this.contentList.dataTablePage();
|
||||
contentList = new DocumentListPage(this.dialog);
|
||||
dataTable = this.contentList.dataTablePage();
|
||||
siteListDropdown = new DropdownPage(this.dialog.element(by.css(`mat-select[data-automation-id='site-my-files-option']`)));
|
||||
|
||||
async checkDialogIsDisplayed(): Promise<void> {
|
||||
@@ -55,7 +54,7 @@ export class ContentNodeSelectorDialogPage {
|
||||
return BrowserActions.getText(this.searchLabel);
|
||||
}
|
||||
|
||||
async checkSelectedSiteIsDisplayed(siteName): Promise<void> {
|
||||
async checkSelectedSiteIsDisplayed(siteName: string): Promise<void> {
|
||||
await this.siteListDropdown.checkOptionIsSelected(siteName);
|
||||
}
|
||||
|
||||
@@ -100,11 +99,11 @@ export class ContentNodeSelectorDialogPage {
|
||||
await BrowserActions.clearSendKeys(this.searchInputElement, text);
|
||||
}
|
||||
|
||||
async clickContentNodeSelectorResult(name): Promise<void> {
|
||||
async clickContentNodeSelectorResult(name: string): Promise<void> {
|
||||
await this.dataTable.clickRowByContent(name);
|
||||
}
|
||||
|
||||
async doubleClickContentNodeSelectorResult(name): Promise<void> {
|
||||
async doubleClickContentNodeSelectorResult(name: string): Promise<void> {
|
||||
// First click to select from search mode and second click to actually open node
|
||||
await this.dataTable.doubleClickRowByContent(name);
|
||||
await this.dataTable.doubleClickRowByContent(name);
|
||||
|
@@ -15,11 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
|
||||
export class DownloadDialogPage {
|
||||
cancelButton: ElementFinder = element(by.id(`cancel-button`));
|
||||
cancelButton = element(by.id(`cancel-button`));
|
||||
|
||||
async clickCancelButton(): Promise<void> {
|
||||
await BrowserActions.click(this.cancelButton);
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder, browser, Locator } from 'protractor';
|
||||
import { by, element, ElementFinder, browser } from 'protractor';
|
||||
import { DataTableComponentPage } from '../../core/pages/data-table-component.page';
|
||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
@@ -23,11 +23,11 @@ import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
export class DocumentListPage {
|
||||
|
||||
rootElement: ElementFinder;
|
||||
optionButton: Locator = by.css('button[data-automation-id*="action_menu_"]');
|
||||
optionButton = by.css('button[data-automation-id*="action_menu_"]');
|
||||
tableBody: ElementFinder;
|
||||
dataTable: DataTableComponentPage;
|
||||
|
||||
constructor(rootElement: ElementFinder = element.all(by.css('adf-document-list')).first()) {
|
||||
constructor(rootElement = element.all(by.css('adf-document-list')).first()) {
|
||||
this.rootElement = rootElement;
|
||||
this.dataTable = new DataTableComponentPage(this.rootElement);
|
||||
this.tableBody = rootElement.all(by.css('div[class="adf-datatable-body"]')).first();
|
||||
@@ -67,7 +67,7 @@ export class DocumentListPage {
|
||||
|
||||
async clickOnActionMenu(content: string): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
const row: ElementFinder = this.dataTable.getRow('Display name', content);
|
||||
const row = this.dataTable.getRow('Display name', content);
|
||||
await BrowserActions.click(row.element(this.optionButton));
|
||||
await BrowserActions.waitUntilActionMenuIsVisible();
|
||||
await browser.sleep(500);
|
||||
|
@@ -22,8 +22,8 @@ import { BrowserVisibility } from '../../../core/utils/browser-visibility';
|
||||
export class SearchRadioPage {
|
||||
|
||||
filter: ElementFinder;
|
||||
showMoreButton: ElementFinder = element(by.css('adf-search-radio button[title="Show more"]'));
|
||||
showLessButton: ElementFinder = element(by.css('adf-search-radio button[title="Show less"]'));
|
||||
showMoreButton = element(by.css('adf-search-radio button[title="Show more"]'));
|
||||
showLessButton = element(by.css('adf-search-radio button[title="Show less"]'));
|
||||
|
||||
constructor(filter: ElementFinder) {
|
||||
this.filter = filter;
|
||||
|
@@ -15,15 +15,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||
|
||||
export class EditJsonDialog {
|
||||
|
||||
dialog: ElementFinder = element(by.css(`.adf-edit-json-dialog`));
|
||||
closeButton: ElementFinder = element(by.cssContainingText(`button span`, 'Close'));
|
||||
dialogContent: ElementFinder = this.dialog.element(by.css(`mat-dialog-content textarea`));
|
||||
dialog = element(by.css(`.adf-edit-json-dialog`));
|
||||
closeButton = element(by.cssContainingText(`button span`, 'Close'));
|
||||
dialogContent = this.dialog.element(by.css(`mat-dialog-content textarea`));
|
||||
|
||||
async checkDialogIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.dialog);
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||
import { DataTableComponentPage } from './data-table-component.page';
|
||||
|
||||
@@ -47,23 +47,23 @@ export class AboutPage {
|
||||
version: 'version'
|
||||
};
|
||||
|
||||
appTitle: ElementFinder = element(by.css('[data-automation-id="adf-github-app-title"]'));
|
||||
sourceCodeTitle: ElementFinder = element(by.css('[data-automation-id="adf-github-source-code-title"]'));
|
||||
githubUrl: ElementFinder = element(by.css('[data-automation-id="adf-github-url"]'));
|
||||
githubVersion: ElementFinder = element(by.css('[data-automation-id="adf-github-version"]'));
|
||||
bpmHost: ElementFinder = element(by.css('[data-automation-id="adf-process-service-host"]'));
|
||||
ecmHost: ElementFinder = element(by.css('[data-automation-id="adf-content-service-host"]'));
|
||||
productVersionTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-product-version-title"]'));
|
||||
bpmEdition: ElementFinder = element(by.css('[data-automation-id="adf-about-bpm-edition"]'));
|
||||
ecmEdition: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-edition"]'));
|
||||
bpmVersion: ElementFinder = element(by.css('[data-automation-id="adf-about-bpm-version"]'));
|
||||
ecmVersion: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-version"]'));
|
||||
ecmStatusTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-status-title"]'));
|
||||
ecmLicenseTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-license-title"]'));
|
||||
ecmModulesTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-modules-title"]'));
|
||||
aboutModulesTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-modules-title"]'));
|
||||
appTitle = element(by.css('[data-automation-id="adf-github-app-title"]'));
|
||||
sourceCodeTitle = element(by.css('[data-automation-id="adf-github-source-code-title"]'));
|
||||
githubUrl = element(by.css('[data-automation-id="adf-github-url"]'));
|
||||
githubVersion = element(by.css('[data-automation-id="adf-github-version"]'));
|
||||
bpmHost = element(by.css('[data-automation-id="adf-process-service-host"]'));
|
||||
ecmHost = element(by.css('[data-automation-id="adf-content-service-host"]'));
|
||||
productVersionTitle = element(by.css('[data-automation-id="adf-about-product-version-title"]'));
|
||||
bpmEdition = element(by.css('[data-automation-id="adf-about-bpm-edition"]'));
|
||||
ecmEdition = element(by.css('[data-automation-id="adf-about-ecm-edition"]'));
|
||||
bpmVersion = element(by.css('[data-automation-id="adf-about-bpm-version"]'));
|
||||
ecmVersion = element(by.css('[data-automation-id="adf-about-ecm-version"]'));
|
||||
ecmStatusTitle = element(by.css('[data-automation-id="adf-about-ecm-status-title"]'));
|
||||
ecmLicenseTitle = element(by.css('[data-automation-id="adf-about-ecm-license-title"]'));
|
||||
ecmModulesTitle = element(by.css('[data-automation-id="adf-about-ecm-modules-title"]'));
|
||||
aboutModulesTitle = element(by.css('[data-automation-id="adf-about-modules-title"]'));
|
||||
|
||||
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
||||
dataTable = new DataTableComponentPage();
|
||||
|
||||
getDataTable(): DataTableComponentPage {
|
||||
return this.dataTable;
|
||||
|
@@ -15,15 +15,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserActions } from '../utils/browser-actions';
|
||||
|
||||
export class BreadcrumbPage {
|
||||
|
||||
breadcrumb: ElementFinder = element(by.css(`adf-breadcrumb nav[data-automation-id='breadcrumb']`));
|
||||
currentItem: ElementFinder = element(by.css('.adf-breadcrumb-item-current'));
|
||||
breadcrumb = element(by.css(`adf-breadcrumb nav[data-automation-id='breadcrumb']`));
|
||||
currentItem = element(by.css('.adf-breadcrumb-item-current'));
|
||||
|
||||
async chooseBreadCrumb(breadCrumbItem): Promise<void> {
|
||||
async chooseBreadCrumb(breadCrumbItem: string): Promise<void> {
|
||||
const path = this.breadcrumb.element(by.css(`a[data-automation-id='breadcrumb_${breadCrumbItem}']`));
|
||||
await BrowserActions.click(path);
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ export class CardBooleanItemPage {
|
||||
}
|
||||
|
||||
async checkLabelIsPresent(): Promise<void> {
|
||||
const labelElement: ElementFinder = this.rootElement.element(this.labelLocator);
|
||||
const labelElement = this.rootElement.element(this.labelLocator);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(labelElement);
|
||||
}
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder, Locator } from 'protractor';
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { DateTimePickerPage } from '../material/date-time-picker.page';
|
||||
import { DatePickerPage } from '../material/date-picker.page';
|
||||
|
||||
@@ -25,10 +25,10 @@ export class CardDateItemPage {
|
||||
dateTimePickerPage: DateTimePickerPage;
|
||||
datePickerPage = new DatePickerPage();
|
||||
|
||||
labelLocator: Locator = by.css('div[data-automation-id*="card-date-label"]');
|
||||
valueLocator: Locator = by.css('span[data-automation-id*="card-date"]');
|
||||
dateTimePicker: ElementFinder = element.all(by.css('.mat-datetimepicker-toggle')).first();
|
||||
saveButton: Locator = by.css('button[data-automation-id*="card-dateitem-update"]');
|
||||
labelLocator = by.css('div[data-automation-id*="card-date-label"]');
|
||||
valueLocator = by.css('span[data-automation-id*="card-date"]');
|
||||
dateTimePicker = element.all(by.css('.mat-datetimepicker-toggle')).first();
|
||||
saveButton = by.css('button[data-automation-id*="card-dateitem-update"]');
|
||||
|
||||
constructor(label: string = 'minDate') {
|
||||
this.rootElement = element(by.xpath(`//div[contains(@data-automation-id, "label-${label}")]/ancestor::adf-card-view-dateitem`));
|
||||
|
@@ -31,7 +31,7 @@ export class CardSelectItemPage {
|
||||
}
|
||||
|
||||
async checkLabelIsPresent(): Promise<void> {
|
||||
const labelElement: ElementFinder = this.rootElement.element(this.labelLocator);
|
||||
const labelElement = this.rootElement.element(this.labelLocator);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(labelElement);
|
||||
}
|
||||
|
||||
|
@@ -15,19 +15,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder, Locator, Key } from 'protractor';
|
||||
import { element, by, ElementFinder, Key } from 'protractor';
|
||||
import { BrowserActions, BrowserVisibility } from '../../utils/public-api';
|
||||
export class CardTextItemPage {
|
||||
|
||||
rootElement: ElementFinder;
|
||||
textField: Locator = by.css('[data-automation-id*="card-textitem-value"]');
|
||||
saveButton: Locator = by.css('button[data-automation-id*="card-textitem-update"]');
|
||||
clearButton: Locator = by.css('button[data-automation-id*="card-textitem-reset"]');
|
||||
field: Locator = by.css('[data-automation-id*="card-textitem-value"]');
|
||||
labelLocator: Locator = by.css('div[data-automation-id*="card-textitem-label"]');
|
||||
errorMessage: Locator = by.css('.adf-textitem-editable-error');
|
||||
clickableElement: Locator = by.css('.adf-textitem-clickable');
|
||||
readOnlyField: Locator = by.css('.adf-property-read-only');
|
||||
textField = by.css('[data-automation-id*="card-textitem-value"]');
|
||||
saveButton = by.css('button[data-automation-id*="card-textitem-update"]');
|
||||
clearButton = by.css('button[data-automation-id*="card-textitem-reset"]');
|
||||
field = by.css('[data-automation-id*="card-textitem-value"]');
|
||||
labelLocator = by.css('div[data-automation-id*="card-textitem-label"]');
|
||||
errorMessage = by.css('.adf-textitem-editable-error');
|
||||
clickableElement = by.css('.adf-textitem-clickable');
|
||||
readOnlyField = by.css('.adf-property-read-only');
|
||||
|
||||
constructor(label: string = 'assignee') {
|
||||
this.rootElement = element(by.xpath(`//div[contains(@data-automation-id, "label-${label}")]/ancestor::adf-card-view-textitem`));
|
||||
@@ -39,7 +39,7 @@ export class CardTextItemPage {
|
||||
}
|
||||
|
||||
async checkLabelIsPresent(): Promise<void> {
|
||||
const labelElement: ElementFinder = this.rootElement.element(this.labelLocator);
|
||||
const labelElement = this.rootElement.element(this.labelLocator);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(labelElement);
|
||||
}
|
||||
|
||||
|
@@ -15,26 +15,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, browser, ElementFinder } from 'protractor';
|
||||
import { element, by, browser } from 'protractor';
|
||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||
import { BrowserActions } from '../utils/browser-actions';
|
||||
|
||||
export class ConfigEditorPage {
|
||||
|
||||
textField: ElementFinder = element(by.css('#adf-form-config-editor div.overflow-guard > textarea'));
|
||||
textField = element(by.css('#adf-form-config-editor div.overflow-guard > textarea'));
|
||||
|
||||
async enterConfiguration(text): Promise<void> {
|
||||
async enterConfiguration(text: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.textField, text);
|
||||
}
|
||||
|
||||
async clickSaveButton(): Promise<void> {
|
||||
const saveButton: ElementFinder = element(by.id('app-form-config-save'));
|
||||
const saveButton = element(by.id('app-form-config-save'));
|
||||
await BrowserActions.click(saveButton);
|
||||
}
|
||||
|
||||
async clickClearButton(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.textField);
|
||||
const clearButton: ElementFinder = element(by.id('app-form-config-clear'));
|
||||
const clearButton = element(by.id('app-form-config-clear'));
|
||||
await BrowserActions.click(clearButton);
|
||||
}
|
||||
|
||||
|
@@ -16,11 +16,11 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions } from '../utils/browser-actions';
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserVisibility } from '../public-api';
|
||||
|
||||
export class ContextMenuPage {
|
||||
contextMenu: ElementFinder = element(by.id('adf-context-menu-content'));
|
||||
contextMenu = element(by.id('adf-context-menu-content'));
|
||||
|
||||
async isContextMenuDisplayed(): Promise<boolean> {
|
||||
try {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, element, Locator, protractor, ElementFinder, ElementArrayFinder } from 'protractor';
|
||||
import { browser, by, element, protractor, ElementFinder, ElementArrayFinder } from 'protractor';
|
||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||
import { BrowserActions } from '../utils/browser-actions';
|
||||
|
||||
@@ -25,14 +25,14 @@ export class DataTableComponentPage {
|
||||
list: ElementArrayFinder;
|
||||
contents: ElementArrayFinder;
|
||||
tableBody: ElementFinder;
|
||||
rows: Locator = by.css(`adf-datatable div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row']`);
|
||||
rows = by.css(`adf-datatable div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row']`);
|
||||
allColumns: ElementArrayFinder;
|
||||
selectedRowNumber: ElementFinder;
|
||||
allSelectedRows: ElementArrayFinder;
|
||||
selectAll: ElementFinder;
|
||||
copyColumnTooltip: ElementFinder;
|
||||
|
||||
constructor(rootElement: ElementFinder = element.all(by.css('adf-datatable')).first()) {
|
||||
constructor(rootElement = element.all(by.css('adf-datatable')).first()) {
|
||||
this.rootElement = rootElement;
|
||||
this.list = this.rootElement.all(by.css(`div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row']`));
|
||||
this.contents = this.rootElement.all(by.css('div[class="adf-datatable-body"] span'));
|
||||
|
@@ -25,7 +25,7 @@ export class DataTableItem {
|
||||
rootElement: ElementFinder;
|
||||
rows: Locator = by.css(`div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row']`);
|
||||
|
||||
constructor(rootElement: ElementFinder = element.all(by.css('adf-datatable')).first()) {
|
||||
constructor(rootElement = element.all(by.css('adf-datatable')).first()) {
|
||||
this.rootElement = rootElement;
|
||||
}
|
||||
|
||||
|
@@ -16,14 +16,14 @@
|
||||
*/
|
||||
|
||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserActions } from '../utils/browser-actions';
|
||||
|
||||
export class ErrorPage {
|
||||
|
||||
errorPageCode: ElementFinder = element(by.css('adf-error-content .adf-error-content-code'));
|
||||
errorPageTitle: ElementFinder = element(by.css('adf-error-content .adf-error-content-title'));
|
||||
errorPageDescription: ElementFinder = element(by.css('adf-error-content .adf-error-content-description'));
|
||||
errorPageCode = element(by.css('adf-error-content .adf-error-content-code'));
|
||||
errorPageTitle = element(by.css('adf-error-content .adf-error-content-title'));
|
||||
errorPageDescription = element(by.css('adf-error-content .adf-error-content-description'));
|
||||
|
||||
async checkErrorCode(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.errorPageCode);
|
||||
|
@@ -15,24 +15,24 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, Locator, ElementFinder } from 'protractor';
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '../../utils/public-api';
|
||||
import { DropdownPage } from '../material/dropdown.page';
|
||||
|
||||
export class FormFields {
|
||||
|
||||
formContent: ElementFinder = element(by.css('adf-form-renderer'));
|
||||
refreshButton: ElementFinder = element(by.css('div[class*="form-reload-button"] mat-icon'));
|
||||
saveButton: ElementFinder = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));
|
||||
valueLocator: Locator = by.css('input');
|
||||
labelLocator: Locator = by.css('label');
|
||||
noFormMessage: ElementFinder = element(by.css('.adf-empty-content__title'));
|
||||
noFormTemplate: ElementFinder = element(by.css('adf-empty-content'));
|
||||
completedTaskNoFormMessage: ElementFinder = element(by.css('div[id*="completed-form-message"] p'));
|
||||
attachFormButton: ElementFinder = element(by.id('adf-attach-form-attach-button'));
|
||||
completeButton: ElementFinder = element(by.id('adf-form-complete'));
|
||||
cancelButton: ElementFinder = element(by.css('#adf-no-form-cancel-button'));
|
||||
errorMessage: Locator = by.css('.adf-error-text-container .adf-error-text');
|
||||
formContent = element(by.css('adf-form-renderer'));
|
||||
refreshButton = element(by.css('div[class*="form-reload-button"] mat-icon'));
|
||||
saveButton = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));
|
||||
valueLocator = by.css('input');
|
||||
labelLocator = by.css('label');
|
||||
noFormMessage = element(by.css('.adf-empty-content__title'));
|
||||
noFormTemplate = element(by.css('adf-empty-content'));
|
||||
completedTaskNoFormMessage = element(by.css('div[id*="completed-form-message"] p'));
|
||||
attachFormButton = element(by.id('adf-attach-form-attach-button'));
|
||||
completeButton = element(by.id('adf-form-complete'));
|
||||
cancelButton = element(by.css('#adf-no-form-cancel-button'));
|
||||
errorMessage = by.css('.adf-error-text-container .adf-error-text');
|
||||
|
||||
selectFormDropdown = new DropdownPage(element.all(by.css('adf-attach-form div[class*="mat-select-arrow"]')).first());
|
||||
|
||||
@@ -41,8 +41,8 @@ export class FormFields {
|
||||
await BrowserActions.clearSendKeys(fieldElement, value);
|
||||
}
|
||||
|
||||
async clickField(locator, field: string, fieldtext?: string): Promise<void> {
|
||||
const fieldElement = fieldtext ? element(locator(field, fieldtext)) : element(locator(field));
|
||||
async clickField(locator, field: string, fieldText?: string): Promise<void> {
|
||||
const fieldElement = fieldText ? element(locator(field, fieldText)) : element(locator(field));
|
||||
await BrowserActions.click(fieldElement);
|
||||
}
|
||||
|
||||
@@ -61,12 +61,12 @@ export class FormFields {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(hiddenElement, 6000);
|
||||
}
|
||||
|
||||
getWidget(fieldId): ElementFinder {
|
||||
getWidget(fieldId: string): ElementFinder {
|
||||
return element(by.css(`adf-form-field div[id='field-${fieldId}-container']`));
|
||||
}
|
||||
|
||||
async getFieldValue(fieldId: string, valueLocatorParam?: any): Promise<string> {
|
||||
const valueWidget: ElementFinder = await (await this.getWidget(fieldId)).element(valueLocatorParam || this.valueLocator);
|
||||
const valueWidget = await (await this.getWidget(fieldId)).element(valueLocatorParam || this.valueLocator);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(valueWidget);
|
||||
|
||||
return valueWidget.getAttribute('value');
|
||||
@@ -89,7 +89,7 @@ export class FormFields {
|
||||
}
|
||||
|
||||
async getFieldPlaceHolder(fieldId: string, locator = 'input'): Promise<string> {
|
||||
const placeHolderLocator: ElementFinder = element(by.css(`${locator}#${fieldId}`));
|
||||
const placeHolderLocator = element(by.css(`${locator}#${fieldId}`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(placeHolderLocator);
|
||||
return placeHolderLocator.getAttribute('placeholder');
|
||||
}
|
||||
@@ -146,7 +146,7 @@ export class FormFields {
|
||||
await BrowserActions.click(formNameElement);
|
||||
}
|
||||
|
||||
async checkWidgetIsReadOnlyMode(fieldId): Promise<ElementFinder> {
|
||||
async checkWidgetIsReadOnlyMode(fieldId: string): Promise<ElementFinder> {
|
||||
const widget = element(by.css(`adf-form-field div[id='field-${fieldId}-container']`));
|
||||
const widgetReadOnly = widget.element(by.css('div[class*="adf-readonly"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(widgetReadOnly);
|
||||
|
@@ -15,29 +15,29 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserVisibility } from '../../utils/browser-visibility';
|
||||
import { BrowserActions } from '../../utils/public-api';
|
||||
|
||||
export class FormPage {
|
||||
|
||||
errorLog: ElementFinder = element(by.css('div[class*="console"]'));
|
||||
saveButton: ElementFinder = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));
|
||||
errorLog = element(by.css('div[class*="console"]'));
|
||||
saveButton = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));
|
||||
|
||||
async checkErrorMessageForWidgetIsDisplayed(errorMessage): Promise<void> {
|
||||
async checkErrorMessageForWidgetIsDisplayed(errorMessage: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText('.adf-error-text', errorMessage)));
|
||||
}
|
||||
|
||||
async checkErrorMessageForWidgetIsNotDisplayed(errorMessage): Promise<void> {
|
||||
async checkErrorMessageForWidgetIsNotDisplayed(errorMessage: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.cssContainingText('.adf-error-text', errorMessage)));
|
||||
}
|
||||
|
||||
async checkErrorLogMessage(errorMessage): Promise<void> {
|
||||
async checkErrorLogMessage(errorMessage: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.errorLog);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText('div[class*="console"] p', errorMessage)));
|
||||
}
|
||||
|
||||
async checkErrorMessageIsNotDisplayed(errorMessage): Promise<void> {
|
||||
async checkErrorMessageIsNotDisplayed(errorMessage: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.errorLog);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.cssContainingText('div[class*="console"] p', errorMessage)));
|
||||
}
|
||||
|
@@ -18,20 +18,20 @@
|
||||
import { FormFields } from '../form-fields';
|
||||
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||
import * as remote from 'selenium-webdriver/remote';
|
||||
import { element, by, browser, ElementFinder } from 'protractor';
|
||||
import { element, by, browser } from 'protractor';
|
||||
|
||||
export class AttachFileWidgetPage {
|
||||
|
||||
formFields: FormFields = new FormFields();
|
||||
formFields = new FormFields();
|
||||
uploadLocator = by.css('button[id="attachfile"]');
|
||||
localStorageButton: ElementFinder = element(by.css('input[id="attachfile"]'));
|
||||
localStorageButton = element(by.css('input[id="attachfile"]'));
|
||||
filesListLocator = by.css('div[id="adf-attach-widget-readonly-list"]');
|
||||
attachFileWidget: ElementFinder = element(by.css('#attachfile'));
|
||||
attachedFileMenu: ElementFinder = element(by.css('mat-list-item button'));
|
||||
attachedFileOptions: ElementFinder = element(by.css('.mat-menu-panel .mat-menu-content'));
|
||||
viewFileOptionButton: ElementFinder = element(by.css(`.mat-menu-panel .mat-menu-content button[id$="show-file"]`));
|
||||
downloadFileOptionButton: ElementFinder = element(by.css(`.mat-menu-panel .mat-menu-content button[id$="download-file"]`));
|
||||
removeFileOptionButton: ElementFinder = element(by.css(`.mat-menu-panel .mat-menu-content button[id$="remove"]`));
|
||||
attachFileWidget = element(by.css('#attachfile'));
|
||||
attachedFileMenu = element(by.css('mat-list-item button'));
|
||||
attachedFileOptions = element(by.css('.mat-menu-panel .mat-menu-content'));
|
||||
viewFileOptionButton = element(by.css(`.mat-menu-panel .mat-menu-content button[id$="show-file"]`));
|
||||
downloadFileOptionButton = element(by.css(`.mat-menu-panel .mat-menu-content button[id$="download-file"]`));
|
||||
removeFileOptionButton = element(by.css(`.mat-menu-panel .mat-menu-content button[id$="remove"]`));
|
||||
|
||||
async attachFile(fieldId, fileLocation): Promise<void> {
|
||||
browser.setFileDetector(new remote.FileDetector());
|
||||
@@ -48,7 +48,7 @@ export class AttachFileWidgetPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(fileAttached);
|
||||
}
|
||||
|
||||
async viewFile(name): Promise<void> {
|
||||
async viewFile(name: string): Promise<void> {
|
||||
const fileView = element(this.filesListLocator).element(by.cssContainingText('mat-list-item span ', name));
|
||||
await BrowserActions.click(fileView);
|
||||
await browser.actions().doubleClick(fileView).perform();
|
||||
|
@@ -17,34 +17,34 @@
|
||||
|
||||
import { FormFields } from '../form-fields';
|
||||
import { BrowserActions, BrowserVisibility } from '../../../utils/public-api';
|
||||
import { by, element, Locator, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
|
||||
export class CheckboxWidgetPage {
|
||||
|
||||
formFields: FormFields = new FormFields();
|
||||
checkboxLabel: ElementFinder = element(by.css('span[class*="mat-checkbox-label"]'));
|
||||
checkboxLocator: Locator = by.css('mat-checkbox');
|
||||
formFields = new FormFields();
|
||||
checkboxLabel = element(by.css('span[class*="mat-checkbox-label"]'));
|
||||
checkboxLocator = by.css('mat-checkbox');
|
||||
|
||||
getCheckboxLabel(): Promise<string> {
|
||||
return BrowserActions.getText(this.checkboxLabel);
|
||||
}
|
||||
|
||||
async clickCheckboxInput(fieldId): Promise<void> {
|
||||
async clickCheckboxInput(fieldId: string): Promise<void> {
|
||||
const checkboxInput = element.all(by.css(`mat-checkbox[id="${fieldId}"] div`)).first();
|
||||
await BrowserActions.click(checkboxInput);
|
||||
}
|
||||
|
||||
async isCheckboxDisplayed(fieldId): Promise<void> {
|
||||
async isCheckboxDisplayed(fieldId: string): Promise<void> {
|
||||
await this.formFields.checkWidgetIsVisible(fieldId);
|
||||
}
|
||||
|
||||
async isCheckboxHidden(fieldId): Promise<void> {
|
||||
async isCheckboxHidden(fieldId: string): Promise<void> {
|
||||
await this.formFields.checkWidgetIsHidden(fieldId);
|
||||
}
|
||||
|
||||
async isCheckboxChecked(fieldId): Promise<boolean> {
|
||||
async isCheckboxChecked(fieldId: string): Promise<boolean> {
|
||||
let isChecked: boolean = false;
|
||||
const checkboxWidget: ElementFinder = await (await this.formFields.getWidget(fieldId)).element(this.checkboxLocator);
|
||||
const checkboxWidget = await (await this.formFields.getWidget(fieldId)).element(this.checkboxLocator);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(checkboxWidget);
|
||||
await checkboxWidget.getAttribute('class').then((attributeValue) => {
|
||||
isChecked = attributeValue.includes('mat-checkbox-checked');
|
||||
|
@@ -16,13 +16,13 @@
|
||||
*/
|
||||
|
||||
import { FormFields } from '../form-fields';
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||
|
||||
export class DateTimeWidgetPage {
|
||||
|
||||
formFields: FormFields = new FormFields();
|
||||
outsideLayer: ElementFinder = element(by.css('div[class*="cdk-overlay-container"]'));
|
||||
formFields = new FormFields();
|
||||
outsideLayer = element(by.css('div[class*="cdk-overlay-container"]'));
|
||||
|
||||
async checkWidgetIsVisible(fieldId): Promise<void> {
|
||||
await this.formFields.checkWidgetIsVisible(fieldId);
|
||||
@@ -46,34 +46,34 @@ export class DateTimeWidgetPage {
|
||||
await BrowserActions.click(this.outsideLayer);
|
||||
}
|
||||
|
||||
async getErrorMessage(fieldId): Promise<string> {
|
||||
async getErrorMessage(fieldId: string): Promise<string> {
|
||||
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] div[class="adf-error-text"]`));
|
||||
return BrowserActions.getText(errorMessage);
|
||||
}
|
||||
|
||||
async selectDay(day): Promise<void> {
|
||||
async selectDay(day: string): Promise<void> {
|
||||
const selectedDay = element(by.cssContainingText('div[class*="mat-datetimepicker-calendar-body-cell-content"]', day));
|
||||
await BrowserActions.click(selectedDay);
|
||||
}
|
||||
|
||||
async openDatepicker(fieldId): Promise<void> {
|
||||
async openDatepicker(fieldId: string): Promise<void> {
|
||||
await BrowserActions.click(element(by.id(fieldId)));
|
||||
}
|
||||
|
||||
async selectTime(time): Promise<void> {
|
||||
async selectTime(time: string): Promise<void> {
|
||||
const selectedTime = element.all(by.cssContainingText('div[class*="mat-datetimepicker-clock-cell"]', time)).first();
|
||||
await BrowserActions.click(selectedTime);
|
||||
}
|
||||
|
||||
async selectHour(hour): Promise<void> {
|
||||
async selectHour(hour: string): Promise<void> {
|
||||
return this.selectTime(hour);
|
||||
}
|
||||
|
||||
async selectMinute(minute): Promise<void> {
|
||||
async selectMinute(minute: string): Promise<void> {
|
||||
return this.selectTime(minute);
|
||||
}
|
||||
|
||||
async getPlaceholder(fieldId): Promise<string> {
|
||||
async getPlaceholder(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldPlaceHolder(fieldId);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ export class DateTimeWidgetPage {
|
||||
await BrowserActions.clearWithBackSpace(amountWidgetInput);
|
||||
}
|
||||
|
||||
async clearDateTimeInput(fieldId): Promise<void> {
|
||||
async clearDateTimeInput(fieldId: string): Promise<void> {
|
||||
const dateInput = element(by.id(fieldId));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(dateInput);
|
||||
await dateInput.clear();
|
||||
|
@@ -16,25 +16,25 @@
|
||||
*/
|
||||
|
||||
import { FormFields } from '../form-fields';
|
||||
import { by, element, ElementArrayFinder, ElementFinder, Locator, protractor } from 'protractor';
|
||||
import { by, element, protractor } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||
|
||||
export class DynamicTableWidgetPage {
|
||||
|
||||
formFields: FormFields = new FormFields();
|
||||
formFields = new FormFields();
|
||||
|
||||
labelLocator: Locator = by.css('dynamic-table-widget div div');
|
||||
columnNameLocator: Locator = by.css('table[id*="dynamic-table"] th');
|
||||
cancelButton: ElementFinder = element(by.cssContainingText('button span', 'Cancel'));
|
||||
editButton: ElementFinder = element(by.cssContainingText('button span', 'edit'));
|
||||
columnDateTime: ElementFinder = element(by.id('columnDateTime'));
|
||||
columnDate: ElementFinder = element(by.id('columnDate'));
|
||||
calendarHeader: ElementFinder = element(by.css('div[class="mat-datetimepicker-calendar-header-date-time"]'));
|
||||
calendarContent: ElementFinder = element(by.css('div[class="mat-datetimepicker-calendar-content"]'));
|
||||
saveButton: ElementFinder = element(by.cssContainingText('button span', 'Save'));
|
||||
errorMessage: ElementFinder = element(by.css('div[class="adf-error-text"]'));
|
||||
dateWidget: ElementFinder = element.all(by.css('mat-datepicker-toggle button')).first();
|
||||
tableRow: ElementArrayFinder = element.all(by.css('tbody tr'));
|
||||
labelLocator = by.css('dynamic-table-widget div div');
|
||||
columnNameLocator = by.css('table[id*="dynamic-table"] th');
|
||||
cancelButton = element(by.cssContainingText('button span', 'Cancel'));
|
||||
editButton = element(by.cssContainingText('button span', 'edit'));
|
||||
columnDateTime = element(by.id('columnDateTime'));
|
||||
columnDate = element(by.id('columnDate'));
|
||||
calendarHeader = element(by.css('div[class="mat-datetimepicker-calendar-header-date-time"]'));
|
||||
calendarContent = element(by.css('div[class="mat-datetimepicker-calendar-content"]'));
|
||||
saveButton = element(by.cssContainingText('button span', 'Save'));
|
||||
errorMessage = element(by.css('div[class="adf-error-text"]'));
|
||||
dateWidget = element.all(by.css('mat-datepicker-toggle button')).first();
|
||||
tableRow = element.all(by.css('tbody tr'));
|
||||
|
||||
getFieldLabel(fieldId): Promise<string> {
|
||||
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
|
||||
@@ -63,7 +63,7 @@ export class DynamicTableWidgetPage {
|
||||
}
|
||||
|
||||
async setDatatableInput(text, id = 'id'): Promise<void> {
|
||||
const dataTableInput: ElementFinder = element(by.id(id));
|
||||
const dataTableInput = element(by.id(id));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(dataTableInput);
|
||||
await BrowserActions.clearSendKeys(dataTableInput, text);
|
||||
}
|
||||
|
@@ -16,25 +16,25 @@
|
||||
*/
|
||||
|
||||
import { FormFields } from '../form-fields';
|
||||
import { by, element, ElementFinder, Locator } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||
|
||||
export class GroupWidgetPage {
|
||||
|
||||
groupField: ElementFinder = element(by.css('input[data-automation-id="adf-group-search-input"]'));
|
||||
firstResult: ElementFinder = element(by.id('adf-group-widget-user-0'));
|
||||
formFields: FormFields = new FormFields();
|
||||
groupDropDownList: Locator = by.css('.mat-autocomplete-panel');
|
||||
groupField = element(by.css('input[data-automation-id="adf-group-search-input"]'));
|
||||
firstResult = element(by.id('adf-group-widget-user-0'));
|
||||
formFields = new FormFields();
|
||||
groupDropDownList = by.css('.mat-autocomplete-panel');
|
||||
|
||||
getFieldLabel(fieldId): Promise<string> {
|
||||
getFieldLabel(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldLabel(fieldId);
|
||||
}
|
||||
|
||||
getFieldValue(fieldId): Promise<string> {
|
||||
getFieldValue(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldValue(fieldId);
|
||||
}
|
||||
|
||||
getFieldText(fieldId): Promise<string> {
|
||||
getFieldText(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldText(fieldId);
|
||||
}
|
||||
|
||||
|
@@ -16,31 +16,31 @@
|
||||
*/
|
||||
|
||||
import { FormFields } from '../form-fields';
|
||||
import { by, element, ElementFinder, Locator } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||
|
||||
export class PeopleWidgetPage {
|
||||
|
||||
peopleField: ElementFinder = element(by.css('input[data-automation-id="adf-people-search-input"]'));
|
||||
firstResult: ElementFinder = element(by.id('adf-people-widget-user-0'));
|
||||
formFields: FormFields = new FormFields();
|
||||
labelLocator: Locator = by.css('div[class*="display-text-widget"]');
|
||||
inputLocator: Locator = by.id('involvepeople');
|
||||
peopleDropDownList: Locator = by.css('div[class*="adf-people-widget-list"]');
|
||||
peopleField = element(by.css('input[data-automation-id="adf-people-search-input"]'));
|
||||
firstResult = element(by.id('adf-people-widget-user-0'));
|
||||
formFields = new FormFields();
|
||||
labelLocator = by.css('div[class*="display-text-widget"]');
|
||||
inputLocator = by.id('involvepeople');
|
||||
peopleDropDownList = by.css('div[class*="adf-people-widget-list"]');
|
||||
|
||||
getFieldLabel(fieldId): Promise<string> {
|
||||
getFieldLabel(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
|
||||
}
|
||||
|
||||
getFieldValue(fieldId): Promise<string> {
|
||||
getFieldValue(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldValue(fieldId, this.inputLocator);
|
||||
}
|
||||
|
||||
getFieldText(fieldId): Promise<string> {
|
||||
getFieldText(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldText(fieldId, this.labelLocator);
|
||||
}
|
||||
|
||||
insertUser(fieldId, value): Promise<void> {
|
||||
insertUser(fieldId: string, value: string): Promise<void> {
|
||||
return this.formFields.setValueInInputById(fieldId, value);
|
||||
}
|
||||
|
||||
@@ -48,12 +48,12 @@ export class PeopleWidgetPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(this.peopleDropDownList));
|
||||
}
|
||||
|
||||
async checkUserIsListed(userName): Promise<void> {
|
||||
async checkUserIsListed(userName: string): Promise<void> {
|
||||
const user = element(by.cssContainingText('.adf-people-label-name', userName));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(user);
|
||||
}
|
||||
|
||||
async selectUserFromDropDown(userName): Promise<void> {
|
||||
async selectUserFromDropDown(userName: string): Promise<void> {
|
||||
const user = element(by.cssContainingText('.adf-people-label-name', userName));
|
||||
await BrowserActions.click(user);
|
||||
}
|
||||
|
@@ -16,29 +16,29 @@
|
||||
*/
|
||||
|
||||
import { FormFields } from '../form-fields';
|
||||
import { by, element, ElementFinder, Locator } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||
|
||||
export class TypeaheadWidgetPage {
|
||||
|
||||
field: ElementFinder = element(by.css('input[data-automation-id="adf-typeahed-search-input"]'));
|
||||
firstResult: ElementFinder = element(by.id('adf-typeahed-widget-user-0'));
|
||||
formFields: FormFields = new FormFields();
|
||||
groupDropDownList: Locator = by.css('.mat-autocomplete-panel');
|
||||
field = element(by.css('input[data-automation-id="adf-typeahed-search-input"]'));
|
||||
firstResult = element(by.id('adf-typeahed-widget-user-0'));
|
||||
formFields = new FormFields();
|
||||
groupDropDownList = by.css('.mat-autocomplete-panel');
|
||||
|
||||
getFieldLabel(fieldId): Promise<string> {
|
||||
getFieldLabel(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldLabel(fieldId);
|
||||
}
|
||||
|
||||
getFieldValue(fieldId): Promise<string> {
|
||||
getFieldValue(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldValue(fieldId);
|
||||
}
|
||||
|
||||
getFieldText(fieldId): Promise<string> {
|
||||
getFieldText(fieldId: string): Promise<string> {
|
||||
return this.formFields.getFieldText(fieldId);
|
||||
}
|
||||
|
||||
insertValue(fieldId, value): Promise<void> {
|
||||
insertValue(fieldId: string, value: string): Promise<void> {
|
||||
return this.formFields.setValueInInputById(fieldId, value);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ export class TypeaheadWidgetPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(this.groupDropDownList));
|
||||
}
|
||||
|
||||
async checkOptionIsListed(option): Promise<void> {
|
||||
async checkOptionIsListed(option: string): Promise<void> {
|
||||
const optionElement = element(by.cssContainingText('[id="adf-typeahed-label-name"]', option));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(optionElement);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ export class TypeaheadWidgetPage {
|
||||
return element.all(option).map((elementFinder) => elementFinder.getText());
|
||||
}
|
||||
|
||||
async selectOptionFromDropDown(userName): Promise<void> {
|
||||
async selectOptionFromDropDown(userName: string): Promise<void> {
|
||||
const option = element(by.cssContainingText('[id="adf-typeahed-label-name"]', userName));
|
||||
await BrowserActions.click(option);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ export class TypeaheadWidgetPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.field);
|
||||
}
|
||||
|
||||
async fillTypeaheadField(value): Promise<void> {
|
||||
async fillTypeaheadField(value: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsClickable(this.field);
|
||||
await BrowserActions.clearSendKeys(this.field, value);
|
||||
}
|
||||
|
@@ -15,23 +15,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, protractor, browser, ElementFinder } from 'protractor';
|
||||
import { element, by, protractor, browser } from 'protractor';
|
||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||
import { BrowserActions } from '../utils/browser-actions';
|
||||
|
||||
export class HeaderPage {
|
||||
|
||||
checkBox: ElementFinder = element(by.cssContainingText('.mat-checkbox-label', 'Show menu button'));
|
||||
headerColor: ElementFinder = element(by.css('option[value="primary"]'));
|
||||
titleInput: ElementFinder = element(by.css('input[name="title"]'));
|
||||
iconInput: ElementFinder = element(by.css('input[placeholder="URL path"]'));
|
||||
hexColorInput: ElementFinder = element(by.css('input[placeholder="hex color code"]'));
|
||||
logoHyperlinkInput: ElementFinder = element(by.css('input[placeholder="Redirect URL"]'));
|
||||
logoTooltipInput: ElementFinder = element(by.css('input[placeholder="Tooltip text"]'));
|
||||
positionStart: ElementFinder = element.all(by.css('mat-radio-button[value="start"]')).first();
|
||||
positionEnd: ElementFinder = element.all(by.css('mat-radio-button[value="end"]')).first();
|
||||
sideBarPositionRight: ElementFinder = element(by.css('mat-sidenav.mat-drawer.mat-sidenav.mat-drawer-end'));
|
||||
sideBarPositionLeft: ElementFinder = element(by.css('mat-sidenav.mat-drawer.mat-sidenav'));
|
||||
checkBox = element(by.cssContainingText('.mat-checkbox-label', 'Show menu button'));
|
||||
headerColor = element(by.css('option[value="primary"]'));
|
||||
titleInput = element(by.css('input[name="title"]'));
|
||||
iconInput = element(by.css('input[placeholder="URL path"]'));
|
||||
hexColorInput = element(by.css('input[placeholder="hex color code"]'));
|
||||
logoHyperlinkInput = element(by.css('input[placeholder="Redirect URL"]'));
|
||||
logoTooltipInput = element(by.css('input[placeholder="Tooltip text"]'));
|
||||
positionStart = element.all(by.css('mat-radio-button[value="start"]')).first();
|
||||
positionEnd = element.all(by.css('mat-radio-button[value="end"]')).first();
|
||||
sideBarPositionRight = element(by.css('mat-sidenav.mat-drawer.mat-sidenav.mat-drawer-end'));
|
||||
sideBarPositionLeft = element(by.css('mat-sidenav.mat-drawer.mat-sidenav'));
|
||||
|
||||
async checkShowMenuCheckBoxIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.checkBox);
|
||||
@@ -54,28 +54,28 @@ export class HeaderPage {
|
||||
await BrowserActions.click(checkBox);
|
||||
}
|
||||
|
||||
async changeHeaderColor(color): Promise<void> {
|
||||
async changeHeaderColor(color: string): Promise<void> {
|
||||
const headerColor = element(by.css('option[value="' + color + '"]'));
|
||||
await BrowserActions.click(headerColor);
|
||||
}
|
||||
|
||||
async checkAppTitle(name): Promise<void> {
|
||||
async checkAppTitle(name: string): Promise<void> {
|
||||
const title = element(by.cssContainingText('.adf-app-title', name));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(title);
|
||||
}
|
||||
|
||||
async addTitle(title): Promise<void> {
|
||||
async addTitle(title: string): Promise<void> {
|
||||
await BrowserActions.click(this.titleInput);
|
||||
await BrowserActions.clearSendKeys(this.titleInput, title);
|
||||
await this.titleInput.sendKeys(protractor.Key.ENTER);
|
||||
}
|
||||
|
||||
async checkIconIsDisplayed(url): Promise<void> {
|
||||
async checkIconIsDisplayed(url: string): Promise<void> {
|
||||
const icon = element(by.css('img[src="' + url + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(icon);
|
||||
}
|
||||
|
||||
async addIcon(url): Promise<void> {
|
||||
async addIcon(url: string): Promise<void> {
|
||||
await BrowserActions.click(this.iconInput);
|
||||
await BrowserActions.clearSendKeys(this.iconInput, url);
|
||||
await this.iconInput.sendKeys(protractor.Key.ENTER);
|
||||
@@ -93,19 +93,19 @@ export class HeaderPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.logoTooltipInput);
|
||||
}
|
||||
|
||||
async addHexCodeColor(hexCode): Promise<void> {
|
||||
async addHexCodeColor(hexCode: string): Promise<void> {
|
||||
await BrowserActions.click(this.hexColorInput);
|
||||
await BrowserActions.clearSendKeys(this.hexColorInput, hexCode);
|
||||
await this.hexColorInput.sendKeys(protractor.Key.ENTER);
|
||||
}
|
||||
|
||||
async addLogoHyperlink(hyperlink): Promise<void> {
|
||||
async addLogoHyperlink(hyperlink: string): Promise<void> {
|
||||
await BrowserActions.click(this.logoHyperlinkInput);
|
||||
await BrowserActions.clearSendKeys(this.logoHyperlinkInput, hyperlink);
|
||||
await this.logoHyperlinkInput.sendKeys(protractor.Key.ENTER);
|
||||
}
|
||||
|
||||
async addLogoTooltip(tooltip): Promise<void> {
|
||||
async addLogoTooltip(tooltip: string): Promise<void> {
|
||||
await BrowserActions.click(this.logoTooltipInput);
|
||||
await BrowserActions.clearSendKeys(this.logoTooltipInput, tooltip);
|
||||
await this.logoTooltipInput.sendKeys(protractor.Key.ENTER);
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, browser, protractor, ElementFinder } from 'protractor';
|
||||
import { element, by, browser, protractor } from 'protractor';
|
||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||
import { BrowserActions } from '../utils/browser-actions';
|
||||
import { LocalStorageUtil } from '../utils/local-storage.util';
|
||||
@@ -29,9 +29,9 @@ export class LoginSSOPage {
|
||||
header = element(by.tagName('adf-layout-header'));
|
||||
loginError = element(by.css(`div[data-automation-id="login-error"]`));
|
||||
|
||||
txtUsernameBasicAuth: ElementFinder = element(by.css('input[id="username"]'));
|
||||
txtPasswordBasicAuth: ElementFinder = element(by.css('input[id="password"]'));
|
||||
signInButtonBasicAuth: ElementFinder = element(by.id('login-button'));
|
||||
txtUsernameBasicAuth = element(by.css('input[id="username"]'));
|
||||
txtPasswordBasicAuth = element(by.css('input[id="password"]'));
|
||||
signInButtonBasicAuth = element(by.id('login-button'));
|
||||
|
||||
async goToLoginPage(): Promise<void> {
|
||||
let currentUrl;
|
||||
@@ -95,11 +95,11 @@ export class LoginSSOPage {
|
||||
await BrowserActions.click(this.signInButtonBasicAuth);
|
||||
}
|
||||
|
||||
async enterUsernameBasicAuth(username): Promise<void> {
|
||||
async enterUsernameBasicAuth(username: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.txtUsernameBasicAuth, username);
|
||||
}
|
||||
|
||||
async enterPasswordBasicAuth(password): Promise<void> {
|
||||
async enterPasswordBasicAuth(password: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.txtPasswordBasicAuth, password);
|
||||
}
|
||||
|
||||
|
@@ -15,17 +15,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { DateUtil } from '../../utils/date-util';
|
||||
import { BrowserVisibility } from '../../utils/browser-visibility';
|
||||
import { BrowserActions } from '../../utils/browser-actions';
|
||||
|
||||
export class DatePickerCalendarPage {
|
||||
|
||||
datePicker: ElementFinder = element(by.css('mat-calendar'));
|
||||
nextMonthButton: ElementFinder = element(by.css('button[class*="mat-calendar-next-button"]'));
|
||||
previousMonthButton: ElementFinder = element(by.css('button[class*="mat-calendar-previous-button"]'));
|
||||
todayDate: ElementFinder = element(by.css('.mat-calendar-body-today'));
|
||||
datePicker = element(by.css('mat-calendar'));
|
||||
nextMonthButton = element(by.css('button[class*="mat-calendar-next-button"]'));
|
||||
previousMonthButton = element(by.css('button[class*="mat-calendar-previous-button"]'));
|
||||
todayDate = element(by.css('.mat-calendar-body-today'));
|
||||
|
||||
async getSelectedDate(): Promise<string> {
|
||||
return element(by.css('td[class*="mat-calendar-body-active"]')).getAttribute('aria-label');
|
||||
|
@@ -15,13 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserActions } from '../../utils/browser-actions';
|
||||
import { DatePickerCalendarPage } from './date-picker-calendar.page';
|
||||
|
||||
export class DatePickerPage {
|
||||
|
||||
datePicker: ElementFinder = element.all(by.css('.mat-datepicker-toggle')).first();
|
||||
datePicker = element.all(by.css('.mat-datepicker-toggle')).first();
|
||||
dateTime = new DatePickerCalendarPage();
|
||||
|
||||
async setTodayDateValue(): Promise<void> {
|
||||
|
@@ -15,21 +15,21 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder, Locator } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserVisibility } from '../../utils/browser-visibility';
|
||||
import { BrowserActions } from '../../utils/browser-actions';
|
||||
|
||||
export class DateTimePickerCalendarPage {
|
||||
|
||||
datePicker: ElementFinder = element(by.css(`.mat-datetimepicker-calendar`));
|
||||
today: ElementFinder = element(by.css(`.mat-datetimepicker-calendar-body-today`));
|
||||
timePicker: ElementFinder = element(by.css('.mat-datetimepicker-clock'));
|
||||
hourTime: ElementFinder = element.all(by.css('.mat-datetimepicker-clock-hours .mat-datetimepicker-clock-cell')).first();
|
||||
minutesTime: ElementFinder = element.all(by.css('.mat-datetimepicker-clock-minutes .mat-datetimepicker-clock-cell')).first();
|
||||
firstEnabledHourSelector: Locator = by.css('.mat-datetimepicker-clock-cell:not(.mat-datetimepicker-clock-cell-disabled)');
|
||||
firstEnabledMinutesSelector: Locator = by.css('.mat-datetimepicker-clock-cell:not(.mat-datetimepicker-clock-cell-disabled)');
|
||||
hoursPicker: ElementFinder = element(by.css('.mat-datetimepicker-clock-hours'));
|
||||
minutePicker: ElementFinder = element(by.css('.mat-datetimepicker-clock-minutes'));
|
||||
datePicker = element(by.css(`.mat-datetimepicker-calendar`));
|
||||
today = element(by.css(`.mat-datetimepicker-calendar-body-today`));
|
||||
timePicker = element(by.css('.mat-datetimepicker-clock'));
|
||||
hourTime = element.all(by.css('.mat-datetimepicker-clock-hours .mat-datetimepicker-clock-cell')).first();
|
||||
minutesTime = element.all(by.css('.mat-datetimepicker-clock-minutes .mat-datetimepicker-clock-cell')).first();
|
||||
firstEnabledHourSelector = by.css('.mat-datetimepicker-clock-cell:not(.mat-datetimepicker-clock-cell-disabled)');
|
||||
firstEnabledMinutesSelector = by.css('.mat-datetimepicker-clock-cell:not(.mat-datetimepicker-clock-cell-disabled)');
|
||||
hoursPicker = element(by.css('.mat-datetimepicker-clock-hours'));
|
||||
minutePicker = element(by.css('.mat-datetimepicker-clock-minutes'));
|
||||
|
||||
async waitTillDateDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.datePicker);
|
||||
|
@@ -22,7 +22,7 @@ import { DateTimePickerCalendarPage } from './date-time-picker-calendar.page';
|
||||
export class DateTimePickerPage {
|
||||
|
||||
rootElement: ElementFinder;
|
||||
dateTimePicker: ElementFinder = element(by.css('.mat-datetimepicker-toggle'));
|
||||
dateTimePicker = element(by.css('.mat-datetimepicker-toggle'));
|
||||
dateTime = new DateTimePickerCalendarPage();
|
||||
|
||||
constructor(rootElement?: ElementFinder) {
|
||||
|
@@ -23,7 +23,7 @@ export class DropdownPage {
|
||||
|
||||
dropDownElement: ElementFinder;
|
||||
|
||||
constructor(dropDownElement: ElementFinder = element.all(by.css('div[class="mat-select-arrow-wrapper"]')).first()) {
|
||||
constructor(dropDownElement = element.all(by.css('div[class="mat-select-arrow-wrapper"]')).first()) {
|
||||
this.dropDownElement = dropDownElement;
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ export class DropdownPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(selectedOption);
|
||||
}
|
||||
|
||||
async selectOptionFromIndex(index): Promise<void> {
|
||||
const value: ElementFinder = element.all(by.className('mat-option')).get(index);
|
||||
async selectOptionFromIndex(index: number): Promise<void> {
|
||||
const value = element.all(by.className('mat-option')).get(index);
|
||||
await BrowserActions.click(value);
|
||||
}
|
||||
|
||||
|
@@ -15,13 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { BrowserActions } from '../utils/browser-actions';
|
||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||
|
||||
export class NotificationHistoryPage {
|
||||
|
||||
notificationList: ElementFinder = element(by.css('#adf-notification-history-list'));
|
||||
notificationList = element(by.css('#adf-notification-history-list'));
|
||||
|
||||
async clickNotificationButton(): Promise<void> {
|
||||
await BrowserActions.clickExecuteScript('#adf-notification-history-open-button');
|
||||
|
@@ -15,28 +15,28 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, element, Locator, ElementFinder } from 'protractor';
|
||||
import { browser, by, element } from 'protractor';
|
||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||
import { BrowserActions } from '../utils/browser-actions';
|
||||
|
||||
export class PaginationPage {
|
||||
|
||||
pageSelectorDropDown: ElementFinder = element(by.css('div[class*="adf-pagination__page-selector"]'));
|
||||
pageSelectorArrow: ElementFinder = element(by.css('button[data-automation-id="page-selector"]'));
|
||||
itemsPerPage: ElementFinder = element(by.css('span[class="adf-pagination__max-items"]'));
|
||||
itemsPerPageOpenDropdown: ElementFinder = element(by.css('.adf-pagination__perpage-block button'));
|
||||
itemsPerPageOptions: Locator = by.css('.adf-pagination__page-selector .mat-menu-item');
|
||||
currentPage: ElementFinder = element(by.css('span[class="adf-pagination__current-page"]'));
|
||||
totalPages: ElementFinder = element(by.css('span[class="adf-pagination__total-pages"]'));
|
||||
paginationRange: ElementFinder = element(by.css('span[class="adf-pagination__range"]'));
|
||||
nextPageButton: ElementFinder = element(by.css('button[class*="adf-pagination__next-button"]'));
|
||||
nextButtonDisabled: ElementFinder = element(by.css('button[class*="adf-pagination__next-button"][disabled]'));
|
||||
previousButtonDisabled: ElementFinder = element(by.css('button[class*="adf-pagination__previous-button"][disabled]'));
|
||||
pageDropDown: ElementFinder = element(by.css('div[class*="adf-pagination__actualinfo-block"] button'));
|
||||
pageDropDownOptions: Locator = by.css('div[class*="mat-menu-content"] button');
|
||||
paginationSection: ElementFinder = element(by.css('adf-pagination'));
|
||||
paginationSectionEmpty: ElementFinder = element(by.css('adf-pagination[class*="adf-pagination__empty"]'));
|
||||
totalFiles: ElementFinder = element(by.css('span[class="adf-pagination__range"]'));
|
||||
pageSelectorDropDown = element(by.css('div[class*="adf-pagination__page-selector"]'));
|
||||
pageSelectorArrow = element(by.css('button[data-automation-id="page-selector"]'));
|
||||
itemsPerPage = element(by.css('span[class="adf-pagination__max-items"]'));
|
||||
itemsPerPageOpenDropdown = element(by.css('.adf-pagination__perpage-block button'));
|
||||
itemsPerPageOptions = by.css('.adf-pagination__page-selector .mat-menu-item');
|
||||
currentPage = element(by.css('span[class="adf-pagination__current-page"]'));
|
||||
totalPages = element(by.css('span[class="adf-pagination__total-pages"]'));
|
||||
paginationRange = element(by.css('span[class="adf-pagination__range"]'));
|
||||
nextPageButton = element(by.css('button[class*="adf-pagination__next-button"]'));
|
||||
nextButtonDisabled = element(by.css('button[class*="adf-pagination__next-button"][disabled]'));
|
||||
previousButtonDisabled = element(by.css('button[class*="adf-pagination__previous-button"][disabled]'));
|
||||
pageDropDown = element(by.css('div[class*="adf-pagination__actualinfo-block"] button'));
|
||||
pageDropDownOptions = by.css('div[class*="mat-menu-content"] button');
|
||||
paginationSection = element(by.css('adf-pagination'));
|
||||
paginationSectionEmpty = element(by.css('adf-pagination[class*="adf-pagination__empty"]'));
|
||||
totalFiles = element(by.css('span[class="adf-pagination__range"]'));
|
||||
|
||||
async selectItemsPerPage(numberOfItem: string): Promise<void> {
|
||||
await browser.executeScript(`document.querySelector('div[class*="adf-pagination__perpage-block"] button').click();`);
|
||||
|
@@ -15,29 +15,29 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, element, ElementFinder } from 'protractor';
|
||||
import { browser, by, element } from 'protractor';
|
||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||
import { BrowserActions } from '../utils/browser-actions';
|
||||
import { DropdownPage } from '../../core/pages/material/dropdown.page';
|
||||
|
||||
export class SettingsPage {
|
||||
|
||||
settingsURL: string = browser.baseUrl + '/settings';
|
||||
ecmText: ElementFinder = element(by.css('input[data-automation-id*="ecmHost"]'));
|
||||
bpmText: ElementFinder = element(by.css('input[data-automation-id*="bpmHost"]'));
|
||||
clientIdText: ElementFinder = element(by.css('input[id="clientId"]'));
|
||||
authHostText: ElementFinder = element(by.css('input[id="oauthHost"]'));
|
||||
logoutUrlText: ElementFinder = element(by.css('input[id="logout-url"]'));
|
||||
basicAuthRadioButton: ElementFinder = element(by.cssContainingText('mat-radio-button[id*="mat-radio"]', 'Basic Authentication'));
|
||||
identityHostText: ElementFinder = element(by.css('input[id="identityHost"]'));
|
||||
ssoRadioButton: ElementFinder = element(by.cssContainingText('[id*="mat-radio"]', 'SSO'));
|
||||
silentLoginToggleLabel: ElementFinder = element(by.css('mat-slide-toggle[name="silentLogin"] label'));
|
||||
silentLoginToggleElement: ElementFinder = element(by.css('mat-slide-toggle[name="silentLogin"]'));
|
||||
implicitFlowLabel: ElementFinder = element(by.css('mat-slide-toggle[name="implicitFlow"] label'));
|
||||
implicitFlowElement: ElementFinder = element(by.css('mat-slide-toggle[name="implicitFlow"]'));
|
||||
applyButton: ElementFinder = element(by.css('button[data-automation-id*="host-button"]'));
|
||||
backButton: ElementFinder = element(by.cssContainingText('button span[class="mat-button-wrapper"]', 'Back'));
|
||||
validationMessage: ElementFinder = element(by.cssContainingText('mat-error', 'This field is required'));
|
||||
settingsURL = browser.baseUrl + '/settings';
|
||||
ecmText = element(by.css('input[data-automation-id*="ecmHost"]'));
|
||||
bpmText = element(by.css('input[data-automation-id*="bpmHost"]'));
|
||||
clientIdText = element(by.css('input[id="clientId"]'));
|
||||
authHostText = element(by.css('input[id="oauthHost"]'));
|
||||
logoutUrlText = element(by.css('input[id="logout-url"]'));
|
||||
basicAuthRadioButton = element(by.cssContainingText('mat-radio-button[id*="mat-radio"]', 'Basic Authentication'));
|
||||
identityHostText = element(by.css('input[id="identityHost"]'));
|
||||
ssoRadioButton = element(by.cssContainingText('[id*="mat-radio"]', 'SSO'));
|
||||
silentLoginToggleLabel = element(by.css('mat-slide-toggle[name="silentLogin"] label'));
|
||||
silentLoginToggleElement = element(by.css('mat-slide-toggle[name="silentLogin"]'));
|
||||
implicitFlowLabel = element(by.css('mat-slide-toggle[name="implicitFlow"] label'));
|
||||
implicitFlowElement = element(by.css('mat-slide-toggle[name="implicitFlow"]'));
|
||||
applyButton = element(by.css('button[data-automation-id*="host-button"]'));
|
||||
backButton = element(by.cssContainingText('button span[class="mat-button-wrapper"]', 'Back'));
|
||||
validationMessage = element(by.cssContainingText('mat-error', 'This field is required'));
|
||||
|
||||
providerDropdown = new DropdownPage(element(by.css('mat-select[id="adf-provider-selector"]')));
|
||||
|
||||
|
@@ -15,14 +15,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||
import { BrowserActions } from '../utils/browser-actions';
|
||||
|
||||
export class SnackbarPage {
|
||||
|
||||
notificationSnackBar: ElementFinder = element.all(by.css('simple-snack-bar span')).first();
|
||||
snackBarAction: ElementFinder = element(by.css('simple-snack-bar button span'));
|
||||
notificationSnackBar = element.all(by.css('simple-snack-bar span')).first();
|
||||
snackBarAction = element(by.css('simple-snack-bar button span'));
|
||||
snackBarContainerCss = by.css('.mat-snack-bar-container');
|
||||
|
||||
async waitForSnackBarToAppear() {
|
||||
|
@@ -15,30 +15,30 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||
import { TabsPage } from '../../core/pages/material/tabs.page';
|
||||
import { BrowserActions } from '../utils/browser-actions';
|
||||
|
||||
export class UserInfoPage {
|
||||
|
||||
dialog: ElementFinder = element.all(by.css('mat-card[class*="adf-userinfo-card"]')).first();
|
||||
userImage: ElementFinder = element(by.css('div[id="user-initial-image"]'));
|
||||
userInfoEcmHeaderTitle: ElementFinder = element(by.css('div[id="ecm-username"]'));
|
||||
userInfoEcmTitle: ElementFinder = element(by.css('mat-card-content span[id="ecm-full-name"]'));
|
||||
ecmEmail: ElementFinder = element(by.css('span[id="ecm-email"]'));
|
||||
ecmJobTitle: ElementFinder = element(by.css('span[id="ecm-job-title"]'));
|
||||
userInfoProcessHeaderTitle: ElementFinder = element(by.css('div[id="bpm-username"]'));
|
||||
userInfoProcessTitle: ElementFinder = element(by.css('mat-card-content span[id="bpm-full-name"]'));
|
||||
processEmail: ElementFinder = element(by.css('span[id="bpm-email"]'));
|
||||
processTenant: ElementFinder = element(by.css('span[class="detail-profile"]'));
|
||||
apsImage: ElementFinder = element(by.css('img[id="bpm-user-detail-image"]'));
|
||||
acsImage: ElementFinder = element(by.css('img[id="ecm-user-detail-image"]'));
|
||||
initialImage: ElementFinder = element.all(by.css('div[id="user-initials-image"]')).first();
|
||||
userInfoSsoHeaderTitle: ElementFinder = this.dialog.element(by.css('div[id="identity-username"]'));
|
||||
userInfoSsoTitle: ElementFinder = element(by.css('.adf-userinfo__detail-title'));
|
||||
ssoEmail: ElementFinder = element(by.id('identity-email'));
|
||||
userProfileButton: ElementFinder = element(by.css('button[data-automation-id="adf-user-profile"]'));
|
||||
dialog = element.all(by.css('mat-card[class*="adf-userinfo-card"]')).first();
|
||||
userImage = element(by.css('div[id="user-initial-image"]'));
|
||||
userInfoEcmHeaderTitle = element(by.css('div[id="ecm-username"]'));
|
||||
userInfoEcmTitle = element(by.css('mat-card-content span[id="ecm-full-name"]'));
|
||||
ecmEmail = element(by.css('span[id="ecm-email"]'));
|
||||
ecmJobTitle = element(by.css('span[id="ecm-job-title"]'));
|
||||
userInfoProcessHeaderTitle = element(by.css('div[id="bpm-username"]'));
|
||||
userInfoProcessTitle = element(by.css('mat-card-content span[id="bpm-full-name"]'));
|
||||
processEmail = element(by.css('span[id="bpm-email"]'));
|
||||
processTenant = element(by.css('span[class="detail-profile"]'));
|
||||
apsImage = element(by.css('img[id="bpm-user-detail-image"]'));
|
||||
acsImage = element(by.css('img[id="ecm-user-detail-image"]'));
|
||||
initialImage = element.all(by.css('div[id="user-initials-image"]')).first();
|
||||
userInfoSsoHeaderTitle = this.dialog.element(by.css('div[id="identity-username"]'));
|
||||
userInfoSsoTitle = element(by.css('.adf-userinfo__detail-title'));
|
||||
ssoEmail = element(by.id('identity-email'));
|
||||
userProfileButton = element(by.css('button[data-automation-id="adf-user-profile"]'));
|
||||
tabsPage: TabsPage;
|
||||
|
||||
constructor() {
|
||||
|
@@ -19,95 +19,95 @@ import { BrowserActions } from '../utils/browser-actions';
|
||||
import { TabsPage } from './material/tabs.page';
|
||||
import { TogglePage } from './material/toggle.page';
|
||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||
import { element, by, ElementFinder, browser, protractor } from 'protractor';
|
||||
import { element, by, browser, protractor } from 'protractor';
|
||||
|
||||
export class ViewerPage {
|
||||
|
||||
tabsPage: TabsPage = new TabsPage();
|
||||
togglePage: TogglePage = new TogglePage();
|
||||
tabsPage = new TabsPage();
|
||||
togglePage = new TogglePage();
|
||||
|
||||
closeButton: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-back"]'));
|
||||
fileName: ElementFinder = element(by.id('adf-viewer-display-name'));
|
||||
infoButton: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-sidebar"]'));
|
||||
leftSideBarButton: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-left-sidebar"]'));
|
||||
previousPageButton: ElementFinder = element(by.id('viewer-previous-page-button'));
|
||||
nextPageButton: ElementFinder = element(by.id('viewer-next-page-button'));
|
||||
zoomInButton: ElementFinder = element(by.id('viewer-zoom-in-button'));
|
||||
zoomOutButton: ElementFinder = element(by.id('viewer-zoom-out-button'));
|
||||
scalePageButton: ElementFinder = element(by.id('viewer-scale-page-button'));
|
||||
fullScreenButton: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-fullscreen"]'));
|
||||
rotateLeft: ElementFinder = element(by.css('button[id="viewer-rotate-left-button"]'));
|
||||
rotateRight: ElementFinder = element(by.css('button[id="viewer-rotate-right-button"]'));
|
||||
scaleImg: ElementFinder = element(by.css('button[id="viewer-reset-button"]'));
|
||||
fileThumbnail: ElementFinder = element(by.css('img[data-automation-id="adf-file-thumbnail"]'));
|
||||
pageSelectorInput: ElementFinder = element(by.css('input[data-automation-id="adf-page-selector"]'));
|
||||
imgContainer: ElementFinder = element(by.css('div[data-automation-id="adf-image-container"]'));
|
||||
mediaContainer: ElementFinder = element(by.css('adf-media-player[class="adf-media-player ng-star-inserted"]'));
|
||||
percentage: ElementFinder = element(by.css('div[data-automation-id="adf-page-scale"'));
|
||||
thumbnailsBtn: ElementFinder = element(by.css('button[data-automation-id="adf-thumbnails-button"]'));
|
||||
thumbnailsContent: ElementFinder = element(by.css('div[data-automation-id="adf-thumbnails-content"]'));
|
||||
thumbnailsClose: ElementFinder = element(by.css('button[data-automation-id="adf-thumbnails-close"]'));
|
||||
secondThumbnail: ElementFinder = element(by.css('adf-pdf-thumb > img[title="Page 2"'));
|
||||
lastThumbnailDisplayed: ElementFinder = element.all(by.css('adf-pdf-thumb')).last();
|
||||
passwordDialog: ElementFinder = element(by.css('adf-pdf-viewer-password-dialog'));
|
||||
passwordSubmit: ElementFinder = element(by.css('button[data-automation-id="adf-password-dialog-submit"]'));
|
||||
passwordDialogClose: ElementFinder = element(by.css('button[data-automation-id="adf-password-dialog-close"]'));
|
||||
passwordSubmitDisabled: ElementFinder = element(by.css('button[data-automation-id="adf-password-dialog-submit"][disabled]'));
|
||||
passwordInput: ElementFinder = element(by.css('input[data-automation-id="adf-password-dialog-input"]'));
|
||||
passwordError: ElementFinder = element(by.css('mat-error[data-automation-id="adf-password-dialog-error"]'));
|
||||
infoSideBar: ElementFinder = element(by.id('adf-right-sidebar'));
|
||||
leftSideBar: ElementFinder = element(by.id('adf-left-sidebar'));
|
||||
viewer: ElementFinder = element(by.css('adf-viewer'));
|
||||
pdfViewer: ElementFinder = element(by.css('adf-pdf-viewer'));
|
||||
imgViewer: ElementFinder = element(by.css('adf-img-viewer'));
|
||||
activeTab: ElementFinder = element(by.css('div[class*="mat-tab-label-active"]'));
|
||||
toolbarSwitch: ElementFinder = element(by.id('adf-switch-toolbar'));
|
||||
toolbar: ElementFinder = element(by.id('adf-viewer-toolbar'));
|
||||
lastButton: ElementFinder = element.all(by.css('#adf-viewer-toolbar mat-toolbar > button[data-automation-id*="adf-toolbar-"]')).last();
|
||||
goBackSwitch: ElementFinder = element(by.id('adf-switch-goback'));
|
||||
canvasLayer: ElementFinder = element.all(by.css('div[class="canvasWrapper"] > canvas')).first();
|
||||
closeButton = element(by.css('button[data-automation-id="adf-toolbar-back"]'));
|
||||
fileName = element(by.id('adf-viewer-display-name'));
|
||||
infoButton = element(by.css('button[data-automation-id="adf-toolbar-sidebar"]'));
|
||||
leftSideBarButton = element(by.css('button[data-automation-id="adf-toolbar-left-sidebar"]'));
|
||||
previousPageButton = element(by.id('viewer-previous-page-button'));
|
||||
nextPageButton = element(by.id('viewer-next-page-button'));
|
||||
zoomInButton = element(by.id('viewer-zoom-in-button'));
|
||||
zoomOutButton = element(by.id('viewer-zoom-out-button'));
|
||||
scalePageButton = element(by.id('viewer-scale-page-button'));
|
||||
fullScreenButton = element(by.css('button[data-automation-id="adf-toolbar-fullscreen"]'));
|
||||
rotateLeft = element(by.css('button[id="viewer-rotate-left-button"]'));
|
||||
rotateRight = element(by.css('button[id="viewer-rotate-right-button"]'));
|
||||
scaleImg = element(by.css('button[id="viewer-reset-button"]'));
|
||||
fileThumbnail = element(by.css('img[data-automation-id="adf-file-thumbnail"]'));
|
||||
pageSelectorInput = element(by.css('input[data-automation-id="adf-page-selector"]'));
|
||||
imgContainer = element(by.css('div[data-automation-id="adf-image-container"]'));
|
||||
mediaContainer = element(by.css('adf-media-player[class="adf-media-player ng-star-inserted"]'));
|
||||
percentage = element(by.css('div[data-automation-id="adf-page-scale"'));
|
||||
thumbnailsBtn = element(by.css('button[data-automation-id="adf-thumbnails-button"]'));
|
||||
thumbnailsContent = element(by.css('div[data-automation-id="adf-thumbnails-content"]'));
|
||||
thumbnailsClose = element(by.css('button[data-automation-id="adf-thumbnails-close"]'));
|
||||
secondThumbnail = element(by.css('adf-pdf-thumb > img[title="Page 2"'));
|
||||
lastThumbnailDisplayed = element.all(by.css('adf-pdf-thumb')).last();
|
||||
passwordDialog = element(by.css('adf-pdf-viewer-password-dialog'));
|
||||
passwordSubmit = element(by.css('button[data-automation-id="adf-password-dialog-submit"]'));
|
||||
passwordDialogClose = element(by.css('button[data-automation-id="adf-password-dialog-close"]'));
|
||||
passwordSubmitDisabled = element(by.css('button[data-automation-id="adf-password-dialog-submit"][disabled]'));
|
||||
passwordInput = element(by.css('input[data-automation-id="adf-password-dialog-input"]'));
|
||||
passwordError = element(by.css('mat-error[data-automation-id="adf-password-dialog-error"]'));
|
||||
infoSideBar = element(by.id('adf-right-sidebar'));
|
||||
leftSideBar = element(by.id('adf-left-sidebar'));
|
||||
viewer = element(by.css('adf-viewer'));
|
||||
pdfViewer = element(by.css('adf-pdf-viewer'));
|
||||
imgViewer = element(by.css('adf-img-viewer'));
|
||||
activeTab = element(by.css('div[class*="mat-tab-label-active"]'));
|
||||
toolbarSwitch = element(by.id('adf-switch-toolbar'));
|
||||
toolbar = element(by.id('adf-viewer-toolbar'));
|
||||
lastButton = element.all(by.css('#adf-viewer-toolbar mat-toolbar > button[data-automation-id*="adf-toolbar-"]')).last();
|
||||
goBackSwitch = element(by.id('adf-switch-goback'));
|
||||
canvasLayer = element.all(by.css('div[class="canvasWrapper"] > canvas')).first();
|
||||
|
||||
openWithSwitch: ElementFinder = element(by.id('adf-switch-openwith'));
|
||||
openWith: ElementFinder = element(by.id('adf-viewer-openwith'));
|
||||
openWithSwitch = element(by.id('adf-switch-openwith'));
|
||||
openWith = element(by.id('adf-viewer-openwith'));
|
||||
|
||||
moreActionsMenuSwitch: ElementFinder = element(by.id('adf-switch-moreactionsmenu'));
|
||||
moreActionsMenu: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-more-actions"]'));
|
||||
moreActionsMenuSwitch = element(by.id('adf-switch-moreactionsmenu'));
|
||||
moreActionsMenu = element(by.css('button[data-automation-id="adf-toolbar-more-actions"]'));
|
||||
|
||||
customNameSwitch: ElementFinder = element(by.id('adf-switch-custoname'));
|
||||
customToolbarToggle: ElementFinder = element(by.id('adf-toggle-custom-toolbar'));
|
||||
customToolbar: ElementFinder = element(by.css('adf-viewer-toolbar[data-automation-id="adf-viewer-custom-toolbar"]'));
|
||||
customNameSwitch = element(by.id('adf-switch-custoname'));
|
||||
customToolbarToggle = element(by.id('adf-toggle-custom-toolbar'));
|
||||
customToolbar = element(by.css('adf-viewer-toolbar[data-automation-id="adf-viewer-custom-toolbar"]'));
|
||||
|
||||
showRightSidebarSwitch: ElementFinder = element(by.id('adf-switch-showrightsidebar'));
|
||||
showLeftSidebarSwitch: ElementFinder = element(by.id('adf-switch-showleftsidebar'));
|
||||
showRightSidebarSwitch = element(by.id('adf-switch-showrightsidebar'));
|
||||
showLeftSidebarSwitch = element(by.id('adf-switch-showleftsidebar'));
|
||||
|
||||
moreActionsSwitch: ElementFinder = element(by.id('adf-switch-moreactions'));
|
||||
pdfPageLoaded: ElementFinder = element(by.css('[data-page-number="1"][data-loaded="true"], adf-img-viewer, adf-txt-viewer'));
|
||||
moreActionsSwitch = element(by.id('adf-switch-moreactions'));
|
||||
pdfPageLoaded = element(by.css('[data-page-number="1"][data-loaded="true"], adf-img-viewer, adf-txt-viewer'));
|
||||
|
||||
downloadSwitch: ElementFinder = element(by.id('adf-switch-download'));
|
||||
downloadButton: ElementFinder = element(by.id('adf-viewer-download'));
|
||||
downloadSwitch = element(by.id('adf-switch-download'));
|
||||
downloadButton = element(by.id('adf-viewer-download'));
|
||||
|
||||
printSwitch: ElementFinder = element(by.id('adf-switch-print'));
|
||||
printButton: ElementFinder = element(by.id('adf-viewer-print'));
|
||||
printSwitch = element(by.id('adf-switch-print'));
|
||||
printButton = element(by.id('adf-viewer-print'));
|
||||
|
||||
allowSidebarSwitch: ElementFinder = element(by.id('adf-switch-allowsidebar'));
|
||||
allowLeftSidebarSwitch: ElementFinder = element(by.id('adf-switch-allowLeftSidebar'));
|
||||
allowSidebarSwitch = element(by.id('adf-switch-allowsidebar'));
|
||||
allowLeftSidebarSwitch = element(by.id('adf-switch-allowLeftSidebar'));
|
||||
|
||||
uploadButton: ElementFinder = element(by.id('adf-viewer-upload'));
|
||||
timeButton: ElementFinder = element(by.id('adf-viewer-time'));
|
||||
bugButton: ElementFinder = element(by.id('adf-viewer-bug'));
|
||||
uploadButton = element(by.id('adf-viewer-upload'));
|
||||
timeButton = element(by.id('adf-viewer-time'));
|
||||
bugButton = element(by.id('adf-viewer-bug'));
|
||||
|
||||
codeViewer: ElementFinder = element(by.id('adf-monaco-file-editor'));
|
||||
codeViewer = element(by.id('adf-monaco-file-editor'));
|
||||
|
||||
showTabWithIconSwitch: ElementFinder = element(by.id('adf-tab-with-icon'));
|
||||
showTabWithIconAndLabelSwitch: ElementFinder = element(by.id('adf-icon-and-label-tab'));
|
||||
unknownFormat: ElementFinder = element(by.css(`adf-viewer-unknown-format .adf-viewer__unknown-format-view`));
|
||||
showTabWithIconSwitch = element(by.id('adf-tab-with-icon'));
|
||||
showTabWithIconAndLabelSwitch = element(by.id('adf-icon-and-label-tab'));
|
||||
unknownFormat = element(by.css(`adf-viewer-unknown-format .adf-viewer__unknown-format-view`));
|
||||
|
||||
async checkCodeViewerIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.codeViewer);
|
||||
}
|
||||
|
||||
async viewFile(fileName): Promise<void> {
|
||||
const fileView: ElementFinder = element.all(by.css(`#document-list-container div[data-automation-id="${fileName}"]`)).first();
|
||||
const fileView = element.all(by.css(`#document-list-container div[data-automation-id="${fileName}"]`)).first();
|
||||
await BrowserActions.click(fileView);
|
||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||
}
|
||||
@@ -176,7 +176,7 @@ export class ViewerPage {
|
||||
}
|
||||
|
||||
async checkCurrentThumbnailIsSelected(): Promise<void> {
|
||||
const selectedThumbnail: ElementFinder = element(by.css('adf-pdf-thumb[class="adf-pdf-thumbnails__thumb ng-star-inserted adf-pdf-thumbnails__thumb--selected"] > img'));
|
||||
const selectedThumbnail = element(by.css('adf-pdf-thumb[class="adf-pdf-thumbnails__thumb ng-star-inserted adf-pdf-thumbnails__thumb--selected"] > img'));
|
||||
const pageNumber = await this.pageSelectorInput.getAttribute('value');
|
||||
|
||||
await expect('Page ' + pageNumber).toEqual(await selectedThumbnail.getAttribute('title'));
|
||||
@@ -274,9 +274,9 @@ export class ViewerPage {
|
||||
|
||||
async checkFileContent(pageNumber: string, text: string): Promise<void> {
|
||||
const allPages = this.canvasLayer;
|
||||
const pageLoaded: ElementFinder = element.all(by.css('div[data-page-number="' + pageNumber + '"][data-loaded="true"]')).first();
|
||||
const textLayerLoaded: ElementFinder = element.all(by.css('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]')).first();
|
||||
const specificText: ElementFinder = element.all(by.cssContainingText('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]', text)).first();
|
||||
const pageLoaded = element.all(by.css('div[data-page-number="' + pageNumber + '"][data-loaded="true"]')).first();
|
||||
const textLayerLoaded = element.all(by.css('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]')).first();
|
||||
const specificText = element.all(by.cssContainingText('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]', text)).first();
|
||||
|
||||
await BrowserVisibility.waitUntilElementIsVisible(allPages);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(pageLoaded);
|
||||
@@ -346,7 +346,7 @@ export class ViewerPage {
|
||||
}
|
||||
|
||||
async checkTabIsActive(tabName): Promise<void> {
|
||||
const tab: ElementFinder = element(by.cssContainingText('.adf-info-drawer-layout-content div.mat-tab-labels div.mat-tab-label-active .mat-tab-label-content', tabName));
|
||||
const tab = element(by.cssContainingText('.adf-info-drawer-layout-content div.mat-tab-labels div.mat-tab-label-active .mat-tab-label-content', tabName));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(tab);
|
||||
}
|
||||
|
||||
@@ -593,7 +593,7 @@ export class ViewerPage {
|
||||
}
|
||||
|
||||
async enterCustomName(text: string): Promise<void> {
|
||||
const textField: ElementFinder = element(by.css('input[data-automation-id="adf-text-custom-name"]'));
|
||||
const textField = element(by.css('input[data-automation-id="adf-text-custom-name"]'));
|
||||
// await BrowserVisibility.waitUntilElementIsVisible(textField);
|
||||
await BrowserActions.clearSendKeys(textField, text);
|
||||
}
|
||||
@@ -611,22 +611,22 @@ export class ViewerPage {
|
||||
}
|
||||
|
||||
async checkTabHasNoIcon(index: number): Promise<void> {
|
||||
const tab: ElementFinder = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] mat-icon`));
|
||||
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] mat-icon`));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(tab);
|
||||
}
|
||||
|
||||
async checkTabHasNoLabel(index: number): Promise<void> {
|
||||
const tab: ElementFinder = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] span`));
|
||||
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] span`));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(tab);
|
||||
}
|
||||
|
||||
async getTabLabelById(index: number): Promise<string> {
|
||||
const tab: ElementFinder = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] span`));
|
||||
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] span`));
|
||||
return BrowserActions.getText(tab);
|
||||
}
|
||||
|
||||
async getTabIconById(index: number): Promise<string> {
|
||||
const tab: ElementFinder = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] mat-icon`));
|
||||
const tab = element(by.css(`div[id="mat-tab-label-1-${index}"] div[class="mat-tab-label-content"] mat-icon`));
|
||||
return BrowserActions.getText(tab);
|
||||
}
|
||||
|
||||
|
@@ -15,23 +15,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { element, by, ElementArrayFinder, ElementFinder } from 'protractor';
|
||||
import { element, by } from 'protractor';
|
||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
|
||||
export class AppListCloudPage {
|
||||
|
||||
apsAppsContainer: ElementFinder = element(by.css('adf-cloud-app-list'));
|
||||
allApps: ElementArrayFinder = element.all(by.css('adf-cloud-app-details'));
|
||||
nameOfAllApps: ElementArrayFinder = element.all(by.css('adf-cloud-app-details div[class*="item-card-title"] h1'));
|
||||
firstApp: ElementFinder = element.all(by.css('adf-cloud-app-details div[class*="item-card-title"] h1')).first();
|
||||
apsAppsContainer = element(by.css('adf-cloud-app-list'));
|
||||
allApps = element.all(by.css('adf-cloud-app-details'));
|
||||
nameOfAllApps = element.all(by.css('adf-cloud-app-details div[class*="item-card-title"] h1'));
|
||||
firstApp = element.all(by.css('adf-cloud-app-details div[class*="item-card-title"] h1')).first();
|
||||
|
||||
async checkApsContainer(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.apsAppsContainer);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.firstApp);
|
||||
}
|
||||
|
||||
async goToApp(applicationName): Promise<void> {
|
||||
async goToApp(applicationName: string): Promise<void> {
|
||||
await BrowserActions.clickExecuteScript('mat-card[title="' + applicationName + '"]');
|
||||
}
|
||||
|
||||
@@ -43,12 +43,12 @@ export class AppListCloudPage {
|
||||
return BrowserActions.getArrayText(this.nameOfAllApps);
|
||||
}
|
||||
|
||||
async checkAppIsNotDisplayed(applicationName): Promise<void> {
|
||||
async checkAppIsNotDisplayed(applicationName: string): Promise<void> {
|
||||
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(app);
|
||||
}
|
||||
|
||||
async checkAppIsDisplayed(applicationName): Promise<void> {
|
||||
async checkAppIsDisplayed(applicationName: string): Promise<void> {
|
||||
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(app);
|
||||
}
|
||||
|
@@ -15,17 +15,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, element, ElementFinder, Locator } from 'protractor';
|
||||
import { browser, by, element } from 'protractor';
|
||||
import { BrowserVisibility } from '../../../core/utils/browser-visibility';
|
||||
import { BrowserActions } from '../../../core/utils/browser-actions';
|
||||
|
||||
export class EditProcessFilterDialogPage {
|
||||
|
||||
componentElement: ElementFinder = element(by.css('adf-cloud-process-filter-dialog-cloud'));
|
||||
title: ElementFinder = element(by.id('adf-process-filter-dialog-title'));
|
||||
filterNameInput: ElementFinder = element(by.id('adf-filter-name-id'));
|
||||
saveButtonLocator: Locator = by.id('adf-save-button-id');
|
||||
cancelButtonLocator: Locator = by.id('adf-cancel-button-id');
|
||||
componentElement = element(by.css('adf-cloud-process-filter-dialog-cloud'));
|
||||
title = element(by.id('adf-process-filter-dialog-title'));
|
||||
filterNameInput = element(by.id('adf-filter-name-id'));
|
||||
saveButtonLocator = by.id('adf-save-button-id');
|
||||
cancelButtonLocator = by.id('adf-cancel-button-id');
|
||||
|
||||
async clickOnSaveButton(): Promise<void> {
|
||||
const saveButton = this.componentElement.element(this.saveButtonLocator);
|
||||
|
@@ -15,17 +15,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, element, Locator, ElementFinder } from 'protractor';
|
||||
import { browser, by, element } from 'protractor';
|
||||
import { BrowserVisibility } from '../../../core/utils/browser-visibility';
|
||||
import { BrowserActions } from '../../../core/utils/browser-actions';
|
||||
|
||||
export class EditTaskFilterDialogPage {
|
||||
|
||||
componentElement: ElementFinder = element(by.css('adf-cloud-task-filter-dialog'));
|
||||
title: ElementFinder = element(by.id('adf-task-filter-dialog-title'));
|
||||
filterNameInput: ElementFinder = element(by.id('adf-filter-name-id'));
|
||||
saveButtonLocator: Locator = by.id('adf-save-button-id');
|
||||
cancelButtonLocator: Locator = by.id('adf-cancel-button-id');
|
||||
componentElement = element(by.css('adf-cloud-task-filter-dialog'));
|
||||
title = element(by.id('adf-task-filter-dialog-title'));
|
||||
filterNameInput = element(by.id('adf-filter-name-id'));
|
||||
saveButtonLocator = by.id('adf-save-button-id');
|
||||
cancelButtonLocator = by.id('adf-cancel-button-id');
|
||||
|
||||
async clickOnSaveButton(): Promise<void> {
|
||||
const saveButton = this.componentElement.element(this.saveButtonLocator);
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { browser, by, element, protractor, ElementFinder } from 'protractor';
|
||||
import { browser, by, element, protractor } from 'protractor';
|
||||
import { EditProcessFilterDialogPage } from './dialog/edit-process-filter-dialog.page';
|
||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
@@ -22,11 +22,11 @@ import { DropdownPage } from '../../core/pages/material/dropdown.page';
|
||||
|
||||
export class EditProcessFilterCloudComponentPage {
|
||||
|
||||
customiseFilter: ElementFinder = element(by.id('adf-edit-process-filter-title-id'));
|
||||
saveButton: ElementFinder = element(by.css('button[data-automation-id="adf-filter-action-save"]'));
|
||||
saveAsButton: ElementFinder = element(by.css('button[data-automation-id="adf-filter-action-saveAs"]'));
|
||||
deleteButton: ElementFinder = element(by.css('button[data-automation-id="adf-filter-action-delete"]'));
|
||||
filter: ElementFinder = element(by.css(`adf-cloud-edit-process-filter mat-expansion-panel-header`));
|
||||
customiseFilter = element(by.id('adf-edit-process-filter-title-id'));
|
||||
saveButton = element(by.css('button[data-automation-id="adf-filter-action-save"]'));
|
||||
saveAsButton = element(by.css('button[data-automation-id="adf-filter-action-saveAs"]'));
|
||||
deleteButton = element(by.css('button[data-automation-id="adf-filter-action-delete"]'));
|
||||
filter = element(by.css(`adf-cloud-edit-process-filter mat-expansion-panel-header`));
|
||||
|
||||
private locatorAppNameDropdown = element(by.css(`mat-select[data-automation-id='adf-cloud-edit-process-property-appName']`));
|
||||
private locatorStatusDropdown = element(by.css(`mat-select[data-automation-id='adf-cloud-edit-process-property-status']`));
|
||||
@@ -115,15 +115,15 @@ export class EditProcessFilterCloudComponentPage {
|
||||
return BrowserVisibility.waitUntilElementIsNotVisible(emptyList);
|
||||
}
|
||||
|
||||
async setProcessInstanceId(option): Promise<void> {
|
||||
async setProcessInstanceId(option: string): Promise<void> {
|
||||
await this.setProperty('processInstanceId', option);
|
||||
}
|
||||
|
||||
async setProcessDefinitionKey(option): Promise<void> {
|
||||
async setProcessDefinitionKey(option: string): Promise<void> {
|
||||
await this.setProperty('processDefinitionKey', option);
|
||||
}
|
||||
|
||||
async setProcessName(option): Promise<void> {
|
||||
async setProcessName(option: string): Promise<void> {
|
||||
await this.setProperty('processName', option);
|
||||
}
|
||||
|
||||
|
@@ -23,21 +23,21 @@ import { DropdownPage } from '../../core/pages/material/dropdown.page';
|
||||
|
||||
export class EditTaskFilterCloudComponentPage {
|
||||
|
||||
customiseFilter: ElementFinder = element(by.id('adf-edit-task-filter-title-id'));
|
||||
assignee: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-assignee"]'));
|
||||
priority: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-priority"]'));
|
||||
taskName: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-taskName"]'));
|
||||
id: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-taskId"]'));
|
||||
processDefinitionId: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processDefinitionId"]'));
|
||||
processInstanceId: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processInstanceId"]'));
|
||||
lastModifiedFrom: ElementFinder = element(by.css('input[placeholder="LastModifiedFrom"]'));
|
||||
lastModifiedTo: ElementFinder = element(by.css('input[placeholder="LastModifiedTo"]'));
|
||||
parentTaskId: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-parentTaskId"]'));
|
||||
owner: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-owner"]'));
|
||||
saveButton: ElementFinder = element(by.css('[data-automation-id="adf-filter-action-save"]'));
|
||||
saveAsButton: ElementFinder = element(by.css('[data-automation-id="adf-filter-action-saveAs"]'));
|
||||
deleteButton: ElementFinder = element(by.css('[data-automation-id="adf-filter-action-delete"]'));
|
||||
filter: ElementFinder = element(by.css(`adf-cloud-edit-task-filter mat-expansion-panel-header`));
|
||||
customiseFilter = element(by.id('adf-edit-task-filter-title-id'));
|
||||
assignee = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-assignee"]'));
|
||||
priority = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-priority"]'));
|
||||
taskName = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-taskName"]'));
|
||||
id = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-taskId"]'));
|
||||
processDefinitionId = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processDefinitionId"]'));
|
||||
processInstanceId = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processInstanceId"]'));
|
||||
lastModifiedFrom = element(by.css('input[placeholder="LastModifiedFrom"]'));
|
||||
lastModifiedTo = element(by.css('input[placeholder="LastModifiedTo"]'));
|
||||
parentTaskId = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-parentTaskId"]'));
|
||||
owner = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-owner"]'));
|
||||
saveButton = element(by.css('[data-automation-id="adf-filter-action-save"]'));
|
||||
saveAsButton = element(by.css('[data-automation-id="adf-filter-action-saveAs"]'));
|
||||
deleteButton = element(by.css('[data-automation-id="adf-filter-action-delete"]'));
|
||||
filter = element(by.css(`adf-cloud-edit-task-filter mat-expansion-panel-header`));
|
||||
|
||||
private locatorAppNameDropdown = element(by.css(`mat-select[data-automation-id='adf-cloud-edit-task-property-appName']`));
|
||||
private locatorStatusDropdown = element(by.css(`mat-select[data-automation-id='adf-cloud-edit-task-property-status']`));
|
||||
@@ -200,7 +200,7 @@ export class EditTaskFilterCloudComponentPage {
|
||||
return this.appNameDropdown.getSelectedOptionText();
|
||||
}
|
||||
|
||||
async setId(option): Promise<void> {
|
||||
async setId(option: string): Promise<void> {
|
||||
await this.setProperty('taskId', option);
|
||||
}
|
||||
|
||||
|
@@ -15,15 +15,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
import { ConfigEditorPage } from '../../core/pages/config-editor-page';
|
||||
|
||||
export class FormCloudComponentPage {
|
||||
|
||||
formCloudEditor: ElementFinder = element.all(by.css('.mat-tab-list .mat-tab-label')).get(1);
|
||||
formCloudRender: ElementFinder = element.all(by.css('.mat-tab-list .mat-tab-label')).get(0);
|
||||
formCloudEditor = element.all(by.css('.mat-tab-list .mat-tab-label')).get(1);
|
||||
formCloudRender = element.all(by.css('.mat-tab-list .mat-tab-label')).get(0);
|
||||
|
||||
configEditorPage = new ConfigEditorPage();
|
||||
|
||||
|
@@ -15,21 +15,21 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { by, element } from 'protractor';
|
||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
import { FormFields } from '../../core/pages/form/form-fields';
|
||||
|
||||
export class GroupCloudComponentPage {
|
||||
|
||||
groupCloudSearch: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-group-search-input"]'));
|
||||
formFields: FormFields = new FormFields();
|
||||
groupCloudSearch = element(by.css('input[data-automation-id="adf-cloud-group-search-input"]'));
|
||||
formFields = new FormFields();
|
||||
|
||||
async searchGroups(name: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.groupCloudSearch, name);
|
||||
}
|
||||
|
||||
async searchGroupsToExisting(name) {
|
||||
async searchGroupsToExisting(name: string) {
|
||||
await BrowserActions.clearSendKeys(this.groupCloudSearch, name);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ export class GroupCloudComponentPage {
|
||||
}
|
||||
}
|
||||
|
||||
async checkGroupActiveField(name): Promise <boolean> {
|
||||
async checkGroupActiveField(name: string): Promise <boolean> {
|
||||
const activeGroupField = element(by.css('group-cloud-widget .adf-readonly'));
|
||||
try {
|
||||
await BrowserActions.clearSendKeys(activeGroupField, name);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user