mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-1846] [AAE-1857] automated e2e tests uploading folders (#5483)
* [AAE-1846] automated e2e tests - uploading a folder * [AAE-1857] added automated e2e test upload folder with excluded file * changed the script for cancel an uploading folder, added -b condition for the running tests for the uploadFolder method
This commit is contained in:
committed by
GitHub
parent
8fcdc55595
commit
c91458df79
@@ -25,6 +25,7 @@ import { FileModel } from '../../models/ACS/file.model';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { DropActions } from '../../actions/drop.actions';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||
import { FolderModel } from '../../models/ACS/folder.model';
|
||||
|
||||
describe('Upload component - Excluded Files', () => {
|
||||
|
||||
@@ -50,6 +51,21 @@ describe('Upload component - Excluded Files', () => {
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
const folderUpload = new FolderModel({
|
||||
'name': browser.params.resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_name,
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_location
|
||||
});
|
||||
|
||||
const acceptedFileInsideFolder = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.FILE_ACCEPTED_INSIDE_TEXT_FOLDER.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.FILE_ACCEPTED_INSIDE_TEXT_FOLDER.file_location
|
||||
});
|
||||
|
||||
const excludedFileInsideFolder = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.FILE_EXCLUDED_INSIDE_TEXT_FOLDER.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.FILE_EXCLUDED_INSIDE_TEXT_FOLDER.file_location
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
@@ -110,6 +126,22 @@ describe('Upload component - Excluded Files', () => {
|
||||
await contentServicesPage.checkContentIsNotDisplayed(txtFileModel.name);
|
||||
});
|
||||
|
||||
it('[C260125] Should not upload excluded file when they are in a Folder', async () => {
|
||||
await LocalStorageUtil.setConfigField('files', JSON.stringify({
|
||||
excluded: ['*.cpio'],
|
||||
'match-options': { 'nocase': true }
|
||||
}));
|
||||
|
||||
await uploadToggles.enableFolderUpload();
|
||||
await contentServicesPage.uploadFolder(folderUpload.location);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
|
||||
await contentServicesPage.openFolder(folderUpload.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(acceptedFileInsideFolder.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(excludedFileInsideFolder.name);
|
||||
});
|
||||
|
||||
it('[C274688] Should extension type added as excluded and accepted not be uploaded', async () => {
|
||||
await LocalStorageUtil.setConfigField('files', JSON.stringify({
|
||||
excluded: ['.DS_Store', 'desktop.ini', '*.png'],
|
||||
|
Reference in New Issue
Block a user