mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-3028]Move breacrumb page to adf testing package (#5705)
* Move breacrumb page to adf testing package * no message
This commit is contained in:
@@ -23,8 +23,7 @@ import { browser } from 'protractor';
|
|||||||
import { FileModel } from '../../models/ACS/file.model';
|
import { FileModel } from '../../models/ACS/file.model';
|
||||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||||
import { TrashcanPage } from '../../pages/adf/trashcan.page';
|
import { TrashcanPage } from '../../pages/adf/trashcan.page';
|
||||||
import { LoginPage, NotificationHistoryPage, StringUtil, UploadActions, BrowserActions } from '@alfresco/adf-testing';
|
import { LoginPage, NotificationHistoryPage, StringUtil, UploadActions, BrowserActions, BreadcrumbPage } from '@alfresco/adf-testing';
|
||||||
import { BreadCrumbPage } from '../../pages/adf/content-services/breadcrumb/bread-crumb.page';
|
|
||||||
|
|
||||||
describe('Restore content directive', () => {
|
describe('Restore content directive', () => {
|
||||||
|
|
||||||
@@ -34,7 +33,7 @@ describe('Restore content directive', () => {
|
|||||||
const acsUser = new AcsUserModel();
|
const acsUser = new AcsUserModel();
|
||||||
const anotherAcsUser = new AcsUserModel();
|
const anotherAcsUser = new AcsUserModel();
|
||||||
const trashcanPage = new TrashcanPage();
|
const trashcanPage = new TrashcanPage();
|
||||||
const breadCrumbPage = new BreadCrumbPage();
|
const breadCrumbPage = new BreadcrumbPage();
|
||||||
const notificationHistoryPage = new NotificationHistoryPage();
|
const notificationHistoryPage = new NotificationHistoryPage();
|
||||||
|
|
||||||
this.alfrescoJsApi = new AlfrescoApi({
|
this.alfrescoJsApi = new AlfrescoApi({
|
||||||
|
@@ -17,11 +17,13 @@
|
|||||||
|
|
||||||
import { browser, by, element } from 'protractor';
|
import { browser, by, element } from 'protractor';
|
||||||
import {
|
import {
|
||||||
|
BreadcrumbPage,
|
||||||
LoginPage,
|
LoginPage,
|
||||||
PaginationPage,
|
PaginationPage,
|
||||||
UploadActions,
|
UploadActions,
|
||||||
StringUtil,
|
StringUtil,
|
||||||
ContentNodeSelectorDialogPage, ViewerPage
|
ContentNodeSelectorDialogPage,
|
||||||
|
ViewerPage
|
||||||
} from '@alfresco/adf-testing';
|
} from '@alfresco/adf-testing';
|
||||||
import { ContentServicesPage } from '../../pages/adf/content-services.page';
|
import { ContentServicesPage } from '../../pages/adf/content-services.page';
|
||||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||||
@@ -30,7 +32,6 @@ import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
|||||||
import { FileModel } from '../../models/ACS/file.model';
|
import { FileModel } from '../../models/ACS/file.model';
|
||||||
import { Util } from '../../util/util';
|
import { Util } from '../../util/util';
|
||||||
import { BreadCrumbDropdownPage } from '../../pages/adf/content-services/breadcrumb/bread-crumb-dropdown.page';
|
import { BreadCrumbDropdownPage } from '../../pages/adf/content-services/breadcrumb/bread-crumb-dropdown.page';
|
||||||
import { BreadCrumbPage } from '../../pages/adf/content-services/breadcrumb/bread-crumb.page';
|
|
||||||
import { InfinitePaginationPage } from '../../pages/adf/core/infinite-pagination.page';
|
import { InfinitePaginationPage } from '../../pages/adf/core/infinite-pagination.page';
|
||||||
import { FolderModel } from '../../models/ACS/folder.model';
|
import { FolderModel } from '../../models/ACS/folder.model';
|
||||||
|
|
||||||
@@ -43,7 +44,7 @@ describe('Document List Component - Actions', () => {
|
|||||||
const contentNodeSelector = new ContentNodeSelectorDialogPage();
|
const contentNodeSelector = new ContentNodeSelectorDialogPage();
|
||||||
const paginationPage = new PaginationPage();
|
const paginationPage = new PaginationPage();
|
||||||
const breadCrumbDropdownPage = new BreadCrumbDropdownPage();
|
const breadCrumbDropdownPage = new BreadCrumbDropdownPage();
|
||||||
const breadCrumbPage = new BreadCrumbPage();
|
const breadCrumbPage = new BreadcrumbPage();
|
||||||
const viewerPage = new ViewerPage();
|
const viewerPage = new ViewerPage();
|
||||||
this.alfrescoJsApi = new AlfrescoApi({
|
this.alfrescoJsApi = new AlfrescoApi({
|
||||||
provider: 'ECM',
|
provider: 'ECM',
|
||||||
|
@@ -16,15 +16,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { element, by, ElementFinder } from 'protractor';
|
import { element, by, ElementFinder } from 'protractor';
|
||||||
import { BrowserActions } from '@alfresco/adf-testing';
|
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: ElementFinder = element(by.css(`adf-breadcrumb nav[data-automation-id='breadcrumb']`));
|
||||||
|
currentItem: ElementFinder = element(by.css('.adf-breadcrumb-item-current'));
|
||||||
|
|
||||||
async chooseBreadCrumb(breadCrumbItem): Promise<void> {
|
async chooseBreadCrumb(breadCrumbItem): 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async getActiveBreadCrumbItemName(): Promise<string> {
|
||||||
|
return this.currentItem.getText();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
export * from './bread-crumb.page';
|
||||||
export * from './header.page';
|
export * from './header.page';
|
||||||
export * from './user-info.page';
|
export * from './user-info.page';
|
||||||
export * from './login.page';
|
export * from './login.page';
|
||||||
|
Reference in New Issue
Block a user