mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +00:00
[ADF-3823] Add tests for create site dialog (#4090)
* [ADF-3823] Create Library component tests * [ADF-3823] Create Library component tests * [ADF-3823] Fixing lint errors. * [ADF-3823] Added automation id for Create Library btn * [ADF-3823] Updated tests and added check for white spaces only. * [ADF-3823] Updated tests & rebased
This commit is contained in:
committed by
Eugenio Romano
parent
c7c4dcb659
commit
5b2887fea1
79
e2e/pages/adf/demo-shell/customSourcesPage.ts
Normal file
79
e2e/pages/adf/demo-shell/customSourcesPage.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Util } from '../../../util/util';
|
||||
import { element, by } from 'protractor';
|
||||
import { ContentListPage } from '../dialog/contentListPage';
|
||||
import { NavigationBarPage } from '../navigationBarPage';
|
||||
|
||||
let source = {
|
||||
favorites: 'Favorites',
|
||||
recent: 'Recent',
|
||||
sharedLinks: 'Shared Links',
|
||||
sites: 'Sites',
|
||||
mySites: 'My Sites',
|
||||
trashcan: 'Trashcan',
|
||||
root: 'Root',
|
||||
my: 'My',
|
||||
shared: 'Shared'
|
||||
};
|
||||
|
||||
let column = {
|
||||
status: 'Status'
|
||||
};
|
||||
|
||||
export class CustomSources {
|
||||
|
||||
contentList = new ContentListPage();
|
||||
navigationBarPage = new NavigationBarPage();
|
||||
|
||||
toolbar = element(by.css('app-custom-sources .adf-toolbar-title'));
|
||||
sourceTypeDropdown = element(by.css('div[class*="select-arrow"]>div'));
|
||||
|
||||
getSourceType(option) {
|
||||
return element(by.cssContainingText('.cdk-overlay-pane span', `${option}`));
|
||||
}
|
||||
|
||||
waitForToolbarToBeVisible() {
|
||||
Util.waitUntilElementIsVisible(this.toolbar);
|
||||
return this;
|
||||
}
|
||||
|
||||
navigateToCustomSources() {
|
||||
this.navigationBarPage.navigateToCustomSources();
|
||||
this.waitForToolbarToBeVisible();
|
||||
}
|
||||
clickOnSourceType() {
|
||||
return this.sourceTypeDropdown.click();
|
||||
}
|
||||
|
||||
selectMySitesSourceType() {
|
||||
this.clickOnSourceType();
|
||||
this.getSourceType(source.mySites).click();
|
||||
}
|
||||
|
||||
checkRowIsDisplayed(rowName) {
|
||||
let row = this.contentList.getRowsName(rowName);
|
||||
Util.waitUntilElementIsVisible(row);
|
||||
}
|
||||
|
||||
getStatusCell(rowName) {
|
||||
Util.waitUntilElementIsVisible(this.contentList.getCellByNameAndColumn(rowName, column.status));
|
||||
return this.contentList.getCellByNameAndColumn(rowName, column.status).getText();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user