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.
|
* 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';
|
import { BrowserVisibility, BrowserActions, CardTextItemPage, DropdownPage, CardBooleanItemPage } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class CardViewComponentPage {
|
export class CardViewComponentPage {
|
||||||
|
|
||||||
addButton: ElementFinder = element(by.className('adf-card-view__key-value-pairs__add-btn'));
|
addButton = element(by.className('adf-card-view__key-value-pairs__add-btn'));
|
||||||
nameCardTextItem: CardTextItemPage = new CardTextItemPage('name');
|
nameCardTextItem = new CardTextItemPage('name');
|
||||||
booleanCardBooleanItem: CardBooleanItemPage = new CardBooleanItemPage('boolean');
|
booleanCardBooleanItem = new CardBooleanItemPage('boolean');
|
||||||
intField: ElementFinder = element(by.css(`input[data-automation-id='card-textitem-editinput-int']`));
|
intField = element(by.css(`input[data-automation-id='card-textitem-editinput-int']`));
|
||||||
floatField: ElementFinder = element(by.css(`input[data-automation-id='card-textitem-editinput-float']`));
|
floatField = element(by.css(`input[data-automation-id='card-textitem-editinput-float']`));
|
||||||
valueInputField: ElementFinder = element(by.xpath(`//*[contains(@id,'input') and @placeholder='Value']`));
|
valueInputField = element(by.xpath(`//*[contains(@id,'input') and @placeholder='Value']`));
|
||||||
nameInputField: ElementFinder = element(by.xpath(`//*[contains(@id,'input') and @placeholder='Name']`));
|
nameInputField = element(by.xpath(`//*[contains(@id,'input') and @placeholder='Name']`));
|
||||||
consoleLog: ElementFinder = element(by.className('app-console'));
|
consoleLog = element(by.className('app-console'));
|
||||||
deleteButton: ElementFinder = element.all(by.className('adf-card-view__key-value-pairs__remove-btn')).first();
|
deleteButton = element.all(by.className('adf-card-view__key-value-pairs__remove-btn')).first();
|
||||||
resetButton: ElementFinder = element(by.css(`#adf-reset-card-log`));
|
resetButton = element(by.css(`#adf-reset-card-log`));
|
||||||
editableSwitch: ElementFinder = element(by.id('app-toggle-editable'));
|
editableSwitch = element(by.id('app-toggle-editable'));
|
||||||
clearDateSwitch: ElementFinder = element(by.id('app-toggle-clear-date'));
|
clearDateSwitch = element(by.id('app-toggle-clear-date'));
|
||||||
noneOptionSwitch: ElementFinder = element(by.id('app-toggle-none-option'));
|
noneOptionSwitch = element(by.id('app-toggle-none-option'));
|
||||||
clickableField: ElementFinder = element(by.css(`[data-automation-id="card-textitem-toggle-click"]`));
|
clickableField = element(by.css(`[data-automation-id="card-textitem-toggle-click"]`));
|
||||||
|
|
||||||
selectDropdown = new DropdownPage(element(by.css('mat-select[data-automation-class="select-box"]')));
|
selectDropdown = new DropdownPage(element(by.css('mat-select[data-automation-class="select-box"]')));
|
||||||
|
|
||||||
@@ -66,18 +66,18 @@ export class CardViewComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async clickOnIntField(): Promise<void> {
|
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 BrowserActions.click(toggleText);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.intField);
|
await BrowserVisibility.waitUntilElementIsVisible(this.intField);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickOnIntClearIcon(): Promise<void> {
|
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);
|
await BrowserActions.click(clearIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickOnIntSaveIcon(): Promise<void> {
|
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);
|
await BrowserActions.click(saveIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,28 +86,28 @@ export class CardViewComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getIntFieldText(): Promise<string> {
|
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);
|
return BrowserActions.getText(textField);
|
||||||
}
|
}
|
||||||
|
|
||||||
getErrorInt(): Promise<string> {
|
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);
|
return BrowserActions.getText(errorElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickOnFloatField(): Promise<void> {
|
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 BrowserActions.click(toggleText);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.floatField);
|
await BrowserVisibility.waitUntilElementIsVisible(this.floatField);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickOnFloatClearIcon(): Promise<void> {
|
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);
|
await BrowserActions.click(clearIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickOnFloatSaveIcon(): Promise<void> {
|
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);
|
await BrowserActions.click(saveIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,12 +116,12 @@ export class CardViewComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getFloatFieldText(): Promise<string> {
|
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);
|
return BrowserActions.getText(textField);
|
||||||
}
|
}
|
||||||
|
|
||||||
getErrorFloat(): Promise<string> {
|
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);
|
return BrowserActions.getText(errorElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ export class CardViewComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async isErrorNotDisplayed(): Promise<boolean> {
|
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 {
|
try {
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(errorElement);
|
await BrowserVisibility.waitUntilElementIsNotVisible(errorElement);
|
||||||
return true;
|
return true;
|
||||||
|
@@ -16,18 +16,18 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserActions, BrowserVisibility, TabsPage } from '@alfresco/adf-testing';
|
import { BrowserActions, BrowserVisibility, TabsPage } from '@alfresco/adf-testing';
|
||||||
import { by, element, ElementArrayFinder, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
|
|
||||||
export class CommentsPage {
|
export class CommentsPage {
|
||||||
|
|
||||||
tabsPage: TabsPage = new TabsPage();
|
tabsPage = new TabsPage();
|
||||||
numberOfComments: ElementFinder = element(by.id('comment-header'));
|
numberOfComments = element(by.id('comment-header'));
|
||||||
commentUserIcon: ElementArrayFinder = element.all(by.id('comment-user-icon'));
|
commentUserIcon = element.all(by.id('comment-user-icon'));
|
||||||
commentUserName: ElementArrayFinder = element.all(by.id('comment-user'));
|
commentUserName = element.all(by.id('comment-user'));
|
||||||
commentMessage: ElementArrayFinder = element.all(by.id('comment-message'));
|
commentMessage = element.all(by.id('comment-message'));
|
||||||
commentTime: ElementArrayFinder = element.all(by.id('comment-time'));
|
commentTime = element.all(by.id('comment-time'));
|
||||||
commentInput: ElementFinder = element(by.id('comment-input'));
|
commentInput = element(by.id('comment-input'));
|
||||||
addCommentButton: ElementFinder = element(by.css("[data-automation-id='comments-input-add']"));
|
addCommentButton = element(by.css("[data-automation-id='comments-input-add']"));
|
||||||
|
|
||||||
async getTotalNumberOfComments(): Promise<string> {
|
async getTotalNumberOfComments(): Promise<string> {
|
||||||
return BrowserActions.getText(this.numberOfComments);
|
return BrowserActions.getText(this.numberOfComments);
|
||||||
@@ -37,16 +37,16 @@ export class CommentsPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.commentUserIcon.first());
|
await BrowserVisibility.waitUntilElementIsVisible(this.commentUserIcon.first());
|
||||||
}
|
}
|
||||||
|
|
||||||
getUserName(position): Promise<string> {
|
getUserName(position: number): Promise<string> {
|
||||||
return BrowserActions.getText(this.commentUserName.get(position));
|
return BrowserActions.getText(this.commentUserName.get(position));
|
||||||
}
|
}
|
||||||
|
|
||||||
getMessage(position): Promise<string> {
|
getMessage(position: number): Promise<string> {
|
||||||
return BrowserActions.getText(this.commentMessage.get(position));
|
return BrowserActions.getText(this.commentMessage.get(position));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getTime(position): Promise<string> {
|
getTime(position: number): Promise<string> {
|
||||||
return BrowserActions.getText(this.commentTime.get(position));
|
return BrowserActions.getText(this.commentTime.get(position));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ export class CommentsPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.commentInput);
|
await BrowserVisibility.waitUntilElementIsNotVisible(this.commentInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
async addComment(comment): Promise<void> {
|
async addComment(comment: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.commentInput, comment);
|
await BrowserActions.clearSendKeys(this.commentInput, comment);
|
||||||
await BrowserActions.click(this.addCommentButton);
|
await BrowserActions.click(this.addCommentButton);
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { DropActions, BrowserActions, BrowserVisibility, DateUtil, DocumentListPage, TogglePage, DropdownPage } from '@alfresco/adf-testing';
|
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 { CreateLibraryDialogPage } from './dialog/create-library-dialog.page';
|
||||||
import { FolderDialogPage } from './dialog/folder-dialog.page';
|
import { FolderDialogPage } from './dialog/folder-dialog.page';
|
||||||
import { NavigationBarPage } from './navigation-bar.page';
|
import { NavigationBarPage } from './navigation-bar.page';
|
||||||
@@ -33,60 +33,60 @@ export class ContentServicesPage {
|
|||||||
created: 'Created'
|
created: 'Created'
|
||||||
};
|
};
|
||||||
|
|
||||||
contentList: DocumentListPage = new DocumentListPage(element.all(by.css('adf-upload-drag-area adf-document-list')).first());
|
contentList = new DocumentListPage(element.all(by.css('adf-upload-drag-area adf-document-list')).first());
|
||||||
togglePage: TogglePage = new TogglePage();
|
togglePage = new TogglePage();
|
||||||
createFolderDialog: FolderDialogPage = new FolderDialogPage();
|
createFolderDialog = new FolderDialogPage();
|
||||||
createLibraryDialog: CreateLibraryDialogPage = new CreateLibraryDialogPage();
|
createLibraryDialog = new CreateLibraryDialogPage();
|
||||||
|
|
||||||
multipleFileUploadToggle: ElementFinder = element(by.id('adf-document-list-enable-drop-files'));
|
multipleFileUploadToggle = element(by.id('adf-document-list-enable-drop-files'));
|
||||||
uploadBorder: ElementFinder = element(by.id('document-list-container'));
|
uploadBorder = element(by.id('document-list-container'));
|
||||||
contentServices: ElementFinder = element(by.css('.app-sidenav-link[data-automation-id="Content Services"]'));
|
contentServices = element(by.css('.app-sidenav-link[data-automation-id="Content Services"]'));
|
||||||
currentFolder: ElementFinder = element(by.css('div[class*="adf-breadcrumb-item adf-active"] div'));
|
currentFolder = element(by.css('div[class*="adf-breadcrumb-item adf-active"] div'));
|
||||||
createFolderButton: ElementFinder = element(by.css('button[data-automation-id="create-new-folder"]'));
|
createFolderButton = element(by.css('button[data-automation-id="create-new-folder"]'));
|
||||||
editFolderButton: ElementFinder = element(by.css('button[data-automation-id="edit-folder"]'));
|
editFolderButton = element(by.css('button[data-automation-id="edit-folder"]'));
|
||||||
deleteNodesButton: ElementFinder = element(by.css('button[data-automation-id="delete-toolbar-button"]'));
|
deleteNodesButton = element(by.css('button[data-automation-id="delete-toolbar-button"]'));
|
||||||
createLibraryButton: ElementFinder = element(by.css('button[data-automation-id="create-new-library"]'));
|
createLibraryButton = element(by.css('button[data-automation-id="create-new-library"]'));
|
||||||
activeBreadcrumb: ElementFinder = element(by.css('div[class*="active"]'));
|
activeBreadcrumb = element(by.css('div[class*="active"]'));
|
||||||
tooltip = by.css('div[class*="--text adf-full-width"] span');
|
tooltip = by.css('div[class*="--text adf-full-width"] span');
|
||||||
uploadFileButton: ElementFinder = element(by.css('.adf-upload-button-file-container button'));
|
uploadFileButton = element(by.css('.adf-upload-button-file-container button'));
|
||||||
uploadFileButtonInput: ElementFinder = element(by.css('input[data-automation-id="upload-single-file"]'));
|
uploadFileButtonInput = element(by.css('input[data-automation-id="upload-single-file"]'));
|
||||||
uploadMultipleFileButton: ElementFinder = element(by.css('input[data-automation-id="upload-multiple-files"]'));
|
uploadMultipleFileButton = element(by.css('input[data-automation-id="upload-multiple-files"]'));
|
||||||
uploadFolderButton: ElementFinder = element(by.css('input[data-automation-id="uploadFolder"]'));
|
uploadFolderButton = element(by.css('input[data-automation-id="uploadFolder"]'));
|
||||||
errorSnackBar: ElementFinder = element(by.css('simple-snack-bar[class*="mat-simple-snackbar"]'));
|
errorSnackBar = element(by.css('simple-snack-bar[class*="mat-simple-snackbar"]'));
|
||||||
emptyPagination: ElementFinder = element(by.css('adf-pagination[class*="adf-pagination__empty"]'));
|
emptyPagination = element(by.css('adf-pagination[class*="adf-pagination__empty"]'));
|
||||||
dragAndDrop: ElementFinder = element.all(by.css('adf-upload-drag-area div')).first();
|
dragAndDrop = 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();
|
nameHeader = 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();
|
sizeHeader = 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();
|
createdByHeader = 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();
|
createdHeader = element.all(by.css('div[data-automation-id="auto_id_createdAt"] > span')).first();
|
||||||
recentFiles: ElementFinder = element(by.css('.app-container-recent'));
|
recentFiles = element(by.css('.app-container-recent'));
|
||||||
recentFilesExpanded: ElementFinder = element(by.css('.app-container-recent mat-expansion-panel-header.mat-expanded'));
|
recentFilesExpanded = element(by.css('.app-container-recent mat-expansion-panel-header.mat-expanded'));
|
||||||
recentFilesClosed: ElementFinder = element(by.css('.app-container-recent mat-expansion-panel-header'));
|
recentFilesClosed = element(by.css('.app-container-recent mat-expansion-panel-header'));
|
||||||
recentFileIcon: ElementFinder = element(by.css('.app-container-recent mat-expansion-panel-header mat-icon'));
|
recentFileIcon = element(by.css('.app-container-recent mat-expansion-panel-header mat-icon'));
|
||||||
emptyFolder: ElementFinder = element(by.css('.adf-empty-folder-this-space-is-empty'));
|
emptyFolder = element(by.css('.adf-empty-folder-this-space-is-empty'));
|
||||||
emptyFolderImage: ElementFinder = element(by.css('.adf-empty-folder-image'));
|
emptyFolderImage = element(by.css('.adf-empty-folder-image'));
|
||||||
emptyRecent: ElementFinder = element(by.css('.app-container-recent .app-empty-list__title'));
|
emptyRecent = element(by.css('.app-container-recent .app-empty-list__title'));
|
||||||
gridViewButton: ElementFinder = element(by.css('button[data-automation-id="document-list-grid-view"]'));
|
gridViewButton = 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'));
|
cardViewContainer = element(by.css('div.app-document-list-container div.adf-datatable-card'));
|
||||||
shareNodeButton: ElementFinder = element(by.cssContainingText('mat-icon', ' share '));
|
shareNodeButton = element(by.cssContainingText('mat-icon', ' share '));
|
||||||
nameColumnHeader = 'name';
|
nameColumnHeader = 'name';
|
||||||
createdByColumnHeader = 'createdByUser.displayName';
|
createdByColumnHeader = 'createdByUser.displayName';
|
||||||
createdColumnHeader = 'createdAt';
|
createdColumnHeader = 'createdAt';
|
||||||
deleteContentElement: ElementFinder = element(by.css('button[data-automation-id*="DELETE"]'));
|
deleteContentElement = element(by.css('button[data-automation-id*="DELETE"]'));
|
||||||
metadataAction: ElementFinder = element(by.css('button[data-automation-id*="METADATA"]'));
|
metadataAction = element(by.css('button[data-automation-id*="METADATA"]'));
|
||||||
versionManagerAction: ElementFinder = element(by.css('button[data-automation-id*="VERSIONS"]'));
|
versionManagerAction = element(by.css('button[data-automation-id*="VERSIONS"]'));
|
||||||
moveContentElement: ElementFinder = element(by.css('button[data-automation-id*="MOVE"]'));
|
moveContentElement = element(by.css('button[data-automation-id*="MOVE"]'));
|
||||||
copyContentElement: ElementFinder = element(by.css('button[data-automation-id*="COPY"]'));
|
copyContentElement = element(by.css('button[data-automation-id*="COPY"]'));
|
||||||
lockContentElement: ElementFinder = element(by.css('button[data-automation-id="DOCUMENT_LIST.ACTIONS.LOCK"]'));
|
lockContentElement = element(by.css('button[data-automation-id="DOCUMENT_LIST.ACTIONS.LOCK"]'));
|
||||||
downloadContent: ElementFinder = element(by.css('button[data-automation-id*="DOWNLOAD"]'));
|
downloadContent = element(by.css('button[data-automation-id*="DOWNLOAD"]'));
|
||||||
downloadButton: ElementFinder = element(by.css('button[title="Download"]'));
|
downloadButton = element(by.css('button[title="Download"]'));
|
||||||
favoriteButton: ElementFinder = element(by.css('button[data-automation-id="favorite"]'));
|
favoriteButton = element(by.css('button[data-automation-id="favorite"]'));
|
||||||
markedFavorite: ElementFinder = element(by.cssContainingText('button[data-automation-id="favorite"] mat-icon', 'star'));
|
markedFavorite = 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'));
|
notMarkedFavorite = 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) '));
|
multiSelectToggle = element(by.cssContainingText('span.mat-slide-toggle-content', ' Multiselect (with checkboxes) '));
|
||||||
selectAllCheckbox: ElementFinder = element.all(by.css('.adf-checkbox-sr-only')).first();
|
selectAllCheckbox = element.all(by.css('.adf-checkbox-sr-only')).first();
|
||||||
selectionModeDropdown: ElementFinder = element(by.css('.mat-select[aria-label="Selection Mode"]'));
|
selectionModeDropdown = element(by.css('.mat-select[aria-label="Selection Mode"]'));
|
||||||
selectedNodesList: ElementArrayFinder = element.all(by.css('.app-content-service-settings li'));
|
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']`)));
|
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"]')));
|
sortingDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="grid-view-sorting"]')));
|
||||||
@@ -96,12 +96,12 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkContextActionIsVisible(actionName) {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(actionButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async isContextActionEnabled(actionName): Promise<boolean> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(actionButton);
|
||||||
return actionButton.isEnabled();
|
return actionButton.isEnabled();
|
||||||
}
|
}
|
||||||
@@ -125,7 +125,7 @@ export class ContentServicesPage {
|
|||||||
async checkDeleteIsDisabled(content): Promise<void> {
|
async checkDeleteIsDisabled(content): Promise<void> {
|
||||||
await this.contentList.clickOnActionMenu(content);
|
await this.contentList.clickOnActionMenu(content);
|
||||||
await this.waitForContentOptions();
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(disabledDelete);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async clickHyperlinkNavigationToggle(): Promise<void> {
|
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);
|
await BrowserActions.click(hyperlinkToggle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -477,22 +477,22 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async enableInfiniteScrolling(): Promise<void> {
|
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);
|
await BrowserActions.click(infiniteScrollButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enableCustomPermissionMessage(): Promise<void> {
|
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);
|
await BrowserActions.click(customPermissionMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enableMediumTimeFormat(): Promise<void> {
|
async enableMediumTimeFormat(): Promise<void> {
|
||||||
const mediumTimeFormat: ElementFinder = element(by.css('#enableMediumTimeFormat'));
|
const mediumTimeFormat = element(by.css('#enableMediumTimeFormat'));
|
||||||
await BrowserActions.click(mediumTimeFormat);
|
await BrowserActions.click(mediumTimeFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enableThumbnails(): Promise<void> {
|
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);
|
await BrowserActions.click(thumbnailSlide);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -501,7 +501,7 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getDocumentListRowNumber(): Promise<number> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(documentList);
|
||||||
return $$('adf-upload-drag-area adf-document-list .adf-datatable-row').count();
|
return $$('adf-upload-drag-area adf-document-list .adf-datatable-row').count();
|
||||||
}
|
}
|
||||||
@@ -537,7 +537,7 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkLockIsDisplayedForElement(name): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(lockButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -546,7 +546,7 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getStyleValueForRowText(rowName, styleName): Promise<string> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(row);
|
||||||
return row.getCssValue(styleName);
|
return row.getCssValue(styleName);
|
||||||
}
|
}
|
||||||
@@ -566,7 +566,7 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getRowIconImageUrl(fileName): Promise<string> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(iconRow);
|
||||||
return iconRow.getAttribute('src');
|
return iconRow.getAttribute('src');
|
||||||
}
|
}
|
||||||
@@ -590,12 +590,12 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getDocumentCardIconForElement(elementName): Promise<string> {
|
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');
|
return elementIcon.getAttribute('src');
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkDocumentCardPropertyIsShowed(elementName, propertyName): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(elementProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -605,15 +605,15 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkMenuIsShowedForElementIndex(elementIndex): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(elementMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
async navigateToCardFolder(folderName): Promise<void> {
|
async navigateToCardFolder(folderName): Promise<void> {
|
||||||
await BrowserActions.closeMenuAndDialogs();
|
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);
|
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 BrowserVisibility.waitUntilElementIsVisible(folderSelected);
|
||||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||||
}
|
}
|
||||||
@@ -656,12 +656,12 @@ export class ContentServicesPage {
|
|||||||
await BrowserActions.click(this.selectAllCheckbox);
|
await BrowserActions.click(this.selectAllCheckbox);
|
||||||
}
|
}
|
||||||
|
|
||||||
getRowByName(rowName): ElementFinder {
|
getRowByName(rowName: string): ElementFinder {
|
||||||
return this.contentList.dataTable.getRow(this.columns.name, rowName);
|
return this.contentList.dataTable.getRow(this.columns.name, rowName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectFolder(folderName: string): Promise<void> {
|
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 BrowserVisibility.waitUntilElementIsVisible(folderSelected);
|
||||||
await BrowserActions.click(folderSelected);
|
await BrowserActions.click(folderSelected);
|
||||||
}
|
}
|
||||||
@@ -682,13 +682,13 @@ export class ContentServicesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async selectItemWithCheckbox(itemName: string): Promise<void> {
|
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 BrowserVisibility.waitUntilElementIsVisible(item);
|
||||||
await BrowserActions.clickScript(item);
|
await BrowserActions.clickScript(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
async unSelectItemWithCheckbox(itemName: string): Promise<void> {
|
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 BrowserVisibility.waitUntilElementIsVisible(item);
|
||||||
await BrowserActions.click(item);
|
await BrowserActions.click(item);
|
||||||
}
|
}
|
||||||
|
@@ -15,18 +15,18 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserActions, DropdownPage } from '@alfresco/adf-testing';
|
import { BrowserActions, DropdownPage } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class BreadCrumbDropdownPage {
|
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']`));
|
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"]`));
|
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());
|
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);
|
await this.breadCrumbDropdown.selectOption(pathName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,15 +15,15 @@
|
|||||||
* limitations under the License.
|
* 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';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class TreeViewPage {
|
export class TreeViewPage {
|
||||||
|
|
||||||
treeViewTitle: ElementFinder = element(by.cssContainingText('app-tree-view div', 'TREE VIEW TEST'));
|
treeViewTitle = element(by.cssContainingText('app-tree-view div', 'TREE VIEW TEST'));
|
||||||
nodeIdInput: ElementFinder = element(by.css('input[placeholder="Node Id"]'));
|
nodeIdInput = element(by.css('input[placeholder="Node Id"]'));
|
||||||
noNodeMessage: ElementFinder = element(by.id('adf-tree-view-missing-node'));
|
noNodeMessage = element(by.id('adf-tree-view-missing-node'));
|
||||||
nodesOnPage: ElementArrayFinder = element.all(by.css('mat-tree-node'));
|
nodesOnPage = element.all(by.css('mat-tree-node'));
|
||||||
|
|
||||||
async checkTreeViewTitleIsDisplayed(): Promise<void> {
|
async checkTreeViewTitleIsDisplayed(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.treeViewTitle);
|
await BrowserVisibility.waitUntilElementIsVisible(this.treeViewTitle);
|
||||||
@@ -34,28 +34,28 @@ export class TreeViewPage {
|
|||||||
return this.nodeIdInput.getAttribute('value');
|
return this.nodeIdInput.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickNode(nodeName): Promise<void> {
|
async clickNode(nodeName: string): Promise<void> {
|
||||||
const node: ElementFinder = element(by.css('mat-tree-node[id="' + nodeName + '-tree-child-node"] button'));
|
const node = element(by.css('mat-tree-node[id="' + nodeName + '-tree-child-node"] button'));
|
||||||
await BrowserActions.click(node);
|
await BrowserActions.click(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkNodeIsDisplayedAsClosed(nodeName): Promise<void> {
|
async checkNodeIsDisplayedAsClosed(nodeName: string): Promise<void> {
|
||||||
const node: ElementFinder = element(by.css('mat-tree-node[id="' + nodeName + '-tree-child-node"][aria-expanded="false"]'));
|
const node = element(by.css('mat-tree-node[id="' + nodeName + '-tree-child-node"][aria-expanded="false"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(node);
|
await BrowserVisibility.waitUntilElementIsVisible(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkNodeIsDisplayedAsOpen(nodeName): Promise<void> {
|
async checkNodeIsDisplayedAsOpen(nodeName: string): Promise<void> {
|
||||||
const node: ElementFinder = element(by.css('mat-tree-node[id="' + nodeName + '-tree-child-node"][aria-expanded="true"]'));
|
const node = element(by.css('mat-tree-node[id="' + nodeName + '-tree-child-node"][aria-expanded="true"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(node);
|
await BrowserVisibility.waitUntilElementIsVisible(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkClickedNodeName(nodeName): Promise<void> {
|
async checkClickedNodeName(nodeName: string): Promise<void> {
|
||||||
const clickedNode: ElementFinder = element(by.cssContainingText('span', ' CLICKED NODE: ' + nodeName + ''));
|
const clickedNode = element(by.cssContainingText('span', ' CLICKED NODE: ' + nodeName + ''));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(clickedNode);
|
await BrowserVisibility.waitUntilElementIsVisible(clickedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkNodeIsNotDisplayed(nodeName): Promise<void> {
|
async checkNodeIsNotDisplayed(nodeName: string): Promise<void> {
|
||||||
const node: ElementFinder = element(by.id('' + nodeName + '-tree-child-node'));
|
const node = element(by.id('' + nodeName + '-tree-child-node'));
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(node);
|
await BrowserVisibility.waitUntilElementIsNotVisible(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ export class TreeViewPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.noNodeMessage);
|
await BrowserVisibility.waitUntilElementIsVisible(this.noNodeMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
async addNodeId(nodeId): Promise<void> {
|
async addNodeId(nodeId: string): Promise<void> {
|
||||||
await BrowserActions.click(this.nodeIdInput);
|
await BrowserActions.click(this.nodeIdInput);
|
||||||
await BrowserActions.clearSendKeys(this.nodeIdInput, nodeId);
|
await BrowserActions.clearSendKeys(this.nodeIdInput, nodeId);
|
||||||
await this.nodeIdInput.sendKeys('a');
|
await this.nodeIdInput.sendKeys('a');
|
||||||
@@ -76,11 +76,11 @@ export class TreeViewPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkErrorMessageIsDisplayed(): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(clickedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getTotalNodes() {
|
async getTotalNodes(): Promise<number> {
|
||||||
return this.nodesOnPage.count();
|
return this.nodesOnPage.count();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,23 +15,22 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, protractor, ElementFinder } from 'protractor';
|
import { element, by, protractor } from 'protractor';
|
||||||
|
|
||||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class HeaderPage {
|
export class HeaderPage {
|
||||||
|
|
||||||
checkBox: ElementFinder = element(by.cssContainingText('.mat-checkbox-label', 'Show menu button'));
|
checkBox = element(by.cssContainingText('.mat-checkbox-label', 'Show menu button'));
|
||||||
headerColor: ElementFinder = element(by.css('option[value="primary"]'));
|
headerColor = element(by.css('option[value="primary"]'));
|
||||||
titleInput: ElementFinder = element(by.css('input[name="title"]'));
|
titleInput = element(by.css('input[name="title"]'));
|
||||||
iconInput: ElementFinder = element(by.css('input[placeholder="URL path"]'));
|
iconInput = element(by.css('input[placeholder="URL path"]'));
|
||||||
hexColorInput: ElementFinder = element(by.css('input[placeholder="hex color code"]'));
|
hexColorInput = element(by.css('input[placeholder="hex color code"]'));
|
||||||
logoHyperlinkInput: ElementFinder = element(by.css('input[placeholder="Redirect URL"]'));
|
logoHyperlinkInput = element(by.css('input[placeholder="Redirect URL"]'));
|
||||||
logoTooltipInput: ElementFinder = element(by.css('input[placeholder="Tooltip text"]'));
|
logoTooltipInput = element(by.css('input[placeholder="Tooltip text"]'));
|
||||||
positionStart: ElementFinder = element.all(by.css('mat-radio-button[value="start"]')).first();
|
positionStart = element.all(by.css('mat-radio-button[value="start"]')).first();
|
||||||
positionEnd: ElementFinder = element.all(by.css('mat-radio-button[value="end"]')).first();
|
positionEnd = element.all(by.css('mat-radio-button[value="end"]')).first();
|
||||||
sideBarPositionRight: ElementFinder = element(by.css('mat-sidenav.mat-drawer.mat-sidenav.mat-drawer-end'));
|
sideBarPositionRight = element(by.css('mat-sidenav.mat-drawer.mat-sidenav.mat-drawer-end'));
|
||||||
sideBarPositionLeft: ElementFinder = element(by.css('mat-sidenav.mat-drawer.mat-sidenav'));
|
sideBarPositionLeft = element(by.css('mat-sidenav.mat-drawer.mat-sidenav'));
|
||||||
|
|
||||||
async checkShowMenuCheckBoxIsDisplayed(): Promise<void> {
|
async checkShowMenuCheckBoxIsDisplayed(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.checkBox);
|
await BrowserVisibility.waitUntilElementIsVisible(this.checkBox);
|
||||||
@@ -50,32 +49,32 @@ export class HeaderPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async clickShowMenuButton(): Promise<void> {
|
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));
|
await BrowserActions.click(checkBox.get(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
async changeHeaderColor(color): Promise<void> {
|
async changeHeaderColor(color: string): Promise<void> {
|
||||||
const headerColor: ElementFinder = element(by.css('option[value="' + color + '"]'));
|
const headerColor = element(by.css('option[value="' + color + '"]'));
|
||||||
await BrowserActions.click(headerColor);
|
await BrowserActions.click(headerColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkAppTitle(name): Promise<void> {
|
async checkAppTitle(name: string): Promise<void> {
|
||||||
const title: ElementFinder = element(by.cssContainingText('.adf-app-title', name));
|
const title = element(by.cssContainingText('.adf-app-title', name));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(title);
|
await BrowserVisibility.waitUntilElementIsVisible(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
async addTitle(title): Promise<void> {
|
async addTitle(title: string): Promise<void> {
|
||||||
await BrowserActions.click(this.titleInput);
|
await BrowserActions.click(this.titleInput);
|
||||||
await BrowserActions.clearSendKeys(this.titleInput, title);
|
await BrowserActions.clearSendKeys(this.titleInput, title);
|
||||||
await this.titleInput.sendKeys(protractor.Key.ENTER);
|
await this.titleInput.sendKeys(protractor.Key.ENTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkIconIsDisplayed(url): Promise<void> {
|
async checkIconIsDisplayed(url: string): Promise<void> {
|
||||||
const icon: ElementFinder = element(by.css('img[src="' + url + '"]'));
|
const icon = element(by.css('img[src="' + url + '"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(icon);
|
await BrowserVisibility.waitUntilElementIsVisible(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
async addIcon(url): Promise<void> {
|
async addIcon(url: string): Promise<void> {
|
||||||
await BrowserActions.click(this.iconInput);
|
await BrowserActions.click(this.iconInput);
|
||||||
await BrowserActions.clearSendKeys(this.iconInput, url);
|
await BrowserActions.clearSendKeys(this.iconInput, url);
|
||||||
await this.iconInput.sendKeys(protractor.Key.ENTER);
|
await this.iconInput.sendKeys(protractor.Key.ENTER);
|
||||||
@@ -93,19 +92,19 @@ export class HeaderPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.logoTooltipInput);
|
await BrowserVisibility.waitUntilElementIsVisible(this.logoTooltipInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
async addHexCodeColor(hexCode): Promise<void> {
|
async addHexCodeColor(hexCode: string): Promise<void> {
|
||||||
await BrowserActions.click(this.hexColorInput);
|
await BrowserActions.click(this.hexColorInput);
|
||||||
await this.hexColorInput.sendKeys(hexCode);
|
await this.hexColorInput.sendKeys(hexCode);
|
||||||
await this.hexColorInput.sendKeys(protractor.Key.ENTER);
|
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.click(this.logoHyperlinkInput);
|
||||||
await this.logoHyperlinkInput.sendKeys(hyperlink);
|
await this.logoHyperlinkInput.sendKeys(hyperlink);
|
||||||
await this.logoHyperlinkInput.sendKeys(protractor.Key.ENTER);
|
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.click(this.logoTooltipInput);
|
||||||
await this.logoTooltipInput.sendKeys(tooltip);
|
await this.logoTooltipInput.sendKeys(tooltip);
|
||||||
await this.logoTooltipInput.sendKeys(protractor.Key.ENTER);
|
await this.logoTooltipInput.sendKeys(protractor.Key.ENTER);
|
||||||
|
@@ -23,7 +23,7 @@ export class InfinitePaginationPage {
|
|||||||
rootElement: ElementFinder;
|
rootElement: ElementFinder;
|
||||||
loadMoreButton;
|
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.rootElement = rootElement;
|
||||||
this.loadMoreButton = this.rootElement.element(by.css('button[data-automation-id="adf-infinite-pagination-button"]'));
|
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 { 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';
|
import { NavigationBarPage } from '../navigation-bar.page';
|
||||||
|
|
||||||
const source = {
|
const source = {
|
||||||
@@ -36,10 +36,10 @@ const column = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export class CustomSourcesPage {
|
export class CustomSourcesPage {
|
||||||
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
dataTable = new DataTableComponentPage();
|
||||||
navigationBarPage: NavigationBarPage = new NavigationBarPage();
|
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"]')));
|
selectModeDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="custom-sources-select"]')));
|
||||||
|
|
||||||
async waitForToolbarToBeVisible(): Promise<void> {
|
async waitForToolbarToBeVisible(): Promise<void> {
|
||||||
@@ -63,15 +63,15 @@ export class CustomSourcesPage {
|
|||||||
await this.selectModeDropdown.selectDropdownOption(source.sharedLinks);
|
await this.selectModeDropdown.selectDropdownOption(source.sharedLinks);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkRowIsDisplayed(rowName): Promise<void> {
|
checkRowIsDisplayed(rowName: string): Promise<void> {
|
||||||
return this.dataTable.checkContentIsDisplayed('Name', rowName);
|
return this.dataTable.checkContentIsDisplayed('Name', rowName);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkRowIsNotDisplayed(rowName): Promise<void> {
|
checkRowIsNotDisplayed(rowName: string): Promise<void> {
|
||||||
return this.dataTable.checkContentIsNotDisplayed('Name', rowName);
|
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);
|
const cell = this.dataTable.getCellByRowContentAndColumn('Name', rowName, column.status);
|
||||||
return BrowserActions.getText(cell);
|
return BrowserActions.getText(cell);
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage, DropdownPage } from '@alfresco/adf-testing';
|
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 {
|
export class DataTablePage {
|
||||||
|
|
||||||
@@ -33,17 +33,17 @@ export class DataTablePage {
|
|||||||
};
|
};
|
||||||
|
|
||||||
dataTable: DataTableComponentPage;
|
dataTable: DataTableComponentPage;
|
||||||
multiSelect: ElementFinder = element(by.css(`div[data-automation-id='multiselect'] label > div[class='mat-checkbox-inner-container']`));
|
multiSelect = 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')]/..`));
|
reset = element(by.xpath(`//span[contains(text(),'Reset to default')]/..`));
|
||||||
allSelectedRows: ElementArrayFinder = element.all(by.css(`adf-datatable-row[class*='is-selected']`));
|
allSelectedRows = 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_']`));
|
selectedRowNumber = element(by.css(`adf-datatable-row[class*='is-selected'] div[data-automation-id*='text_']`));
|
||||||
selectAll: ElementFinder = element(by.css(`div[class*='header'] label`));
|
selectAll = element(by.css(`div[class*='header'] label`));
|
||||||
addRowElement: ElementFinder = element(by.xpath(`//span[contains(text(),'Add row')]/..`));
|
addRowElement = element(by.xpath(`//span[contains(text(),'Add row')]/..`));
|
||||||
replaceRowsElement: ElementFinder = element(by.xpath(`//span[contains(text(),'Replace rows')]/..`));
|
replaceRowsElement = element(by.xpath(`//span[contains(text(),'Replace rows')]/..`));
|
||||||
replaceColumnsElement: ElementFinder = element(by.xpath(`//span[contains(text(),'Replace columns')]/..`));
|
replaceColumnsElement = element(by.xpath(`//span[contains(text(),'Replace columns')]/..`));
|
||||||
createdOnColumn: ElementFinder = element(by.css(`div[data-automation-id='auto_id_createdOn']`));
|
createdOnColumn = element(by.css(`div[data-automation-id='auto_id_createdOn']`));
|
||||||
idColumnHeader: ElementFinder = element(by.css(`div[data-automation-id='auto_id_id']`));
|
idColumnHeader = element(by.css(`div[data-automation-id='auto_id_id']`));
|
||||||
pasteClipboardInput: ElementFinder = element(by.css(`input[data-automation-id='paste clipboard input']`));
|
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']`)));
|
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> {
|
async insertFilter(filterText: string): Promise<void> {
|
||||||
const inputFilter: ElementFinder = element(by.css(`#adf-datatable-filter-input`));
|
const inputFilter = element(by.css(`#adf-datatable-filter-input`));
|
||||||
await BrowserActions.clearSendKeys(inputFilter, filterText);
|
await BrowserActions.clearSendKeys(inputFilter, filterText);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ export class DataTablePage {
|
|||||||
await BrowserActions.click(this.addRowElement);
|
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);
|
const rowID = this.dataTable.getCellElementByValue(this.columns.id, id);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(rowID);
|
await BrowserVisibility.waitUntilElementIsVisible(rowID);
|
||||||
await BrowserActions.click(this.replaceRowsElement);
|
await BrowserActions.click(this.replaceRowsElement);
|
||||||
@@ -128,7 +128,7 @@ export class DataTablePage {
|
|||||||
await browser.actions().sendKeys(protractor.Key.NULL).perform();
|
await browser.actions().sendKeys(protractor.Key.NULL).perform();
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectSelectionMode(selectionMode): Promise<void> {
|
async selectSelectionMode(selectionMode: string): Promise<void> {
|
||||||
await this.selectModeDropdown.selectDropdownOption(selectionMode);
|
await this.selectModeDropdown.selectDropdownOption(selectionMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,11 +174,11 @@ export class DataTablePage {
|
|||||||
await BrowserActions.click(this.dataTable.getCellByRowNumberAndColumnName(rowNumber - 1, this.columns.json));
|
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);
|
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);
|
await this.dataTable.clickColumn(this.columns.createdBy, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,41 +15,41 @@
|
|||||||
* limitations under the License.
|
* 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';
|
import { TogglePage, BrowserActions, BrowserVisibility, LoginSSOPage } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class LoginPage {
|
export class LoginPage {
|
||||||
|
|
||||||
loginURL: string = browser.baseUrl + '/login';
|
loginURL = browser.baseUrl + '/login';
|
||||||
|
|
||||||
loginSSOPage: LoginSSOPage = new LoginSSOPage();
|
loginSSOPage = new LoginSSOPage();
|
||||||
|
|
||||||
togglePage: TogglePage = new TogglePage();
|
togglePage = new TogglePage();
|
||||||
txtUsername: ElementFinder = element(by.css('input[id="username"]'));
|
txtUsername = element(by.css('input[id="username"]'));
|
||||||
txtPassword: ElementFinder = element(by.css('input[id="password"]'));
|
txtPassword = element(by.css('input[id="password"]'));
|
||||||
logoImg: ElementFinder = element(by.css('img[id="adf-login-img-logo"]'));
|
logoImg = element(by.css('img[id="adf-login-img-logo"]'));
|
||||||
successRouteTxt: ElementFinder = element(by.css('input[data-automation-id="adf-success-route"]'));
|
successRouteTxt = element(by.css('input[data-automation-id="adf-success-route"]'));
|
||||||
logoTxt: ElementFinder = element(by.css('input[data-automation-id="adf-url-logo"]'));
|
logoTxt = element(by.css('input[data-automation-id="adf-url-logo"]'));
|
||||||
usernameTooltip: ElementFinder = element(by.css('span[data-automation-id="username-error"]'));
|
usernameTooltip = element(by.css('span[data-automation-id="username-error"]'));
|
||||||
passwordTooltip: ElementFinder = element(by.css('span[data-automation-id="password-required"]'));
|
passwordTooltip = element(by.css('span[data-automation-id="password-required"]'));
|
||||||
loginTooltip: ElementFinder = element(by.css('span[class="adf-login-error-message"]'));
|
loginTooltip = element(by.css('span[class="adf-login-error-message"]'));
|
||||||
usernameInactive: ElementFinder = element(by.css('input[id="username"][aria-invalid="false"]'));
|
usernameInactive = element(by.css('input[id="username"][aria-invalid="false"]'));
|
||||||
passwordInactive: ElementFinder = element(by.css('input[id="password"][aria-invalid="false"]'));
|
passwordInactive = element(by.css('input[id="password"][aria-invalid="false"]'));
|
||||||
adfLogo: ElementFinder = element(by.css('img[class="adf-img-logo ng-star-inserted"]'));
|
adfLogo = element(by.css('img[class="adf-img-logo ng-star-inserted"]'));
|
||||||
usernameHighlighted: ElementFinder = element(by.css('input[id="username"][aria-invalid="true"]'));
|
usernameHighlighted = element(by.css('input[id="username"][aria-invalid="true"]'));
|
||||||
passwordHighlighted: ElementFinder = element(by.css('input[id="password"][aria-invalid="true"]'));
|
passwordHighlighted = element(by.css('input[id="password"][aria-invalid="true"]'));
|
||||||
signInButton: ElementFinder = element(by.id('login-button'));
|
signInButton = element(by.id('login-button'));
|
||||||
showPasswordElement: ElementFinder = element(by.css('button[data-automation-id="show_password"]'));
|
showPasswordElement = element(by.css('button[data-automation-id="show_password"]'));
|
||||||
hidePasswordElement: ElementFinder = element(by.css('button[data-automation-id="hide_password"]'));
|
hidePasswordElement = element(by.css('button[data-automation-id="hide_password"]'));
|
||||||
rememberMe: ElementFinder = element(by.css('mat-checkbox[id="adf-login-remember"]'));
|
rememberMe = element(by.css('mat-checkbox[id="adf-login-remember"]'));
|
||||||
needHelp: ElementFinder = element(by.css('div[id="adf-login-action-left"]'));
|
needHelp = element(by.css('div[id="adf-login-action-left"]'));
|
||||||
register: ElementFinder = element(by.css('div[id="adf-login-action-right"]'));
|
register = element(by.css('div[id="adf-login-action-right"]'));
|
||||||
footerSwitch: ElementFinder = element(by.id('switch4'));
|
footerSwitch = element(by.id('switch4'));
|
||||||
rememberMeSwitch: ElementFinder = element(by.id('adf-toggle-show-rememberme'));
|
rememberMeSwitch = element(by.id('adf-toggle-show-rememberme'));
|
||||||
successRouteSwitch: ElementFinder = element(by.id('adf-toggle-show-successRoute'));
|
successRouteSwitch = element(by.id('adf-toggle-show-successRoute'));
|
||||||
logoSwitch: ElementFinder = element(by.id('adf-toggle-logo'));
|
logoSwitch = element(by.id('adf-toggle-logo'));
|
||||||
header: ElementFinder = element(by.id('adf-header'));
|
header = element(by.id('adf-header'));
|
||||||
settingsIcon: ElementFinder = element(by.cssContainingText('a[data-automation-id="settings"] mat-icon', 'settings'));
|
settingsIcon = element(by.cssContainingText('a[data-automation-id="settings"] mat-icon', 'settings'));
|
||||||
sidenavLayout = element(by.css(`[data-automation-id="sidenav-layout"]`));
|
sidenavLayout = element(by.css(`[data-automation-id="sidenav-layout"]`));
|
||||||
|
|
||||||
async goToLoginPage(): Promise<void> {
|
async goToLoginPage(): Promise<void> {
|
||||||
@@ -62,11 +62,11 @@ export class LoginPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.txtPassword);
|
await BrowserVisibility.waitUntilElementIsVisible(this.txtPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterUsername(username): Promise<void> {
|
async enterUsername(username: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.txtUsername, username);
|
await BrowserActions.clearSendKeys(this.txtUsername, username);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterPassword(password): Promise<void> {
|
async enterPassword(password: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.txtPassword, password);
|
await BrowserActions.clearSendKeys(this.txtPassword, password);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,11 +195,11 @@ export class LoginPage {
|
|||||||
await this.togglePage.enableToggle(this.logoSwitch);
|
await this.togglePage.enableToggle(this.logoSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterSuccessRoute(route): Promise<void> {
|
async enterSuccessRoute(route: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.successRouteTxt, route);
|
await BrowserActions.clearSendKeys(this.successRouteTxt, route);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterLogo(logo): Promise<void> {
|
async enterLogo(logo: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.logoTxt, logo);
|
await BrowserActions.clearSendKeys(this.logoTxt, logo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,12 +15,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class MonacoExtensionPage {
|
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> {
|
async checkMonacoPluginIsDisplayed(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.monacoPlugin);
|
await BrowserVisibility.waitUntilElementIsVisible(this.monacoPlugin);
|
||||||
|
@@ -15,20 +15,20 @@
|
|||||||
* limitations under the License.
|
* 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';
|
import { BrowserVisibility, BrowserActions, DropdownPage, SnackbarPage } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class NotificationDemoPage {
|
export class NotificationDemoPage {
|
||||||
|
|
||||||
snackbarPage = new SnackbarPage();
|
snackbarPage = new SnackbarPage();
|
||||||
|
|
||||||
messageField: ElementFinder = element(by.css('input[data-automation-id="notification-message"]'));
|
messageField = element(by.css('input[data-automation-id="notification-message"]'));
|
||||||
durationField: ElementFinder = element(by.css('input[data-automation-id="notification-duration"]'));
|
durationField = element(by.css('input[data-automation-id="notification-duration"]'));
|
||||||
actionToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="notification-action-toggle"]'));
|
actionToggle = element(by.css('mat-slide-toggle[data-automation-id="notification-action-toggle"]'));
|
||||||
notificationSnackBar: ElementFinder = element.all(by.css('simple-snack-bar')).first();
|
notificationSnackBar = element.all(by.css('simple-snack-bar')).first();
|
||||||
actionOutput: ElementFinder = element(by.css('div[data-automation-id="notification-action-output"]'));
|
actionOutput = element(by.css('div[data-automation-id="notification-action-output"]'));
|
||||||
notificationsPage: ElementFinder = element(by.css('.app-sidenav-link[data-automation-id="Notifications"]'));
|
notificationsPage = element(by.css('.app-sidenav-link[data-automation-id="Notifications"]'));
|
||||||
notificationConfig: ElementFinder = element(by.css('p[data-automation-id="notification-custom-object"]'));
|
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"]')));
|
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"]')));
|
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();
|
await this.snackbarPage.waitForSnackBarToClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterMessageField(text): Promise<void> {
|
async enterMessageField(text: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.messageField, text);
|
await BrowserActions.clearSendKeys(this.messageField, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterDurationField(time): Promise<void> {
|
async enterDurationField(time: number): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.durationField, time);
|
await BrowserActions.clearSendKeys(this.durationField, time.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectHorizontalPosition(selectItem): Promise<void> {
|
async selectHorizontalPosition(selectItem: string): Promise<void> {
|
||||||
await this.horizontalPositionDropdown.selectDropdownOption(selectItem);
|
await this.horizontalPositionDropdown.selectDropdownOption(selectItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectVerticalPosition(selectItem): Promise<void> {
|
async selectVerticalPosition(selectItem: string): Promise<void> {
|
||||||
await this.verticalPositionDropdown.selectDropdownOption(selectItem);
|
await this.verticalPositionDropdown.selectDropdownOption(selectItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectDirection(selectItem): Promise<void> {
|
async selectDirection(selectItem: string): Promise<void> {
|
||||||
await this.directionDropdown.selectDropdownOption(selectItem);
|
await this.directionDropdown.selectDropdownOption(selectItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickNotificationButton(): Promise<void> {
|
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);
|
await BrowserActions.click(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,12 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserActions, BrowserVisibility, ConfigEditorPage } from '@alfresco/adf-testing';
|
import { BrowserActions, BrowserVisibility, ConfigEditorPage } from '@alfresco/adf-testing';
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
|
|
||||||
export class FormDemoPage {
|
export class FormDemoPage {
|
||||||
|
|
||||||
formCloudEditor: ElementFinder = element.all(by.css('.mat-tab-list .mat-tab-label')).get(1);
|
formCloudEditor = 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);
|
formCloudRender = element.all(by.css('.mat-tab-list .mat-tab-label')).get(0);
|
||||||
|
|
||||||
configEditorPage = new ConfigEditorPage();
|
configEditorPage = new ConfigEditorPage();
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ export class FormDemoPage {
|
|||||||
await BrowserActions.click(this.formCloudRender);
|
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 configEditor = element(by.id('adf-form-config-editor'));
|
||||||
const form = element(by.css('adf-form'));
|
const form = element(by.css('adf-form'));
|
||||||
await this.goToEditor();
|
await this.goToEditor();
|
||||||
|
@@ -15,30 +15,30 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class PeopleGroupCloudComponentPage {
|
export class PeopleGroupCloudComponentPage {
|
||||||
|
|
||||||
peopleCloudSingleSelectionChecked: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-people-single-mode"][class*="mat-radio-checked"]'));
|
peopleCloudSingleSelectionChecked = 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"]'));
|
peopleCloudMultipleSelectionChecked = 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"]'));
|
peopleCloudSingleSelection = 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"]'));
|
peopleCloudMultipleSelection = 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"]'));
|
peopleCloudFilterRole = 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"]'));
|
groupCloudSingleSelection = 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"]'));
|
groupCloudMultipleSelection = 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"]'));
|
groupCloudFilterRole = 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"]'));
|
peopleRoleInput = element(by.css('input[data-automation-id="app-people-roles-input"]'));
|
||||||
peopleAppInput: ElementFinder = element(by.css('input[data-automation-id="app-people-app-input"]'));
|
peopleAppInput = element(by.css('input[data-automation-id="app-people-app-input"]'));
|
||||||
peoplePreselect: ElementFinder = element(by.css('input[data-automation-id="app-people-preselect-input"]'));
|
peoplePreselect = element(by.css('input[data-automation-id="app-people-preselect-input"]'));
|
||||||
groupRoleInput: ElementFinder = element(by.css('input[data-automation-id="app-group-roles-input"]'));
|
groupRoleInput = element(by.css('input[data-automation-id="app-group-roles-input"]'));
|
||||||
groupAppInput: ElementFinder = element(by.css('input[data-automation-id="app-group-app-input"]'));
|
groupAppInput = element(by.css('input[data-automation-id="app-group-app-input"]'));
|
||||||
peopleCloudComponentTitle: ElementFinder = element(by.cssContainingText('mat-card-title', 'People Cloud Component'));
|
peopleCloudComponentTitle = element(by.cssContainingText('mat-card-title', 'People Cloud Component'));
|
||||||
groupCloudComponentTitle: ElementFinder = element(by.cssContainingText('mat-card-title', 'Groups Cloud Component'));
|
groupCloudComponentTitle = element(by.cssContainingText('mat-card-title', 'Groups Cloud Component'));
|
||||||
preselectValidation: ElementFinder = element.all(by.css('mat-checkbox.app-preselect-value')).first();
|
preselectValidation = element.all(by.css('mat-checkbox.app-preselect-value')).first();
|
||||||
preselectValidationStatus: ElementFinder = element.all(by.css('mat-checkbox.app-preselect-value label input')).first();
|
preselectValidationStatus = 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"]'));
|
peopleFilterByAppName = 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"]'));
|
groupFilterByAppName = element(by.css('.app-groups-control-options mat-radio-button[value="appName"]'));
|
||||||
|
|
||||||
async checkPeopleCloudComponentTitleIsDisplayed(): Promise<void> {
|
async checkPeopleCloudComponentTitleIsDisplayed(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudComponentTitle);
|
await BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudComponentTitle);
|
||||||
@@ -76,11 +76,11 @@ export class PeopleGroupCloudComponentPage {
|
|||||||
await BrowserActions.click(this.groupCloudFilterRole);
|
await BrowserActions.click(this.groupCloudFilterRole);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterPeopleRoles(roles): Promise<void> {
|
async enterPeopleRoles(roles: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.peopleRoleInput, roles);
|
await BrowserActions.clearSendKeys(this.peopleRoleInput, roles);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterPeoplePreselect(preselect): Promise<void> {
|
async enterPeoplePreselect(preselect: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.peoplePreselect, preselect);
|
await BrowserActions.clearSendKeys(this.peoplePreselect, preselect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,11 +117,11 @@ export class PeopleGroupCloudComponentPage {
|
|||||||
await BrowserActions.click(this.groupFilterByAppName);
|
await BrowserActions.click(this.groupFilterByAppName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterPeopleAppName(appName): Promise<void> {
|
async enterPeopleAppName(appName: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.peopleAppInput, appName);
|
await BrowserActions.clearSendKeys(this.peopleAppInput, appName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterGroupAppName(appName): Promise<void> {
|
async enterGroupAppName(appName: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.groupAppInput, appName);
|
await BrowserActions.clearSendKeys(this.groupAppInput, appName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,12 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserActions, BrowserVisibility, EditProcessFilterCloudComponentPage, ProcessFiltersCloudComponentPage, ProcessListCloudComponentPage } from '@alfresco/adf-testing';
|
import { BrowserActions, BrowserVisibility, EditProcessFilterCloudComponentPage, ProcessFiltersCloudComponentPage, ProcessListCloudComponentPage } from '@alfresco/adf-testing';
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
|
|
||||||
export class ProcessCloudDemoPage {
|
export class ProcessCloudDemoPage {
|
||||||
|
|
||||||
createButton: ElementFinder = element(by.css('button[data-automation-id="create-button"'));
|
createButton = element(by.css('button[data-automation-id="create-button"'));
|
||||||
newProcessButton: ElementFinder = element(by.css('button[data-automation-id="btn-start-process"]'));
|
newProcessButton = element(by.css('button[data-automation-id="btn-start-process"]'));
|
||||||
|
|
||||||
processListCloud = new ProcessListCloudComponentPage();
|
processListCloud = new ProcessListCloudComponentPage();
|
||||||
editProcessFilterCloud = new EditProcessFilterCloudComponentPage();
|
editProcessFilterCloud = new EditProcessFilterCloudComponentPage();
|
||||||
|
@@ -16,20 +16,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage, DropdownPage } from '@alfresco/adf-testing';
|
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 {
|
export class ProcessListDemoPage {
|
||||||
|
|
||||||
appIdInput: ElementFinder = element(by.css('input[data-automation-id="app-id"]'));
|
appIdInput = element(by.css('input[data-automation-id="app-id"]'));
|
||||||
resetButton: ElementFinder = element(by.cssContainingText('button span', 'Reset'));
|
resetButton = element(by.cssContainingText('button span', 'Reset'));
|
||||||
emptyProcessContent: ElementFinder = element(by.css('div[class="adf-empty-content"]'));
|
emptyProcessContent = element(by.css('div[class="adf-empty-content"]'));
|
||||||
processDefinitionInput: ElementFinder = element(by.css('input[data-automation-id="process-definition-id"]'));
|
processDefinitionInput = element(by.css('input[data-automation-id="process-definition-id"]'));
|
||||||
processInstanceInput: ElementFinder = element(by.css('input[data-automation-id="process-instance-id"]'));
|
processInstanceInput = element(by.css('input[data-automation-id="process-instance-id"]'));
|
||||||
|
|
||||||
stateDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="state"')));
|
stateDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="state"')));
|
||||||
sortDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="sort"')));
|
sortDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="sort"')));
|
||||||
|
|
||||||
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
dataTable = new DataTableComponentPage();
|
||||||
|
|
||||||
getDisplayedProcessesNames(): Promise<any> {
|
getDisplayedProcessesNames(): Promise<any> {
|
||||||
return this.dataTable.getAllRowsColumnValues('Name');
|
return this.dataTable.getAllRowsColumnValues('Name');
|
||||||
@@ -55,7 +55,7 @@ export class ProcessListDemoPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkErrorMessageIsDisplayed(error): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,11 +63,11 @@ export class ProcessListDemoPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.emptyProcessContent);
|
await BrowserVisibility.waitUntilElementIsVisible(this.emptyProcessContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkProcessIsNotDisplayed(processName): Promise<void> {
|
async checkProcessIsNotDisplayed(processName: string): Promise<void> {
|
||||||
await this.dataTable.checkContentIsNotDisplayed('Name', processName);
|
await this.dataTable.checkContentIsNotDisplayed('Name', processName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkProcessIsDisplayed(processName): Promise<void> {
|
async checkProcessIsDisplayed(processName: string): Promise<void> {
|
||||||
await this.dataTable.checkContentIsDisplayed('Name', processName);
|
await this.dataTable.checkContentIsDisplayed('Name', processName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,16 +16,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserActions } from '@alfresco/adf-testing';
|
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';
|
import { TaskFiltersPage } from '../../process-services/task-filters.page';
|
||||||
|
|
||||||
export class TaskFiltersDemoPage {
|
export class TaskFiltersDemoPage {
|
||||||
|
|
||||||
myTasks: ElementFinder = element(by.css('button[data-automation-id="My Tasks_filter"]'));
|
myTasks = element(by.css('button[data-automation-id="My Tasks_filter"]'));
|
||||||
queuedTask: ElementFinder = element(by.css('button[data-automation-id="Queued Tasks_filter"]'));
|
queuedTask = element(by.css('button[data-automation-id="Queued Tasks_filter"]'));
|
||||||
completedTask: ElementFinder = element(by.css('button[data-automation-id="Completed Tasks_filter"]'));
|
completedTask = element(by.css('button[data-automation-id="Completed Tasks_filter"]'));
|
||||||
involvedTask: ElementFinder = element(by.css('button[data-automation-id="Involved Tasks_filter"]'));
|
involvedTask = element(by.css('button[data-automation-id="Involved Tasks_filter"]'));
|
||||||
activeFilter: ElementFinder = element(by.css('adf-task-filters .adf-active'));
|
activeFilter = element(by.css('adf-task-filters .adf-active'));
|
||||||
|
|
||||||
myTasksFilter(): TaskFiltersPage {
|
myTasksFilter(): TaskFiltersPage {
|
||||||
return new TaskFiltersPage(this.myTasks);
|
return new TaskFiltersPage(this.myTasks);
|
||||||
@@ -43,7 +43,7 @@ export class TaskFiltersDemoPage {
|
|||||||
return new TaskFiltersPage(this.involvedTask);
|
return new TaskFiltersPage(this.involvedTask);
|
||||||
}
|
}
|
||||||
|
|
||||||
customTaskFilter(filterName): TaskFiltersPage {
|
customTaskFilter(filterName: string): TaskFiltersPage {
|
||||||
return new TaskFiltersPage(element(by.css(`button[data-automation-id="${filterName}_filter"]`)));
|
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 { 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';
|
import { TasksListPage } from '../../process-services/tasks-list.page';
|
||||||
|
|
||||||
export class TaskListDemoPage {
|
export class TaskListDemoPage {
|
||||||
|
|
||||||
taskListPage: TasksListPage = new TasksListPage();
|
taskListPage: TasksListPage = new TasksListPage();
|
||||||
appId: ElementFinder = element(by.css("input[data-automation-id='appId input']"));
|
appId = element(by.css("input[data-automation-id='appId input']"));
|
||||||
itemsPerPage: ElementFinder = element(by.css("input[data-automation-id='items per page']"));
|
itemsPerPage = element(by.css("input[data-automation-id='items per page']"));
|
||||||
itemsPerPageForm: ElementFinder = element(by.css("mat-form-field[data-automation-id='items per page']"));
|
itemsPerPageForm = element(by.css("mat-form-field[data-automation-id='items per page']"));
|
||||||
processDefinitionId: ElementFinder = element(by.css("input[data-automation-id='process definition id']"));
|
processDefinitionId = element(by.css("input[data-automation-id='process definition id']"));
|
||||||
processInstanceId: ElementFinder = element(by.css("input[data-automation-id='process instance id']"));
|
processInstanceId = element(by.css("input[data-automation-id='process instance id']"));
|
||||||
page: ElementFinder = element(by.css("input[data-automation-id='page']"));
|
page = element(by.css("input[data-automation-id='page']"));
|
||||||
pageForm: ElementFinder = element(by.css("mat-form-field[data-automation-id='page']"));
|
pageForm = element(by.css("mat-form-field[data-automation-id='page']"));
|
||||||
taskName: ElementFinder = element(by.css("input[data-automation-id='task name']"));
|
taskName = element(by.css("input[data-automation-id='task name']"));
|
||||||
resetButton: ElementFinder = element(by.css("div[class='app-reset-button'] button"));
|
resetButton = element(by.css("div[class='app-reset-button'] button"));
|
||||||
dueBefore: ElementFinder = element(by.css("input[data-automation-id='due before']"));
|
dueBefore = element(by.css("input[data-automation-id='due before']"));
|
||||||
dueAfter: ElementFinder = element(by.css("input[data-automation-id='due after']"));
|
dueAfter = element(by.css("input[data-automation-id='due after']"));
|
||||||
taskId: ElementFinder = element(by.css("input[data-automation-id='task id']"));
|
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);
|
stateDropdown = new DropdownPage(this.stateDropDownArrow);
|
||||||
|
|
||||||
taskList(): TasksListPage {
|
taskList(): TasksListPage {
|
||||||
@@ -46,7 +46,7 @@ export class TaskListDemoPage {
|
|||||||
return new PaginationPage();
|
return new PaginationPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeAppId(input): Promise<void> {
|
async typeAppId(input: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.appId, input);
|
await BrowserActions.clearSendKeys(this.appId, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ export class TaskListDemoPage {
|
|||||||
return this.appId.getAttribute('value');
|
return this.appId.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeTaskId(input): Promise<void> {
|
async typeTaskId(input: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.taskId, input);
|
await BrowserActions.clearSendKeys(this.taskId, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ export class TaskListDemoPage {
|
|||||||
return this.taskId.getAttribute('value');
|
return this.taskId.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeTaskName(input): Promise<void> {
|
async typeTaskName(input: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.taskName, input);
|
await BrowserActions.clearSendKeys(this.taskName, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,11 +77,11 @@ export class TaskListDemoPage {
|
|||||||
return this.taskName.getAttribute('value');
|
return this.taskName.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeItemsPerPage(input): Promise<void> {
|
async typeItemsPerPage(input: number): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.itemsPerPage, input);
|
await BrowserActions.clearSendKeys(this.itemsPerPage, input.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeProcessDefinitionId(input): Promise<void> {
|
async typeProcessDefinitionId(input: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.processDefinitionId, input);
|
await BrowserActions.clearSendKeys(this.processDefinitionId, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ export class TaskListDemoPage {
|
|||||||
return this.processInstanceId.getAttribute('value');
|
return this.processInstanceId.getAttribute('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeProcessInstanceId(input): Promise<void> {
|
async typeProcessInstanceId(input: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.processInstanceId, input);
|
await BrowserActions.clearSendKeys(this.processInstanceId, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,8 +105,8 @@ export class TaskListDemoPage {
|
|||||||
return BrowserActions.getText(errorMessage);
|
return BrowserActions.getText(errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
async typePage(input): Promise<void> {
|
async typePage(input: number): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.page, input);
|
await BrowserActions.clearSendKeys(this.page, input.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
async getPage(): Promise<string> {
|
async getPage(): Promise<string> {
|
||||||
@@ -120,11 +120,11 @@ export class TaskListDemoPage {
|
|||||||
return BrowserActions.getText(errorMessage);
|
return BrowserActions.getText(errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeDueAfter(input): Promise<void> {
|
async typeDueAfter(input: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.dueAfter, input);
|
await BrowserActions.clearSendKeys(this.dueAfter, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeDueBefore(input): Promise<void> {
|
async typeDueBefore(input: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.dueBefore, input);
|
await BrowserActions.clearSendKeys(this.dueBefore, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ export class TaskListDemoPage {
|
|||||||
await BrowserActions.click(this.resetButton);
|
await BrowserActions.click(this.resetButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectState(state): Promise<void> {
|
async selectState(state: string): Promise<void> {
|
||||||
await this.stateDropdown.selectDropdownOption(state);
|
await this.stateDropdown.selectDropdownOption(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, browser, ElementFinder, ElementArrayFinder } from 'protractor';
|
import { element, by, browser } from 'protractor';
|
||||||
import {
|
import {
|
||||||
TogglePage,
|
TogglePage,
|
||||||
TaskFiltersCloudComponentPage,
|
TaskFiltersCloudComponentPage,
|
||||||
@@ -27,31 +27,31 @@ import {
|
|||||||
|
|
||||||
export class TasksCloudDemoPage {
|
export class TasksCloudDemoPage {
|
||||||
|
|
||||||
createButton: ElementFinder = element(by.css('button[data-automation-id="create-button"'));
|
createButton = element(by.css('button[data-automation-id="create-button"'));
|
||||||
newTaskButton: ElementFinder = element(by.css('button[data-automation-id="btn-start-task"]'));
|
newTaskButton = 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();
|
settingsButton = 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();
|
appButton = 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"]'));
|
displayTaskDetailsToggle = element(by.css('mat-slide-toggle[data-automation-id="taskDetailsRedirection"]'));
|
||||||
displayProcessDetailsToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="processDetailsRedirection"]'));
|
displayProcessDetailsToggle = element(by.css('mat-slide-toggle[data-automation-id="processDetailsRedirection"]'));
|
||||||
actionMenuToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="actionmenu"]'));
|
actionMenuToggle = element(by.css('mat-slide-toggle[data-automation-id="actionmenu"]'));
|
||||||
contextMenuToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="contextmenu"]'));
|
contextMenuToggle = element(by.css('mat-slide-toggle[data-automation-id="contextmenu"]'));
|
||||||
multiSelectionToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="multiSelection"]'));
|
multiSelectionToggle = element(by.css('mat-slide-toggle[data-automation-id="multiSelection"]'));
|
||||||
testingModeToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="testingMode"]'));
|
testingModeToggle = element(by.css('mat-slide-toggle[data-automation-id="testingMode"]'));
|
||||||
selectedRows: ElementFinder = element(by.xpath("//div[text()=' Selected Rows: ']"));
|
selectedRows = element(by.xpath("//div[text()=' Selected Rows: ']"));
|
||||||
noOfSelectedRows: ElementArrayFinder = element.all(by.xpath("//div[text()=' Selected Rows: ']//li"));
|
noOfSelectedRows = element.all(by.xpath("//div[text()=' Selected Rows: ']//li"));
|
||||||
addActionTitle: ElementFinder = element(by.cssContainingText('.mat-card-title', 'Add Action'));
|
addActionTitle = element(by.cssContainingText('.mat-card-title', 'Add Action'));
|
||||||
keyInputField: ElementFinder = element(by.css('input[placeholder="Key"]'));
|
keyInputField = element(by.css('input[placeholder="Key"]'));
|
||||||
titleInputField: ElementFinder = element(by.css('input[placeholder="Title"]'));
|
titleInputField = element(by.css('input[placeholder="Title"]'));
|
||||||
iconInputField: ElementFinder = element(by.css('input[placeholder="Icon"]'));
|
iconInputField = element(by.css('input[placeholder="Icon"]'));
|
||||||
addActionButton: ElementFinder = element(by.cssContainingText('button span', 'Add'));
|
addActionButton = element(by.cssContainingText('button span', 'Add'));
|
||||||
disableCheckbox: ElementFinder = element(by.css(`mat-checkbox[formcontrolname='disabled']`));
|
disableCheckbox = element(by.css(`mat-checkbox[formcontrolname='disabled']`));
|
||||||
visibleCheckbox: ElementFinder = element(by.css(`mat-checkbox[formcontrolname='visible']`));
|
visibleCheckbox = element(by.css(`mat-checkbox[formcontrolname='visible']`));
|
||||||
|
|
||||||
modeDropdown = new DropdownPage(element(by.css('mat-form-field[data-automation-id="selectionMode"]')));
|
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();
|
taskFilterCloudComponent = new TaskFiltersCloudComponentPage();
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ export class TasksCloudDemoPage {
|
|||||||
await BrowserActions.click(this.appButton);
|
await BrowserActions.click(this.appButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectSelectionMode(mode): Promise<void> {
|
async selectSelectionMode(mode: string): Promise<void> {
|
||||||
await this.modeDropdown.clickDropdown();
|
await this.modeDropdown.clickDropdown();
|
||||||
await this.modeDropdown.selectOption(mode);
|
await this.modeDropdown.selectOption(mode);
|
||||||
}
|
}
|
||||||
@@ -119,7 +119,7 @@ export class TasksCloudDemoPage {
|
|||||||
|
|
||||||
async getSelectedTaskRowText(rowNo: string): Promise<string> {
|
async getSelectedTaskRowText(rowNo: string): Promise<string> {
|
||||||
await this.checkSelectedRowsIsDisplayed();
|
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);
|
return BrowserActions.getText(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,12 +15,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
import { BrowserActions, BrowserVisibility } from '@alfresco/adf-testing';
|
import { BrowserActions, BrowserVisibility } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class SocialPage {
|
export class SocialPage {
|
||||||
|
|
||||||
nodeIdField: ElementFinder = element(by.css(`input[id="nodeId"]`));
|
nodeIdField = element(by.css(`input[id="nodeId"]`));
|
||||||
|
|
||||||
async getNodeIdFieldValue(): Promise<string> {
|
async getNodeIdFieldValue(): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.nodeIdField);
|
await BrowserVisibility.waitUntilElementIsVisible(this.nodeIdField);
|
||||||
|
@@ -15,26 +15,26 @@
|
|||||||
* limitations under the License.
|
* 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';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class CreateLibraryDialogPage {
|
export class CreateLibraryDialogPage {
|
||||||
libraryDialog: ElementFinder = element(by.css('[role="dialog"]'));
|
libraryDialog = element(by.css('[role="dialog"]'));
|
||||||
libraryTitle: ElementFinder = element(by.css('.adf-library-dialog>h2'));
|
libraryTitle = element(by.css('.adf-library-dialog>h2'));
|
||||||
libraryNameField: ElementFinder = element(by.css('input[formcontrolname="title"]'));
|
libraryNameField = element(by.css('input[formcontrolname="title"]'));
|
||||||
libraryIdField: ElementFinder = element(by.css('input[formcontrolname="id"]'));
|
libraryIdField = element(by.css('input[formcontrolname="id"]'));
|
||||||
libraryDescriptionField: ElementFinder = element(by.css('textarea[formcontrolname="description"]'));
|
libraryDescriptionField = element(by.css('textarea[formcontrolname="description"]'));
|
||||||
publicRadioButton: ElementFinder = element(by.css('[data-automation-id="PUBLIC"]>label'));
|
publicRadioButton = element(by.css('[data-automation-id="PUBLIC"]>label'));
|
||||||
privateRadioButton: ElementFinder = element(by.css('[data-automation-id="PRIVATE"]>label'));
|
privateRadioButton = element(by.css('[data-automation-id="PRIVATE"]>label'));
|
||||||
moderatedRadioButton: ElementFinder = element(by.css('[data-automation-id="MODERATED"]>label'));
|
moderatedRadioButton = element(by.css('[data-automation-id="MODERATED"]>label'));
|
||||||
cancelButton: ElementFinder = element(by.css('button[data-automation-id="cancel-library-id"]'));
|
cancelButton = element(by.css('button[data-automation-id="cancel-library-id"]'));
|
||||||
createButton: ElementFinder = element(by.css('button[data-automation-id="create-library-id"]'));
|
createButton = element(by.css('button[data-automation-id="create-library-id"]'));
|
||||||
errorMessage: ElementFinder = element(by.css('.mat-dialog-content .mat-error'));
|
errorMessage = element(by.css('.mat-dialog-content .mat-error'));
|
||||||
errorMessages: ElementArrayFinder = element.all(by.css('.mat-dialog-content .mat-error'));
|
errorMessages = element.all(by.css('.mat-dialog-content .mat-error'));
|
||||||
libraryNameHint: ElementFinder = element(by.css('adf-library-dialog .mat-hint'));
|
libraryNameHint = element(by.css('adf-library-dialog .mat-hint'));
|
||||||
|
|
||||||
async getSelectedRadio(): Promise<string> {
|
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);
|
return BrowserActions.getText(radio);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ export class CreateLibraryDialogPage {
|
|||||||
return BrowserActions.getText(this.errorMessage);
|
return BrowserActions.getText(this.errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getErrorMessages(position): Promise<string> {
|
async getErrorMessages(position: number): Promise<string> {
|
||||||
return BrowserActions.getText(this.errorMessages.get(position));
|
return BrowserActions.getText(this.errorMessages.get(position));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,11 +122,11 @@ export class CreateLibraryDialogPage {
|
|||||||
await BrowserActions.clearSendKeys(this.libraryNameField, libraryName);
|
await BrowserActions.clearSendKeys(this.libraryNameField, libraryName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeLibraryId(libraryId): Promise<void> {
|
async typeLibraryId(libraryId: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.libraryIdField, libraryId);
|
await BrowserActions.clearSendKeys(this.libraryIdField, libraryId);
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeLibraryDescription(libraryDescription): Promise<void> {
|
async typeLibraryDescription(libraryDescription: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.libraryDescriptionField, libraryDescription);
|
await BrowserActions.clearSendKeys(this.libraryDescriptionField, libraryDescription);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,13 +19,13 @@ import { by, element, ElementFinder } from 'protractor';
|
|||||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class FolderDialogPage {
|
export class FolderDialogPage {
|
||||||
folderDialog: ElementFinder = element(by.css('adf-folder-dialog'));
|
folderDialog = element(by.css('adf-folder-dialog'));
|
||||||
folderNameField: ElementFinder = this.folderDialog.element(by.id('adf-folder-name-input'));
|
folderNameField = this.folderDialog.element(by.id('adf-folder-name-input'));
|
||||||
folderDescriptionField: ElementFinder = this.folderDialog.element(by.id('adf-folder-description-input'));
|
folderDescriptionField = this.folderDialog.element(by.id('adf-folder-description-input'));
|
||||||
createUpdateButton: ElementFinder = this.folderDialog.element(by.id('adf-folder-create-button'));
|
createUpdateButton = this.folderDialog.element(by.id('adf-folder-create-button'));
|
||||||
cancelButton: ElementFinder = this.folderDialog.element(by.id('adf-folder-cancel-button'));
|
cancelButton = this.folderDialog.element(by.id('adf-folder-cancel-button'));
|
||||||
folderTitle: ElementFinder = this.folderDialog.element((by.css('h2.mat-dialog-title')));
|
folderTitle = 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'));
|
validationMessage = this.folderDialog.element(by.css('div.mat-form-field-subscript-wrapper mat-hint span'));
|
||||||
|
|
||||||
async getDialogTitle(): Promise<string> {
|
async getDialogTitle(): Promise<string> {
|
||||||
return BrowserActions.getText(this.folderTitle);
|
return BrowserActions.getText(this.folderTitle);
|
||||||
|
@@ -15,19 +15,19 @@
|
|||||||
* limitations under the License.
|
* 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';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class SearchDialogPage {
|
export class SearchDialogPage {
|
||||||
|
|
||||||
searchIcon: ElementFinder = element(by.css(`button[class*='adf-search-button']`));
|
searchIcon = element(by.css(`button[class*='adf-search-button']`));
|
||||||
searchBar: ElementFinder = element(by.css(`adf-search-control input`));
|
searchBar = element(by.css(`adf-search-control input`));
|
||||||
searchBarExpanded: ElementFinder = element(by.css(`adf-search-control mat-form-field[class*="mat-focused"] input`));
|
searchBarExpanded = element(by.css(`adf-search-control mat-form-field[class*="mat-focused"] input`));
|
||||||
noResultMessage: ElementFinder = element(by.css(`p[class*='adf-search-fixed-text']`));
|
noResultMessage = element(by.css(`p[class*='adf-search-fixed-text']`));
|
||||||
rowsAuthor: Locator = by.css(`div[class='mat-list-text'] p[class*='adf-search-fixed-text']`);
|
rowsAuthor = by.css(`div[class='mat-list-text'] p[class*='adf-search-fixed-text']`);
|
||||||
completeName: Locator = by.css(`h4[class*='adf-search-fixed-text']`);
|
completeName = by.css(`h4[class*='adf-search-fixed-text']`);
|
||||||
highlightName: Locator = by.css(`.adf-highlight`);
|
highlightName = by.css(`.adf-highlight`);
|
||||||
searchDialog: ElementFinder = element(by.css(`mat-list[id='autocomplete-search-result-list']`));
|
searchDialog = element(by.css(`mat-list[id='autocomplete-search-result-list']`));
|
||||||
|
|
||||||
async pressDownArrowAndEnter(): Promise<void> {
|
async pressDownArrowAndEnter(): Promise<void> {
|
||||||
await element(by.css(`adf-search-control div input`)).sendKeys(protractor.Key.ARROW_DOWN);
|
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);
|
await BrowserVisibility.waitUntilElementIsNotVisible(this.noResultMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterText(text): Promise<void> {
|
async enterText(text: string): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchBar);
|
await BrowserVisibility.waitUntilElementIsVisible(this.searchBar);
|
||||||
await this.searchBar.sendKeys(text);
|
await this.searchBar.sendKeys(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterTextAndPressEnter(text): Promise<void> {
|
async enterTextAndPressEnter(text: string): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchBar);
|
await BrowserVisibility.waitUntilElementIsVisible(this.searchBar);
|
||||||
await this.searchBar.sendKeys(text);
|
await this.searchBar.sendKeys(text);
|
||||||
await this.searchBar.sendKeys(protractor.Key.ENTER);
|
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.searchDialog);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.getRowByRowName(name));
|
await BrowserVisibility.waitUntilElementIsVisible(this.getRowByRowName(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickOnSpecificRow(name): Promise<void> {
|
async clickOnSpecificRow(name: string): Promise<void> {
|
||||||
await this.resultTableContainsRow(name);
|
await this.resultTableContainsRow(name);
|
||||||
await BrowserActions.click(this.getRowByRowName(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}']`));
|
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));
|
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));
|
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));
|
return BrowserActions.getText(this.getRowByRowName(name).element(this.rowsAuthor));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,28 +15,28 @@
|
|||||||
* limitations under the License.
|
* 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';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class UploadDialogPage {
|
export class UploadDialogPage {
|
||||||
|
|
||||||
closeButton: ElementFinder = element((by.css('footer[class*="upload-dialog__actions"] button[id="adf-upload-dialog-close"]')));
|
closeButton = element((by.css('footer[class*="upload-dialog__actions"] button[id="adf-upload-dialog-close"]')));
|
||||||
dialog: ElementFinder = element(by.css('div[id="upload-dialog"]'));
|
dialog = element(by.css('div[id="upload-dialog"]'));
|
||||||
minimizedDialog: ElementFinder = element(by.css('div[class*="upload-dialog--minimized"]'));
|
minimizedDialog = element(by.css('div[class*="upload-dialog--minimized"]'));
|
||||||
uploadedStatusIcon: Locator = by.css('mat-icon[class*="status--done"]');
|
uploadedStatusIcon = by.css('mat-icon[class*="status--done"]');
|
||||||
cancelledStatusIcon: Locator = by.css('div[class*="status--cancelled"]');
|
cancelledStatusIcon = by.css('div[class*="status--cancelled"]');
|
||||||
errorStatusIcon = by.css('div[class*="status--error"] mat-icon');
|
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');
|
rowByRowName = by.xpath('ancestor::adf-file-uploading-list-row');
|
||||||
title: ElementFinder = element(by.css('span[class*="upload-dialog__title"]'));
|
title = element(by.css('span[class*="upload-dialog__title"]'));
|
||||||
minimizeButton: ElementFinder = element(by.css('mat-icon[title="Minimize"]'));
|
minimizeButton = element(by.css('mat-icon[title="Minimize"]'));
|
||||||
maximizeButton: ElementFinder = element(by.css('mat-icon[title="Maximize"]'));
|
maximizeButton = element(by.css('mat-icon[title="Maximize"]'));
|
||||||
canUploadConfirmationTitle: ElementFinder = element(by.css('p[class="upload-dialog__confirmation--title"]'));
|
canUploadConfirmationTitle = element(by.css('p[class="upload-dialog__confirmation--title"]'));
|
||||||
canUploadConfirmationDescription: ElementFinder = element(by.css('p[class="upload-dialog__confirmation--text"]'));
|
canUploadConfirmationDescription = element(by.css('p[class="upload-dialog__confirmation--text"]'));
|
||||||
confirmationDialogNoButton: ElementFinder = element(by.partialButtonText('No'));
|
confirmationDialogNoButton = element(by.partialButtonText('No'));
|
||||||
confirmationDialogYesButton: ElementFinder = element(by.partialButtonText('Yes'));
|
confirmationDialogYesButton = element(by.partialButtonText('Yes'));
|
||||||
cancelUploadsElement: ElementFinder = element((by.css('footer[class*="upload-dialog__actions"] button[id="adf-upload-dialog-cancel-all"]')));
|
cancelUploadsElement = 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"]'));
|
cancelUploadInProgressButton = element(by.css('div[data-automation-id="cancel-upload-progress"]'));
|
||||||
|
|
||||||
async clickOnCloseButton(): Promise<void> {
|
async clickOnCloseButton(): Promise<void> {
|
||||||
await this.checkCloseButtonIsDisplayed();
|
await this.checkCloseButtonIsDisplayed();
|
||||||
@@ -59,32 +59,32 @@ export class UploadDialogPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.dialog);
|
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();
|
return element.all(by.css(`div[class*='uploading-row'] span[title="${content}"]`)).first();
|
||||||
}
|
}
|
||||||
|
|
||||||
getRowByRowName(content) {
|
getRowByRowName(content: string) {
|
||||||
const rows = this.getRowsByName(content);
|
const rows = this.getRowsByName(content);
|
||||||
return rows.element(this.rowByRowName);
|
return rows.element(this.rowByRowName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async fileIsUploaded(content): Promise<void> {
|
async fileIsUploaded(content: string): Promise<void> {
|
||||||
const row = await this.getRowByRowName(content);
|
const row = await this.getRowByRowName(content);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.uploadedStatusIcon));
|
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.uploadedStatusIcon));
|
||||||
}
|
}
|
||||||
|
|
||||||
async fileIsError(content) {
|
async fileIsError(content: string) {
|
||||||
const row = await this.getRowByRowName(content);
|
const row = await this.getRowByRowName(content);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.errorStatusIcon));
|
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++) {
|
for (let i = 0; i < content.length; i++) {
|
||||||
await this.fileIsUploaded(content[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}"]`)));
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(this.cancelUploadInProgressButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async fileIsCancelled(content): Promise<void> {
|
async fileIsCancelled(content: string): Promise<void> {
|
||||||
const row = await this.getRowByRowName(content);
|
const row = await this.getRowByRowName(content);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.cancelledStatusIcon), 10000);
|
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);
|
const row = await this.getRowByRowName(content);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.uploadedStatusIcon));
|
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.uploadedStatusIcon));
|
||||||
const elementRow = await this.getRowByRowName(content);
|
const elementRow = await this.getRowByRowName(content);
|
||||||
|
@@ -15,20 +15,20 @@
|
|||||||
* limitations under the License.
|
* 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';
|
import { BrowserActions, BrowserVisibility, TogglePage } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class UploadTogglesPage {
|
export class UploadTogglesPage {
|
||||||
|
|
||||||
togglePage: TogglePage = new TogglePage();
|
togglePage = new TogglePage();
|
||||||
multipleFileUploadToggle: ElementFinder = element(by.id('adf-multiple-upload-switch'));
|
multipleFileUploadToggle = element(by.id('adf-multiple-upload-switch'));
|
||||||
uploadFolderToggle: ElementFinder = element(by.css('#adf-folder-upload-switch'));
|
uploadFolderToggle = element(by.css('#adf-folder-upload-switch'));
|
||||||
extensionFilterToggle: ElementFinder = element(by.id('adf-extension-filter-upload-switch'));
|
extensionFilterToggle = element(by.id('adf-extension-filter-upload-switch'));
|
||||||
maxSizeToggle: ElementFinder = element(by.id('adf-max-size-filter-upload-switch'));
|
maxSizeToggle = element(by.id('adf-max-size-filter-upload-switch'));
|
||||||
versioningToggle: ElementFinder = element(by.id('adf-version-upload-switch'));
|
versioningToggle = element(by.id('adf-version-upload-switch'));
|
||||||
extensionAcceptedField: ElementFinder = element(by.css('input[data-automation-id="accepted-files-type"]'));
|
extensionAcceptedField = element(by.css('input[data-automation-id="accepted-files-type"]'));
|
||||||
maxSizeField: ElementFinder = element(by.css('input[data-automation-id="max-files-size"]'));
|
maxSizeField = element(by.css('input[data-automation-id="max-files-size"]'));
|
||||||
disableUploadCheckbox: ElementFinder = element(by.css('[id="adf-disable-upload"]'));
|
disableUploadCheckbox = element(by.css('[id="adf-disable-upload"]'));
|
||||||
|
|
||||||
async enableMultipleFileUpload(): Promise<void> {
|
async enableMultipleFileUpload(): Promise<void> {
|
||||||
await browser.executeScript('arguments[0].scrollIntoView()', this.multipleFileUploadToggle);
|
await browser.executeScript('arguments[0].scrollIntoView()', this.multipleFileUploadToggle);
|
||||||
@@ -46,7 +46,7 @@ export class UploadTogglesPage {
|
|||||||
|
|
||||||
async checkFolderUploadToggleIsEnabled(): Promise<boolean> {
|
async checkFolderUploadToggleIsEnabled(): Promise<boolean> {
|
||||||
try {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(enabledFolderUpload);
|
||||||
return true;
|
return true;
|
||||||
} catch {
|
} catch {
|
||||||
@@ -55,17 +55,17 @@ export class UploadTogglesPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkMultipleFileUploadToggleIsEnabled(): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(enabledToggle);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkMaxSizeToggleIsEnabled(): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(enabledToggle);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkVersioningToggleIsEnabled(): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(enabledToggle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ export class UploadTogglesPage {
|
|||||||
}
|
}
|
||||||
async checkFolderUploadToggleIsNotEnabled(): Promise<boolean> {
|
async checkFolderUploadToggleIsNotEnabled(): Promise<boolean> {
|
||||||
try {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(inactiveToggleFolder);
|
||||||
return true;
|
return true;
|
||||||
} catch {
|
} catch {
|
||||||
@@ -112,7 +112,7 @@ export class UploadTogglesPage {
|
|||||||
await BrowserActions.click(this.disableUploadCheckbox);
|
await BrowserActions.click(this.disableUploadCheckbox);
|
||||||
}
|
}
|
||||||
|
|
||||||
async addExtension(extension): Promise<void> {
|
async addExtension(extension: string): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.extensionAcceptedField);
|
await BrowserVisibility.waitUntilElementIsVisible(this.extensionAcceptedField);
|
||||||
await this.extensionAcceptedField.sendKeys(',' + extension);
|
await this.extensionAcceptedField.sendKeys(',' + extension);
|
||||||
}
|
}
|
||||||
|
@@ -19,15 +19,15 @@ import { browser, by, element, ElementFinder } from 'protractor';
|
|||||||
|
|
||||||
export class IconsPage {
|
export class IconsPage {
|
||||||
|
|
||||||
locateCustomIcon(name): ElementFinder {
|
locateCustomIcon(name: string): ElementFinder {
|
||||||
return element(by.css(`adf-icon[value='${name}'] svg`));
|
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`));
|
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));
|
const present = await browser.isElementPresent(this.locateCustomIcon(name));
|
||||||
if (present) {
|
if (present) {
|
||||||
return this.locateCustomIcon(name).isDisplayed();
|
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));
|
const present = await browser.isElementPresent(this.locateLigatureIcon(name));
|
||||||
if (present) {
|
if (present) {
|
||||||
return this.locateLigatureIcon(name).isDisplayed();
|
return this.locateLigatureIcon(name).isDisplayed();
|
||||||
|
@@ -15,16 +15,16 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class LockFilePage {
|
export class LockFilePage {
|
||||||
|
|
||||||
cancelButton: ElementFinder = element(by.css('button[data-automation-id="lock-dialog-btn-cancel"]'));
|
cancelButton = element(by.css('button[data-automation-id="lock-dialog-btn-cancel"]'));
|
||||||
saveButton: ElementFinder = element(by.cssContainingText('button span', 'Save'));
|
saveButton = element(by.cssContainingText('button span', 'Save'));
|
||||||
lockFileCheckboxText: ElementFinder = element(by.cssContainingText('mat-checkbox label span', ' Lock file '));
|
lockFileCheckboxText = element(by.cssContainingText('mat-checkbox label span', ' Lock file '));
|
||||||
lockFileCheckbox: ElementFinder = element(by.css('mat-checkbox[data-automation-id="adf-lock-node-checkbox"]'));
|
lockFileCheckbox = 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 '));
|
allowOwnerCheckbox = element(by.cssContainingText('mat-checkbox[class*="adf-lock-file-name"] span', ' Allow the owner to modify this file '));
|
||||||
|
|
||||||
async checkLockFileCheckboxIsDisplayed(): Promise<void> {
|
async checkLockFileCheckboxIsDisplayed(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.lockFileCheckboxText);
|
await BrowserVisibility.waitUntilElementIsVisible(this.lockFileCheckboxText);
|
||||||
|
@@ -15,38 +15,38 @@
|
|||||||
* limitations under the License.
|
* 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';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class MetadataViewPage {
|
export class MetadataViewPage {
|
||||||
|
|
||||||
title: ElementFinder = element(by.css(`div[info-drawer-title]`));
|
title = element(by.css(`div[info-drawer-title]`));
|
||||||
expandedAspect: ElementFinder = element(by.css(`mat-expansion-panel-header[aria-expanded='true']`));
|
expandedAspect = element(by.css(`mat-expansion-panel-header[aria-expanded='true']`));
|
||||||
aspectTitle = by.css(`mat-panel-title`);
|
aspectTitle = by.css(`mat-panel-title`);
|
||||||
name: ElementFinder = element(by.css(`[data-automation-id='card-textitem-value-name']`));
|
name = element(by.css(`[data-automation-id='card-textitem-value-name']`));
|
||||||
creator: ElementFinder = element(by.css(`[data-automation-id='card-textitem-value-createdByUser.displayName']`));
|
creator = element(by.css(`[data-automation-id='card-textitem-value-createdByUser.displayName']`));
|
||||||
createdDate: ElementFinder = element(by.css(`span[data-automation-id='card-dateitem-createdAt'] span`));
|
createdDate = element(by.css(`span[data-automation-id='card-dateitem-createdAt'] span`));
|
||||||
modifier: ElementFinder = element(by.css(`[data-automation-id='card-textitem-value-modifiedByUser.displayName']`));
|
modifier = element(by.css(`[data-automation-id='card-textitem-value-modifiedByUser.displayName']`));
|
||||||
modifiedDate: ElementFinder = element(by.css(`span[data-automation-id='card-dateitem-modifiedAt'] span`));
|
modifiedDate = element(by.css(`span[data-automation-id='card-dateitem-modifiedAt'] span`));
|
||||||
mimetypeName: ElementFinder = element(by.css(`[data-automation-id='card-textitem-value-content.mimeTypeName']`));
|
mimetypeName = element(by.css(`[data-automation-id='card-textitem-value-content.mimeTypeName']`));
|
||||||
size: ElementFinder = element(by.css(`[data-automation-id='card-textitem-value-content.sizeInBytes']`));
|
size = 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']`));
|
description = 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']`));
|
author = 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`));
|
titleProperty = 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']`));
|
editIcon = 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']`));
|
informationButton = 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']`));
|
informationSpan = 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`));
|
informationIcon = element(by.css(`span[data-automation-id='meta-data-card-toggle-expand-label'] ~ mat-icon`));
|
||||||
displayEmptySwitch: ElementFinder = element(by.id(`adf-metadata-empty`));
|
displayEmptySwitch = element(by.id(`adf-metadata-empty`));
|
||||||
readonlySwitch: ElementFinder = element(by.id(`adf-metadata-readonly`));
|
readonlySwitch = element(by.id(`adf-metadata-readonly`));
|
||||||
multiSwitch: ElementFinder = element(by.id(`adf-metadata-multi`));
|
multiSwitch = element(by.id(`adf-metadata-multi`));
|
||||||
presetSwitch: ElementFinder = element(by.id('adf-toggle-custom-preset'));
|
presetSwitch = element(by.id('adf-toggle-custom-preset'));
|
||||||
defaultPropertiesSwitch: ElementFinder = element(by.id('adf-metadata-default-properties'));
|
defaultPropertiesSwitch = element(by.id('adf-metadata-default-properties'));
|
||||||
closeButton: ElementFinder = element(by.cssContainingText('button.mat-button span', 'Close'));
|
closeButton = element(by.cssContainingText('button.mat-button span', 'Close'));
|
||||||
displayAspect: ElementFinder = element(by.css(`input[placeholder='Display Aspect']`));
|
displayAspect = element(by.css(`input[placeholder='Display Aspect']`));
|
||||||
applyAspect: ElementFinder = element(by.cssContainingText(`button span.mat-button-wrapper`, 'Apply Aspect'));
|
applyAspect = element(by.cssContainingText(`button span.mat-button-wrapper`, 'Apply Aspect'));
|
||||||
saveMetadataButton: ElementFinder = element(by.css(`[data-automation-id='save-metadata']`));
|
saveMetadataButton = element(by.css(`[data-automation-id='save-metadata']`));
|
||||||
resetMetadataButton: ElementFinder = element(by.css(`[data-automation-id='reset-metadata']`));
|
resetMetadataButton = element(by.css(`[data-automation-id='reset-metadata']`));
|
||||||
|
|
||||||
async getTitle(): Promise<string> {
|
async getTitle(): Promise<string> {
|
||||||
return BrowserActions.getText(this.title);
|
return BrowserActions.getText(this.title);
|
||||||
@@ -129,7 +129,7 @@ export class MetadataViewPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async clickOnPropertiesTab(): Promise<void> {
|
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);
|
await BrowserActions.click(propertiesTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,70 +138,70 @@ export class MetadataViewPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async editPropertyIconIsDisplayed(propertyName: string) {
|
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);
|
await BrowserVisibility.waitUntilElementIsPresent(editPropertyIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickResetButton(): Promise<void> {
|
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);
|
await BrowserActions.click(clearPropertyIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterPropertyText(propertyName: string, text: string | number): Promise<void> {
|
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 BrowserActions.clearSendKeys(textField, text.toString());
|
||||||
await textField.sendKeys(protractor.Key.ENTER);
|
await textField.sendKeys(protractor.Key.ENTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterPresetText(text: string): Promise<void> {
|
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 BrowserActions.clearSendKeys(presetField, text.toString());
|
||||||
await presetField.sendKeys(protractor.Key.ENTER);
|
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);
|
await BrowserActions.click(applyButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterDescriptionText(text: string): Promise<void> {
|
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 BrowserActions.clearSendKeys(textField, text);
|
||||||
await textField.sendKeys(Key.TAB);
|
await textField.sendKeys(Key.TAB);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getPropertyText(propertyName: string, type?: string): Promise<string> {
|
async getPropertyText(propertyName: string, type?: string): Promise<string> {
|
||||||
const propertyType = type || 'textitem';
|
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);
|
return BrowserActions.getInputValue(textField);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getPropertyIconTooltip(propertyName: string): Promise<string> {
|
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');
|
return editPropertyIcon.getAttribute('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickMetadataGroup(groupName: string): Promise<void> {
|
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);
|
await BrowserActions.click(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkMetadataGroupIsPresent(groupName: string): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkMetadataGroupIsNotPresent(groupName: string): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsNotVisible(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkMetadataGroupIsExpand(groupName: string): Promise<void> {
|
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 BrowserVisibility.waitUntilElementIsVisible(group);
|
||||||
await expect(await group.getAttribute('class')).toContain('mat-expanded');
|
await expect(await group.getAttribute('class')).toContain('mat-expanded');
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkMetadataGroupIsNotExpand(groupName: string): Promise<void> {
|
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 BrowserVisibility.waitUntilElementIsPresent(group);
|
||||||
await expect(await group.getAttribute('class')).not.toContain('mat-expanded');
|
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> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(property);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkPropertyIsNotVisible(propertyName: string, type: string): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsNotVisible(property);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,22 +22,22 @@ import { ProcessServicesPage } from './process-services/process-services.page';
|
|||||||
|
|
||||||
export class NavigationBarPage {
|
export class NavigationBarPage {
|
||||||
|
|
||||||
linkListContainer: ElementFinder = element(by.css('.app-sidenav-linklist'));
|
linkListContainer = element(by.css('.app-sidenav-linklist'));
|
||||||
linkMenuChildrenContainer: ElementFinder = element(by.css('.nestedMenu'));
|
linkMenuChildrenContainer = element(by.css('.nestedMenu'));
|
||||||
dataTableNestedButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Datatable"]'));
|
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"]'));
|
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"]'));
|
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"]'));
|
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"]'));
|
processServicesCloudHomeButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Home"]'));
|
||||||
themeButton: ElementFinder = element(by.css('button[data-automation-id="theme menu"]'));
|
themeButton = element(by.css('button[data-automation-id="theme menu"]'));
|
||||||
themeMenuContent: ElementFinder = element(by.css('div[class*="mat-menu-panel"]'));
|
themeMenuContent = element(by.css('div[class*="mat-menu-panel"]'));
|
||||||
languageMenuButton: ElementFinder = element(by.css('button[data-automation-id="language-menu-button"]'));
|
languageMenuButton = element(by.css('button[data-automation-id="language-menu-button"]'));
|
||||||
appTitle: ElementFinder = element(by.css('.adf-app-title'));
|
appTitle = element(by.css('.adf-app-title'));
|
||||||
menuButton: ElementFinder = element(by.css('button[data-automation-id="adf-menu-icon"]'));
|
menuButton = element(by.css('button[data-automation-id="adf-menu-icon"]'));
|
||||||
formButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Form"]'));
|
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"]'));
|
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}"]`));
|
const menu = element(by.css(`.app-sidenav-link[data-automation-id="${title}"]`));
|
||||||
await BrowserActions.closeMenuAndDialogs();
|
await BrowserActions.closeMenuAndDialogs();
|
||||||
await BrowserActions.click(menu);
|
await BrowserActions.click(menu);
|
||||||
@@ -185,7 +185,7 @@ export class NavigationBarPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async clickOnSpecificThemeButton(themeName): Promise<void> {
|
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 BrowserActions.click(themeElement);
|
||||||
await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
|
await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
|
||||||
}
|
}
|
||||||
@@ -201,7 +201,7 @@ export class NavigationBarPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async chooseLanguage(language): Promise<void> {
|
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 BrowserActions.click(buttonLanguage);
|
||||||
await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
|
await BrowserVisibility.waitUntilElementIsNotPresent(this.linkMenuChildrenContainer);
|
||||||
}
|
}
|
||||||
@@ -214,13 +214,13 @@ export class NavigationBarPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.menuButton);
|
await BrowserVisibility.waitUntilElementIsNotVisible(this.menuButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkToolbarColor(color): Promise<void> {
|
async checkToolbarColor(color: string): Promise<void> {
|
||||||
const toolbarColor: ElementFinder = element(by.css(`mat-toolbar[class*="mat-${color}"]`));
|
const toolbarColor = element(by.css(`mat-toolbar[class*="mat-${color}"]`));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(toolbarColor);
|
await BrowserVisibility.waitUntilElementIsVisible(toolbarColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickAppLogo(logoTitle): Promise<void> {
|
async clickAppLogo(logoTitle: string): Promise<void> {
|
||||||
const appLogo: ElementFinder = element(by.css('a[title="' + logoTitle + '"]'));
|
const appLogo = element(by.css('a[title="' + logoTitle + '"]'));
|
||||||
await BrowserActions.click(appLogo);
|
await BrowserActions.click(appLogo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,12 +228,12 @@ export class NavigationBarPage {
|
|||||||
await BrowserActions.click(this.appTitle);
|
await BrowserActions.click(this.appTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkLogoTooltip(logoTooltipTitle): Promise<void> {
|
async checkLogoTooltip(logoTooltipTitle: string): Promise<void> {
|
||||||
const logoTooltip: ElementFinder = element(by.css('a[title="' + logoTooltipTitle + '"]'));
|
const logoTooltip = element(by.css('a[title="' + logoTooltipTitle + '"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(logoTooltip);
|
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`);
|
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 { BrowserActions, BrowserVisibility, DataTableComponentPage, DropdownPage } from '@alfresco/adf-testing';
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
|
|
||||||
const column = {
|
const column = {
|
||||||
role: 'Role'
|
role: 'Role'
|
||||||
@@ -26,16 +26,16 @@ export class PermissionsPage {
|
|||||||
|
|
||||||
dataTableComponentPage: DataTableComponentPage = new DataTableComponentPage();
|
dataTableComponentPage: DataTableComponentPage = new DataTableComponentPage();
|
||||||
|
|
||||||
addPermissionButton: ElementFinder = element(by.css("button[data-automation-id='adf-add-permission-button']"));
|
addPermissionButton = element(by.css("button[data-automation-id='adf-add-permission-button']"));
|
||||||
addPermissionDialog: ElementFinder = element(by.css('adf-add-permission-dialog'));
|
addPermissionDialog = element(by.css('adf-add-permission-dialog'));
|
||||||
searchUserInput: ElementFinder = element(by.id('searchInput'));
|
searchUserInput = element(by.id('searchInput'));
|
||||||
searchResults: ElementFinder = element(by.css('#adf-add-permission-authority-results #adf-search-results-content'));
|
searchResults = element(by.css('#adf-add-permission-authority-results #adf-search-results-content'));
|
||||||
addButton: ElementFinder = element(by.id('add-permission-dialog-confirm-button'));
|
addButton = element(by.id('add-permission-dialog-confirm-button'));
|
||||||
permissionInheritedButton: ElementFinder = element.all(by.css("div[class='app-inherit_permission_button'] button")).first();
|
permissionInheritedButton = element.all(by.css("div[class='app-inherit_permission_button'] button")).first();
|
||||||
noPermissions: ElementFinder = element(by.css('div[id="adf-no-permissions-template"]'));
|
noPermissions = element(by.css('div[id="adf-no-permissions-template"]'));
|
||||||
deletePermissionButton: ElementFinder = element(by.css(`button[data-automation-id='adf-delete-permission-button']`));
|
deletePermissionButton = element(by.css(`button[data-automation-id='adf-delete-permission-button']`));
|
||||||
permissionDisplayContainer: ElementFinder = element(by.css(`div[id='adf-permission-display-container']`));
|
permissionDisplayContainer = element(by.css(`div[id='adf-permission-display-container']`));
|
||||||
closeButton: ElementFinder = element(by.id('add-permission-dialog-close-button'));
|
closeButton = element(by.id('add-permission-dialog-close-button'));
|
||||||
|
|
||||||
async clickCloseButton(): Promise<void> {
|
async clickCloseButton(): Promise<void> {
|
||||||
await BrowserActions.click(this.closeButton);
|
await BrowserActions.click(this.closeButton);
|
||||||
@@ -57,7 +57,7 @@ export class PermissionsPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchUserInput);
|
await BrowserVisibility.waitUntilElementIsVisible(this.searchUserInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
async searchUserOrGroup(name): Promise<void> {
|
async searchUserOrGroup(name: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.searchUserInput, name);
|
await BrowserActions.clearSendKeys(this.searchUserInput, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,19 +65,19 @@ export class PermissionsPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchResults);
|
await BrowserVisibility.waitUntilElementIsVisible(this.searchResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickUserOrGroup(name): Promise<void> {
|
async clickUserOrGroup(name: string): Promise<void> {
|
||||||
const userOrGroupName: ElementFinder = element(by.cssContainingText('mat-list-option .mat-list-text', name));
|
const userOrGroupName = element(by.cssContainingText('mat-list-option .mat-list-text', name));
|
||||||
await BrowserActions.clickScript(userOrGroupName);
|
await BrowserActions.clickScript(userOrGroupName);
|
||||||
await BrowserActions.click(this.addButton);
|
await BrowserActions.click(this.addButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkUserOrGroupIsAdded(name): Promise<void> {
|
async checkUserOrGroupIsAdded(name: string): Promise<void> {
|
||||||
const userOrGroupName: ElementFinder = element(by.css('div[data-automation-id="text_' + name + '"]'));
|
const userOrGroupName = element(by.css('div[data-automation-id="text_' + name + '"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(userOrGroupName);
|
await BrowserVisibility.waitUntilElementIsVisible(userOrGroupName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkUserOrGroupIsDeleted(name): Promise<void> {
|
async checkUserOrGroupIsDeleted(name: string): Promise<void> {
|
||||||
const userOrGroupName: ElementFinder = element(by.css('div[data-automation-id="text_' + name + '"]'));
|
const userOrGroupName = element(by.css('div[data-automation-id="text_' + name + '"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(userOrGroupName);
|
await BrowserVisibility.waitUntilElementIsNotVisible(userOrGroupName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,12 +105,12 @@ export class PermissionsPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.css('[class*="adf-datatable-permission"]')));
|
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);
|
const locator = this.dataTableComponentPage.getCellByRowContentAndColumn('Authority ID', rowName, column.role);
|
||||||
return BrowserActions.getText(locator);
|
return BrowserActions.getText(locator);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickRoleDropdownByUserOrGroupName(name): Promise<void> {
|
async clickRoleDropdownByUserOrGroupName(name: string): Promise<void> {
|
||||||
const row = this.dataTableComponentPage.getRow('Authority ID', name);
|
const row = this.dataTableComponentPage.getRow('Authority ID', name);
|
||||||
await BrowserActions.click(row.element(by.id('adf-select-role-permission')));
|
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'));
|
return element.all(by.css('.mat-option-text'));
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectOption(name): Promise<void> {
|
async selectOption(name: string): Promise<void> {
|
||||||
await new DropdownPage().selectOption(name);
|
await new DropdownPage().selectOption(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,8 +127,8 @@ export class PermissionsPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.permissionDisplayContainer);
|
await BrowserVisibility.waitUntilElementIsVisible(this.permissionDisplayContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkUserOrGroupIsDisplayed(name): Promise<void> {
|
async checkUserOrGroupIsDisplayed(name: string): Promise<void> {
|
||||||
const userOrGroupName: ElementFinder = element(by.cssContainingText('mat-list-option .mat-list-text', name));
|
const userOrGroupName = element(by.cssContainingText('mat-list-option .mat-list-text', name));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(userOrGroupName);
|
await BrowserVisibility.waitUntilElementIsVisible(userOrGroupName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,18 +15,18 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, protractor, ElementFinder } from 'protractor';
|
import { element, by, protractor } from 'protractor';
|
||||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class AnalyticsPage {
|
export class AnalyticsPage {
|
||||||
|
|
||||||
toolbarTitleInput: ElementFinder = element(by.css('input[data-automation-id="reportName"]'));
|
toolbarTitleInput = element(by.css('input[data-automation-id="reportName"]'));
|
||||||
toolbarTitleContainer: ElementFinder = element(by.css('adf-toolbar-title'));
|
toolbarTitleContainer = element(by.css('adf-toolbar-title'));
|
||||||
toolbarTitle: ElementFinder = element(by.xpath('//mat-toolbar/adf-toolbar-title/div/h4'));
|
toolbarTitle = element(by.xpath('//mat-toolbar/adf-toolbar-title/div/h4'));
|
||||||
reportMessage: ElementFinder = element(by.css('div[class="ng-star-inserted"] span'));
|
reportMessage = element(by.css('div[class="ng-star-inserted"] span'));
|
||||||
|
|
||||||
async getReport(title): Promise<void> {
|
async getReport(title: string): Promise<void> {
|
||||||
const reportTitle: ElementFinder = element(by.css(`mat-icon[data-automation-id="${title}_filter"]`));
|
const reportTitle = element(by.css(`mat-icon[data-automation-id="${title}_filter"]`));
|
||||||
await BrowserActions.click(reportTitle);
|
await BrowserActions.click(reportTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,17 +15,17 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserVisibility, BrowserActions, DropdownPage } from '@alfresco/adf-testing';
|
import { BrowserVisibility, BrowserActions, DropdownPage } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class AttachFormPage {
|
export class AttachFormPage {
|
||||||
|
|
||||||
noFormMessage: ElementFinder = element(by.css('.adf-empty-content__title'));
|
noFormMessage = element(by.css('.adf-empty-content__title'));
|
||||||
attachFormButton: ElementFinder = element(by.id('adf-attach-form-attach-button'));
|
attachFormButton = element(by.id('adf-attach-form-attach-button'));
|
||||||
completeButton: ElementFinder = element(by.id('adf-attach-form-complete-button'));
|
completeButton = element(by.id('adf-attach-form-complete-button'));
|
||||||
formDropdown: ElementFinder = element(by.id('form_id'));
|
formDropdown = element(by.id('form_id'));
|
||||||
cancelButton: ElementFinder = element(by.id('adf-attach-form-cancel-button'));
|
cancelButton = element(by.id('adf-attach-form-cancel-button'));
|
||||||
defaultTitle: ElementFinder = element(by.css('mat-card-title[class="mat-card-title mat-card-title"]'));
|
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']")));
|
attachFormDropdown = new DropdownPage(element(by.css("div[class='adf-attach-form-row']")));
|
||||||
|
|
||||||
async checkNoFormMessageIsDisplayed(): Promise<void> {
|
async checkNoFormMessageIsDisplayed(): Promise<void> {
|
||||||
|
@@ -15,33 +15,33 @@
|
|||||||
* limitations under the License.
|
* 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 path from 'path';
|
||||||
import * as remote from 'selenium-webdriver/remote';
|
import * as remote from 'selenium-webdriver/remote';
|
||||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class AttachmentListPage {
|
export class AttachmentListPage {
|
||||||
|
|
||||||
attachFileButton: ElementFinder = element(by.css("input[type='file']"));
|
attachFileButton = element(by.css("input[type='file']"));
|
||||||
buttonMenu: ElementFinder = element(by.css("button[data-automation-id='action_menu_0']"));
|
buttonMenu = element(by.css("button[data-automation-id='action_menu_0']"));
|
||||||
viewButton: ElementFinder = element(by.css("button[data-automation-id*='MENU_ACTIONS.VIEW_CONTENT']"));
|
viewButton = element(by.css("button[data-automation-id*='MENU_ACTIONS.VIEW_CONTENT']"));
|
||||||
removeButton: ElementFinder = element(by.css("button[data-automation-id*='MENU_ACTIONS.REMOVE_CONTENT']"));
|
removeButton = element(by.css("button[data-automation-id*='MENU_ACTIONS.REMOVE_CONTENT']"));
|
||||||
downloadButton: ElementFinder = element(by.css("button[data-automation-id*='MENU_ACTIONS.DOWNLOAD_CONTENT']"));
|
downloadButton = element(by.css("button[data-automation-id*='MENU_ACTIONS.DOWNLOAD_CONTENT']"));
|
||||||
noContentContainer: ElementFinder = element(by.css("div[class*='adf-no-content-container']"));
|
noContentContainer = element(by.css("div[class*='adf-no-content-container']"));
|
||||||
|
|
||||||
async checkEmptyAttachmentList(): Promise<void> {
|
async checkEmptyAttachmentList(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.noContentContainer);
|
await BrowserVisibility.waitUntilElementIsVisible(this.noContentContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickAttachFileButton(fileLocation): Promise<void> {
|
async clickAttachFileButton(fileLocation: string): Promise<void> {
|
||||||
browser.setFileDetector(new remote.FileDetector());
|
browser.setFileDetector(new remote.FileDetector());
|
||||||
|
|
||||||
await BrowserVisibility.waitUntilElementIsPresent(this.attachFileButton);
|
await BrowserVisibility.waitUntilElementIsPresent(this.attachFileButton);
|
||||||
await this.attachFileButton.sendKeys(path.resolve(path.join(browser.params.testConfig.main.rootPath, fileLocation)));
|
await this.attachFileButton.sendKeys(path.resolve(path.join(browser.params.testConfig.main.rootPath, fileLocation)));
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFileIsAttached(name): Promise<void> {
|
async checkFileIsAttached(name: string): Promise<void> {
|
||||||
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 BrowserVisibility.waitUntilElementIsVisible(fileAttached);
|
await BrowserVisibility.waitUntilElementIsVisible(fileAttached);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ export class AttachmentListPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.attachFileButton);
|
await BrowserVisibility.waitUntilElementIsNotVisible(this.attachFileButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async viewFile(name): Promise<void> {
|
async viewFile(name: string): Promise<void> {
|
||||||
await BrowserActions.closeMenuAndDialogs();
|
await BrowserActions.closeMenuAndDialogs();
|
||||||
await BrowserActions.click(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
|
await BrowserActions.click(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
|
||||||
await BrowserActions.click(this.buttonMenu);
|
await BrowserActions.click(this.buttonMenu);
|
||||||
@@ -58,7 +58,7 @@ export class AttachmentListPage {
|
|||||||
await browser.sleep(500);
|
await browser.sleep(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
async removeFile(name): Promise<void> {
|
async removeFile(name: string): Promise<void> {
|
||||||
await BrowserActions.closeMenuAndDialogs();
|
await BrowserActions.closeMenuAndDialogs();
|
||||||
await BrowserActions.click(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
|
await BrowserActions.click(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
|
||||||
await BrowserActions.click(this.buttonMenu);
|
await BrowserActions.click(this.buttonMenu);
|
||||||
@@ -67,7 +67,7 @@ export class AttachmentListPage {
|
|||||||
await browser.sleep(500);
|
await browser.sleep(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
async downloadFile(name): Promise<void> {
|
async downloadFile(name: string): Promise<void> {
|
||||||
await BrowserActions.closeMenuAndDialogs();
|
await BrowserActions.closeMenuAndDialogs();
|
||||||
await BrowserActions.click(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
|
await BrowserActions.click(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
|
||||||
await BrowserActions.click(this.buttonMenu);
|
await BrowserActions.click(this.buttonMenu);
|
||||||
@@ -75,16 +75,16 @@ export class AttachmentListPage {
|
|||||||
await BrowserActions.click(this.downloadButton);
|
await BrowserActions.click(this.downloadButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async doubleClickFile(name): Promise<void> {
|
async doubleClickFile(name: string): Promise<void> {
|
||||||
await BrowserActions.closeMenuAndDialogs();
|
await BrowserActions.closeMenuAndDialogs();
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
|
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 BrowserActions.click(fileAttached);
|
||||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFileIsRemoved(name): Promise<void> {
|
async checkFileIsRemoved(name: string): Promise<void> {
|
||||||
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 BrowserVisibility.waitUntilElementIsNotVisible(fileAttached);
|
await BrowserVisibility.waitUntilElementIsNotVisible(fileAttached);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,15 +16,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { TogglePage } from '@alfresco/adf-testing';
|
import { TogglePage } from '@alfresco/adf-testing';
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
|
|
||||||
export class AppSettingsTogglesPage {
|
export class AppSettingsTogglesPage {
|
||||||
|
|
||||||
togglePage: TogglePage = new TogglePage();
|
togglePage = new TogglePage();
|
||||||
|
|
||||||
showDetailsHeaderToggle: ElementFinder = element(by.id('adf-show-header'));
|
showDetailsHeaderToggle = element(by.id('adf-show-header'));
|
||||||
showTaskFilterIconsToggle: ElementFinder = element(by.id('adf-show-task-filter-icon'));
|
showTaskFilterIconsToggle = element(by.id('adf-show-task-filter-icon'));
|
||||||
showProcessFilterIconsToggle: ElementFinder = element(by.id('adf-show-process-filter-icon'));
|
showProcessFilterIconsToggle = element(by.id('adf-show-process-filter-icon'));
|
||||||
|
|
||||||
async enableShowHeader(): Promise<void> {
|
async enableShowHeader(): Promise<void> {
|
||||||
await this.togglePage.enableToggle(this.showDetailsHeaderToggle);
|
await this.togglePage.enableToggle(this.showDetailsHeaderToggle);
|
||||||
|
@@ -15,17 +15,17 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class ChecklistDialog {
|
export class ChecklistDialog {
|
||||||
|
|
||||||
nameField: ElementFinder = element(by.css('input[data-automation-id="checklist-name"]'));
|
nameField = element(by.css('input[data-automation-id="checklist-name"]'));
|
||||||
addChecklistButton: ElementFinder = element(by.css('button[id="add-check"] span'));
|
addChecklistButton = element(by.css('button[id="add-check"] span'));
|
||||||
closeButton: ElementFinder = element(by.css('button[id="close-check-dialog"] span'));
|
closeButton = element(by.css('button[id="close-check-dialog"] span'));
|
||||||
dialogTitle: ElementFinder = element(by.id('add-checklist-title'));
|
dialogTitle = element(by.id('add-checklist-title'));
|
||||||
|
|
||||||
async addName(name): Promise<void> {
|
async addName(name: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.nameField, name);
|
await BrowserActions.clearSendKeys(this.nameField, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,13 +20,13 @@ import { BrowserVisibility, BrowserActions, DropdownPage } from '@alfresco/adf-t
|
|||||||
|
|
||||||
export class StartTaskDialogPage {
|
export class StartTaskDialogPage {
|
||||||
|
|
||||||
name: ElementFinder = element(by.css('input[id="name_id"]'));
|
name = element(by.css('input[id="name_id"]'));
|
||||||
dueDate: ElementFinder = element(by.css('input[id="date_id"]'));
|
dueDate = element(by.css('input[id="date_id"]'));
|
||||||
description: ElementFinder = element(by.css('textarea[id="description_id"]'));
|
description = element(by.css('textarea[id="description_id"]'));
|
||||||
assignee: ElementFinder = element(by.css('div#people-widget-content input'));
|
assignee = element(by.css('div#people-widget-content input'));
|
||||||
startButton: ElementFinder = element(by.css('button[id="button-start"]'));
|
startButton = element(by.css('button[id="button-start"]'));
|
||||||
startButtonEnabled: ElementFinder = element(by.css('button[id="button-start"]:not(disabled)'));
|
startButtonEnabled = element(by.css('button[id="button-start"]:not(disabled)'));
|
||||||
cancelButton: ElementFinder = element(by.css('button[id="button-cancel"]'));
|
cancelButton = element(by.css('button[id="button-cancel"]'));
|
||||||
|
|
||||||
selectFormDropdown = new DropdownPage(element(by.css('mat-select[id="form_id"]')));
|
selectFormDropdown = new DropdownPage(element(by.css('mat-select[id="form_id"]')));
|
||||||
selectAssigneeDropdown = new DropdownPage();
|
selectAssigneeDropdown = new DropdownPage();
|
||||||
@@ -88,7 +88,7 @@ export class StartTaskDialogPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkValidationErrorIsDisplayed(error: string, elementRef = 'mat-error'): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(errorElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,11 +16,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage } from '@alfresco/adf-testing';
|
import { BrowserActions, BrowserVisibility, DataTableComponentPage } from '@alfresco/adf-testing';
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
|
|
||||||
export class FiltersPage {
|
export class FiltersPage {
|
||||||
|
|
||||||
activeFilter: ElementFinder = element(by.css('.adf-active'));
|
activeFilter = element(by.css('.adf-active'));
|
||||||
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
||||||
|
|
||||||
async getActiveFilter(): Promise<string> {
|
async getActiveFilter(): Promise<string> {
|
||||||
@@ -41,7 +41,7 @@ export class FiltersPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkFilterIsHighlighted(filterName: string): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(highlightedFilter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,32 +15,32 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { by, element, ElementFinder, protractor } from 'protractor';
|
import { by, element, protractor } from 'protractor';
|
||||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class ProcessDetailsPage {
|
export class ProcessDetailsPage {
|
||||||
processTitle: ElementFinder = element(by.css('mat-card-title[class="mat-card-title"]'));
|
processTitle = element(by.css('mat-card-title[class="mat-card-title"]'));
|
||||||
processDetailsMessage: ElementFinder = element(by.css('adf-process-instance-details div[class="ng-star-inserted"]'));
|
processDetailsMessage = element(by.css('adf-process-instance-details div[class="ng-star-inserted"]'));
|
||||||
processStatusField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-status"]'));
|
processStatusField = element(by.css('[data-automation-id="card-textitem-value-status"]'));
|
||||||
processEndDateField: ElementFinder = element(by.css('span[data-automation-id="card-dateitem-ended"]'));
|
processEndDateField = element(by.css('span[data-automation-id="card-dateitem-ended"]'));
|
||||||
processCategoryField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-category"]'));
|
processCategoryField = element(by.css('[data-automation-id="card-textitem-value-category"]'));
|
||||||
processBusinessKeyField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-businessKey"]'));
|
processBusinessKeyField = element(by.css('[data-automation-id="card-textitem-value-businessKey"]'));
|
||||||
processCreatedByField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-assignee"]'));
|
processCreatedByField = element(by.css('[data-automation-id="card-textitem-value-assignee"]'));
|
||||||
processCreatedField: ElementFinder = element(by.css('span[data-automation-id="card-dateitem-created"]'));
|
processCreatedField = element(by.css('span[data-automation-id="card-dateitem-created"]'));
|
||||||
processIdField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-id"]'));
|
processIdField = element(by.css('[data-automation-id="card-textitem-value-id"]'));
|
||||||
processDescription: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-description"]'));
|
processDescription = element(by.css('[data-automation-id="card-textitem-value-description"]'));
|
||||||
showDiagramButtonDisabled: ElementFinder = element(by.css('button[id="show-diagram-button"][disabled]'));
|
showDiagramButtonDisabled = element(by.css('button[id="show-diagram-button"][disabled]'));
|
||||||
propertiesList: ElementFinder = element(by.css('div[class="adf-property-list"]'));
|
propertiesList = element(by.css('div[class="adf-property-list"]'));
|
||||||
showDiagramButton: ElementFinder = element(by.id('show-diagram-button'));
|
showDiagramButton = element(by.id('show-diagram-button'));
|
||||||
diagramCanvas: ElementFinder = element(by.css('svg[xmlns="http://www.w3.org/2000/svg"]'));
|
diagramCanvas = 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"]'));
|
backButton = element(by.css('app-show-diagram button[class="mat-mini-fab mat-accent"]'));
|
||||||
commentInput: ElementFinder = element(by.id('comment-input'));
|
commentInput = element(by.id('comment-input'));
|
||||||
auditLogButton: ElementFinder = element(by.css('button[adf-process-audit]'));
|
auditLogButton = element(by.css('button[adf-process-audit]'));
|
||||||
auditLogEmptyListMessage: ElementFinder = element(by.css('.app-empty-list-header'));
|
auditLogEmptyListMessage = element(by.css('.app-empty-list-header'));
|
||||||
cancelProcessButton: ElementFinder = element(by.css('div[data-automation-id="header-status"] > button'));
|
cancelProcessButton = element(by.css('div[data-automation-id="header-status"] > button'));
|
||||||
activeTask: ElementFinder = element(by.css('div[data-automation-id="active-tasks"]'));
|
activeTask = element(by.css('div[data-automation-id="active-tasks"]'));
|
||||||
completedTask: ElementFinder = element(by.css('div[data-automation-id="completed-tasks"]'));
|
completedTask = element(by.css('div[data-automation-id="completed-tasks"]'));
|
||||||
taskTitle: ElementFinder = element(by.css('h2[class="adf-activiti-task-details__header"]'));
|
taskTitle = element(by.css('h2[class="adf-activiti-task-details__header"]'));
|
||||||
|
|
||||||
async checkDetailsAreDisplayed(): Promise<void> {
|
async checkDetailsAreDisplayed(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.processStatusField);
|
await BrowserVisibility.waitUntilElementIsVisible(this.processStatusField);
|
||||||
@@ -115,8 +115,8 @@ export class ProcessDetailsPage {
|
|||||||
await this.commentInput.sendKeys(protractor.Key.ENTER);
|
await this.commentInput.sendKeys(protractor.Key.ENTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkCommentIsDisplayed(comment): Promise<void> {
|
async checkCommentIsDisplayed(comment: string): Promise<void> {
|
||||||
const commentInserted: ElementFinder = element(by.cssContainingText('div[id="comment-message"]', comment));
|
const commentInserted = element(by.cssContainingText('div[id="comment-message"]', comment));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(commentInserted);
|
await BrowserVisibility.waitUntilElementIsVisible(commentInserted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,23 +16,23 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage, StartProcessPage } from '@alfresco/adf-testing';
|
import { BrowserActions, BrowserVisibility, DataTableComponentPage, StartProcessPage } from '@alfresco/adf-testing';
|
||||||
import { by, element, ElementFinder, Locator } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
|
|
||||||
export class ProcessFiltersPage {
|
export class ProcessFiltersPage {
|
||||||
|
|
||||||
dataTable = new DataTableComponentPage();
|
dataTable = new DataTableComponentPage();
|
||||||
runningFilter: ElementFinder = element(by.css('button[data-automation-id="Running_filter"]'));
|
runningFilter = element(by.css('button[data-automation-id="Running_filter"]'));
|
||||||
completedFilter: ElementFinder = element(by.css('button[data-automation-id="Completed_filter"]'));
|
completedFilter = element(by.css('button[data-automation-id="Completed_filter"]'));
|
||||||
allFilter: ElementFinder = element(by.css('button[data-automation-id="All_filter"]'));
|
allFilter = element(by.css('button[data-automation-id="All_filter"]'));
|
||||||
createProcessButton: ElementFinder = element(by.css('.app-processes-menu button[data-automation-id="create-button"] > span'));
|
createProcessButton = 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"]'));
|
newProcessButton = 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"]'));
|
processesPage = 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'));
|
accordionMenu = element(by.css('.app-processes-menu mat-accordion'));
|
||||||
buttonWindow: ElementFinder = element(by.css('div > button[data-automation-id="btn-start-process"] > div'));
|
buttonWindow = 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();
|
noContentMessage = 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"]');
|
rows = 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();
|
tableBody = 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');
|
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"]');
|
processIcon = by.css('adf-icon[data-automation-id="adf-filter-icon"]');
|
||||||
|
|
||||||
async startProcess(): Promise<StartProcessPage> {
|
async startProcess(): Promise<StartProcessPage> {
|
||||||
@@ -71,14 +71,14 @@ export class ProcessFiltersPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.noContentMessage);
|
await BrowserVisibility.waitUntilElementIsVisible(this.noContentMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectFromProcessList(title): Promise<void> {
|
async selectFromProcessList(title: string): Promise<void> {
|
||||||
await BrowserActions.closeMenuAndDialogs();
|
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);
|
await BrowserActions.click(processName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFilterIsHighlighted(filterName): Promise<void> {
|
async checkFilterIsHighlighted(filterName: string): Promise<void> {
|
||||||
const processNameHighlighted: ElementFinder = element(by.css(`adf-process-instance-filters .adf-active button[data-automation-id='${filterName}_filter']`));
|
const processNameHighlighted = element(by.css(`adf-process-instance-filters .adf-active button[data-automation-id='${filterName}_filter']`));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(processNameHighlighted);
|
await BrowserVisibility.waitUntilElementIsVisible(processNameHighlighted);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,26 +103,26 @@ export class ProcessFiltersPage {
|
|||||||
return this.dataTable.getAllRowsColumnValues('Name');
|
return this.dataTable.getAllRowsColumnValues('Name');
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFilterIsDisplayed(name): Promise<void> {
|
async checkFilterIsDisplayed(name: string): Promise<void> {
|
||||||
const filterName: ElementFinder = element(by.css(`button[data-automation-id='${name}_filter']`));
|
const filterName = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFilterHasNoIcon(name): Promise<void> {
|
async checkFilterHasNoIcon(name: string): Promise<void> {
|
||||||
const filterName: ElementFinder = element(by.css(`button[data-automation-id='${name}_filter']`));
|
const filterName = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(filterName.element(this.processIcon));
|
await BrowserVisibility.waitUntilElementIsNotVisible(filterName.element(this.processIcon));
|
||||||
}
|
}
|
||||||
|
|
||||||
async getFilterIcon(name): Promise<string> {
|
async getFilterIcon(name: string): Promise<string> {
|
||||||
const filterName: ElementFinder = element(by.css(`button[data-automation-id='${name}_filter']`));
|
const filterName = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
await BrowserVisibility.waitUntilElementIsVisible(filterName);
|
||||||
const icon = filterName.element(this.processIcon);
|
const icon = filterName.element(this.processIcon);
|
||||||
return BrowserActions.getText(icon);
|
return BrowserActions.getText(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFilterIsNotDisplayed(name): Promise<void> {
|
async checkFilterIsNotDisplayed(name: string): Promise<void> {
|
||||||
const filterName: ElementFinder = element(by.css(`button[data-automation-id='${name}_filter']`));
|
const filterName = element(by.css(`button[data-automation-id='${name}_filter']`));
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(filterName);
|
await BrowserVisibility.waitUntilElementIsNotVisible(filterName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,12 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
|
|
||||||
export class ProcessListPage {
|
export class ProcessListPage {
|
||||||
|
|
||||||
processListTitle: ElementFinder = element(by.css('div[class="adf-empty-content__title"]'));
|
processListTitle = element(by.css('div[class="adf-empty-content__title"]'));
|
||||||
processInstanceList: ElementFinder = element(by.css('adf-process-instance-list'));
|
processInstanceList = element(by.css('adf-process-instance-list'));
|
||||||
|
|
||||||
getDisplayedProcessListTitle(): Promise<string> {
|
getDisplayedProcessListTitle(): Promise<string> {
|
||||||
return BrowserActions.getText(this.processListTitle);
|
return BrowserActions.getText(this.processListTitle);
|
||||||
|
@@ -16,15 +16,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
import { element, by, browser, ElementFinder } from 'protractor';
|
import { element, by, browser } from 'protractor';
|
||||||
|
|
||||||
export class ProcessServiceTabBarPage {
|
export class ProcessServiceTabBarPage {
|
||||||
|
|
||||||
tasksButton: ElementFinder = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div', 'Tasks')).first();
|
tasksButton = 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();
|
processButton = 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();
|
reportsButton = 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();
|
settingsButton = 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();
|
reportsButtonSelected = element.all(by.cssContainingText('div[class*="mat-tab-label"] .mat-tab-labels div[aria-selected="true"]', 'Reports')).first();
|
||||||
|
|
||||||
async clickTasksButton(): Promise<void> {
|
async clickTasksButton(): Promise<void> {
|
||||||
await BrowserActions.click(this.tasksButton);
|
await BrowserActions.click(this.tasksButton);
|
||||||
|
@@ -17,14 +17,14 @@
|
|||||||
|
|
||||||
import { ProcessServiceTabBarPage } from './process-service-tab-bar.page';
|
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 { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
import { __await } from 'tslib';
|
import { __await } from 'tslib';
|
||||||
|
|
||||||
export class ProcessServicesPage {
|
export class ProcessServicesPage {
|
||||||
|
|
||||||
apsAppsContainer: ElementFinder = element(by.css('div[class="adf-app-listgrid ng-star-inserted"]'));
|
apsAppsContainer = element(by.css('div[class="adf-app-listgrid ng-star-inserted"]'));
|
||||||
taskApp: ElementFinder = element(by.css('mat-card[title="Task App"]'));
|
taskApp = element(by.css('mat-card[title="Task App"]'));
|
||||||
iconTypeLocator = by.css('mat-icon[class*="card-logo-icon"]');
|
iconTypeLocator = by.css('mat-icon[class*="card-logo-icon"]');
|
||||||
descriptionLocator = by.css('mat-card-subtitle[class*="subtitle"]');
|
descriptionLocator = by.css('mat-card-subtitle[class*="subtitle"]');
|
||||||
|
|
||||||
@@ -32,8 +32,8 @@ export class ProcessServicesPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.apsAppsContainer);
|
await BrowserVisibility.waitUntilElementIsVisible(this.apsAppsContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
async goToApp(applicationName): Promise<ProcessServiceTabBarPage> {
|
async goToApp(applicationName: string): Promise<ProcessServiceTabBarPage> {
|
||||||
const app: ElementFinder = element(by.css('mat-card[title="' + applicationName + '"]'));
|
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||||
await BrowserActions.click(app);
|
await BrowserActions.click(app);
|
||||||
return new ProcessServiceTabBarPage();
|
return new ProcessServiceTabBarPage();
|
||||||
}
|
}
|
||||||
@@ -43,33 +43,33 @@ export class ProcessServicesPage {
|
|||||||
return new ProcessServiceTabBarPage();
|
return new ProcessServiceTabBarPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAppIconType(applicationName): Promise<string> {
|
async getAppIconType(applicationName: string): Promise<string> {
|
||||||
const app: ElementFinder = element(by.css('mat-card[title="' + applicationName + '"]'));
|
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(app);
|
await BrowserVisibility.waitUntilElementIsVisible(app);
|
||||||
const iconType = app.element(this.iconTypeLocator);
|
const iconType = app.element(this.iconTypeLocator);
|
||||||
return BrowserActions.getText(iconType);
|
return BrowserActions.getText(iconType);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getBackgroundColor(applicationName): Promise<string> {
|
async getBackgroundColor(applicationName: string): Promise<string> {
|
||||||
const app: ElementFinder = element(by.css('mat-card[title="' + applicationName + '"]'));
|
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(app);
|
await BrowserVisibility.waitUntilElementIsVisible(app);
|
||||||
return app.getCssValue('background-color');
|
return app.getCssValue('background-color');
|
||||||
}
|
}
|
||||||
|
|
||||||
async getDescription(applicationName): Promise<string> {
|
async getDescription(applicationName: string): Promise<string> {
|
||||||
const app: ElementFinder = element(by.css('mat-card[title="' + applicationName + '"]'));
|
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(app);
|
await BrowserVisibility.waitUntilElementIsVisible(app);
|
||||||
const description = app.element(this.descriptionLocator);
|
const description = app.element(this.descriptionLocator);
|
||||||
return BrowserActions.getText(description);
|
return BrowserActions.getText(description);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkAppIsNotDisplayed(applicationName): Promise<void> {
|
async checkAppIsNotDisplayed(applicationName: string): Promise<void> {
|
||||||
const app: ElementFinder = element(by.css('mat-card[title="' + applicationName + '"]'));
|
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(app);
|
await BrowserVisibility.waitUntilElementIsNotVisible(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkAppIsDisplayed(applicationName): Promise<void> {
|
async checkAppIsDisplayed(applicationName: string): Promise<void> {
|
||||||
const app: ElementFinder = element(by.css('mat-card[title="' + applicationName + '"]'));
|
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(app);
|
await BrowserVisibility.waitUntilElementIsVisible(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,55 +16,55 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserActions, BrowserVisibility, DropdownPage, TabsPage } from '@alfresco/adf-testing';
|
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';
|
import { AppSettingsTogglesPage } from './dialog/app-settings-toggles.page';
|
||||||
|
|
||||||
export class TaskDetailsPage {
|
export class TaskDetailsPage {
|
||||||
|
|
||||||
appSettingsTogglesClass = new AppSettingsTogglesPage();
|
appSettingsTogglesClass = new AppSettingsTogglesPage();
|
||||||
|
|
||||||
formContent: ElementFinder = element(by.css('adf-form'));
|
formContent = element(by.css('adf-form'));
|
||||||
formNameField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-formName"]'));
|
formNameField = element(by.css('[data-automation-id="card-textitem-value-formName"]'));
|
||||||
formNameButton: ElementFinder = element(by.css('[data-automation-id="card-textitem-toggle-formName"]'));
|
formNameButton = element(by.css('[data-automation-id="card-textitem-toggle-formName"]'));
|
||||||
assigneeField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-assignee"]'));
|
assigneeField = element(by.css('[data-automation-id="card-textitem-value-assignee"]'));
|
||||||
assigneeButton: ElementFinder = element(by.css('[data-automation-id="card-textitem-toggle-assignee"]'));
|
assigneeButton = element(by.css('[data-automation-id="card-textitem-toggle-assignee"]'));
|
||||||
statusField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-status"]'));
|
statusField = element(by.css('[data-automation-id="card-textitem-value-status"]'));
|
||||||
categoryField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-category"] '));
|
categoryField = element(by.css('[data-automation-id="card-textitem-value-category"] '));
|
||||||
parentNameField: ElementFinder = element(by.css('span[data-automation-id*="parentName"] span'));
|
parentNameField = element(by.css('span[data-automation-id*="parentName"] span'));
|
||||||
parentTaskIdField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-parentTaskId"] '));
|
parentTaskIdField = element(by.css('[data-automation-id="card-textitem-value-parentTaskId"] '));
|
||||||
durationField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-duration"] '));
|
durationField = element(by.css('[data-automation-id="card-textitem-value-duration"] '));
|
||||||
endDateField: ElementFinder = element.all(by.css('span[data-automation-id*="endDate"] span')).first();
|
endDateField = element.all(by.css('span[data-automation-id*="endDate"] span')).first();
|
||||||
createdField: ElementFinder = element(by.css('span[data-automation-id="card-dateitem-created"] span'));
|
createdField = 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();
|
idField = element.all(by.css('[data-automation-id="card-textitem-value-id"]')).first();
|
||||||
descriptionField: ElementFinder = element(by.css('[data-automation-id="card-textitem-value-description"]'));
|
descriptionField = element(by.css('[data-automation-id="card-textitem-value-description"]'));
|
||||||
dueDateField: ElementFinder = element.all(by.css('span[data-automation-id*="dueDate"] span')).first();
|
dueDateField = 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'));
|
activitiesTitle = element(by.css('div[class*="adf-info-drawer-layout-header-title"] div'));
|
||||||
commentField: ElementFinder = element(by.id('comment-input'));
|
commentField = element(by.id('comment-input'));
|
||||||
addCommentButton: ElementFinder = element(by.css('[data-automation-id="comments-input-add"]'));
|
addCommentButton = element(by.css('[data-automation-id="comments-input-add"]'));
|
||||||
involvePeopleButton: ElementFinder = element(by.css('div[class*="add-people"]'));
|
involvePeopleButton = element(by.css('div[class*="add-people"]'));
|
||||||
addPeopleField: ElementFinder = element(by.css('input[data-automation-id="adf-people-search-input"]'));
|
addPeopleField = element(by.css('input[data-automation-id="adf-people-search-input"]'));
|
||||||
addInvolvedUserButton: ElementFinder = element(by.css('button[id="add-people"] span'));
|
addInvolvedUserButton = element(by.css('button[id="add-people"] span'));
|
||||||
emailInvolvedUser = by.xpath('following-sibling::div[@class="adf-people-email"]');
|
emailInvolvedUser = by.xpath('following-sibling::div[@class="adf-people-email"]');
|
||||||
taskDetailsInfoDrawer: ElementFinder = element(by.tagName('adf-info-drawer'));
|
taskDetailsInfoDrawer = element(by.tagName('adf-info-drawer'));
|
||||||
taskDetailsSection: ElementFinder = element(by.css('div[data-automation-id="app-tasks-details"]'));
|
taskDetailsSection = element(by.css('div[data-automation-id="app-tasks-details"]'));
|
||||||
taskDetailsEmptySection: ElementFinder = element(by.css('div[data-automation-id="adf-tasks-details--empty"]'));
|
taskDetailsEmptySection = element(by.css('div[data-automation-id="adf-tasks-details--empty"]'));
|
||||||
completeTask: ElementFinder = element(by.css('button[id="adf-no-form-complete-button"]'));
|
completeTask = element(by.css('button[id="adf-no-form-complete-button"]'));
|
||||||
completeFormTask: ElementFinder = element(by.css('button[id="adf-form-complete"]'));
|
completeFormTask = element(by.css('button[id="adf-form-complete"]'));
|
||||||
taskDetailsTitle: ElementFinder = element(by.css('h2[class="adf-activiti-task-details__header"] span'));
|
taskDetailsTitle = element(by.css('h2[class="adf-activiti-task-details__header"] span'));
|
||||||
auditLogButton: ElementFinder = element(by.css('button[adf-task-audit]'));
|
auditLogButton = element(by.css('button[adf-task-audit]'));
|
||||||
noPeopleInvolved: ElementFinder = element(by.id('no-people-label'));
|
noPeopleInvolved = element(by.id('no-people-label'));
|
||||||
cancelInvolvePeopleButton: ElementFinder = element(by.id('close-people-search'));
|
cancelInvolvePeopleButton = element(by.id('close-people-search'));
|
||||||
involvePeopleHeader: ElementFinder = element(by.css('div[class="adf-search-text-header"]'));
|
involvePeopleHeader = element(by.css('div[class="adf-search-text-header"]'));
|
||||||
removeInvolvedPeople: ElementFinder = element(by.css('button[data-automation-id="Remove"]'));
|
removeInvolvedPeople = element(by.css('button[data-automation-id="Remove"]'));
|
||||||
peopleTitle: ElementFinder = element(by.id('people-title'));
|
peopleTitle = element(by.id('people-title'));
|
||||||
noFormMessage: ElementFinder = element(by.css('span[id*="no-form-message"]'));
|
noFormMessage = element(by.css('span[id*="no-form-message"]'));
|
||||||
cancelAttachForm: ElementFinder = element(by.id('adf-no-form-cancel-button'));
|
cancelAttachForm = element(by.id('adf-no-form-cancel-button'));
|
||||||
attachFormButton: ElementFinder = element(by.id('adf-no-form-attach-form-button'));
|
attachFormButton = element(by.id('adf-no-form-attach-form-button'));
|
||||||
disabledAttachFormButton: ElementFinder = element(by.css('button[id="adf-no-form-attach-form-button"][disabled]'));
|
disabledAttachFormButton = element(by.css('button[id="adf-no-form-attach-form-button"][disabled]'));
|
||||||
removeAttachForm: ElementFinder = element(by.id('adf-attach-form-remove-button'));
|
removeAttachForm = element(by.id('adf-attach-form-remove-button'));
|
||||||
attachFormName: ElementFinder = element(by.css('span[class="adf-form-title ng-star-inserted"]'));
|
attachFormName = element(by.css('span[class="adf-form-title ng-star-inserted"]'));
|
||||||
emptyTaskDetails: ElementFinder = element(by.css('adf-task-details > div > div'));
|
emptyTaskDetails = element(by.css('adf-task-details > div > div'));
|
||||||
priority: ElementFinder = element(by.css('[data-automation-id*="card-textitem-value-priority"]'));
|
priority = element(by.css('[data-automation-id*="card-textitem-value-priority"]'));
|
||||||
editableAssignee = element(by.css('[data-automation-id="card-textitem-value-assignee"][class*="clickable"]'));
|
editableAssignee = element(by.css('[data-automation-id="card-textitem-value-assignee"][class*="clickable"]'));
|
||||||
claimElement = element(by.css('[data-automation-id="header-claim-button"]'));
|
claimElement = element(by.css('[data-automation-id="header-claim-button"]'));
|
||||||
releaseElement = element(by.css('[data-automation-id="header-unclaim-button"]'));
|
releaseElement = element(by.css('[data-automation-id="header-unclaim-button"]'));
|
||||||
@@ -261,18 +261,18 @@ export class TaskDetailsPage {
|
|||||||
await tabsPage.clickTabByTitle('Details');
|
await tabsPage.clickTabByTitle('Details');
|
||||||
}
|
}
|
||||||
|
|
||||||
async addComment(comment): Promise<void> {
|
async addComment(comment: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.commentField, comment);
|
await BrowserActions.clearSendKeys(this.commentField, comment);
|
||||||
await BrowserActions.click(this.addCommentButton);
|
await BrowserActions.click(this.addCommentButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkCommentIsDisplayed(comment): Promise<void> {
|
async checkCommentIsDisplayed(comment: string): Promise<void> {
|
||||||
const row: ElementFinder = element(by.cssContainingText('div[id="comment-message"]', comment));
|
const row = element(by.cssContainingText('div[id="comment-message"]', comment));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(row);
|
await BrowserVisibility.waitUntilElementIsVisible(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkIsEmptyCommentListDisplayed(): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(emptyList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,7 +283,7 @@ export class TaskDetailsPage {
|
|||||||
await BrowserActions.click(this.involvePeopleButton);
|
await BrowserActions.click(this.involvePeopleButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async typeUser(user): Promise<void> {
|
async typeUser(user: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.addPeopleField, user);
|
await BrowserActions.clearSendKeys(this.addPeopleField, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,8 +292,8 @@ export class TaskDetailsPage {
|
|||||||
await BrowserActions.click(row);
|
await BrowserActions.click(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkUserIsSelected(user): Promise<void> {
|
async checkUserIsSelected(user: string): Promise<void> {
|
||||||
const row: ElementFinder = element(by.cssContainingText('div[class*="search-list-container"] div[class*="people-full-name"]', user));
|
const row = element(by.cssContainingText('div[class*="search-list-container"] div[class*="people-full-name"]', user));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(row);
|
await BrowserVisibility.waitUntilElementIsVisible(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,7 +301,7 @@ export class TaskDetailsPage {
|
|||||||
await BrowserActions.click(this.addInvolvedUserButton);
|
await BrowserActions.click(this.addInvolvedUserButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
getRowsUser(user) {
|
getRowsUser(user: string) {
|
||||||
return element(by.cssContainingText('div[class*="people-full-name"]', user));
|
return element(by.cssContainingText('div[class*="people-full-name"]', user));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,15 +16,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage } from '@alfresco/adf-testing';
|
import { BrowserActions, BrowserVisibility, DataTableComponentPage } from '@alfresco/adf-testing';
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
|
|
||||||
export class TasksListPage {
|
export class TasksListPage {
|
||||||
|
|
||||||
taskList: ElementFinder = element(by.css('adf-tasklist'));
|
taskList = element(by.css('adf-tasklist'));
|
||||||
noTasksFound: ElementFinder = element.all(by.css("div[class='adf-empty-content__title']")).first();
|
noTasksFound = element.all(by.css("div[class='adf-empty-content__title']")).first();
|
||||||
dataTable: DataTableComponentPage = new DataTableComponentPage(this.taskList);
|
dataTable = new DataTableComponentPage(this.taskList);
|
||||||
|
|
||||||
getDataTable() {
|
getDataTable(): DataTableComponentPage {
|
||||||
return this.dataTable;
|
return this.dataTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,22 +21,22 @@ import { TaskDetailsPage } from './task-details.page';
|
|||||||
import { FiltersPage } from './filters.page';
|
import { FiltersPage } from './filters.page';
|
||||||
import { ChecklistDialog } from './dialog/create-checklist-dialog.page';
|
import { ChecklistDialog } from './dialog/create-checklist-dialog.page';
|
||||||
import { TasksListPage } from './tasks-list.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';
|
import { BrowserVisibility, BrowserActions, FormFields } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class TasksPage {
|
export class TasksPage {
|
||||||
|
|
||||||
createButton: ElementFinder = element(by.css('button[data-automation-id="create-button"'));
|
createButton = element(by.css('button[data-automation-id="create-button"'));
|
||||||
newTaskButton: ElementFinder = element(by.css('button[data-automation-id="btn-start-task"]'));
|
newTaskButton = element(by.css('button[data-automation-id="btn-start-task"]'));
|
||||||
addChecklistButton: ElementFinder = element(by.css('button[class*="adf-add-to-checklist-button"]'));
|
addChecklistButton = element(by.css('button[class*="adf-add-to-checklist-button"]'));
|
||||||
rowByRowName = by.xpath('ancestor::mat-chip');
|
rowByRowName = by.xpath('ancestor::mat-chip');
|
||||||
checklistContainer = by.css('div[class*="checklist-menu"]');
|
checklistContainer = by.css('div[class*="checklist-menu"]');
|
||||||
taskTitle = 'h2[class="adf-activiti-task-details__header"] span';
|
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"]');
|
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'));
|
completeButtonNoForm = element(by.id('adf-no-form-complete-button'));
|
||||||
checklistDialog: ElementFinder = element(by.id('checklist-dialog'));
|
checklistDialog = element(by.id('checklist-dialog'));
|
||||||
checklistNoMessage: ElementFinder = element(by.id('checklist-none-message'));
|
checklistNoMessage = element(by.id('checklist-none-message'));
|
||||||
numberOfChecklists: ElementFinder = element(by.css('[data-automation-id="checklist-label"] mat-chip'));
|
numberOfChecklists = element(by.css('[data-automation-id="checklist-label"] mat-chip'));
|
||||||
sortByName = by.css('div[data-automation-id="auto_id_name"]');
|
sortByName = by.css('div[data-automation-id="auto_id_name"]');
|
||||||
|
|
||||||
async createNewTask(): Promise<StartTaskDialogPage> {
|
async createNewTask(): Promise<StartTaskDialogPage> {
|
||||||
@@ -90,7 +90,7 @@ export class TasksPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getRowsName(name) {
|
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;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,13 +105,13 @@ export class TasksPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(checklistEle);
|
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)));
|
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)));
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,28 +16,28 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserVisibility, DateRangeFilterPage, NumberRangeFilterPage, SearchCategoriesPage, SearchCheckListPage, SearchRadioPage, SearchSliderPage, SearchTextPage } from '@alfresco/adf-testing';
|
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 {
|
export class SearchFiltersPage {
|
||||||
|
|
||||||
searchCategoriesPage: SearchCategoriesPage = new SearchCategoriesPage();
|
searchCategoriesPage: SearchCategoriesPage = new SearchCategoriesPage();
|
||||||
|
|
||||||
searchFilters: ElementFinder = element(by.css('adf-search-filter'));
|
searchFilters = element(by.css('adf-search-filter'));
|
||||||
fileTypeFilter: ElementFinder = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.TYPE"]'));
|
fileTypeFilter = 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"]'));
|
creatorFilter = 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"]'));
|
fileSizeFilter = 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"]'));
|
nameFilter = 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"]'));
|
checkListFilter = 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)"]'));
|
createdDateRangeFilter = 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"]'));
|
typeFilter = 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)"]'));
|
sizeRangeFilter = 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"]'));
|
sizeSliderFilter = 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"],' +
|
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"]'));
|
'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"]'));
|
facetQueriesTypeGroup = 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"]'));
|
facetQueriesSizeGroup = 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"]'));
|
facetIntervalsByCreated = 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"]'));
|
facetIntervalsByModified = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-TheModified"]'));
|
||||||
|
|
||||||
async checkSearchFiltersIsDisplayed(): Promise<void> {
|
async checkSearchFiltersIsDisplayed(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchFilters);
|
await BrowserVisibility.waitUntilElementIsVisible(this.searchFilters);
|
||||||
@@ -71,7 +71,7 @@ export class SearchFiltersPage {
|
|||||||
return SearchCategoriesPage.radioFiltersPage(this.typeFilter);
|
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}"]`)));
|
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 { BrowserVisibility, DataTableComponentPage, SearchSortingPickerPage } from '@alfresco/adf-testing';
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
import { ContentServicesPage } from './content-services.page';
|
import { ContentServicesPage } from './content-services.page';
|
||||||
|
|
||||||
export class SearchResultsPage {
|
export class SearchResultsPage {
|
||||||
|
|
||||||
noResultsMessage: ElementFinder = element(by.css('div[class="app-no-result-message"]'));
|
noResultsMessage = element(by.css('div[class="app-no-result-message"]'));
|
||||||
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
dataTable = new DataTableComponentPage();
|
||||||
searchSortingPicker: SearchSortingPickerPage = new SearchSortingPickerPage();
|
searchSortingPicker = new SearchSortingPickerPage();
|
||||||
contentServices: ContentServicesPage = new ContentServicesPage();
|
contentServices = new ContentServicesPage();
|
||||||
|
|
||||||
getNodeHighlight(content) {
|
getNodeHighlight(content: string) {
|
||||||
return this.dataTable.getCellByRowContentAndColumn('Display name', content, 'Search');
|
return this.dataTable.getCellByRowContentAndColumn('Display name', content, 'Search');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ export class SearchResultsPage {
|
|||||||
await this.dataTable.tableIsLoaded();
|
await this.dataTable.tableIsLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkContentIsDisplayed(content): Promise<void> {
|
async checkContentIsDisplayed(content: string): Promise<void> {
|
||||||
await this.dataTable.checkContentIsDisplayed('Display name', content);
|
await this.dataTable.checkContentIsDisplayed('Display name', content);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ export class SearchResultsPage {
|
|||||||
return this.dataTable.numberOfRows();
|
return this.dataTable.numberOfRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkContentIsNotDisplayed(content): Promise<void> {
|
async checkContentIsNotDisplayed(content: string): Promise<void> {
|
||||||
await this.dataTable.checkContentIsNotDisplayed('Display name', content);
|
await this.dataTable.checkContentIsNotDisplayed('Display name', content);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,11 +54,11 @@ export class SearchResultsPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.noResultsMessage);
|
await BrowserVisibility.waitUntilElementIsNotVisible(this.noResultsMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
async navigateToFolder(content): Promise<void> {
|
async navigateToFolder(content: string): Promise<void> {
|
||||||
await this.dataTable.doubleClickRow('Display name', content);
|
await this.dataTable.doubleClickRow('Display name', content);
|
||||||
}
|
}
|
||||||
|
|
||||||
async deleteContent(content): Promise<void> {
|
async deleteContent(content: string): Promise<void> {
|
||||||
await this.contentServices.deleteContent(content);
|
await this.contentServices.deleteContent(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,25 +15,25 @@
|
|||||||
* limitations under the License.
|
* 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';
|
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
export class TagPage {
|
export class TagPage {
|
||||||
|
|
||||||
addTagButton: ElementFinder = element(by.css('button[id="add-tag"]'));
|
addTagButton = element(by.css('button[id="add-tag"]'));
|
||||||
insertNodeIdElement: ElementFinder = element(by.css('input[id="nodeId"]'));
|
insertNodeIdElement = element(by.css('input[id="nodeId"]'));
|
||||||
newTagInput: ElementFinder = element(by.css('input[id="new-tag-text"]'));
|
newTagInput = element(by.css('input[id="new-tag-text"]'));
|
||||||
tagListRow: ElementFinder = element(by.css('adf-tag-node-actions-list mat-list-item'));
|
tagListRow = element(by.css('adf-tag-node-actions-list mat-list-item'));
|
||||||
tagListByNodeIdRow: ElementFinder = element(by.css('adf-tag-node-list mat-chip'));
|
tagListByNodeIdRow = element(by.css('adf-tag-node-list mat-chip'));
|
||||||
errorMessage: ElementFinder = element(by.css('mat-hint[data-automation-id="errorMessage"]'));
|
errorMessage = element(by.css('mat-hint[data-automation-id="errorMessage"]'));
|
||||||
tagListRowLocator = by.css('adf-tag-node-actions-list mat-list-item div');
|
tagListRowLocator = by.css('adf-tag-node-actions-list mat-list-item div');
|
||||||
tagListByNodeIdRowLocator = by.css('adf-tag-node-list mat-chip span');
|
tagListByNodeIdRowLocator = by.css('adf-tag-node-list mat-chip span');
|
||||||
tagListContentServicesRowLocator = by.css('div[class*="adf-list-tag"]');
|
tagListContentServicesRowLocator = by.css('div[class*="adf-list-tag"]');
|
||||||
showDeleteButton: ElementFinder = element(by.id('adf-remove-button-tag'));
|
showDeleteButton = element(by.id('adf-remove-button-tag'));
|
||||||
showMoreButton: ElementFinder = element(by.css('button[data-automation-id="show-more-tags"]'));
|
showMoreButton = element(by.css('button[data-automation-id="show-more-tags"]'));
|
||||||
showLessButton: ElementFinder = element(by.css('button[data-automation-id="show-fewer-tags"]'));
|
showLessButton = element(by.css('button[data-automation-id="show-fewer-tags"]'));
|
||||||
tagsOnPage: ElementArrayFinder = element.all(by.css('div[class*="adf-list-tag"]'));
|
tagsOnPage = element.all(by.css('div[class*="adf-list-tag"]'));
|
||||||
confirmTag: ElementFinder = element(by.id('adf-tag-node-send'));
|
confirmTag = element(by.id('adf-tag-node-send'));
|
||||||
|
|
||||||
async getNodeId(): Promise<string> {
|
async getNodeId(): Promise<string> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.insertNodeIdElement);
|
await BrowserVisibility.waitUntilElementIsVisible(this.insertNodeIdElement);
|
||||||
@@ -59,13 +59,13 @@ export class TagPage {
|
|||||||
await BrowserActions.click(this.addTagButton);
|
await BrowserActions.click(this.addTagButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async deleteTagFromTagListByNodeId(name): Promise<void> {
|
async deleteTagFromTagListByNodeId(name: string): Promise<void> {
|
||||||
const deleteChip: ElementFinder = element(by.id('tag_chips_delete_' + name));
|
const deleteChip = element(by.id('tag_chips_delete_' + name));
|
||||||
await BrowserActions.click(deleteChip);
|
await BrowserActions.click(deleteChip);
|
||||||
}
|
}
|
||||||
|
|
||||||
async deleteTagFromTagList(name): Promise<void> {
|
async deleteTagFromTagList(name: string): Promise<void> {
|
||||||
const deleteChip: ElementFinder = element(by.id('tag_chips_delete_' + name));
|
const deleteChip = element(by.id('tag_chips_delete_' + name));
|
||||||
await BrowserActions.click(deleteChip);
|
await BrowserActions.click(deleteChip);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,23 +84,23 @@ export class TagPage {
|
|||||||
return this.addTagButton.isEnabled();
|
return this.addTagButton.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkTagIsDisplayedInTagList(tagName): Promise<void> {
|
async checkTagIsDisplayedInTagList(tagName: string): Promise<void> {
|
||||||
const tag: ElementFinder = element(by.cssContainingText('div[id*="tag_name"]', tagName));
|
const tag = element(by.cssContainingText('div[id*="tag_name"]', tagName));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(tag);
|
await BrowserVisibility.waitUntilElementIsVisible(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkTagIsNotDisplayedInTagList(tagName): Promise<void> {
|
async checkTagIsNotDisplayedInTagList(tagName: string): Promise<void> {
|
||||||
const tag: ElementFinder = element(by.cssContainingText('div[id*="tag_name"]', tagName));
|
const tag = element(by.cssContainingText('div[id*="tag_name"]', tagName));
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(tag);
|
await BrowserVisibility.waitUntilElementIsNotVisible(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkTagIsNotDisplayedInTagListByNodeId(tagName): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsNotVisible(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkTagIsDisplayedInTagListByNodeId(tagName): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ export class TagPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkTagIsDisplayedInTagListContentServices(tagName): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ export class TagPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkListIsSorted(sortOrder, locator): Promise<boolean> {
|
async checkListIsSorted(sortOrder, locator): Promise<boolean> {
|
||||||
const tagList: ElementArrayFinder = element.all(locator);
|
const tagList = element.all(locator);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(tagList.first());
|
await BrowserVisibility.waitUntilElementIsVisible(tagList.first());
|
||||||
const initialList = [];
|
const initialList = [];
|
||||||
await tagList.each(async (currentElement) => {
|
await tagList.each(async (currentElement) => {
|
||||||
@@ -149,13 +149,13 @@ export class TagPage {
|
|||||||
return initialList.toString() === sortedList.toString();
|
return initialList.toString() === sortedList.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkDeleteTagFromTagListByNodeIdIsDisplayed(name): Promise<void> {
|
async checkDeleteTagFromTagListByNodeIdIsDisplayed(name: string): Promise<void> {
|
||||||
const deleteChip: ElementFinder = element(by.id('tag_chips_delete_' + name));
|
const deleteChip = element(by.id('tag_chips_delete_' + name));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(deleteChip);
|
await BrowserVisibility.waitUntilElementIsVisible(deleteChip);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkDeleteTagFromTagListByNodeIdIsNotDisplayed(name): Promise<void> {
|
async checkDeleteTagFromTagListByNodeIdIsNotDisplayed(name: string): Promise<void> {
|
||||||
const deleteChip: ElementFinder = element(by.id('tag_chips_delete_' + name));
|
const deleteChip = element(by.id('tag_chips_delete_' + name));
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(deleteChip);
|
await BrowserVisibility.waitUntilElementIsNotVisible(deleteChip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,17 +16,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserActions, BrowserVisibility, DocumentListPage } from '@alfresco/adf-testing';
|
import { BrowserActions, BrowserVisibility, DocumentListPage } from '@alfresco/adf-testing';
|
||||||
|
import { element, by } from 'protractor';
|
||||||
import { element, by, ElementFinder, Locator } from 'protractor';
|
|
||||||
|
|
||||||
export class TrashcanPage {
|
export class TrashcanPage {
|
||||||
|
|
||||||
contentList: DocumentListPage = new DocumentListPage(element(by.css('adf-document-list')));
|
contentList = 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"]');
|
rows = 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();
|
tableBody = element.all(by.css('adf-document-list div[class="adf-datatable-body"]')).first();
|
||||||
pagination: ElementFinder = element(by.css('adf-pagination'));
|
pagination = element(by.css('adf-pagination'));
|
||||||
emptyTrashcan: ElementFinder = element(by.css('adf-empty-content'));
|
emptyTrashcan = element(by.css('adf-empty-content'));
|
||||||
restoreButton: ElementFinder = element(by.css(`button[title='Restore']`));
|
restoreButton = element(by.css(`button[title='Restore']`));
|
||||||
|
|
||||||
async numberOfResultsDisplayed(): Promise<number> {
|
async numberOfResultsDisplayed(): Promise<number> {
|
||||||
return element.all(this.rows).count();
|
return element.all(this.rows).count();
|
||||||
|
@@ -17,23 +17,23 @@
|
|||||||
|
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import { BrowserActions, BrowserVisibility, TogglePage } from '@alfresco/adf-testing';
|
import { BrowserActions, BrowserVisibility, TogglePage } from '@alfresco/adf-testing';
|
||||||
import { browser, by, element, ElementFinder } from 'protractor';
|
import { browser, by, element } from 'protractor';
|
||||||
|
|
||||||
export class VersionManagePage {
|
export class VersionManagePage {
|
||||||
|
|
||||||
togglePage: TogglePage = new TogglePage();
|
togglePage = new TogglePage();
|
||||||
|
|
||||||
showNewVersionButton: ElementFinder = element(by.id('adf-show-version-upload-button'));
|
showNewVersionButton = element(by.id('adf-show-version-upload-button'));
|
||||||
uploadNewVersionInput: ElementFinder = element(by.css('adf-upload-version-button input[data-automation-id="upload-single-file"]'));
|
uploadNewVersionInput = element(by.css('adf-upload-version-button input[data-automation-id="upload-single-file"]'));
|
||||||
uploadNewVersionButton: ElementFinder = element(by.css('adf-upload-version-button'));
|
uploadNewVersionButton = element(by.css('adf-upload-version-button'));
|
||||||
uploadNewVersionContainer: ElementFinder = element(by.id('adf-new-version-uploader-container'));
|
uploadNewVersionContainer = element(by.id('adf-new-version-uploader-container'));
|
||||||
cancelButton: ElementFinder = element(by.id('adf-new-version-cancel'));
|
cancelButton = element(by.id('adf-new-version-cancel'));
|
||||||
majorRadio: ElementFinder = element(by.id('adf-new-version-major'));
|
majorRadio = element(by.id('adf-new-version-major'));
|
||||||
minorRadio: ElementFinder = element(by.id('adf-new-version-minor'));
|
minorRadio = element(by.id('adf-new-version-minor'));
|
||||||
commentText: ElementFinder = element(by.id('adf-new-version-text-area'));
|
commentText = element(by.id('adf-new-version-text-area'));
|
||||||
readOnlySwitch: ElementFinder = element(by.id('adf-version-manager-switch-readonly'));
|
readOnlySwitch = element(by.id('adf-version-manager-switch-readonly'));
|
||||||
downloadSwitch: ElementFinder = element(by.id('adf-version-manager-switch-download'));
|
downloadSwitch = element(by.id('adf-version-manager-switch-download'));
|
||||||
commentsSwitch: ElementFinder = element(by.id('adf-version-manager-switch-comments'));
|
commentsSwitch = element(by.id('adf-version-manager-switch-comments'));
|
||||||
|
|
||||||
async checkUploadNewVersionsButtonIsDisplayed(): Promise<void> {
|
async checkUploadNewVersionsButtonIsDisplayed(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.showNewVersionButton);
|
await BrowserVisibility.waitUntilElementIsVisible(this.showNewVersionButton);
|
||||||
@@ -43,48 +43,48 @@ export class VersionManagePage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.cancelButton);
|
await BrowserVisibility.waitUntilElementIsVisible(this.cancelButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async uploadNewVersionFile(fileLocation): Promise<void> {
|
async uploadNewVersionFile(fileLocation: string): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsPresent(this.uploadNewVersionInput);
|
await BrowserVisibility.waitUntilElementIsPresent(this.uploadNewVersionInput);
|
||||||
await this.uploadNewVersionInput.sendKeys(path.resolve(path.join(browser.params.testConfig.main.rootPath, fileLocation)));
|
await this.uploadNewVersionInput.sendKeys(path.resolve(path.join(browser.params.testConfig.main.rootPath, fileLocation)));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.showNewVersionButton);
|
await BrowserVisibility.waitUntilElementIsVisible(this.showNewVersionButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getFileVersionName(version): Promise<string> {
|
async getFileVersionName(version: string): Promise<string> {
|
||||||
const fileElement: ElementFinder = element(by.css(`[id="adf-version-list-item-name-${version}"]`));
|
const fileElement = element(by.css(`[id="adf-version-list-item-name-${version}"]`));
|
||||||
return BrowserActions.getText(fileElement);
|
return BrowserActions.getText(fileElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFileVersionExist(version): Promise<void> {
|
async checkFileVersionExist(version: string): Promise<void> {
|
||||||
const fileVersion: ElementFinder = element(by.id(`adf-version-list-item-version-${version}`));
|
const fileVersion = element(by.id(`adf-version-list-item-version-${version}`));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(fileVersion);
|
await BrowserVisibility.waitUntilElementIsVisible(fileVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkFileVersionNotExist(version): Promise<void> {
|
async checkFileVersionNotExist(version: string): Promise<void> {
|
||||||
const fileVersion: ElementFinder = element(by.id(`adf-version-list-item-version-${version}`));
|
const fileVersion = element(by.id(`adf-version-list-item-version-${version}`));
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(fileVersion);
|
await BrowserVisibility.waitUntilElementIsNotVisible(fileVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getFileVersionComment(version): Promise<string> {
|
async getFileVersionComment(version: string): Promise<string> {
|
||||||
const fileComment: ElementFinder = element(by.id(`adf-version-list-item-comment-${version}`));
|
const fileComment = element(by.id(`adf-version-list-item-comment-${version}`));
|
||||||
return BrowserActions.getText(fileComment);
|
return BrowserActions.getText(fileComment);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getFileVersionDate(version): Promise<string> {
|
async getFileVersionDate(version: string): Promise<string> {
|
||||||
const fileDate: ElementFinder = element(by.id(`adf-version-list-item-date-${version}`));
|
const fileDate = element(by.id(`adf-version-list-item-date-${version}`));
|
||||||
return BrowserActions.getText(fileDate);
|
return BrowserActions.getText(fileDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterCommentText(text): Promise<void> {
|
async enterCommentText(text: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.commentText, text);
|
await BrowserActions.clearSendKeys(this.commentText, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickMajorChange(): Promise<void> {
|
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);
|
await BrowserActions.click(radioMajor);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickMinorChange(): Promise<void> {
|
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);
|
await BrowserActions.click(radioMinor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ export class VersionManagePage {
|
|||||||
await this.togglePage.enableToggle(this.commentsSwitch);
|
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 BrowserActions.click(element(by.id(`adf-version-list-action-menu-button-${version}`)));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.css('.cdk-overlay-container .mat-menu-content')));
|
await BrowserVisibility.waitUntilElementIsVisible(element(by.css('.cdk-overlay-container .mat-menu-content')));
|
||||||
}
|
}
|
||||||
@@ -149,31 +149,31 @@ export class VersionManagePage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async closeDisabledActionsMenu(): Promise<void> {
|
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 BrowserActions.closeDisabledMenu();
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(container);
|
await BrowserVisibility.waitUntilElementIsNotVisible(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
async downloadFileVersion(version): Promise<void> {
|
async downloadFileVersion(version: string): Promise<void> {
|
||||||
await this.clickActionButton(version);
|
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 BrowserActions.click(downloadButton);
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(downloadButton);
|
await BrowserVisibility.waitUntilElementIsNotVisible(downloadButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async deleteFileVersion(version): Promise<void> {
|
async deleteFileVersion(version: string): Promise<void> {
|
||||||
await this.clickActionButton(version);
|
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);
|
await BrowserActions.click(deleteButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async restoreFileVersion(version): Promise<void> {
|
async restoreFileVersion(version: string): Promise<void> {
|
||||||
await this.clickActionButton(version);
|
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);
|
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-download-${version}`)));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.id(`adf-version-list-action-delete-${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}`)));
|
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 () => {
|
it('[C286406] Invalid values for items per page', async () => {
|
||||||
await taskListSinglePage.typeItemsPerPage('0');
|
await taskListSinglePage.typeItemsPerPage(0);
|
||||||
await taskListSinglePage.clickAppId();
|
await taskListSinglePage.clickAppId();
|
||||||
await expect(await taskListSinglePage.getItemsPerPageFieldErrorMessage()).toEqual('Value must be greater than or equal to 1');
|
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 () => {
|
it('[C286405] Type invalid values to page field', async () => {
|
||||||
await taskListSinglePage.typePage('0');
|
await taskListSinglePage.typePage(0);
|
||||||
await taskListSinglePage.clickAppId();
|
await taskListSinglePage.clickAppId();
|
||||||
await expect(await taskListSinglePage.getPageFieldErrorMessage()).toEqual('Value must be greater than or equal to 1');
|
await expect(await taskListSinglePage.getPageFieldErrorMessage()).toEqual('Value must be greater than or equal to 1');
|
||||||
|
|
||||||
await taskListSinglePage.clickResetButton();
|
await taskListSinglePage.clickResetButton();
|
||||||
await taskListSinglePage.typePage('2');
|
await taskListSinglePage.typePage(2);
|
||||||
await taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
await taskListSinglePage.paginationPage().checkPaginationIsNotDisplayed();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { DataTableComponentPage, DatePickerCalendarPage, DateUtil, LocalStorageUtil, LoginSSOPage } from '@alfresco/adf-testing';
|
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 { SearchDialogPage } from '../../pages/adf/dialog/search-dialog.page';
|
||||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||||
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
||||||
@@ -121,9 +121,9 @@ describe('Search Date Range Filter', () => {
|
|||||||
|
|
||||||
await searchResults.sortByCreated('ASC');
|
await searchResults.sortByCreated('ASC');
|
||||||
|
|
||||||
const results: any = dataTable.geCellElementDetail('Created');
|
const results = await dataTable.geCellElementDetail('Created') as ElementFinder[];
|
||||||
for (const currentResult of results) {
|
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');
|
const currentDateFormatted = DateUtil.parse(currentDate, 'MMM DD, YYYY, h:mm:ss a');
|
||||||
|
|
||||||
await expect(currentDateFormatted <= DateUtil.parse(toDate, 'DD-MM-YY')).toBe(true);
|
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 { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||||
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
||||||
import { FileModel } from '../../models/ACS/file.model';
|
import { FileModel } from '../../models/ACS/file.model';
|
||||||
import { browser } from 'protractor';
|
import { browser, ElementFinder } from 'protractor';
|
||||||
import { SearchConfiguration } from '../search.config';
|
import { SearchConfiguration } from '../search.config';
|
||||||
import { UsersActions } from '../../actions/users.actions';
|
import { UsersActions } from '../../actions/users.actions';
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@ describe('Search Number Range Filter', () => {
|
|||||||
await searchResults.tableIsLoaded();
|
await searchResults.tableIsLoaded();
|
||||||
await searchResults.sortBySize('DESC');
|
await searchResults.sortBySize('DESC');
|
||||||
|
|
||||||
const results: any = dataTable.geCellElementDetail('Size');
|
const results = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||||
for (const currentResult of results) {
|
for (const currentResult of results) {
|
||||||
try {
|
try {
|
||||||
const currentSize = await currentResult.getAttribute('title');
|
const currentSize = await currentResult.getAttribute('title');
|
||||||
@@ -202,7 +202,7 @@ describe('Search Number Range Filter', () => {
|
|||||||
await sizeRangeFilter.clickApplyButton();
|
await sizeRangeFilter.clickApplyButton();
|
||||||
await searchResults.sortBySize('DESC');
|
await searchResults.sortBySize('DESC');
|
||||||
|
|
||||||
const results: any = dataTable.geCellElementDetail('Size');
|
const results = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||||
for (const currentResult of results) {
|
for (const currentResult of results) {
|
||||||
try {
|
try {
|
||||||
const currentSize = await currentResult.getAttribute('title');
|
const currentSize = await currentResult.getAttribute('title');
|
||||||
@@ -218,7 +218,7 @@ describe('Search Number Range Filter', () => {
|
|||||||
await nameFilter.searchByName('z*');
|
await nameFilter.searchByName('z*');
|
||||||
await searchResults.sortBySize('DESC');
|
await searchResults.sortBySize('DESC');
|
||||||
|
|
||||||
const resultsSize: any = dataTable.geCellElementDetail('Size');
|
const resultsSize = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||||
for (const currentResult of resultsSize) {
|
for (const currentResult of resultsSize) {
|
||||||
try {
|
try {
|
||||||
const currentSize = await currentResult.getAttribute('title');
|
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) {
|
for (const currentResult of resultsDisplay) {
|
||||||
try {
|
try {
|
||||||
const name = await currentResult.getAttribute('title');
|
const name = await currentResult.getAttribute('title');
|
||||||
@@ -269,7 +269,7 @@ describe('Search Number Range Filter', () => {
|
|||||||
await searchResults.tableIsLoaded();
|
await searchResults.tableIsLoaded();
|
||||||
await searchResults.sortBySize('DESC');
|
await searchResults.sortBySize('DESC');
|
||||||
|
|
||||||
const results: any = dataTable.geCellElementDetail('Size');
|
const results = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||||
for (const currentResult of results) {
|
for (const currentResult of results) {
|
||||||
try {
|
try {
|
||||||
const currentSize = await currentResult.getAttribute('title');
|
const currentSize = await currentResult.getAttribute('title');
|
||||||
@@ -311,7 +311,7 @@ describe('Search Number Range Filter', () => {
|
|||||||
await sizeRangeFilter.clickApplyButton();
|
await sizeRangeFilter.clickApplyButton();
|
||||||
await searchResults.sortBySize('DESC');
|
await searchResults.sortBySize('DESC');
|
||||||
|
|
||||||
const results: any = dataTable.geCellElementDetail('Size');
|
const results = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||||
for (const currentResult of results) {
|
for (const currentResult of results) {
|
||||||
try {
|
try {
|
||||||
const currentSize = await currentResult.getAttribute('title');
|
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.getFromNumber()).toEqual('');
|
||||||
await expect(await sizeRangeFilter.getToNumber()).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) {
|
for (const currentResult of resultsSize) {
|
||||||
try {
|
try {
|
||||||
const currentSize = await currentResult.getAttribute('title');
|
const currentSize = await currentResult.getAttribute('title');
|
||||||
@@ -415,7 +415,7 @@ describe('Search Number Range Filter', () => {
|
|||||||
await searchResults.tableIsLoaded();
|
await searchResults.tableIsLoaded();
|
||||||
await searchResults.sortByCreated('DESC');
|
await searchResults.sortByCreated('DESC');
|
||||||
|
|
||||||
const results: any = dataTable.geCellElementDetail('Created');
|
const results = await dataTable.geCellElementDetail('Created') as ElementFinder[];
|
||||||
for (const currentResult of results) {
|
for (const currentResult of results) {
|
||||||
const currentDate = await currentResult.getAttribute('title');
|
const currentDate = await currentResult.getAttribute('title');
|
||||||
const currentDateFormatted = DateUtil.parse(currentDate, 'MMM DD, YYYY, h:mm:ss a');
|
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 { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||||
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
||||||
import { FileModel } from '../../models/ACS/file.model';
|
import { FileModel } from '../../models/ACS/file.model';
|
||||||
import { browser } from 'protractor';
|
import { browser, ElementFinder } from 'protractor';
|
||||||
import { SearchConfiguration } from '../search.config';
|
import { SearchConfiguration } from '../search.config';
|
||||||
import { UsersActions } from '../../actions/users.actions';
|
import { UsersActions } from '../../actions/users.actions';
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ describe('Search Slider Filter', () => {
|
|||||||
await searchResults.sortBySize('DESC');
|
await searchResults.sortBySize('DESC');
|
||||||
await searchResults.tableIsLoaded();
|
await searchResults.tableIsLoaded();
|
||||||
|
|
||||||
const results: any = dataTable.geCellElementDetail('Size');
|
const results = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||||
for (const currentResult of results) {
|
for (const currentResult of results) {
|
||||||
try {
|
try {
|
||||||
const currentSize = await currentResult.getAttribute('title');
|
const currentSize = await currentResult.getAttribute('title');
|
||||||
@@ -141,7 +141,7 @@ describe('Search Slider Filter', () => {
|
|||||||
await searchResults.sortBySize('DESC');
|
await searchResults.sortBySize('DESC');
|
||||||
await searchResults.tableIsLoaded();
|
await searchResults.tableIsLoaded();
|
||||||
|
|
||||||
const resultsSize: any = dataTable.geCellElementDetail('Size');
|
const resultsSize = await dataTable.geCellElementDetail('Size') as ElementFinder[];
|
||||||
for (const currentResult of resultsSize) {
|
for (const currentResult of resultsSize) {
|
||||||
try {
|
try {
|
||||||
const currentSize = await currentResult.getAttribute('title');
|
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 () => {
|
it('[C277286] Should be able to sort the search results by "Created Date" ASC', async () => {
|
||||||
await searchResults.sortByCreated('ASC');
|
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);
|
await expect(contentServices.checkElementsDateSortedAsc(results)).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C277287] Should be able to sort the search results by "Created Date" DESC', async () => {
|
it('[C277287] Should be able to sort the search results by "Created Date" DESC', async () => {
|
||||||
await searchResults.sortByCreated('DESC');
|
await searchResults.sortByCreated('DESC');
|
||||||
const results = searchResults.dataTable.geCellElementDetail('Created');
|
const results = await searchResults.dataTable.geCellElementDetail('Created');
|
||||||
await expect(contentServices.checkElementsDateSortedDesc(results)).toBe(true);
|
await expect(contentServices.checkElementsDateSortedDesc(results)).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -15,24 +15,23 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
import { DocumentListPage } from '../pages/document-list.page';
|
import { DocumentListPage } from '../pages/document-list.page';
|
||||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||||
import { DropdownPage } from '../../core/pages/material/dropdown.page';
|
import { DropdownPage } from '../../core/pages/material/dropdown.page';
|
||||||
import { DataTableComponentPage } from '../../core/pages/data-table-component.page';
|
|
||||||
|
|
||||||
export class ContentNodeSelectorDialogPage {
|
export class ContentNodeSelectorDialogPage {
|
||||||
dialog: ElementFinder = element(by.css(`adf-content-node-selector`));
|
dialog = element(by.css(`adf-content-node-selector`));
|
||||||
header: ElementFinder = this.dialog.element(by.css(`header[data-automation-id='content-node-selector-title']`));
|
header = 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']`));
|
searchInputElement = 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"));
|
searchLabel = 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"]`));
|
selectedRow = 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']`));
|
cancelButton = 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']`));
|
moveCopyButton = element(by.css(`button[data-automation-id='content-node-selector-actions-choose']`));
|
||||||
|
|
||||||
contentList: DocumentListPage = new DocumentListPage(this.dialog);
|
contentList = new DocumentListPage(this.dialog);
|
||||||
dataTable: DataTableComponentPage = this.contentList.dataTablePage();
|
dataTable = this.contentList.dataTablePage();
|
||||||
siteListDropdown = new DropdownPage(this.dialog.element(by.css(`mat-select[data-automation-id='site-my-files-option']`)));
|
siteListDropdown = new DropdownPage(this.dialog.element(by.css(`mat-select[data-automation-id='site-my-files-option']`)));
|
||||||
|
|
||||||
async checkDialogIsDisplayed(): Promise<void> {
|
async checkDialogIsDisplayed(): Promise<void> {
|
||||||
@@ -55,7 +54,7 @@ export class ContentNodeSelectorDialogPage {
|
|||||||
return BrowserActions.getText(this.searchLabel);
|
return BrowserActions.getText(this.searchLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkSelectedSiteIsDisplayed(siteName): Promise<void> {
|
async checkSelectedSiteIsDisplayed(siteName: string): Promise<void> {
|
||||||
await this.siteListDropdown.checkOptionIsSelected(siteName);
|
await this.siteListDropdown.checkOptionIsSelected(siteName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,11 +99,11 @@ export class ContentNodeSelectorDialogPage {
|
|||||||
await BrowserActions.clearSendKeys(this.searchInputElement, text);
|
await BrowserActions.clearSendKeys(this.searchInputElement, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickContentNodeSelectorResult(name): Promise<void> {
|
async clickContentNodeSelectorResult(name: string): Promise<void> {
|
||||||
await this.dataTable.clickRowByContent(name);
|
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
|
// First click to select from search mode and second click to actually open node
|
||||||
await this.dataTable.doubleClickRowByContent(name);
|
await this.dataTable.doubleClickRowByContent(name);
|
||||||
await this.dataTable.doubleClickRowByContent(name);
|
await this.dataTable.doubleClickRowByContent(name);
|
||||||
|
@@ -15,11 +15,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||||
|
|
||||||
export class DownloadDialogPage {
|
export class DownloadDialogPage {
|
||||||
cancelButton: ElementFinder = element(by.id(`cancel-button`));
|
cancelButton = element(by.id(`cancel-button`));
|
||||||
|
|
||||||
async clickCancelButton(): Promise<void> {
|
async clickCancelButton(): Promise<void> {
|
||||||
await BrowserActions.click(this.cancelButton);
|
await BrowserActions.click(this.cancelButton);
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { DataTableComponentPage } from '../../core/pages/data-table-component.page';
|
||||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||||
@@ -23,11 +23,11 @@ import { BrowserActions } from '../../core/utils/browser-actions';
|
|||||||
export class DocumentListPage {
|
export class DocumentListPage {
|
||||||
|
|
||||||
rootElement: ElementFinder;
|
rootElement: ElementFinder;
|
||||||
optionButton: Locator = by.css('button[data-automation-id*="action_menu_"]');
|
optionButton = by.css('button[data-automation-id*="action_menu_"]');
|
||||||
tableBody: ElementFinder;
|
tableBody: ElementFinder;
|
||||||
dataTable: DataTableComponentPage;
|
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.rootElement = rootElement;
|
||||||
this.dataTable = new DataTableComponentPage(this.rootElement);
|
this.dataTable = new DataTableComponentPage(this.rootElement);
|
||||||
this.tableBody = rootElement.all(by.css('div[class="adf-datatable-body"]')).first();
|
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> {
|
async clickOnActionMenu(content: string): Promise<void> {
|
||||||
await BrowserActions.closeMenuAndDialogs();
|
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.click(row.element(this.optionButton));
|
||||||
await BrowserActions.waitUntilActionMenuIsVisible();
|
await BrowserActions.waitUntilActionMenuIsVisible();
|
||||||
await browser.sleep(500);
|
await browser.sleep(500);
|
||||||
|
@@ -22,8 +22,8 @@ import { BrowserVisibility } from '../../../core/utils/browser-visibility';
|
|||||||
export class SearchRadioPage {
|
export class SearchRadioPage {
|
||||||
|
|
||||||
filter: ElementFinder;
|
filter: ElementFinder;
|
||||||
showMoreButton: ElementFinder = element(by.css('adf-search-radio button[title="Show more"]'));
|
showMoreButton = element(by.css('adf-search-radio button[title="Show more"]'));
|
||||||
showLessButton: ElementFinder = element(by.css('adf-search-radio button[title="Show less"]'));
|
showLessButton = element(by.css('adf-search-radio button[title="Show less"]'));
|
||||||
|
|
||||||
constructor(filter: ElementFinder) {
|
constructor(filter: ElementFinder) {
|
||||||
this.filter = filter;
|
this.filter = filter;
|
||||||
|
@@ -15,15 +15,15 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||||
|
|
||||||
export class EditJsonDialog {
|
export class EditJsonDialog {
|
||||||
|
|
||||||
dialog: ElementFinder = element(by.css(`.adf-edit-json-dialog`));
|
dialog = element(by.css(`.adf-edit-json-dialog`));
|
||||||
closeButton: ElementFinder = element(by.cssContainingText(`button span`, 'Close'));
|
closeButton = element(by.cssContainingText(`button span`, 'Close'));
|
||||||
dialogContent: ElementFinder = this.dialog.element(by.css(`mat-dialog-content textarea`));
|
dialogContent = this.dialog.element(by.css(`mat-dialog-content textarea`));
|
||||||
|
|
||||||
async checkDialogIsDisplayed(): Promise<void> {
|
async checkDialogIsDisplayed(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.dialog);
|
await BrowserVisibility.waitUntilElementIsVisible(this.dialog);
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||||
import { DataTableComponentPage } from './data-table-component.page';
|
import { DataTableComponentPage } from './data-table-component.page';
|
||||||
|
|
||||||
@@ -47,23 +47,23 @@ export class AboutPage {
|
|||||||
version: 'version'
|
version: 'version'
|
||||||
};
|
};
|
||||||
|
|
||||||
appTitle: ElementFinder = element(by.css('[data-automation-id="adf-github-app-title"]'));
|
appTitle = element(by.css('[data-automation-id="adf-github-app-title"]'));
|
||||||
sourceCodeTitle: ElementFinder = element(by.css('[data-automation-id="adf-github-source-code-title"]'));
|
sourceCodeTitle = element(by.css('[data-automation-id="adf-github-source-code-title"]'));
|
||||||
githubUrl: ElementFinder = element(by.css('[data-automation-id="adf-github-url"]'));
|
githubUrl = element(by.css('[data-automation-id="adf-github-url"]'));
|
||||||
githubVersion: ElementFinder = element(by.css('[data-automation-id="adf-github-version"]'));
|
githubVersion = element(by.css('[data-automation-id="adf-github-version"]'));
|
||||||
bpmHost: ElementFinder = element(by.css('[data-automation-id="adf-process-service-host"]'));
|
bpmHost = element(by.css('[data-automation-id="adf-process-service-host"]'));
|
||||||
ecmHost: ElementFinder = element(by.css('[data-automation-id="adf-content-service-host"]'));
|
ecmHost = element(by.css('[data-automation-id="adf-content-service-host"]'));
|
||||||
productVersionTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-product-version-title"]'));
|
productVersionTitle = element(by.css('[data-automation-id="adf-about-product-version-title"]'));
|
||||||
bpmEdition: ElementFinder = element(by.css('[data-automation-id="adf-about-bpm-edition"]'));
|
bpmEdition = element(by.css('[data-automation-id="adf-about-bpm-edition"]'));
|
||||||
ecmEdition: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-edition"]'));
|
ecmEdition = element(by.css('[data-automation-id="adf-about-ecm-edition"]'));
|
||||||
bpmVersion: ElementFinder = element(by.css('[data-automation-id="adf-about-bpm-version"]'));
|
bpmVersion = element(by.css('[data-automation-id="adf-about-bpm-version"]'));
|
||||||
ecmVersion: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-version"]'));
|
ecmVersion = element(by.css('[data-automation-id="adf-about-ecm-version"]'));
|
||||||
ecmStatusTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-status-title"]'));
|
ecmStatusTitle = element(by.css('[data-automation-id="adf-about-ecm-status-title"]'));
|
||||||
ecmLicenseTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-license-title"]'));
|
ecmLicenseTitle = element(by.css('[data-automation-id="adf-about-ecm-license-title"]'));
|
||||||
ecmModulesTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-ecm-modules-title"]'));
|
ecmModulesTitle = element(by.css('[data-automation-id="adf-about-ecm-modules-title"]'));
|
||||||
aboutModulesTitle: ElementFinder = element(by.css('[data-automation-id="adf-about-modules-title"]'));
|
aboutModulesTitle = element(by.css('[data-automation-id="adf-about-modules-title"]'));
|
||||||
|
|
||||||
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
dataTable = new DataTableComponentPage();
|
||||||
|
|
||||||
getDataTable(): DataTableComponentPage {
|
getDataTable(): DataTableComponentPage {
|
||||||
return this.dataTable;
|
return this.dataTable;
|
||||||
|
@@ -15,15 +15,15 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserActions } from '../utils/browser-actions';
|
import { BrowserActions } from '../utils/browser-actions';
|
||||||
|
|
||||||
export class BreadcrumbPage {
|
export class BreadcrumbPage {
|
||||||
|
|
||||||
breadcrumb: ElementFinder = element(by.css(`adf-breadcrumb nav[data-automation-id='breadcrumb']`));
|
breadcrumb = element(by.css(`adf-breadcrumb nav[data-automation-id='breadcrumb']`));
|
||||||
currentItem: ElementFinder = element(by.css('.adf-breadcrumb-item-current'));
|
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}']`));
|
const path = this.breadcrumb.element(by.css(`a[data-automation-id='breadcrumb_${breadCrumbItem}']`));
|
||||||
await BrowserActions.click(path);
|
await BrowserActions.click(path);
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@ export class CardBooleanItemPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkLabelIsPresent(): Promise<void> {
|
async checkLabelIsPresent(): Promise<void> {
|
||||||
const labelElement: ElementFinder = this.rootElement.element(this.labelLocator);
|
const labelElement = this.rootElement.element(this.labelLocator);
|
||||||
await BrowserVisibility.waitUntilElementIsPresent(labelElement);
|
await BrowserVisibility.waitUntilElementIsPresent(labelElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { DateTimePickerPage } from '../material/date-time-picker.page';
|
||||||
import { DatePickerPage } from '../material/date-picker.page';
|
import { DatePickerPage } from '../material/date-picker.page';
|
||||||
|
|
||||||
@@ -25,10 +25,10 @@ export class CardDateItemPage {
|
|||||||
dateTimePickerPage: DateTimePickerPage;
|
dateTimePickerPage: DateTimePickerPage;
|
||||||
datePickerPage = new DatePickerPage();
|
datePickerPage = new DatePickerPage();
|
||||||
|
|
||||||
labelLocator: Locator = by.css('div[data-automation-id*="card-date-label"]');
|
labelLocator = by.css('div[data-automation-id*="card-date-label"]');
|
||||||
valueLocator: Locator = by.css('span[data-automation-id*="card-date"]');
|
valueLocator = by.css('span[data-automation-id*="card-date"]');
|
||||||
dateTimePicker: ElementFinder = element.all(by.css('.mat-datetimepicker-toggle')).first();
|
dateTimePicker = element.all(by.css('.mat-datetimepicker-toggle')).first();
|
||||||
saveButton: Locator = by.css('button[data-automation-id*="card-dateitem-update"]');
|
saveButton = by.css('button[data-automation-id*="card-dateitem-update"]');
|
||||||
|
|
||||||
constructor(label: string = 'minDate') {
|
constructor(label: string = 'minDate') {
|
||||||
this.rootElement = element(by.xpath(`//div[contains(@data-automation-id, "label-${label}")]/ancestor::adf-card-view-dateitem`));
|
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> {
|
async checkLabelIsPresent(): Promise<void> {
|
||||||
const labelElement: ElementFinder = this.rootElement.element(this.labelLocator);
|
const labelElement = this.rootElement.element(this.labelLocator);
|
||||||
await BrowserVisibility.waitUntilElementIsPresent(labelElement);
|
await BrowserVisibility.waitUntilElementIsPresent(labelElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,19 +15,19 @@
|
|||||||
* limitations under the License.
|
* 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';
|
import { BrowserActions, BrowserVisibility } from '../../utils/public-api';
|
||||||
export class CardTextItemPage {
|
export class CardTextItemPage {
|
||||||
|
|
||||||
rootElement: ElementFinder;
|
rootElement: ElementFinder;
|
||||||
textField: Locator = by.css('[data-automation-id*="card-textitem-value"]');
|
textField = by.css('[data-automation-id*="card-textitem-value"]');
|
||||||
saveButton: Locator = by.css('button[data-automation-id*="card-textitem-update"]');
|
saveButton = by.css('button[data-automation-id*="card-textitem-update"]');
|
||||||
clearButton: Locator = by.css('button[data-automation-id*="card-textitem-reset"]');
|
clearButton = by.css('button[data-automation-id*="card-textitem-reset"]');
|
||||||
field: Locator = by.css('[data-automation-id*="card-textitem-value"]');
|
field = by.css('[data-automation-id*="card-textitem-value"]');
|
||||||
labelLocator: Locator = by.css('div[data-automation-id*="card-textitem-label"]');
|
labelLocator = by.css('div[data-automation-id*="card-textitem-label"]');
|
||||||
errorMessage: Locator = by.css('.adf-textitem-editable-error');
|
errorMessage = by.css('.adf-textitem-editable-error');
|
||||||
clickableElement: Locator = by.css('.adf-textitem-clickable');
|
clickableElement = by.css('.adf-textitem-clickable');
|
||||||
readOnlyField: Locator = by.css('.adf-property-read-only');
|
readOnlyField = by.css('.adf-property-read-only');
|
||||||
|
|
||||||
constructor(label: string = 'assignee') {
|
constructor(label: string = 'assignee') {
|
||||||
this.rootElement = element(by.xpath(`//div[contains(@data-automation-id, "label-${label}")]/ancestor::adf-card-view-textitem`));
|
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> {
|
async checkLabelIsPresent(): Promise<void> {
|
||||||
const labelElement: ElementFinder = this.rootElement.element(this.labelLocator);
|
const labelElement = this.rootElement.element(this.labelLocator);
|
||||||
await BrowserVisibility.waitUntilElementIsPresent(labelElement);
|
await BrowserVisibility.waitUntilElementIsPresent(labelElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,26 +15,26 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, browser, ElementFinder } from 'protractor';
|
import { element, by, browser } from 'protractor';
|
||||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||||
import { BrowserActions } from '../utils/browser-actions';
|
import { BrowserActions } from '../utils/browser-actions';
|
||||||
|
|
||||||
export class ConfigEditorPage {
|
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);
|
await BrowserActions.clearSendKeys(this.textField, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickSaveButton(): Promise<void> {
|
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);
|
await BrowserActions.click(saveButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickClearButton(): Promise<void> {
|
async clickClearButton(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.textField);
|
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);
|
await BrowserActions.click(clearButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,11 +16,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserActions } from '../utils/browser-actions';
|
import { BrowserActions } from '../utils/browser-actions';
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserVisibility } from '../public-api';
|
import { BrowserVisibility } from '../public-api';
|
||||||
|
|
||||||
export class ContextMenuPage {
|
export class ContextMenuPage {
|
||||||
contextMenu: ElementFinder = element(by.id('adf-context-menu-content'));
|
contextMenu = element(by.id('adf-context-menu-content'));
|
||||||
|
|
||||||
async isContextMenuDisplayed(): Promise<boolean> {
|
async isContextMenuDisplayed(): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { BrowserVisibility } from '../utils/browser-visibility';
|
||||||
import { BrowserActions } from '../utils/browser-actions';
|
import { BrowserActions } from '../utils/browser-actions';
|
||||||
|
|
||||||
@@ -25,14 +25,14 @@ export class DataTableComponentPage {
|
|||||||
list: ElementArrayFinder;
|
list: ElementArrayFinder;
|
||||||
contents: ElementArrayFinder;
|
contents: ElementArrayFinder;
|
||||||
tableBody: ElementFinder;
|
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;
|
allColumns: ElementArrayFinder;
|
||||||
selectedRowNumber: ElementFinder;
|
selectedRowNumber: ElementFinder;
|
||||||
allSelectedRows: ElementArrayFinder;
|
allSelectedRows: ElementArrayFinder;
|
||||||
selectAll: ElementFinder;
|
selectAll: ElementFinder;
|
||||||
copyColumnTooltip: 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.rootElement = rootElement;
|
||||||
this.list = this.rootElement.all(by.css(`div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row']`));
|
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'));
|
this.contents = this.rootElement.all(by.css('div[class="adf-datatable-body"] span'));
|
||||||
|
@@ -25,7 +25,7 @@ export class DataTableItem {
|
|||||||
rootElement: ElementFinder;
|
rootElement: ElementFinder;
|
||||||
rows: Locator = by.css(`div[class*='adf-datatable-body'] adf-datatable-row[class*='adf-datatable-row']`);
|
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;
|
this.rootElement = rootElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,14 +16,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserActions } from '../utils/browser-actions';
|
import { BrowserActions } from '../utils/browser-actions';
|
||||||
|
|
||||||
export class ErrorPage {
|
export class ErrorPage {
|
||||||
|
|
||||||
errorPageCode: ElementFinder = element(by.css('adf-error-content .adf-error-content-code'));
|
errorPageCode = element(by.css('adf-error-content .adf-error-content-code'));
|
||||||
errorPageTitle: ElementFinder = element(by.css('adf-error-content .adf-error-content-title'));
|
errorPageTitle = element(by.css('adf-error-content .adf-error-content-title'));
|
||||||
errorPageDescription: ElementFinder = element(by.css('adf-error-content .adf-error-content-description'));
|
errorPageDescription = element(by.css('adf-error-content .adf-error-content-description'));
|
||||||
|
|
||||||
async checkErrorCode(): Promise<void> {
|
async checkErrorCode(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.errorPageCode);
|
await BrowserVisibility.waitUntilElementIsVisible(this.errorPageCode);
|
||||||
|
@@ -15,24 +15,24 @@
|
|||||||
* limitations under the License.
|
* 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 { BrowserVisibility, BrowserActions } from '../../utils/public-api';
|
||||||
import { DropdownPage } from '../material/dropdown.page';
|
import { DropdownPage } from '../material/dropdown.page';
|
||||||
|
|
||||||
export class FormFields {
|
export class FormFields {
|
||||||
|
|
||||||
formContent: ElementFinder = element(by.css('adf-form-renderer'));
|
formContent = element(by.css('adf-form-renderer'));
|
||||||
refreshButton: ElementFinder = element(by.css('div[class*="form-reload-button"] mat-icon'));
|
refreshButton = element(by.css('div[class*="form-reload-button"] mat-icon'));
|
||||||
saveButton: ElementFinder = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));
|
saveButton = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));
|
||||||
valueLocator: Locator = by.css('input');
|
valueLocator = by.css('input');
|
||||||
labelLocator: Locator = by.css('label');
|
labelLocator = by.css('label');
|
||||||
noFormMessage: ElementFinder = element(by.css('.adf-empty-content__title'));
|
noFormMessage = element(by.css('.adf-empty-content__title'));
|
||||||
noFormTemplate: ElementFinder = element(by.css('adf-empty-content'));
|
noFormTemplate = element(by.css('adf-empty-content'));
|
||||||
completedTaskNoFormMessage: ElementFinder = element(by.css('div[id*="completed-form-message"] p'));
|
completedTaskNoFormMessage = element(by.css('div[id*="completed-form-message"] p'));
|
||||||
attachFormButton: ElementFinder = element(by.id('adf-attach-form-attach-button'));
|
attachFormButton = element(by.id('adf-attach-form-attach-button'));
|
||||||
completeButton: ElementFinder = element(by.id('adf-form-complete'));
|
completeButton = element(by.id('adf-form-complete'));
|
||||||
cancelButton: ElementFinder = element(by.css('#adf-no-form-cancel-button'));
|
cancelButton = element(by.css('#adf-no-form-cancel-button'));
|
||||||
errorMessage: Locator = by.css('.adf-error-text-container .adf-error-text');
|
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());
|
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);
|
await BrowserActions.clearSendKeys(fieldElement, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickField(locator, field: string, fieldtext?: string): Promise<void> {
|
async clickField(locator, field: string, fieldText?: string): Promise<void> {
|
||||||
const fieldElement = fieldtext ? element(locator(field, fieldtext)) : element(locator(field));
|
const fieldElement = fieldText ? element(locator(field, fieldText)) : element(locator(field));
|
||||||
await BrowserActions.click(fieldElement);
|
await BrowserActions.click(fieldElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,12 +61,12 @@ export class FormFields {
|
|||||||
await BrowserVisibility.waitUntilElementIsNotVisible(hiddenElement, 6000);
|
await BrowserVisibility.waitUntilElementIsNotVisible(hiddenElement, 6000);
|
||||||
}
|
}
|
||||||
|
|
||||||
getWidget(fieldId): ElementFinder {
|
getWidget(fieldId: string): ElementFinder {
|
||||||
return element(by.css(`adf-form-field div[id='field-${fieldId}-container']`));
|
return element(by.css(`adf-form-field div[id='field-${fieldId}-container']`));
|
||||||
}
|
}
|
||||||
|
|
||||||
async getFieldValue(fieldId: string, valueLocatorParam?: any): Promise<string> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(valueWidget);
|
||||||
|
|
||||||
return valueWidget.getAttribute('value');
|
return valueWidget.getAttribute('value');
|
||||||
@@ -89,7 +89,7 @@ export class FormFields {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getFieldPlaceHolder(fieldId: string, locator = 'input'): Promise<string> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(placeHolderLocator);
|
||||||
return placeHolderLocator.getAttribute('placeholder');
|
return placeHolderLocator.getAttribute('placeholder');
|
||||||
}
|
}
|
||||||
@@ -146,7 +146,7 @@ export class FormFields {
|
|||||||
await BrowserActions.click(formNameElement);
|
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 widget = element(by.css(`adf-form-field div[id='field-${fieldId}-container']`));
|
||||||
const widgetReadOnly = widget.element(by.css('div[class*="adf-readonly"]'));
|
const widgetReadOnly = widget.element(by.css('div[class*="adf-readonly"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(widgetReadOnly);
|
await BrowserVisibility.waitUntilElementIsVisible(widgetReadOnly);
|
||||||
|
@@ -15,29 +15,29 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserVisibility } from '../../utils/browser-visibility';
|
import { BrowserVisibility } from '../../utils/browser-visibility';
|
||||||
import { BrowserActions } from '../../utils/public-api';
|
import { BrowserActions } from '../../utils/public-api';
|
||||||
|
|
||||||
export class FormPage {
|
export class FormPage {
|
||||||
|
|
||||||
errorLog: ElementFinder = element(by.css('div[class*="console"]'));
|
errorLog = element(by.css('div[class*="console"]'));
|
||||||
saveButton: ElementFinder = element(by.cssContainingText('mat-card-actions[class*="adf-for"] span', 'SAVE'));
|
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)));
|
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)));
|
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(this.errorLog);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText('div[class*="console"] p', errorMessage)));
|
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.waitUntilElementIsVisible(this.errorLog);
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.cssContainingText('div[class*="console"] p', errorMessage)));
|
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.cssContainingText('div[class*="console"] p', errorMessage)));
|
||||||
}
|
}
|
||||||
|
@@ -18,20 +18,20 @@
|
|||||||
import { FormFields } from '../form-fields';
|
import { FormFields } from '../form-fields';
|
||||||
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||||
import * as remote from 'selenium-webdriver/remote';
|
import * as remote from 'selenium-webdriver/remote';
|
||||||
import { element, by, browser, ElementFinder } from 'protractor';
|
import { element, by, browser } from 'protractor';
|
||||||
|
|
||||||
export class AttachFileWidgetPage {
|
export class AttachFileWidgetPage {
|
||||||
|
|
||||||
formFields: FormFields = new FormFields();
|
formFields = new FormFields();
|
||||||
uploadLocator = by.css('button[id="attachfile"]');
|
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"]');
|
filesListLocator = by.css('div[id="adf-attach-widget-readonly-list"]');
|
||||||
attachFileWidget: ElementFinder = element(by.css('#attachfile'));
|
attachFileWidget = element(by.css('#attachfile'));
|
||||||
attachedFileMenu: ElementFinder = element(by.css('mat-list-item button'));
|
attachedFileMenu = element(by.css('mat-list-item button'));
|
||||||
attachedFileOptions: ElementFinder = element(by.css('.mat-menu-panel .mat-menu-content'));
|
attachedFileOptions = element(by.css('.mat-menu-panel .mat-menu-content'));
|
||||||
viewFileOptionButton: ElementFinder = element(by.css(`.mat-menu-panel .mat-menu-content button[id$="show-file"]`));
|
viewFileOptionButton = 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"]`));
|
downloadFileOptionButton = 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"]`));
|
removeFileOptionButton = element(by.css(`.mat-menu-panel .mat-menu-content button[id$="remove"]`));
|
||||||
|
|
||||||
async attachFile(fieldId, fileLocation): Promise<void> {
|
async attachFile(fieldId, fileLocation): Promise<void> {
|
||||||
browser.setFileDetector(new remote.FileDetector());
|
browser.setFileDetector(new remote.FileDetector());
|
||||||
@@ -48,7 +48,7 @@ export class AttachFileWidgetPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(fileAttached);
|
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));
|
const fileView = element(this.filesListLocator).element(by.cssContainingText('mat-list-item span ', name));
|
||||||
await BrowserActions.click(fileView);
|
await BrowserActions.click(fileView);
|
||||||
await browser.actions().doubleClick(fileView).perform();
|
await browser.actions().doubleClick(fileView).perform();
|
||||||
|
@@ -17,34 +17,34 @@
|
|||||||
|
|
||||||
import { FormFields } from '../form-fields';
|
import { FormFields } from '../form-fields';
|
||||||
import { BrowserActions, BrowserVisibility } from '../../../utils/public-api';
|
import { BrowserActions, BrowserVisibility } from '../../../utils/public-api';
|
||||||
import { by, element, Locator, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
|
|
||||||
export class CheckboxWidgetPage {
|
export class CheckboxWidgetPage {
|
||||||
|
|
||||||
formFields: FormFields = new FormFields();
|
formFields = new FormFields();
|
||||||
checkboxLabel: ElementFinder = element(by.css('span[class*="mat-checkbox-label"]'));
|
checkboxLabel = element(by.css('span[class*="mat-checkbox-label"]'));
|
||||||
checkboxLocator: Locator = by.css('mat-checkbox');
|
checkboxLocator = by.css('mat-checkbox');
|
||||||
|
|
||||||
getCheckboxLabel(): Promise<string> {
|
getCheckboxLabel(): Promise<string> {
|
||||||
return BrowserActions.getText(this.checkboxLabel);
|
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();
|
const checkboxInput = element.all(by.css(`mat-checkbox[id="${fieldId}"] div`)).first();
|
||||||
await BrowserActions.click(checkboxInput);
|
await BrowserActions.click(checkboxInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
async isCheckboxDisplayed(fieldId): Promise<void> {
|
async isCheckboxDisplayed(fieldId: string): Promise<void> {
|
||||||
await this.formFields.checkWidgetIsVisible(fieldId);
|
await this.formFields.checkWidgetIsVisible(fieldId);
|
||||||
}
|
}
|
||||||
|
|
||||||
async isCheckboxHidden(fieldId): Promise<void> {
|
async isCheckboxHidden(fieldId: string): Promise<void> {
|
||||||
await this.formFields.checkWidgetIsHidden(fieldId);
|
await this.formFields.checkWidgetIsHidden(fieldId);
|
||||||
}
|
}
|
||||||
|
|
||||||
async isCheckboxChecked(fieldId): Promise<boolean> {
|
async isCheckboxChecked(fieldId: string): Promise<boolean> {
|
||||||
let isChecked: boolean = false;
|
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 BrowserVisibility.waitUntilElementIsVisible(checkboxWidget);
|
||||||
await checkboxWidget.getAttribute('class').then((attributeValue) => {
|
await checkboxWidget.getAttribute('class').then((attributeValue) => {
|
||||||
isChecked = attributeValue.includes('mat-checkbox-checked');
|
isChecked = attributeValue.includes('mat-checkbox-checked');
|
||||||
|
@@ -16,13 +16,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { FormFields } from '../form-fields';
|
import { FormFields } from '../form-fields';
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||||
|
|
||||||
export class DateTimeWidgetPage {
|
export class DateTimeWidgetPage {
|
||||||
|
|
||||||
formFields: FormFields = new FormFields();
|
formFields = new FormFields();
|
||||||
outsideLayer: ElementFinder = element(by.css('div[class*="cdk-overlay-container"]'));
|
outsideLayer = element(by.css('div[class*="cdk-overlay-container"]'));
|
||||||
|
|
||||||
async checkWidgetIsVisible(fieldId): Promise<void> {
|
async checkWidgetIsVisible(fieldId): Promise<void> {
|
||||||
await this.formFields.checkWidgetIsVisible(fieldId);
|
await this.formFields.checkWidgetIsVisible(fieldId);
|
||||||
@@ -46,34 +46,34 @@ export class DateTimeWidgetPage {
|
|||||||
await BrowserActions.click(this.outsideLayer);
|
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"]`));
|
const errorMessage = element(by.css(`adf-form-field div[id="field-${fieldId}-container"] div[class="adf-error-text"]`));
|
||||||
return BrowserActions.getText(errorMessage);
|
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));
|
const selectedDay = element(by.cssContainingText('div[class*="mat-datetimepicker-calendar-body-cell-content"]', day));
|
||||||
await BrowserActions.click(selectedDay);
|
await BrowserActions.click(selectedDay);
|
||||||
}
|
}
|
||||||
|
|
||||||
async openDatepicker(fieldId): Promise<void> {
|
async openDatepicker(fieldId: string): Promise<void> {
|
||||||
await BrowserActions.click(element(by.id(fieldId)));
|
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();
|
const selectedTime = element.all(by.cssContainingText('div[class*="mat-datetimepicker-clock-cell"]', time)).first();
|
||||||
await BrowserActions.click(selectedTime);
|
await BrowserActions.click(selectedTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectHour(hour): Promise<void> {
|
async selectHour(hour: string): Promise<void> {
|
||||||
return this.selectTime(hour);
|
return this.selectTime(hour);
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectMinute(minute): Promise<void> {
|
async selectMinute(minute: string): Promise<void> {
|
||||||
return this.selectTime(minute);
|
return this.selectTime(minute);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getPlaceholder(fieldId): Promise<string> {
|
async getPlaceholder(fieldId: string): Promise<string> {
|
||||||
return this.formFields.getFieldPlaceHolder(fieldId);
|
return this.formFields.getFieldPlaceHolder(fieldId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ export class DateTimeWidgetPage {
|
|||||||
await BrowserActions.clearWithBackSpace(amountWidgetInput);
|
await BrowserActions.clearWithBackSpace(amountWidgetInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clearDateTimeInput(fieldId): Promise<void> {
|
async clearDateTimeInput(fieldId: string): Promise<void> {
|
||||||
const dateInput = element(by.id(fieldId));
|
const dateInput = element(by.id(fieldId));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(dateInput);
|
await BrowserVisibility.waitUntilElementIsVisible(dateInput);
|
||||||
await dateInput.clear();
|
await dateInput.clear();
|
||||||
|
@@ -16,25 +16,25 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { FormFields } from '../form-fields';
|
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';
|
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||||
|
|
||||||
export class DynamicTableWidgetPage {
|
export class DynamicTableWidgetPage {
|
||||||
|
|
||||||
formFields: FormFields = new FormFields();
|
formFields = new FormFields();
|
||||||
|
|
||||||
labelLocator: Locator = by.css('dynamic-table-widget div div');
|
labelLocator = by.css('dynamic-table-widget div div');
|
||||||
columnNameLocator: Locator = by.css('table[id*="dynamic-table"] th');
|
columnNameLocator = by.css('table[id*="dynamic-table"] th');
|
||||||
cancelButton: ElementFinder = element(by.cssContainingText('button span', 'Cancel'));
|
cancelButton = element(by.cssContainingText('button span', 'Cancel'));
|
||||||
editButton: ElementFinder = element(by.cssContainingText('button span', 'edit'));
|
editButton = element(by.cssContainingText('button span', 'edit'));
|
||||||
columnDateTime: ElementFinder = element(by.id('columnDateTime'));
|
columnDateTime = element(by.id('columnDateTime'));
|
||||||
columnDate: ElementFinder = element(by.id('columnDate'));
|
columnDate = element(by.id('columnDate'));
|
||||||
calendarHeader: ElementFinder = element(by.css('div[class="mat-datetimepicker-calendar-header-date-time"]'));
|
calendarHeader = element(by.css('div[class="mat-datetimepicker-calendar-header-date-time"]'));
|
||||||
calendarContent: ElementFinder = element(by.css('div[class="mat-datetimepicker-calendar-content"]'));
|
calendarContent = element(by.css('div[class="mat-datetimepicker-calendar-content"]'));
|
||||||
saveButton: ElementFinder = element(by.cssContainingText('button span', 'Save'));
|
saveButton = element(by.cssContainingText('button span', 'Save'));
|
||||||
errorMessage: ElementFinder = element(by.css('div[class="adf-error-text"]'));
|
errorMessage = element(by.css('div[class="adf-error-text"]'));
|
||||||
dateWidget: ElementFinder = element.all(by.css('mat-datepicker-toggle button')).first();
|
dateWidget = element.all(by.css('mat-datepicker-toggle button')).first();
|
||||||
tableRow: ElementArrayFinder = element.all(by.css('tbody tr'));
|
tableRow = element.all(by.css('tbody tr'));
|
||||||
|
|
||||||
getFieldLabel(fieldId): Promise<string> {
|
getFieldLabel(fieldId): Promise<string> {
|
||||||
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
|
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
|
||||||
@@ -63,7 +63,7 @@ export class DynamicTableWidgetPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async setDatatableInput(text, id = 'id'): Promise<void> {
|
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 BrowserVisibility.waitUntilElementIsVisible(dataTableInput);
|
||||||
await BrowserActions.clearSendKeys(dataTableInput, text);
|
await BrowserActions.clearSendKeys(dataTableInput, text);
|
||||||
}
|
}
|
||||||
|
@@ -16,25 +16,25 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { FormFields } from '../form-fields';
|
import { FormFields } from '../form-fields';
|
||||||
import { by, element, ElementFinder, Locator } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||||
|
|
||||||
export class GroupWidgetPage {
|
export class GroupWidgetPage {
|
||||||
|
|
||||||
groupField: ElementFinder = element(by.css('input[data-automation-id="adf-group-search-input"]'));
|
groupField = element(by.css('input[data-automation-id="adf-group-search-input"]'));
|
||||||
firstResult: ElementFinder = element(by.id('adf-group-widget-user-0'));
|
firstResult = element(by.id('adf-group-widget-user-0'));
|
||||||
formFields: FormFields = new FormFields();
|
formFields = new FormFields();
|
||||||
groupDropDownList: Locator = by.css('.mat-autocomplete-panel');
|
groupDropDownList = by.css('.mat-autocomplete-panel');
|
||||||
|
|
||||||
getFieldLabel(fieldId): Promise<string> {
|
getFieldLabel(fieldId: string): Promise<string> {
|
||||||
return this.formFields.getFieldLabel(fieldId);
|
return this.formFields.getFieldLabel(fieldId);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFieldValue(fieldId): Promise<string> {
|
getFieldValue(fieldId: string): Promise<string> {
|
||||||
return this.formFields.getFieldValue(fieldId);
|
return this.formFields.getFieldValue(fieldId);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFieldText(fieldId): Promise<string> {
|
getFieldText(fieldId: string): Promise<string> {
|
||||||
return this.formFields.getFieldText(fieldId);
|
return this.formFields.getFieldText(fieldId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,31 +16,31 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { FormFields } from '../form-fields';
|
import { FormFields } from '../form-fields';
|
||||||
import { by, element, ElementFinder, Locator } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||||
|
|
||||||
export class PeopleWidgetPage {
|
export class PeopleWidgetPage {
|
||||||
|
|
||||||
peopleField: ElementFinder = element(by.css('input[data-automation-id="adf-people-search-input"]'));
|
peopleField = element(by.css('input[data-automation-id="adf-people-search-input"]'));
|
||||||
firstResult: ElementFinder = element(by.id('adf-people-widget-user-0'));
|
firstResult = element(by.id('adf-people-widget-user-0'));
|
||||||
formFields: FormFields = new FormFields();
|
formFields = new FormFields();
|
||||||
labelLocator: Locator = by.css('div[class*="display-text-widget"]');
|
labelLocator = by.css('div[class*="display-text-widget"]');
|
||||||
inputLocator: Locator = by.id('involvepeople');
|
inputLocator = by.id('involvepeople');
|
||||||
peopleDropDownList: Locator = by.css('div[class*="adf-people-widget-list"]');
|
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);
|
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFieldValue(fieldId): Promise<string> {
|
getFieldValue(fieldId: string): Promise<string> {
|
||||||
return this.formFields.getFieldValue(fieldId, this.inputLocator);
|
return this.formFields.getFieldValue(fieldId, this.inputLocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFieldText(fieldId): Promise<string> {
|
getFieldText(fieldId: string): Promise<string> {
|
||||||
return this.formFields.getFieldText(fieldId, this.labelLocator);
|
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);
|
return this.formFields.setValueInInputById(fieldId, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,12 +48,12 @@ export class PeopleWidgetPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(element(this.peopleDropDownList));
|
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));
|
const user = element(by.cssContainingText('.adf-people-label-name', userName));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(user);
|
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));
|
const user = element(by.cssContainingText('.adf-people-label-name', userName));
|
||||||
await BrowserActions.click(user);
|
await BrowserActions.click(user);
|
||||||
}
|
}
|
||||||
|
@@ -16,29 +16,29 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { FormFields } from '../form-fields';
|
import { FormFields } from '../form-fields';
|
||||||
import { by, element, ElementFinder, Locator } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||||
|
|
||||||
export class TypeaheadWidgetPage {
|
export class TypeaheadWidgetPage {
|
||||||
|
|
||||||
field: ElementFinder = element(by.css('input[data-automation-id="adf-typeahed-search-input"]'));
|
field = element(by.css('input[data-automation-id="adf-typeahed-search-input"]'));
|
||||||
firstResult: ElementFinder = element(by.id('adf-typeahed-widget-user-0'));
|
firstResult = element(by.id('adf-typeahed-widget-user-0'));
|
||||||
formFields: FormFields = new FormFields();
|
formFields = new FormFields();
|
||||||
groupDropDownList: Locator = by.css('.mat-autocomplete-panel');
|
groupDropDownList = by.css('.mat-autocomplete-panel');
|
||||||
|
|
||||||
getFieldLabel(fieldId): Promise<string> {
|
getFieldLabel(fieldId: string): Promise<string> {
|
||||||
return this.formFields.getFieldLabel(fieldId);
|
return this.formFields.getFieldLabel(fieldId);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFieldValue(fieldId): Promise<string> {
|
getFieldValue(fieldId: string): Promise<string> {
|
||||||
return this.formFields.getFieldValue(fieldId);
|
return this.formFields.getFieldValue(fieldId);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFieldText(fieldId): Promise<string> {
|
getFieldText(fieldId: string): Promise<string> {
|
||||||
return this.formFields.getFieldText(fieldId);
|
return this.formFields.getFieldText(fieldId);
|
||||||
}
|
}
|
||||||
|
|
||||||
insertValue(fieldId, value): Promise<void> {
|
insertValue(fieldId: string, value: string): Promise<void> {
|
||||||
return this.formFields.setValueInInputById(fieldId, value);
|
return this.formFields.setValueInInputById(fieldId, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ export class TypeaheadWidgetPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(element(this.groupDropDownList));
|
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));
|
const optionElement = element(by.cssContainingText('[id="adf-typeahed-label-name"]', option));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(optionElement);
|
await BrowserVisibility.waitUntilElementIsVisible(optionElement);
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@ export class TypeaheadWidgetPage {
|
|||||||
return element.all(option).map((elementFinder) => elementFinder.getText());
|
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));
|
const option = element(by.cssContainingText('[id="adf-typeahed-label-name"]', userName));
|
||||||
await BrowserActions.click(option);
|
await BrowserActions.click(option);
|
||||||
}
|
}
|
||||||
@@ -66,7 +66,7 @@ export class TypeaheadWidgetPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.field);
|
await BrowserVisibility.waitUntilElementIsVisible(this.field);
|
||||||
}
|
}
|
||||||
|
|
||||||
async fillTypeaheadField(value): Promise<void> {
|
async fillTypeaheadField(value: string): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsClickable(this.field);
|
await BrowserVisibility.waitUntilElementIsClickable(this.field);
|
||||||
await BrowserActions.clearSendKeys(this.field, value);
|
await BrowserActions.clearSendKeys(this.field, value);
|
||||||
}
|
}
|
||||||
|
@@ -15,23 +15,23 @@
|
|||||||
* limitations under the License.
|
* 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 { BrowserVisibility } from '../utils/browser-visibility';
|
||||||
import { BrowserActions } from '../utils/browser-actions';
|
import { BrowserActions } from '../utils/browser-actions';
|
||||||
|
|
||||||
export class HeaderPage {
|
export class HeaderPage {
|
||||||
|
|
||||||
checkBox: ElementFinder = element(by.cssContainingText('.mat-checkbox-label', 'Show menu button'));
|
checkBox = element(by.cssContainingText('.mat-checkbox-label', 'Show menu button'));
|
||||||
headerColor: ElementFinder = element(by.css('option[value="primary"]'));
|
headerColor = element(by.css('option[value="primary"]'));
|
||||||
titleInput: ElementFinder = element(by.css('input[name="title"]'));
|
titleInput = element(by.css('input[name="title"]'));
|
||||||
iconInput: ElementFinder = element(by.css('input[placeholder="URL path"]'));
|
iconInput = element(by.css('input[placeholder="URL path"]'));
|
||||||
hexColorInput: ElementFinder = element(by.css('input[placeholder="hex color code"]'));
|
hexColorInput = element(by.css('input[placeholder="hex color code"]'));
|
||||||
logoHyperlinkInput: ElementFinder = element(by.css('input[placeholder="Redirect URL"]'));
|
logoHyperlinkInput = element(by.css('input[placeholder="Redirect URL"]'));
|
||||||
logoTooltipInput: ElementFinder = element(by.css('input[placeholder="Tooltip text"]'));
|
logoTooltipInput = element(by.css('input[placeholder="Tooltip text"]'));
|
||||||
positionStart: ElementFinder = element.all(by.css('mat-radio-button[value="start"]')).first();
|
positionStart = element.all(by.css('mat-radio-button[value="start"]')).first();
|
||||||
positionEnd: ElementFinder = element.all(by.css('mat-radio-button[value="end"]')).first();
|
positionEnd = element.all(by.css('mat-radio-button[value="end"]')).first();
|
||||||
sideBarPositionRight: ElementFinder = element(by.css('mat-sidenav.mat-drawer.mat-sidenav.mat-drawer-end'));
|
sideBarPositionRight = element(by.css('mat-sidenav.mat-drawer.mat-sidenav.mat-drawer-end'));
|
||||||
sideBarPositionLeft: ElementFinder = element(by.css('mat-sidenav.mat-drawer.mat-sidenav'));
|
sideBarPositionLeft = element(by.css('mat-sidenav.mat-drawer.mat-sidenav'));
|
||||||
|
|
||||||
async checkShowMenuCheckBoxIsDisplayed(): Promise<void> {
|
async checkShowMenuCheckBoxIsDisplayed(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.checkBox);
|
await BrowserVisibility.waitUntilElementIsVisible(this.checkBox);
|
||||||
@@ -54,28 +54,28 @@ export class HeaderPage {
|
|||||||
await BrowserActions.click(checkBox);
|
await BrowserActions.click(checkBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
async changeHeaderColor(color): Promise<void> {
|
async changeHeaderColor(color: string): Promise<void> {
|
||||||
const headerColor = element(by.css('option[value="' + color + '"]'));
|
const headerColor = element(by.css('option[value="' + color + '"]'));
|
||||||
await BrowserActions.click(headerColor);
|
await BrowserActions.click(headerColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkAppTitle(name): Promise<void> {
|
async checkAppTitle(name: string): Promise<void> {
|
||||||
const title = element(by.cssContainingText('.adf-app-title', name));
|
const title = element(by.cssContainingText('.adf-app-title', name));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(title);
|
await BrowserVisibility.waitUntilElementIsVisible(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
async addTitle(title): Promise<void> {
|
async addTitle(title: string): Promise<void> {
|
||||||
await BrowserActions.click(this.titleInput);
|
await BrowserActions.click(this.titleInput);
|
||||||
await BrowserActions.clearSendKeys(this.titleInput, title);
|
await BrowserActions.clearSendKeys(this.titleInput, title);
|
||||||
await this.titleInput.sendKeys(protractor.Key.ENTER);
|
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 + '"]'));
|
const icon = element(by.css('img[src="' + url + '"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(icon);
|
await BrowserVisibility.waitUntilElementIsVisible(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
async addIcon(url): Promise<void> {
|
async addIcon(url: string): Promise<void> {
|
||||||
await BrowserActions.click(this.iconInput);
|
await BrowserActions.click(this.iconInput);
|
||||||
await BrowserActions.clearSendKeys(this.iconInput, url);
|
await BrowserActions.clearSendKeys(this.iconInput, url);
|
||||||
await this.iconInput.sendKeys(protractor.Key.ENTER);
|
await this.iconInput.sendKeys(protractor.Key.ENTER);
|
||||||
@@ -93,19 +93,19 @@ export class HeaderPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.logoTooltipInput);
|
await BrowserVisibility.waitUntilElementIsVisible(this.logoTooltipInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
async addHexCodeColor(hexCode): Promise<void> {
|
async addHexCodeColor(hexCode: string): Promise<void> {
|
||||||
await BrowserActions.click(this.hexColorInput);
|
await BrowserActions.click(this.hexColorInput);
|
||||||
await BrowserActions.clearSendKeys(this.hexColorInput, hexCode);
|
await BrowserActions.clearSendKeys(this.hexColorInput, hexCode);
|
||||||
await this.hexColorInput.sendKeys(protractor.Key.ENTER);
|
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.click(this.logoHyperlinkInput);
|
||||||
await BrowserActions.clearSendKeys(this.logoHyperlinkInput, hyperlink);
|
await BrowserActions.clearSendKeys(this.logoHyperlinkInput, hyperlink);
|
||||||
await this.logoHyperlinkInput.sendKeys(protractor.Key.ENTER);
|
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.click(this.logoTooltipInput);
|
||||||
await BrowserActions.clearSendKeys(this.logoTooltipInput, tooltip);
|
await BrowserActions.clearSendKeys(this.logoTooltipInput, tooltip);
|
||||||
await this.logoTooltipInput.sendKeys(protractor.Key.ENTER);
|
await this.logoTooltipInput.sendKeys(protractor.Key.ENTER);
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* 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 { BrowserVisibility } from '../utils/browser-visibility';
|
||||||
import { BrowserActions } from '../utils/browser-actions';
|
import { BrowserActions } from '../utils/browser-actions';
|
||||||
import { LocalStorageUtil } from '../utils/local-storage.util';
|
import { LocalStorageUtil } from '../utils/local-storage.util';
|
||||||
@@ -29,9 +29,9 @@ export class LoginSSOPage {
|
|||||||
header = element(by.tagName('adf-layout-header'));
|
header = element(by.tagName('adf-layout-header'));
|
||||||
loginError = element(by.css(`div[data-automation-id="login-error"]`));
|
loginError = element(by.css(`div[data-automation-id="login-error"]`));
|
||||||
|
|
||||||
txtUsernameBasicAuth: ElementFinder = element(by.css('input[id="username"]'));
|
txtUsernameBasicAuth = element(by.css('input[id="username"]'));
|
||||||
txtPasswordBasicAuth: ElementFinder = element(by.css('input[id="password"]'));
|
txtPasswordBasicAuth = element(by.css('input[id="password"]'));
|
||||||
signInButtonBasicAuth: ElementFinder = element(by.id('login-button'));
|
signInButtonBasicAuth = element(by.id('login-button'));
|
||||||
|
|
||||||
async goToLoginPage(): Promise<void> {
|
async goToLoginPage(): Promise<void> {
|
||||||
let currentUrl;
|
let currentUrl;
|
||||||
@@ -95,11 +95,11 @@ export class LoginSSOPage {
|
|||||||
await BrowserActions.click(this.signInButtonBasicAuth);
|
await BrowserActions.click(this.signInButtonBasicAuth);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterUsernameBasicAuth(username): Promise<void> {
|
async enterUsernameBasicAuth(username: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.txtUsernameBasicAuth, username);
|
await BrowserActions.clearSendKeys(this.txtUsernameBasicAuth, username);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enterPasswordBasicAuth(password): Promise<void> {
|
async enterPasswordBasicAuth(password: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.txtPasswordBasicAuth, password);
|
await BrowserActions.clearSendKeys(this.txtPasswordBasicAuth, password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,17 +15,17 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { DateUtil } from '../../utils/date-util';
|
import { DateUtil } from '../../utils/date-util';
|
||||||
import { BrowserVisibility } from '../../utils/browser-visibility';
|
import { BrowserVisibility } from '../../utils/browser-visibility';
|
||||||
import { BrowserActions } from '../../utils/browser-actions';
|
import { BrowserActions } from '../../utils/browser-actions';
|
||||||
|
|
||||||
export class DatePickerCalendarPage {
|
export class DatePickerCalendarPage {
|
||||||
|
|
||||||
datePicker: ElementFinder = element(by.css('mat-calendar'));
|
datePicker = element(by.css('mat-calendar'));
|
||||||
nextMonthButton: ElementFinder = element(by.css('button[class*="mat-calendar-next-button"]'));
|
nextMonthButton = element(by.css('button[class*="mat-calendar-next-button"]'));
|
||||||
previousMonthButton: ElementFinder = element(by.css('button[class*="mat-calendar-previous-button"]'));
|
previousMonthButton = element(by.css('button[class*="mat-calendar-previous-button"]'));
|
||||||
todayDate: ElementFinder = element(by.css('.mat-calendar-body-today'));
|
todayDate = element(by.css('.mat-calendar-body-today'));
|
||||||
|
|
||||||
async getSelectedDate(): Promise<string> {
|
async getSelectedDate(): Promise<string> {
|
||||||
return element(by.css('td[class*="mat-calendar-body-active"]')).getAttribute('aria-label');
|
return element(by.css('td[class*="mat-calendar-body-active"]')).getAttribute('aria-label');
|
||||||
|
@@ -15,13 +15,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserActions } from '../../utils/browser-actions';
|
import { BrowserActions } from '../../utils/browser-actions';
|
||||||
import { DatePickerCalendarPage } from './date-picker-calendar.page';
|
import { DatePickerCalendarPage } from './date-picker-calendar.page';
|
||||||
|
|
||||||
export class DatePickerPage {
|
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();
|
dateTime = new DatePickerCalendarPage();
|
||||||
|
|
||||||
async setTodayDateValue(): Promise<void> {
|
async setTodayDateValue(): Promise<void> {
|
||||||
|
@@ -15,21 +15,21 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, ElementFinder, Locator } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserVisibility } from '../../utils/browser-visibility';
|
import { BrowserVisibility } from '../../utils/browser-visibility';
|
||||||
import { BrowserActions } from '../../utils/browser-actions';
|
import { BrowserActions } from '../../utils/browser-actions';
|
||||||
|
|
||||||
export class DateTimePickerCalendarPage {
|
export class DateTimePickerCalendarPage {
|
||||||
|
|
||||||
datePicker: ElementFinder = element(by.css(`.mat-datetimepicker-calendar`));
|
datePicker = element(by.css(`.mat-datetimepicker-calendar`));
|
||||||
today: ElementFinder = element(by.css(`.mat-datetimepicker-calendar-body-today`));
|
today = element(by.css(`.mat-datetimepicker-calendar-body-today`));
|
||||||
timePicker: ElementFinder = element(by.css('.mat-datetimepicker-clock'));
|
timePicker = element(by.css('.mat-datetimepicker-clock'));
|
||||||
hourTime: ElementFinder = element.all(by.css('.mat-datetimepicker-clock-hours .mat-datetimepicker-clock-cell')).first();
|
hourTime = 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();
|
minutesTime = 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)');
|
firstEnabledHourSelector = 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)');
|
firstEnabledMinutesSelector = by.css('.mat-datetimepicker-clock-cell:not(.mat-datetimepicker-clock-cell-disabled)');
|
||||||
hoursPicker: ElementFinder = element(by.css('.mat-datetimepicker-clock-hours'));
|
hoursPicker = element(by.css('.mat-datetimepicker-clock-hours'));
|
||||||
minutePicker: ElementFinder = element(by.css('.mat-datetimepicker-clock-minutes'));
|
minutePicker = element(by.css('.mat-datetimepicker-clock-minutes'));
|
||||||
|
|
||||||
async waitTillDateDisplayed(): Promise<void> {
|
async waitTillDateDisplayed(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.datePicker);
|
await BrowserVisibility.waitUntilElementIsVisible(this.datePicker);
|
||||||
|
@@ -22,7 +22,7 @@ import { DateTimePickerCalendarPage } from './date-time-picker-calendar.page';
|
|||||||
export class DateTimePickerPage {
|
export class DateTimePickerPage {
|
||||||
|
|
||||||
rootElement: ElementFinder;
|
rootElement: ElementFinder;
|
||||||
dateTimePicker: ElementFinder = element(by.css('.mat-datetimepicker-toggle'));
|
dateTimePicker = element(by.css('.mat-datetimepicker-toggle'));
|
||||||
dateTime = new DateTimePickerCalendarPage();
|
dateTime = new DateTimePickerCalendarPage();
|
||||||
|
|
||||||
constructor(rootElement?: ElementFinder) {
|
constructor(rootElement?: ElementFinder) {
|
||||||
|
@@ -23,7 +23,7 @@ export class DropdownPage {
|
|||||||
|
|
||||||
dropDownElement: ElementFinder;
|
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;
|
this.dropDownElement = dropDownElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,8 +58,8 @@ export class DropdownPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(selectedOption);
|
await BrowserVisibility.waitUntilElementIsVisible(selectedOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectOptionFromIndex(index): Promise<void> {
|
async selectOptionFromIndex(index: number): Promise<void> {
|
||||||
const value: ElementFinder = element.all(by.className('mat-option')).get(index);
|
const value = element.all(by.className('mat-option')).get(index);
|
||||||
await BrowserActions.click(value);
|
await BrowserActions.click(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,13 +15,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
import { BrowserActions } from '../utils/browser-actions';
|
import { BrowserActions } from '../utils/browser-actions';
|
||||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||||
|
|
||||||
export class NotificationHistoryPage {
|
export class NotificationHistoryPage {
|
||||||
|
|
||||||
notificationList: ElementFinder = element(by.css('#adf-notification-history-list'));
|
notificationList = element(by.css('#adf-notification-history-list'));
|
||||||
|
|
||||||
async clickNotificationButton(): Promise<void> {
|
async clickNotificationButton(): Promise<void> {
|
||||||
await BrowserActions.clickExecuteScript('#adf-notification-history-open-button');
|
await BrowserActions.clickExecuteScript('#adf-notification-history-open-button');
|
||||||
|
@@ -15,28 +15,28 @@
|
|||||||
* limitations under the License.
|
* 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 { BrowserVisibility } from '../utils/browser-visibility';
|
||||||
import { BrowserActions } from '../utils/browser-actions';
|
import { BrowserActions } from '../utils/browser-actions';
|
||||||
|
|
||||||
export class PaginationPage {
|
export class PaginationPage {
|
||||||
|
|
||||||
pageSelectorDropDown: ElementFinder = element(by.css('div[class*="adf-pagination__page-selector"]'));
|
pageSelectorDropDown = element(by.css('div[class*="adf-pagination__page-selector"]'));
|
||||||
pageSelectorArrow: ElementFinder = element(by.css('button[data-automation-id="page-selector"]'));
|
pageSelectorArrow = element(by.css('button[data-automation-id="page-selector"]'));
|
||||||
itemsPerPage: ElementFinder = element(by.css('span[class="adf-pagination__max-items"]'));
|
itemsPerPage = element(by.css('span[class="adf-pagination__max-items"]'));
|
||||||
itemsPerPageOpenDropdown: ElementFinder = element(by.css('.adf-pagination__perpage-block button'));
|
itemsPerPageOpenDropdown = element(by.css('.adf-pagination__perpage-block button'));
|
||||||
itemsPerPageOptions: Locator = by.css('.adf-pagination__page-selector .mat-menu-item');
|
itemsPerPageOptions = by.css('.adf-pagination__page-selector .mat-menu-item');
|
||||||
currentPage: ElementFinder = element(by.css('span[class="adf-pagination__current-page"]'));
|
currentPage = element(by.css('span[class="adf-pagination__current-page"]'));
|
||||||
totalPages: ElementFinder = element(by.css('span[class="adf-pagination__total-pages"]'));
|
totalPages = element(by.css('span[class="adf-pagination__total-pages"]'));
|
||||||
paginationRange: ElementFinder = element(by.css('span[class="adf-pagination__range"]'));
|
paginationRange = element(by.css('span[class="adf-pagination__range"]'));
|
||||||
nextPageButton: ElementFinder = element(by.css('button[class*="adf-pagination__next-button"]'));
|
nextPageButton = element(by.css('button[class*="adf-pagination__next-button"]'));
|
||||||
nextButtonDisabled: ElementFinder = element(by.css('button[class*="adf-pagination__next-button"][disabled]'));
|
nextButtonDisabled = element(by.css('button[class*="adf-pagination__next-button"][disabled]'));
|
||||||
previousButtonDisabled: ElementFinder = element(by.css('button[class*="adf-pagination__previous-button"][disabled]'));
|
previousButtonDisabled = element(by.css('button[class*="adf-pagination__previous-button"][disabled]'));
|
||||||
pageDropDown: ElementFinder = element(by.css('div[class*="adf-pagination__actualinfo-block"] button'));
|
pageDropDown = element(by.css('div[class*="adf-pagination__actualinfo-block"] button'));
|
||||||
pageDropDownOptions: Locator = by.css('div[class*="mat-menu-content"] button');
|
pageDropDownOptions = by.css('div[class*="mat-menu-content"] button');
|
||||||
paginationSection: ElementFinder = element(by.css('adf-pagination'));
|
paginationSection = element(by.css('adf-pagination'));
|
||||||
paginationSectionEmpty: ElementFinder = element(by.css('adf-pagination[class*="adf-pagination__empty"]'));
|
paginationSectionEmpty = element(by.css('adf-pagination[class*="adf-pagination__empty"]'));
|
||||||
totalFiles: ElementFinder = element(by.css('span[class="adf-pagination__range"]'));
|
totalFiles = element(by.css('span[class="adf-pagination__range"]'));
|
||||||
|
|
||||||
async selectItemsPerPage(numberOfItem: string): Promise<void> {
|
async selectItemsPerPage(numberOfItem: string): Promise<void> {
|
||||||
await browser.executeScript(`document.querySelector('div[class*="adf-pagination__perpage-block"] button').click();`);
|
await browser.executeScript(`document.querySelector('div[class*="adf-pagination__perpage-block"] button').click();`);
|
||||||
|
@@ -15,29 +15,29 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { browser, by, element, ElementFinder } from 'protractor';
|
import { browser, by, element } from 'protractor';
|
||||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||||
import { BrowserActions } from '../utils/browser-actions';
|
import { BrowserActions } from '../utils/browser-actions';
|
||||||
import { DropdownPage } from '../../core/pages/material/dropdown.page';
|
import { DropdownPage } from '../../core/pages/material/dropdown.page';
|
||||||
|
|
||||||
export class SettingsPage {
|
export class SettingsPage {
|
||||||
|
|
||||||
settingsURL: string = browser.baseUrl + '/settings';
|
settingsURL = browser.baseUrl + '/settings';
|
||||||
ecmText: ElementFinder = element(by.css('input[data-automation-id*="ecmHost"]'));
|
ecmText = element(by.css('input[data-automation-id*="ecmHost"]'));
|
||||||
bpmText: ElementFinder = element(by.css('input[data-automation-id*="bpmHost"]'));
|
bpmText = element(by.css('input[data-automation-id*="bpmHost"]'));
|
||||||
clientIdText: ElementFinder = element(by.css('input[id="clientId"]'));
|
clientIdText = element(by.css('input[id="clientId"]'));
|
||||||
authHostText: ElementFinder = element(by.css('input[id="oauthHost"]'));
|
authHostText = element(by.css('input[id="oauthHost"]'));
|
||||||
logoutUrlText: ElementFinder = element(by.css('input[id="logout-url"]'));
|
logoutUrlText = element(by.css('input[id="logout-url"]'));
|
||||||
basicAuthRadioButton: ElementFinder = element(by.cssContainingText('mat-radio-button[id*="mat-radio"]', 'Basic Authentication'));
|
basicAuthRadioButton = element(by.cssContainingText('mat-radio-button[id*="mat-radio"]', 'Basic Authentication'));
|
||||||
identityHostText: ElementFinder = element(by.css('input[id="identityHost"]'));
|
identityHostText = element(by.css('input[id="identityHost"]'));
|
||||||
ssoRadioButton: ElementFinder = element(by.cssContainingText('[id*="mat-radio"]', 'SSO'));
|
ssoRadioButton = element(by.cssContainingText('[id*="mat-radio"]', 'SSO'));
|
||||||
silentLoginToggleLabel: ElementFinder = element(by.css('mat-slide-toggle[name="silentLogin"] label'));
|
silentLoginToggleLabel = element(by.css('mat-slide-toggle[name="silentLogin"] label'));
|
||||||
silentLoginToggleElement: ElementFinder = element(by.css('mat-slide-toggle[name="silentLogin"]'));
|
silentLoginToggleElement = element(by.css('mat-slide-toggle[name="silentLogin"]'));
|
||||||
implicitFlowLabel: ElementFinder = element(by.css('mat-slide-toggle[name="implicitFlow"] label'));
|
implicitFlowLabel = element(by.css('mat-slide-toggle[name="implicitFlow"] label'));
|
||||||
implicitFlowElement: ElementFinder = element(by.css('mat-slide-toggle[name="implicitFlow"]'));
|
implicitFlowElement = element(by.css('mat-slide-toggle[name="implicitFlow"]'));
|
||||||
applyButton: ElementFinder = element(by.css('button[data-automation-id*="host-button"]'));
|
applyButton = element(by.css('button[data-automation-id*="host-button"]'));
|
||||||
backButton: ElementFinder = element(by.cssContainingText('button span[class="mat-button-wrapper"]', 'Back'));
|
backButton = element(by.cssContainingText('button span[class="mat-button-wrapper"]', 'Back'));
|
||||||
validationMessage: ElementFinder = element(by.cssContainingText('mat-error', 'This field is required'));
|
validationMessage = element(by.cssContainingText('mat-error', 'This field is required'));
|
||||||
|
|
||||||
providerDropdown = new DropdownPage(element(by.css('mat-select[id="adf-provider-selector"]')));
|
providerDropdown = new DropdownPage(element(by.css('mat-select[id="adf-provider-selector"]')));
|
||||||
|
|
||||||
|
@@ -15,14 +15,14 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||||
import { BrowserActions } from '../utils/browser-actions';
|
import { BrowserActions } from '../utils/browser-actions';
|
||||||
|
|
||||||
export class SnackbarPage {
|
export class SnackbarPage {
|
||||||
|
|
||||||
notificationSnackBar: ElementFinder = element.all(by.css('simple-snack-bar span')).first();
|
notificationSnackBar = element.all(by.css('simple-snack-bar span')).first();
|
||||||
snackBarAction: ElementFinder = element(by.css('simple-snack-bar button span'));
|
snackBarAction = element(by.css('simple-snack-bar button span'));
|
||||||
snackBarContainerCss = by.css('.mat-snack-bar-container');
|
snackBarContainerCss = by.css('.mat-snack-bar-container');
|
||||||
|
|
||||||
async waitForSnackBarToAppear() {
|
async waitForSnackBarToAppear() {
|
||||||
|
@@ -15,30 +15,30 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||||
import { TabsPage } from '../../core/pages/material/tabs.page';
|
import { TabsPage } from '../../core/pages/material/tabs.page';
|
||||||
import { BrowserActions } from '../utils/browser-actions';
|
import { BrowserActions } from '../utils/browser-actions';
|
||||||
|
|
||||||
export class UserInfoPage {
|
export class UserInfoPage {
|
||||||
|
|
||||||
dialog: ElementFinder = element.all(by.css('mat-card[class*="adf-userinfo-card"]')).first();
|
dialog = element.all(by.css('mat-card[class*="adf-userinfo-card"]')).first();
|
||||||
userImage: ElementFinder = element(by.css('div[id="user-initial-image"]'));
|
userImage = element(by.css('div[id="user-initial-image"]'));
|
||||||
userInfoEcmHeaderTitle: ElementFinder = element(by.css('div[id="ecm-username"]'));
|
userInfoEcmHeaderTitle = element(by.css('div[id="ecm-username"]'));
|
||||||
userInfoEcmTitle: ElementFinder = element(by.css('mat-card-content span[id="ecm-full-name"]'));
|
userInfoEcmTitle = element(by.css('mat-card-content span[id="ecm-full-name"]'));
|
||||||
ecmEmail: ElementFinder = element(by.css('span[id="ecm-email"]'));
|
ecmEmail = element(by.css('span[id="ecm-email"]'));
|
||||||
ecmJobTitle: ElementFinder = element(by.css('span[id="ecm-job-title"]'));
|
ecmJobTitle = element(by.css('span[id="ecm-job-title"]'));
|
||||||
userInfoProcessHeaderTitle: ElementFinder = element(by.css('div[id="bpm-username"]'));
|
userInfoProcessHeaderTitle = element(by.css('div[id="bpm-username"]'));
|
||||||
userInfoProcessTitle: ElementFinder = element(by.css('mat-card-content span[id="bpm-full-name"]'));
|
userInfoProcessTitle = element(by.css('mat-card-content span[id="bpm-full-name"]'));
|
||||||
processEmail: ElementFinder = element(by.css('span[id="bpm-email"]'));
|
processEmail = element(by.css('span[id="bpm-email"]'));
|
||||||
processTenant: ElementFinder = element(by.css('span[class="detail-profile"]'));
|
processTenant = element(by.css('span[class="detail-profile"]'));
|
||||||
apsImage: ElementFinder = element(by.css('img[id="bpm-user-detail-image"]'));
|
apsImage = element(by.css('img[id="bpm-user-detail-image"]'));
|
||||||
acsImage: ElementFinder = element(by.css('img[id="ecm-user-detail-image"]'));
|
acsImage = element(by.css('img[id="ecm-user-detail-image"]'));
|
||||||
initialImage: ElementFinder = element.all(by.css('div[id="user-initials-image"]')).first();
|
initialImage = element.all(by.css('div[id="user-initials-image"]')).first();
|
||||||
userInfoSsoHeaderTitle: ElementFinder = this.dialog.element(by.css('div[id="identity-username"]'));
|
userInfoSsoHeaderTitle = this.dialog.element(by.css('div[id="identity-username"]'));
|
||||||
userInfoSsoTitle: ElementFinder = element(by.css('.adf-userinfo__detail-title'));
|
userInfoSsoTitle = element(by.css('.adf-userinfo__detail-title'));
|
||||||
ssoEmail: ElementFinder = element(by.id('identity-email'));
|
ssoEmail = element(by.id('identity-email'));
|
||||||
userProfileButton: ElementFinder = element(by.css('button[data-automation-id="adf-user-profile"]'));
|
userProfileButton = element(by.css('button[data-automation-id="adf-user-profile"]'));
|
||||||
tabsPage: TabsPage;
|
tabsPage: TabsPage;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@@ -19,95 +19,95 @@ import { BrowserActions } from '../utils/browser-actions';
|
|||||||
import { TabsPage } from './material/tabs.page';
|
import { TabsPage } from './material/tabs.page';
|
||||||
import { TogglePage } from './material/toggle.page';
|
import { TogglePage } from './material/toggle.page';
|
||||||
import { BrowserVisibility } from '../utils/browser-visibility';
|
import { BrowserVisibility } from '../utils/browser-visibility';
|
||||||
import { element, by, ElementFinder, browser, protractor } from 'protractor';
|
import { element, by, browser, protractor } from 'protractor';
|
||||||
|
|
||||||
export class ViewerPage {
|
export class ViewerPage {
|
||||||
|
|
||||||
tabsPage: TabsPage = new TabsPage();
|
tabsPage = new TabsPage();
|
||||||
togglePage: TogglePage = new TogglePage();
|
togglePage = new TogglePage();
|
||||||
|
|
||||||
closeButton: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-back"]'));
|
closeButton = element(by.css('button[data-automation-id="adf-toolbar-back"]'));
|
||||||
fileName: ElementFinder = element(by.id('adf-viewer-display-name'));
|
fileName = element(by.id('adf-viewer-display-name'));
|
||||||
infoButton: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-sidebar"]'));
|
infoButton = element(by.css('button[data-automation-id="adf-toolbar-sidebar"]'));
|
||||||
leftSideBarButton: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-left-sidebar"]'));
|
leftSideBarButton = element(by.css('button[data-automation-id="adf-toolbar-left-sidebar"]'));
|
||||||
previousPageButton: ElementFinder = element(by.id('viewer-previous-page-button'));
|
previousPageButton = element(by.id('viewer-previous-page-button'));
|
||||||
nextPageButton: ElementFinder = element(by.id('viewer-next-page-button'));
|
nextPageButton = element(by.id('viewer-next-page-button'));
|
||||||
zoomInButton: ElementFinder = element(by.id('viewer-zoom-in-button'));
|
zoomInButton = element(by.id('viewer-zoom-in-button'));
|
||||||
zoomOutButton: ElementFinder = element(by.id('viewer-zoom-out-button'));
|
zoomOutButton = element(by.id('viewer-zoom-out-button'));
|
||||||
scalePageButton: ElementFinder = element(by.id('viewer-scale-page-button'));
|
scalePageButton = element(by.id('viewer-scale-page-button'));
|
||||||
fullScreenButton: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-fullscreen"]'));
|
fullScreenButton = element(by.css('button[data-automation-id="adf-toolbar-fullscreen"]'));
|
||||||
rotateLeft: ElementFinder = element(by.css('button[id="viewer-rotate-left-button"]'));
|
rotateLeft = element(by.css('button[id="viewer-rotate-left-button"]'));
|
||||||
rotateRight: ElementFinder = element(by.css('button[id="viewer-rotate-right-button"]'));
|
rotateRight = element(by.css('button[id="viewer-rotate-right-button"]'));
|
||||||
scaleImg: ElementFinder = element(by.css('button[id="viewer-reset-button"]'));
|
scaleImg = element(by.css('button[id="viewer-reset-button"]'));
|
||||||
fileThumbnail: ElementFinder = element(by.css('img[data-automation-id="adf-file-thumbnail"]'));
|
fileThumbnail = element(by.css('img[data-automation-id="adf-file-thumbnail"]'));
|
||||||
pageSelectorInput: ElementFinder = element(by.css('input[data-automation-id="adf-page-selector"]'));
|
pageSelectorInput = element(by.css('input[data-automation-id="adf-page-selector"]'));
|
||||||
imgContainer: ElementFinder = element(by.css('div[data-automation-id="adf-image-container"]'));
|
imgContainer = 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"]'));
|
mediaContainer = 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"'));
|
percentage = element(by.css('div[data-automation-id="adf-page-scale"'));
|
||||||
thumbnailsBtn: ElementFinder = element(by.css('button[data-automation-id="adf-thumbnails-button"]'));
|
thumbnailsBtn = element(by.css('button[data-automation-id="adf-thumbnails-button"]'));
|
||||||
thumbnailsContent: ElementFinder = element(by.css('div[data-automation-id="adf-thumbnails-content"]'));
|
thumbnailsContent = element(by.css('div[data-automation-id="adf-thumbnails-content"]'));
|
||||||
thumbnailsClose: ElementFinder = element(by.css('button[data-automation-id="adf-thumbnails-close"]'));
|
thumbnailsClose = element(by.css('button[data-automation-id="adf-thumbnails-close"]'));
|
||||||
secondThumbnail: ElementFinder = element(by.css('adf-pdf-thumb > img[title="Page 2"'));
|
secondThumbnail = element(by.css('adf-pdf-thumb > img[title="Page 2"'));
|
||||||
lastThumbnailDisplayed: ElementFinder = element.all(by.css('adf-pdf-thumb')).last();
|
lastThumbnailDisplayed = element.all(by.css('adf-pdf-thumb')).last();
|
||||||
passwordDialog: ElementFinder = element(by.css('adf-pdf-viewer-password-dialog'));
|
passwordDialog = element(by.css('adf-pdf-viewer-password-dialog'));
|
||||||
passwordSubmit: ElementFinder = element(by.css('button[data-automation-id="adf-password-dialog-submit"]'));
|
passwordSubmit = element(by.css('button[data-automation-id="adf-password-dialog-submit"]'));
|
||||||
passwordDialogClose: ElementFinder = element(by.css('button[data-automation-id="adf-password-dialog-close"]'));
|
passwordDialogClose = 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]'));
|
passwordSubmitDisabled = 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"]'));
|
passwordInput = 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"]'));
|
passwordError = element(by.css('mat-error[data-automation-id="adf-password-dialog-error"]'));
|
||||||
infoSideBar: ElementFinder = element(by.id('adf-right-sidebar'));
|
infoSideBar = element(by.id('adf-right-sidebar'));
|
||||||
leftSideBar: ElementFinder = element(by.id('adf-left-sidebar'));
|
leftSideBar = element(by.id('adf-left-sidebar'));
|
||||||
viewer: ElementFinder = element(by.css('adf-viewer'));
|
viewer = element(by.css('adf-viewer'));
|
||||||
pdfViewer: ElementFinder = element(by.css('adf-pdf-viewer'));
|
pdfViewer = element(by.css('adf-pdf-viewer'));
|
||||||
imgViewer: ElementFinder = element(by.css('adf-img-viewer'));
|
imgViewer = element(by.css('adf-img-viewer'));
|
||||||
activeTab: ElementFinder = element(by.css('div[class*="mat-tab-label-active"]'));
|
activeTab = element(by.css('div[class*="mat-tab-label-active"]'));
|
||||||
toolbarSwitch: ElementFinder = element(by.id('adf-switch-toolbar'));
|
toolbarSwitch = element(by.id('adf-switch-toolbar'));
|
||||||
toolbar: ElementFinder = element(by.id('adf-viewer-toolbar'));
|
toolbar = element(by.id('adf-viewer-toolbar'));
|
||||||
lastButton: ElementFinder = element.all(by.css('#adf-viewer-toolbar mat-toolbar > button[data-automation-id*="adf-toolbar-"]')).last();
|
lastButton = element.all(by.css('#adf-viewer-toolbar mat-toolbar > button[data-automation-id*="adf-toolbar-"]')).last();
|
||||||
goBackSwitch: ElementFinder = element(by.id('adf-switch-goback'));
|
goBackSwitch = element(by.id('adf-switch-goback'));
|
||||||
canvasLayer: ElementFinder = element.all(by.css('div[class="canvasWrapper"] > canvas')).first();
|
canvasLayer = element.all(by.css('div[class="canvasWrapper"] > canvas')).first();
|
||||||
|
|
||||||
openWithSwitch: ElementFinder = element(by.id('adf-switch-openwith'));
|
openWithSwitch = element(by.id('adf-switch-openwith'));
|
||||||
openWith: ElementFinder = element(by.id('adf-viewer-openwith'));
|
openWith = element(by.id('adf-viewer-openwith'));
|
||||||
|
|
||||||
moreActionsMenuSwitch: ElementFinder = element(by.id('adf-switch-moreactionsmenu'));
|
moreActionsMenuSwitch = element(by.id('adf-switch-moreactionsmenu'));
|
||||||
moreActionsMenu: ElementFinder = element(by.css('button[data-automation-id="adf-toolbar-more-actions"]'));
|
moreActionsMenu = element(by.css('button[data-automation-id="adf-toolbar-more-actions"]'));
|
||||||
|
|
||||||
customNameSwitch: ElementFinder = element(by.id('adf-switch-custoname'));
|
customNameSwitch = element(by.id('adf-switch-custoname'));
|
||||||
customToolbarToggle: ElementFinder = element(by.id('adf-toggle-custom-toolbar'));
|
customToolbarToggle = element(by.id('adf-toggle-custom-toolbar'));
|
||||||
customToolbar: ElementFinder = element(by.css('adf-viewer-toolbar[data-automation-id="adf-viewer-custom-toolbar"]'));
|
customToolbar = element(by.css('adf-viewer-toolbar[data-automation-id="adf-viewer-custom-toolbar"]'));
|
||||||
|
|
||||||
showRightSidebarSwitch: ElementFinder = element(by.id('adf-switch-showrightsidebar'));
|
showRightSidebarSwitch = element(by.id('adf-switch-showrightsidebar'));
|
||||||
showLeftSidebarSwitch: ElementFinder = element(by.id('adf-switch-showleftsidebar'));
|
showLeftSidebarSwitch = element(by.id('adf-switch-showleftsidebar'));
|
||||||
|
|
||||||
moreActionsSwitch: ElementFinder = element(by.id('adf-switch-moreactions'));
|
moreActionsSwitch = element(by.id('adf-switch-moreactions'));
|
||||||
pdfPageLoaded: ElementFinder = element(by.css('[data-page-number="1"][data-loaded="true"], adf-img-viewer, adf-txt-viewer'));
|
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'));
|
downloadSwitch = element(by.id('adf-switch-download'));
|
||||||
downloadButton: ElementFinder = element(by.id('adf-viewer-download'));
|
downloadButton = element(by.id('adf-viewer-download'));
|
||||||
|
|
||||||
printSwitch: ElementFinder = element(by.id('adf-switch-print'));
|
printSwitch = element(by.id('adf-switch-print'));
|
||||||
printButton: ElementFinder = element(by.id('adf-viewer-print'));
|
printButton = element(by.id('adf-viewer-print'));
|
||||||
|
|
||||||
allowSidebarSwitch: ElementFinder = element(by.id('adf-switch-allowsidebar'));
|
allowSidebarSwitch = element(by.id('adf-switch-allowsidebar'));
|
||||||
allowLeftSidebarSwitch: ElementFinder = element(by.id('adf-switch-allowLeftSidebar'));
|
allowLeftSidebarSwitch = element(by.id('adf-switch-allowLeftSidebar'));
|
||||||
|
|
||||||
uploadButton: ElementFinder = element(by.id('adf-viewer-upload'));
|
uploadButton = element(by.id('adf-viewer-upload'));
|
||||||
timeButton: ElementFinder = element(by.id('adf-viewer-time'));
|
timeButton = element(by.id('adf-viewer-time'));
|
||||||
bugButton: ElementFinder = element(by.id('adf-viewer-bug'));
|
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'));
|
showTabWithIconSwitch = element(by.id('adf-tab-with-icon'));
|
||||||
showTabWithIconAndLabelSwitch: ElementFinder = element(by.id('adf-icon-and-label-tab'));
|
showTabWithIconAndLabelSwitch = element(by.id('adf-icon-and-label-tab'));
|
||||||
unknownFormat: ElementFinder = element(by.css(`adf-viewer-unknown-format .adf-viewer__unknown-format-view`));
|
unknownFormat = element(by.css(`adf-viewer-unknown-format .adf-viewer__unknown-format-view`));
|
||||||
|
|
||||||
async checkCodeViewerIsDisplayed(): Promise<void> {
|
async checkCodeViewerIsDisplayed(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.codeViewer);
|
await BrowserVisibility.waitUntilElementIsVisible(this.codeViewer);
|
||||||
}
|
}
|
||||||
|
|
||||||
async viewFile(fileName): Promise<void> {
|
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 BrowserActions.click(fileView);
|
||||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@ export class ViewerPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkCurrentThumbnailIsSelected(): Promise<void> {
|
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');
|
const pageNumber = await this.pageSelectorInput.getAttribute('value');
|
||||||
|
|
||||||
await expect('Page ' + pageNumber).toEqual(await selectedThumbnail.getAttribute('title'));
|
await expect('Page ' + pageNumber).toEqual(await selectedThumbnail.getAttribute('title'));
|
||||||
@@ -274,9 +274,9 @@ export class ViewerPage {
|
|||||||
|
|
||||||
async checkFileContent(pageNumber: string, text: string): Promise<void> {
|
async checkFileContent(pageNumber: string, text: string): Promise<void> {
|
||||||
const allPages = this.canvasLayer;
|
const allPages = this.canvasLayer;
|
||||||
const pageLoaded: ElementFinder = element.all(by.css('div[data-page-number="' + pageNumber + '"][data-loaded="true"]')).first();
|
const pageLoaded = 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 textLayerLoaded = 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 specificText = element.all(by.cssContainingText('div[data-page-number="' + pageNumber + '"] div[class="textLayer"]', text)).first();
|
||||||
|
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(allPages);
|
await BrowserVisibility.waitUntilElementIsVisible(allPages);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(pageLoaded);
|
await BrowserVisibility.waitUntilElementIsVisible(pageLoaded);
|
||||||
@@ -346,7 +346,7 @@ export class ViewerPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkTabIsActive(tabName): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsVisible(tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -593,7 +593,7 @@ export class ViewerPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async enterCustomName(text: string): Promise<void> {
|
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 BrowserVisibility.waitUntilElementIsVisible(textField);
|
||||||
await BrowserActions.clearSendKeys(textField, text);
|
await BrowserActions.clearSendKeys(textField, text);
|
||||||
}
|
}
|
||||||
@@ -611,22 +611,22 @@ export class ViewerPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkTabHasNoIcon(index: number): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsNotVisible(tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkTabHasNoLabel(index: number): Promise<void> {
|
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);
|
await BrowserVisibility.waitUntilElementIsNotVisible(tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getTabLabelById(index: number): Promise<string> {
|
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);
|
return BrowserActions.getText(tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getTabIconById(index: number): Promise<string> {
|
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);
|
return BrowserActions.getText(tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,23 +15,23 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, ElementArrayFinder, ElementFinder } from 'protractor';
|
import { element, by } from 'protractor';
|
||||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||||
|
|
||||||
export class AppListCloudPage {
|
export class AppListCloudPage {
|
||||||
|
|
||||||
apsAppsContainer: ElementFinder = element(by.css('adf-cloud-app-list'));
|
apsAppsContainer = element(by.css('adf-cloud-app-list'));
|
||||||
allApps: ElementArrayFinder = element.all(by.css('adf-cloud-app-details'));
|
allApps = element.all(by.css('adf-cloud-app-details'));
|
||||||
nameOfAllApps: ElementArrayFinder = element.all(by.css('adf-cloud-app-details div[class*="item-card-title"] h1'));
|
nameOfAllApps = 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();
|
firstApp = element.all(by.css('adf-cloud-app-details div[class*="item-card-title"] h1')).first();
|
||||||
|
|
||||||
async checkApsContainer(): Promise<void> {
|
async checkApsContainer(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.apsAppsContainer);
|
await BrowserVisibility.waitUntilElementIsVisible(this.apsAppsContainer);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.firstApp);
|
await BrowserVisibility.waitUntilElementIsVisible(this.firstApp);
|
||||||
}
|
}
|
||||||
|
|
||||||
async goToApp(applicationName): Promise<void> {
|
async goToApp(applicationName: string): Promise<void> {
|
||||||
await BrowserActions.clickExecuteScript('mat-card[title="' + applicationName + '"]');
|
await BrowserActions.clickExecuteScript('mat-card[title="' + applicationName + '"]');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,12 +43,12 @@ export class AppListCloudPage {
|
|||||||
return BrowserActions.getArrayText(this.nameOfAllApps);
|
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 + '"]'));
|
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(app);
|
await BrowserVisibility.waitUntilElementIsNotVisible(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkAppIsDisplayed(applicationName): Promise<void> {
|
async checkAppIsDisplayed(applicationName: string): Promise<void> {
|
||||||
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(app);
|
await BrowserVisibility.waitUntilElementIsVisible(app);
|
||||||
}
|
}
|
||||||
|
@@ -15,17 +15,17 @@
|
|||||||
* limitations under the License.
|
* 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 { BrowserVisibility } from '../../../core/utils/browser-visibility';
|
||||||
import { BrowserActions } from '../../../core/utils/browser-actions';
|
import { BrowserActions } from '../../../core/utils/browser-actions';
|
||||||
|
|
||||||
export class EditProcessFilterDialogPage {
|
export class EditProcessFilterDialogPage {
|
||||||
|
|
||||||
componentElement: ElementFinder = element(by.css('adf-cloud-process-filter-dialog-cloud'));
|
componentElement = element(by.css('adf-cloud-process-filter-dialog-cloud'));
|
||||||
title: ElementFinder = element(by.id('adf-process-filter-dialog-title'));
|
title = element(by.id('adf-process-filter-dialog-title'));
|
||||||
filterNameInput: ElementFinder = element(by.id('adf-filter-name-id'));
|
filterNameInput = element(by.id('adf-filter-name-id'));
|
||||||
saveButtonLocator: Locator = by.id('adf-save-button-id');
|
saveButtonLocator = by.id('adf-save-button-id');
|
||||||
cancelButtonLocator: Locator = by.id('adf-cancel-button-id');
|
cancelButtonLocator = by.id('adf-cancel-button-id');
|
||||||
|
|
||||||
async clickOnSaveButton(): Promise<void> {
|
async clickOnSaveButton(): Promise<void> {
|
||||||
const saveButton = this.componentElement.element(this.saveButtonLocator);
|
const saveButton = this.componentElement.element(this.saveButtonLocator);
|
||||||
|
@@ -15,17 +15,17 @@
|
|||||||
* limitations under the License.
|
* 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 { BrowserVisibility } from '../../../core/utils/browser-visibility';
|
||||||
import { BrowserActions } from '../../../core/utils/browser-actions';
|
import { BrowserActions } from '../../../core/utils/browser-actions';
|
||||||
|
|
||||||
export class EditTaskFilterDialogPage {
|
export class EditTaskFilterDialogPage {
|
||||||
|
|
||||||
componentElement: ElementFinder = element(by.css('adf-cloud-task-filter-dialog'));
|
componentElement = element(by.css('adf-cloud-task-filter-dialog'));
|
||||||
title: ElementFinder = element(by.id('adf-task-filter-dialog-title'));
|
title = element(by.id('adf-task-filter-dialog-title'));
|
||||||
filterNameInput: ElementFinder = element(by.id('adf-filter-name-id'));
|
filterNameInput = element(by.id('adf-filter-name-id'));
|
||||||
saveButtonLocator: Locator = by.id('adf-save-button-id');
|
saveButtonLocator = by.id('adf-save-button-id');
|
||||||
cancelButtonLocator: Locator = by.id('adf-cancel-button-id');
|
cancelButtonLocator = by.id('adf-cancel-button-id');
|
||||||
|
|
||||||
async clickOnSaveButton(): Promise<void> {
|
async clickOnSaveButton(): Promise<void> {
|
||||||
const saveButton = this.componentElement.element(this.saveButtonLocator);
|
const saveButton = this.componentElement.element(this.saveButtonLocator);
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* 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 { EditProcessFilterDialogPage } from './dialog/edit-process-filter-dialog.page';
|
||||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||||
@@ -22,11 +22,11 @@ import { DropdownPage } from '../../core/pages/material/dropdown.page';
|
|||||||
|
|
||||||
export class EditProcessFilterCloudComponentPage {
|
export class EditProcessFilterCloudComponentPage {
|
||||||
|
|
||||||
customiseFilter: ElementFinder = element(by.id('adf-edit-process-filter-title-id'));
|
customiseFilter = element(by.id('adf-edit-process-filter-title-id'));
|
||||||
saveButton: ElementFinder = element(by.css('button[data-automation-id="adf-filter-action-save"]'));
|
saveButton = element(by.css('button[data-automation-id="adf-filter-action-save"]'));
|
||||||
saveAsButton: ElementFinder = element(by.css('button[data-automation-id="adf-filter-action-saveAs"]'));
|
saveAsButton = element(by.css('button[data-automation-id="adf-filter-action-saveAs"]'));
|
||||||
deleteButton: ElementFinder = element(by.css('button[data-automation-id="adf-filter-action-delete"]'));
|
deleteButton = 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`));
|
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 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']`));
|
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);
|
return BrowserVisibility.waitUntilElementIsNotVisible(emptyList);
|
||||||
}
|
}
|
||||||
|
|
||||||
async setProcessInstanceId(option): Promise<void> {
|
async setProcessInstanceId(option: string): Promise<void> {
|
||||||
await this.setProperty('processInstanceId', option);
|
await this.setProperty('processInstanceId', option);
|
||||||
}
|
}
|
||||||
|
|
||||||
async setProcessDefinitionKey(option): Promise<void> {
|
async setProcessDefinitionKey(option: string): Promise<void> {
|
||||||
await this.setProperty('processDefinitionKey', option);
|
await this.setProperty('processDefinitionKey', option);
|
||||||
}
|
}
|
||||||
|
|
||||||
async setProcessName(option): Promise<void> {
|
async setProcessName(option: string): Promise<void> {
|
||||||
await this.setProperty('processName', option);
|
await this.setProperty('processName', option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -23,21 +23,21 @@ import { DropdownPage } from '../../core/pages/material/dropdown.page';
|
|||||||
|
|
||||||
export class EditTaskFilterCloudComponentPage {
|
export class EditTaskFilterCloudComponentPage {
|
||||||
|
|
||||||
customiseFilter: ElementFinder = element(by.id('adf-edit-task-filter-title-id'));
|
customiseFilter = element(by.id('adf-edit-task-filter-title-id'));
|
||||||
assignee: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-assignee"]'));
|
assignee = 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"]'));
|
priority = 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"]'));
|
taskName = 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"]'));
|
id = 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"]'));
|
processDefinitionId = 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"]'));
|
processInstanceId = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processInstanceId"]'));
|
||||||
lastModifiedFrom: ElementFinder = element(by.css('input[placeholder="LastModifiedFrom"]'));
|
lastModifiedFrom = element(by.css('input[placeholder="LastModifiedFrom"]'));
|
||||||
lastModifiedTo: ElementFinder = element(by.css('input[placeholder="LastModifiedTo"]'));
|
lastModifiedTo = element(by.css('input[placeholder="LastModifiedTo"]'));
|
||||||
parentTaskId: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-parentTaskId"]'));
|
parentTaskId = 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"]'));
|
owner = 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"]'));
|
saveButton = element(by.css('[data-automation-id="adf-filter-action-save"]'));
|
||||||
saveAsButton: ElementFinder = element(by.css('[data-automation-id="adf-filter-action-saveAs"]'));
|
saveAsButton = element(by.css('[data-automation-id="adf-filter-action-saveAs"]'));
|
||||||
deleteButton: ElementFinder = element(by.css('[data-automation-id="adf-filter-action-delete"]'));
|
deleteButton = element(by.css('[data-automation-id="adf-filter-action-delete"]'));
|
||||||
filter: ElementFinder = element(by.css(`adf-cloud-edit-task-filter mat-expansion-panel-header`));
|
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 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']`));
|
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();
|
return this.appNameDropdown.getSelectedOptionText();
|
||||||
}
|
}
|
||||||
|
|
||||||
async setId(option): Promise<void> {
|
async setId(option: string): Promise<void> {
|
||||||
await this.setProperty('taskId', option);
|
await this.setProperty('taskId', option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,15 +15,15 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||||
import { ConfigEditorPage } from '../../core/pages/config-editor-page';
|
import { ConfigEditorPage } from '../../core/pages/config-editor-page';
|
||||||
|
|
||||||
export class FormCloudComponentPage {
|
export class FormCloudComponentPage {
|
||||||
|
|
||||||
formCloudEditor: ElementFinder = element.all(by.css('.mat-tab-list .mat-tab-label')).get(1);
|
formCloudEditor = 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);
|
formCloudRender = element.all(by.css('.mat-tab-list .mat-tab-label')).get(0);
|
||||||
|
|
||||||
configEditorPage = new ConfigEditorPage();
|
configEditorPage = new ConfigEditorPage();
|
||||||
|
|
||||||
|
@@ -15,21 +15,21 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { by, element, ElementFinder } from 'protractor';
|
import { by, element } from 'protractor';
|
||||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||||
import { FormFields } from '../../core/pages/form/form-fields';
|
import { FormFields } from '../../core/pages/form/form-fields';
|
||||||
|
|
||||||
export class GroupCloudComponentPage {
|
export class GroupCloudComponentPage {
|
||||||
|
|
||||||
groupCloudSearch: ElementFinder = element(by.css('input[data-automation-id="adf-cloud-group-search-input"]'));
|
groupCloudSearch = element(by.css('input[data-automation-id="adf-cloud-group-search-input"]'));
|
||||||
formFields: FormFields = new FormFields();
|
formFields = new FormFields();
|
||||||
|
|
||||||
async searchGroups(name: string): Promise<void> {
|
async searchGroups(name: string): Promise<void> {
|
||||||
await BrowserActions.clearSendKeys(this.groupCloudSearch, name);
|
await BrowserActions.clearSendKeys(this.groupCloudSearch, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
async searchGroupsToExisting(name) {
|
async searchGroupsToExisting(name: string) {
|
||||||
await BrowserActions.clearSendKeys(this.groupCloudSearch, name);
|
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'));
|
const activeGroupField = element(by.css('group-cloud-widget .adf-readonly'));
|
||||||
try {
|
try {
|
||||||
await BrowserActions.clearSendKeys(activeGroupField, name);
|
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