[ADF-4595] Change demo-shell style classes prefix (#5132)

* [ADF-4595] Change demo-shell style classes prefix

* Change more files

* Trigger e2e tests

* Fix e2e selectors

* Fix e2e tests

* Fix e2e tests
This commit is contained in:
davidcanonieto
2019-10-18 17:35:01 +01:00
committed by Eugenio Romano
parent 83094b43ff
commit f2c1778eda
101 changed files with 576 additions and 562 deletions

View File

@@ -27,15 +27,15 @@ export class CardViewComponentPage {
floatField: ElementFinder = element(by.css(`input[data-automation-id='card-textitem-editinput-float']`));
valueInputField: ElementFinder = element(by.xpath(`//*[contains(@id,'input') and @placeholder='Value']`));
nameInputField: ElementFinder = element(by.xpath(`//*[contains(@id,'input') and @placeholder='Name']`));
consoleLog: ElementFinder = element(by.className('adf-console'));
consoleLog: ElementFinder = element(by.className('app-console'));
deleteButton: ElementFinder = element.all(by.className('adf-card-view__key-value-pairs__remove-btn')).first();
select: ElementFinder = element(by.css('mat-select[data-automation-class="select-box"]'));
checkbox: ElementFinder = element(by.css(`mat-checkbox[data-automation-id='card-boolean-boolean']`));
resetButton: ElementFinder = element(by.css(`#adf-reset-card-log`));
listContent: ElementFinder = element(by.css('.mat-select-panel'));
editableSwitch: ElementFinder = element(by.id('adf-toggle-editable'));
clearDateSwitch: ElementFinder = element(by.id('adf-toggle-clear-date'));
noneOptionSwitch: ElementFinder = element(by.id('adf-toggle-none-option'));
editableSwitch: ElementFinder = element(by.id('app-toggle-editable'));
clearDateSwitch: ElementFinder = element(by.id('app-toggle-clear-date'));
noneOptionSwitch: ElementFinder = element(by.id('app-toggle-none-option'));
async clickOnAddButton(): Promise<void> {
await BrowserActions.click(this.addButton);
@@ -202,7 +202,7 @@ export class CardViewComponentPage {
const switchClass = await this.clearDateSwitch.getAttribute('class');
if (switchClass.indexOf('mat-checked') === -1) {
await this.clearDateSwitch.click();
const clearDateChecked = element(by.css('mat-slide-toggle[id="adf-toggle-clear-date"][class*="mat-checked"]'));
const clearDateChecked = element(by.css('mat-slide-toggle[id="app-toggle-clear-date"][class*="mat-checked"]'));
await BrowserVisibility.waitUntilElementIsVisible(clearDateChecked);
}
}
@@ -213,7 +213,7 @@ export class CardViewComponentPage {
const switchClass = await this.noneOptionSwitch.getAttribute('class');
if (switchClass.indexOf('mat-checked') === -1) {
await this.noneOptionSwitch.click();
const noneOptionChecked = element(by.css('mat-slide-toggle[id="adf-toggle-none-option"][class*="mat-checked"]'));
const noneOptionChecked = element(by.css('mat-slide-toggle[id="app-toggle-none-option"][class*="mat-checked"]'));
await BrowserVisibility.waitUntilElementIsVisible(noneOptionChecked);
}
}

View File

@@ -27,13 +27,13 @@ export class ConfigEditorPage {
}
async clickSaveButton(): Promise<void> {
const saveButton: ElementFinder = element(by.id('adf-form-config-save'));
const saveButton: ElementFinder = element(by.id('app-form-config-save'));
await BrowserActions.click(saveButton);
}
async clickClearButton(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.textField);
const clearButton: ElementFinder = element(by.id('adf-form-config-clear'));
const clearButton: ElementFinder = element(by.id('app-form-config-clear'));
await BrowserActions.click(clearButton);
}

View File

@@ -43,7 +43,7 @@ export class ContentServicesPage {
multipleFileUploadToggle: ElementFinder = element(by.id('adf-document-list-enable-drop-files'));
uploadBorder: ElementFinder = element(by.id('document-list-container'));
contentServices: ElementFinder = element(by.css('.adf-sidenav-link[data-automation-id="Content Services"]'));
contentServices: ElementFinder = element(by.css('.app-sidenav-link[data-automation-id="Content Services"]'));
currentFolder: ElementFinder = element(by.css('div[class*="adf-breadcrumb-item adf-active"] div'));
createFolderButton: ElementFinder = element(by.css('button[data-automation-id="create-new-folder"]'));
editFolderButton: ElementFinder = element(by.css('button[data-automation-id="edit-folder"]'));
@@ -61,15 +61,15 @@ export class ContentServicesPage {
sizeHeader: ElementFinder = element(by.css('div[data-automation-id="auto_id_content.sizeInBytes"] > span'));
createdByHeader: ElementFinder = element(by.css('div[data-automation-id="auto_id_createdByUser.displayName"] > span'));
createdHeader: ElementFinder = element(by.css('div[data-automation-id="auto_id_createdAt"] > span'));
recentFiles: ElementFinder = element(by.css('.adf-container-recent'));
recentFilesExpanded: ElementFinder = element(by.css('.adf-container-recent mat-expansion-panel-header.mat-expanded'));
recentFilesClosed: ElementFinder = element(by.css('.adf-container-recent mat-expansion-panel-header'));
recentFileIcon: ElementFinder = element(by.css('.adf-container-recent mat-expansion-panel-header mat-icon'));
recentFiles: ElementFinder = element(by.css('.app-container-recent'));
recentFilesExpanded: ElementFinder = element(by.css('.app-container-recent mat-expansion-panel-header.mat-expanded'));
recentFilesClosed: ElementFinder = element(by.css('.app-container-recent mat-expansion-panel-header'));
recentFileIcon: ElementFinder = element(by.css('.app-container-recent mat-expansion-panel-header mat-icon'));
emptyFolder: ElementFinder = element(by.css('.adf-empty-folder-this-space-is-empty'));
emptyFolderImage: ElementFinder = element(by.css('.adf-empty-folder-image'));
emptyRecent: ElementFinder = element(by.css('.adf-container-recent .adf-empty-list__title'));
emptyRecent: ElementFinder = element(by.css('.app-container-recent .app-empty-list__title'));
gridViewButton: ElementFinder = element(by.css('button[data-automation-id="document-list-grid-view"]'));
cardViewContainer: ElementFinder = element(by.css('div.adf-document-list-container div.adf-datatable-card'));
cardViewContainer: ElementFinder = element(by.css('div.app-document-list-container div.adf-datatable-card'));
shareNodeButton: ElementFinder = element(by.cssContainingText('mat-icon', ' share '));
nameColumnHeader = 'name';
createdByColumnHeader = 'createdByUser.displayName';
@@ -520,7 +520,7 @@ export class ContentServicesPage {
}
async getRowIconImageUrl(fileName): Promise<string> {
const iconRow: ElementFinder = element(by.css(`.adf-document-list-container div.adf-datatable-cell[data-automation-id="${fileName}"] img`));
const iconRow: ElementFinder = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${fileName}"] img`));
await BrowserVisibility.waitUntilElementIsVisible(iconRow);
return await iconRow.getAttribute('src');
}
@@ -540,21 +540,21 @@ export class ContentServicesPage {
async getCardElementShowedInPage(): Promise<number> {
await BrowserVisibility.waitUntilElementIsVisible(this.cardViewContainer);
return $$('div.adf-document-list-container div.adf-datatable-card div.adf-cell-value img').count();
return $$('div.app-document-list-container div.adf-datatable-card div.adf-cell-value img').count();
}
async getDocumentCardIconForElement(elementName): Promise<string> {
const elementIcon: ElementFinder = element(by.css(`.adf-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"] img`));
const elementIcon: ElementFinder = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"] img`));
return await elementIcon.getAttribute('src');
}
async checkDocumentCardPropertyIsShowed(elementName, propertyName): Promise<void> {
const elementProperty: ElementFinder = element(by.css(`.adf-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"][title="${propertyName}"]`));
const elementProperty: ElementFinder = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"][title="${propertyName}"]`));
await BrowserVisibility.waitUntilElementIsVisible(elementProperty);
}
async getAttributeValueForElement(elementName, propertyName): Promise<string> {
const elementSize = element(by.css(`.adf-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"][title="${propertyName}"] span`));
const elementSize = element(by.css(`.app-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"][title="${propertyName}"] span`));
return await BrowserActions.getText(elementSize);
}
@@ -565,7 +565,7 @@ export class ContentServicesPage {
async navigateToCardFolder(folderName): Promise<void> {
await BrowserActions.closeMenuAndDialogs();
const folderCard: ElementFinder = element(by.css(`.adf-document-list-container div.adf-image-table-cell.adf-datatable-cell[data-automation-id="${folderName}"]`));
const folderCard: ElementFinder = element(by.css(`.app-document-list-container div.adf-image-table-cell.adf-datatable-cell[data-automation-id="${folderName}"]`));
await BrowserActions.click(folderCard);
const folderSelected: ElementFinder = element(by.css(`.adf-datatable-row.adf-is-selected div[data-automation-id="${folderName}"].adf-datatable-cell--image`));
await BrowserVisibility.waitUntilElementIsVisible(folderSelected);

View File

@@ -20,25 +20,25 @@ import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class PeopleGroupCloudComponentPage {
peopleCloudSingleSelectionChecked: ElementFinder = element(by.css('mat-radio-button[data-automation-id="adf-people-single-mode"][class*="mat-radio-checked"]'));
peopleCloudMultipleSelectionChecked: ElementFinder = element(by.css('mat-radio-button[data-automation-id="adf-people-multiple-mode"][class*="mat-radio-checked"]'));
peopleCloudSingleSelection: ElementFinder = element(by.css('mat-radio-button[data-automation-id="adf-people-single-mode"]'));
peopleCloudMultipleSelection: ElementFinder = element(by.css('mat-radio-button[data-automation-id="adf-people-multiple-mode"]'));
peopleCloudFilterRole: ElementFinder = element(by.css('mat-radio-button[data-automation-id="adf-people-filter-role"]'));
groupCloudSingleSelection: ElementFinder = element(by.css('mat-radio-button[data-automation-id="adf-group-single-mode"]'));
groupCloudMultipleSelection: ElementFinder = element(by.css('mat-radio-button[data-automation-id="adf-group-multiple-mode"]'));
groupCloudFilterRole: ElementFinder = element(by.css('mat-radio-button[data-automation-id="adf-group-filter-role"]'));
peopleRoleInput: ElementFinder = element(by.css('input[data-automation-id="adf-people-roles-input"]'));
peopleAppInput: ElementFinder = element(by.css('input[data-automation-id="adf-people-app-input"]'));
peoplePreselect: ElementFinder = element(by.css('input[data-automation-id="adf-people-preselect-input"]'));
groupRoleInput: ElementFinder = element(by.css('input[data-automation-id="adf-group-roles-input"]'));
groupAppInput: ElementFinder = element(by.css('input[data-automation-id="adf-group-app-input"]'));
peopleCloudSingleSelectionChecked: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-people-single-mode"][class*="mat-radio-checked"]'));
peopleCloudMultipleSelectionChecked: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-people-multiple-mode"][class*="mat-radio-checked"]'));
peopleCloudSingleSelection: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-people-single-mode"]'));
peopleCloudMultipleSelection: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-people-multiple-mode"]'));
peopleCloudFilterRole: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-people-filter-role"]'));
groupCloudSingleSelection: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-group-single-mode"]'));
groupCloudMultipleSelection: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-group-multiple-mode"]'));
groupCloudFilterRole: ElementFinder = element(by.css('mat-radio-button[data-automation-id="app-group-filter-role"]'));
peopleRoleInput: ElementFinder = element(by.css('input[data-automation-id="app-people-roles-input"]'));
peopleAppInput: ElementFinder = element(by.css('input[data-automation-id="app-people-app-input"]'));
peoplePreselect: ElementFinder = element(by.css('input[data-automation-id="app-people-preselect-input"]'));
groupRoleInput: ElementFinder = element(by.css('input[data-automation-id="app-group-roles-input"]'));
groupAppInput: ElementFinder = element(by.css('input[data-automation-id="app-group-app-input"]'));
peopleCloudComponentTitle: ElementFinder = element(by.cssContainingText('mat-card-title', 'People Cloud Component'));
groupCloudComponentTitle: ElementFinder = element(by.cssContainingText('mat-card-title', 'Groups Cloud Component'));
preselectValidation: ElementFinder = element(by.css('mat-checkbox.adf-preselect-value'));
preselectValidationStatus: ElementFinder = element(by.css('mat-checkbox.adf-preselect-value label input'));
peopleFilterByAppName: ElementFinder = element(by.css('.people-control-options mat-radio-button[value="appName"]'));
groupFilterByAppName: ElementFinder = element(by.css('.groups-control-options mat-radio-button[value="appName"]'));
preselectValidation: ElementFinder = element(by.css('mat-checkbox.app-preselect-value'));
preselectValidationStatus: ElementFinder = element(by.css('mat-checkbox.app-preselect-value label input'));
peopleFilterByAppName: ElementFinder = element(by.css('.app-people-control-options mat-radio-button[value="appName"]'));
groupFilterByAppName: ElementFinder = element(by.css('.app-groups-control-options mat-radio-button[value="appName"]'));
async checkPeopleCloudComponentTitleIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudComponentTitle);

View File

@@ -31,7 +31,7 @@ export class TaskListDemoPage {
page: ElementFinder = element(by.css("input[data-automation-id='page']"));
pageForm: ElementFinder = element(by.css("mat-form-field[data-automation-id='page']"));
taskName: ElementFinder = element(by.css("input[data-automation-id='task name']"));
resetButton: ElementFinder = element(by.css("div[class='adf-reset-button'] button"));
resetButton: ElementFinder = element(by.css("div[class='app-reset-button'] button"));
dueBefore: ElementFinder = element(by.css("input[data-automation-id='due before']"));
dueAfter: ElementFinder = element(by.css("input[data-automation-id='due after']"));
taskId: ElementFinder = element(by.css("input[data-automation-id='task id']"));

View File

@@ -23,23 +23,23 @@ import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
export class NavigationBarPage {
linkListContainer: ElementFinder = element(by.css('.adf-sidenav-linklist'));
linkListContainer: ElementFinder = element(by.css('.app-sidenav-linklist'));
linkMenuChildrenContainer: ElementFinder = element(by.css('.nestedMenu'));
dataTableNestedButton = this.linkMenuChildrenContainer.element(by.css('.adf-sidenav-link[data-automation-id="Datatable"]'));
dataTableCopyContentButton = this.linkMenuChildrenContainer.element(by.css('.adf-sidenav-link[data-automation-id="Copy Content"]'));
dataTableDragAndDropButton = this.linkMenuChildrenContainer.element(by.css('.adf-sidenav-link[data-automation-id="Drag and Drop"]'));
processServicesNestedButton = this.linkMenuChildrenContainer.element(by.css('.adf-sidenav-link[data-automation-id="App"]'));
processServicesCloudHomeButton = this.linkMenuChildrenContainer.element(by.css('.adf-sidenav-link[data-automation-id="Home"]'));
dataTableNestedButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Datatable"]'));
dataTableCopyContentButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Copy Content"]'));
dataTableDragAndDropButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Drag and Drop"]'));
processServicesNestedButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="App"]'));
processServicesCloudHomeButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Home"]'));
themeButton: ElementFinder = element(by.css('button[data-automation-id="theme menu"]'));
themeMenuContent: ElementFinder = element(by.css('div[class*="mat-menu-panel"]'));
languageMenuButton: ElementFinder = element(by.css('button[data-automation-id="language-menu-button"]'));
appTitle: ElementFinder = element(by.css('.adf-app-title'));
menuButton: ElementFinder = element(by.css('button[data-automation-id="adf-menu-icon"]'));
formButton = this.linkMenuChildrenContainer.element(by.css('.adf-sidenav-link[data-automation-id="Form"]'));
peopleGroupCloudButton = this.linkMenuChildrenContainer.element(by.css('.adf-sidenav-link[data-automation-id="People/Group Cloud"]'));
formButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="Form"]'));
peopleGroupCloudButton = this.linkMenuChildrenContainer.element(by.css('.app-sidenav-link[data-automation-id="People/Group Cloud"]'));
async clickNavigationBarItem(title): Promise<void> {
const menu = element(by.css(`.adf-sidenav-link[data-automation-id="${title}"]`));
const menu = element(by.css(`.app-sidenav-link[data-automation-id="${title}"]`));
await BrowserActions.closeMenuAndDialogs();
await BrowserActions.click(menu);
}
@@ -176,7 +176,7 @@ export class NavigationBarPage {
async clickLogoutButton(): Promise<void> {
await BrowserActions.closeMenuAndDialogs();
await BrowserActions.clickExecuteScript('.adf-sidenav-link[adf-logout]');
await BrowserActions.clickExecuteScript('.app-sidenav-link[adf-logout]');
}
async clickThemeButton(): Promise<void> {

View File

@@ -29,7 +29,7 @@ export class NotificationPage {
notificationSnackBar: ElementFinder = element.all(by.css('simple-snack-bar')).first();
actionOutput: ElementFinder = element(by.css('div[data-automation-id="notification-action-output"]'));
selectionDropDown: ElementFinder = element.all(by.css('.mat-select-panel')).first();
notificationsPage: ElementFinder = element(by.css('.adf-sidenav-link[data-automation-id="Notifications"]'));
notificationsPage: ElementFinder = element(by.css('.app-sidenav-link[data-automation-id="Notifications"]'));
notificationConfig: ElementFinder = element(by.css('p[data-automation-id="notification-custom-object"]'));
async checkNotifyContains(message): Promise<void> {

View File

@@ -33,7 +33,7 @@ export class PermissionsPage {
searchUserInput: ElementFinder = element(by.id('searchInput'));
searchResults: ElementFinder = element(by.css('#adf-add-permission-authority-results #adf-search-results-content'));
addButton: ElementFinder = element(by.id('add-permission-dialog-confirm-button'));
permissionInheritedButton: ElementFinder = element.all(by.css("div[class='adf-inherit_permission_button'] button")).first();
permissionInheritedButton: ElementFinder = element.all(by.css("div[class='app-inherit_permission_button'] button")).first();
noPermissions: ElementFinder = element(by.css('div[id="adf-no-permissions-template"]'));
deletePermissionButton: ElementFinder = element(by.css(`button[data-automation-id='adf-delete-permission-button']`));
permissionDisplayContainer: ElementFinder = element(by.css(`div[id='adf-permission-display-container']`));

View File

@@ -26,10 +26,10 @@ export class ProcessFiltersPage {
runningFilter: ElementFinder = element(by.css('span[data-automation-id="Running_filter"]'));
completedFilter: ElementFinder = element(by.css('div[class="mat-list-text"] > span[data-automation-id="Completed_filter"]'));
allFilter: ElementFinder = element(by.css('span[data-automation-id="All_filter"]'));
createProcessButton: ElementFinder = element(by.css('.adf-processes-menu button[data-automation-id="create-button"] > span'));
createProcessButton: ElementFinder = element(by.css('.app-processes-menu button[data-automation-id="create-button"] > span'));
newProcessButton: ElementFinder = element(by.css('div > button[data-automation-id="btn-start-process"]'));
processesPage: ElementFinder = element(by.css('div[class="adf-grid"] > div[class="adf-grid-item adf-processes-menu"]'));
accordionMenu: ElementFinder = element(by.css('.adf-processes-menu mat-accordion'));
processesPage: ElementFinder = element(by.css('div[class="app-grid"] > div[class="app-grid-item app-processes-menu"]'));
accordionMenu: ElementFinder = element(by.css('.app-processes-menu mat-accordion'));
buttonWindow: ElementFinder = element(by.css('div > button[data-automation-id="btn-start-process"] > div'));
noContentMessage: ElementFinder = element.all(by.css('div[class="adf-empty-content__title"]')).first();
rows: Locator = by.css('adf-process-instance-list div[class="adf-datatable-body"] div[class*="adf-datatable-row"]');

View File

@@ -45,7 +45,7 @@ export class TaskDetailsPage {
addInvolvedUserButton: ElementFinder = element(by.css('button[id="add-people"] span'));
emailInvolvedUser = by.xpath('following-sibling::div[@class="adf-people-email"]');
taskDetailsInfoDrawer: ElementFinder = element(by.tagName('adf-info-drawer'));
taskDetailsSection: ElementFinder = element(by.css('div[data-automation-id="adf-tasks-details"]'));
taskDetailsSection: ElementFinder = element(by.css('div[data-automation-id="app-tasks-details"]'));
taskDetailsEmptySection: ElementFinder = element(by.css('div[data-automation-id="adf-tasks-details--empty"]'));
completeTask: ElementFinder = element(by.css('button[id="adf-no-form-complete-button"]'));
completeFormTask: ElementFinder = element(by.css('button[id="adf-form-complete"]'));

View File

@@ -22,7 +22,7 @@ import { BrowserVisibility, SearchSortingPickerPage } from '@alfresco/adf-testin
export class SearchResultsPage {
noResultsMessage: ElementFinder = element(by.css('div[class="adf-no-result-message"]'));
noResultsMessage: ElementFinder = element(by.css('div[class="app-no-result-message"]'));
dataTable: DataTableComponentPage = new DataTableComponentPage();
searchSortingPicker: SearchSortingPickerPage = new SearchSortingPickerPage();
contentServices: ContentServicesPage = new ContentServicesPage();