mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
use new static drop actions
This commit is contained in:
parent
76d391669c
commit
fffa97c7f8
@ -68,8 +68,7 @@ describe('Document List Component - Properties', () => {
|
|||||||
|
|
||||||
const dragAndDropArea = contentServicesPage.getRowByName(subFolder.entry.name);
|
const dragAndDropArea = contentServicesPage.getRowByName(subFolder.entry.name);
|
||||||
|
|
||||||
const dragAndDrop = new DropActions();
|
await DropActions.dropFile(dragAndDropArea, pngFile.location);
|
||||||
await dragAndDrop.dropFile(dragAndDropArea, pngFile.location);
|
|
||||||
await contentServicesPage.checkContentIsDisplayed(pngFile.name);
|
await contentServicesPage.checkContentIsDisplayed(pngFile.name);
|
||||||
await contentServicesPage.doubleClickRow(subFolder.entry.name);
|
await contentServicesPage.doubleClickRow(subFolder.entry.name);
|
||||||
await contentServicesPage.checkEmptyFolderTextToBe('This folder is empty');
|
await contentServicesPage.checkEmptyFolderTextToBe('This folder is empty');
|
||||||
@ -83,8 +82,7 @@ describe('Document List Component - Properties', () => {
|
|||||||
|
|
||||||
const dragAndDropArea = contentServicesPage.getRowByName(subFolder.entry.name);
|
const dragAndDropArea = contentServicesPage.getRowByName(subFolder.entry.name);
|
||||||
|
|
||||||
const dragAndDrop = new DropActions();
|
await DropActions.dropFile(dragAndDropArea, pngFile.location);
|
||||||
await dragAndDrop.dropFile(dragAndDropArea, pngFile.location);
|
|
||||||
|
|
||||||
await contentServicesPage.checkContentIsNotDisplayed(pngFile.name);
|
await contentServicesPage.checkContentIsNotDisplayed(pngFile.name);
|
||||||
await contentServicesPage.doubleClickRow(subFolder.entry.name);
|
await contentServicesPage.doubleClickRow(subFolder.entry.name);
|
||||||
|
@ -92,9 +92,7 @@ describe('Upload component - Excluded Files', () => {
|
|||||||
|
|
||||||
const dragAndDropArea = element.all(by.css('adf-upload-drag-area div')).first();
|
const dragAndDropArea = element.all(by.css('adf-upload-drag-area div')).first();
|
||||||
|
|
||||||
const dragAndDrop = new DropActions();
|
await DropActions.dropFile(dragAndDropArea, iniExcludedFile.location);
|
||||||
|
|
||||||
await dragAndDrop.dropFile(dragAndDropArea, iniExcludedFile.location);
|
|
||||||
|
|
||||||
await browser.sleep(5000);
|
await browser.sleep(5000);
|
||||||
|
|
||||||
|
@ -261,10 +261,9 @@ describe('Upload component', () => {
|
|||||||
await browser.sleep(1000);
|
await browser.sleep(1000);
|
||||||
await uploadToggles.addExtension('.docx');
|
await uploadToggles.addExtension('.docx');
|
||||||
|
|
||||||
const dragAndDrop = new DropActions();
|
|
||||||
const dragAndDropArea = element.all(by.css('adf-upload-drag-area div')).first();
|
const dragAndDropArea = element.all(by.css('adf-upload-drag-area div')).first();
|
||||||
|
|
||||||
await dragAndDrop.dropFile(dragAndDropArea, docxFileModel.location);
|
await DropActions.dropFile(dragAndDropArea, docxFileModel.location);
|
||||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||||
|
|
||||||
await uploadDialog.removeUploadedFile(docxFileModel.name);
|
await uploadDialog.removeUploadedFile(docxFileModel.name);
|
||||||
@ -272,7 +271,7 @@ describe('Upload component', () => {
|
|||||||
await uploadDialog.clickOnCloseButton();
|
await uploadDialog.clickOnCloseButton();
|
||||||
await uploadDialog.dialogIsNotDisplayed();
|
await uploadDialog.dialogIsNotDisplayed();
|
||||||
|
|
||||||
await dragAndDrop.dropFile(dragAndDropArea, pngFileModel.location);
|
await DropActions.dropFile(dragAndDropArea, pngFileModel.location);
|
||||||
await contentServicesPage.checkContentIsNotDisplayed(pngFileModel.name);
|
await contentServicesPage.checkContentIsNotDisplayed(pngFileModel.name);
|
||||||
await uploadDialog.dialogIsNotDisplayed();
|
await uploadDialog.dialogIsNotDisplayed();
|
||||||
await uploadToggles.disableExtensionFilter();
|
await uploadToggles.disableExtensionFilter();
|
||||||
|
@ -38,7 +38,6 @@ describe('Datatable component', () => {
|
|||||||
|
|
||||||
const apiService = new ApiService();
|
const apiService = new ApiService();
|
||||||
const usersActions = new UsersActions(apiService);
|
const usersActions = new UsersActions(apiService);
|
||||||
const dragAndDrop = new DropActions();
|
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
|
||||||
@ -144,11 +143,11 @@ describe('Datatable component', () => {
|
|||||||
|
|
||||||
it('[C307984] Should trigger the event handling header-drop and cell-drop', async () => {
|
it('[C307984] Should trigger the event handling header-drop and cell-drop', async () => {
|
||||||
const dragAndDropHeader = dragAndDropDataTablePage.getDropTargetIdColumnHeader();
|
const dragAndDropHeader = dragAndDropDataTablePage.getDropTargetIdColumnHeader();
|
||||||
await dragAndDrop.dropFile(dragAndDropHeader, pngFile.location);
|
await DropActions.dropFile(dragAndDropHeader, pngFile.location);
|
||||||
await notificationHistoryPage.checkNotifyContains('Dropped data on [ id ] header');
|
await notificationHistoryPage.checkNotifyContains('Dropped data on [ id ] header');
|
||||||
|
|
||||||
const dragAndDropCell = dragAndDropDataTablePage.getDropTargetIdColumnCell(1);
|
const dragAndDropCell = dragAndDropDataTablePage.getDropTargetIdColumnCell(1);
|
||||||
await dragAndDrop.dropFile(dragAndDropCell, pngFile.location);
|
await DropActions.dropFile(dragAndDropCell, pngFile.location);
|
||||||
await notificationHistoryPage.checkNotifyContains('Dropped data on [ id ] cell');
|
await notificationHistoryPage.checkNotifyContains('Dropped data on [ id ] cell');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -37,7 +37,6 @@ export class ContentServicesPage {
|
|||||||
togglePage: TogglePage = new TogglePage();
|
togglePage: TogglePage = new TogglePage();
|
||||||
createFolderDialog: FolderDialogPage = new FolderDialogPage();
|
createFolderDialog: FolderDialogPage = new FolderDialogPage();
|
||||||
createLibraryDialog: CreateLibraryDialogPage = new CreateLibraryDialogPage();
|
createLibraryDialog: CreateLibraryDialogPage = new CreateLibraryDialogPage();
|
||||||
dragAndDropAction: DropActions = new DropActions();
|
|
||||||
|
|
||||||
multipleFileUploadToggle: ElementFinder = element(by.id('adf-document-list-enable-drop-files'));
|
multipleFileUploadToggle: ElementFinder = element(by.id('adf-document-list-enable-drop-files'));
|
||||||
uploadBorder: ElementFinder = element(by.id('document-list-container'));
|
uploadBorder: ElementFinder = element(by.id('document-list-container'));
|
||||||
@ -529,12 +528,12 @@ export class ContentServicesPage {
|
|||||||
|
|
||||||
async dragAndDropFile(file: string): Promise<void> {
|
async dragAndDropFile(file: string): Promise<void> {
|
||||||
await this.checkDragAndDropDIsDisplayed();
|
await this.checkDragAndDropDIsDisplayed();
|
||||||
await this.dragAndDropAction.dropFile(this.dragAndDrop, file);
|
await DropActions.dropFile(this.dragAndDrop, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
async dragAndDropFolder(folderName: string): Promise<void> {
|
async dragAndDropFolder(folderName: string): Promise<void> {
|
||||||
await this.checkDragAndDropDIsDisplayed();
|
await this.checkDragAndDropDIsDisplayed();
|
||||||
await this.dragAndDropAction.dropFolder(this.dragAndDrop, folderName);
|
await DropActions.dropFolder(this.dragAndDrop, folderName);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkLockIsDisplayedForElement(name): Promise<void> {
|
async checkLockIsDisplayedForElement(name): Promise<void> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user