mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4442] Show whole app config in config editor (#4700)
This commit is contained in:
committed by
Eugenio Romano
parent
5bb8912651
commit
7bc99d492a
@@ -17,11 +17,10 @@
|
||||
|
||||
import { element, by, browser } from 'protractor';
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, LocalStorageUtil } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { UploadDialog } from '../../pages/adf/dialog/uploadDialog';
|
||||
import { UploadToggles } from '../../pages/adf/dialog/uploadToggles';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
@@ -32,7 +31,6 @@ import resources = require('../../util/resources');
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { DropActions } from '../../actions/drop.actions';
|
||||
import { ConfigEditorPage } from '../../pages/adf/configEditorPage';
|
||||
|
||||
describe('Upload component - Excluded Files', () => {
|
||||
|
||||
@@ -41,8 +39,6 @@ describe('Upload component - Excluded Files', () => {
|
||||
const uploadToggles = new UploadToggles();
|
||||
const loginPage = new LoginPage();
|
||||
const acsUser = new AcsUserModel();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const configEditorPage = new ConfigEditorPage();
|
||||
|
||||
const iniExcludedFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.INI.file_name,
|
||||
@@ -122,24 +118,20 @@ describe('Upload component - Excluded Files', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C212862] Should not allow upload file excluded in the files extension of app.config.json', () => {
|
||||
it('[C212862] Should not allow upload file excluded in the files extension of app.config.json', async () => {
|
||||
|
||||
navigationBarPage.clickConfigEditorButton();
|
||||
configEditorPage.clickFileConfiguration();
|
||||
const filesConfig = {
|
||||
'excluded': [
|
||||
'.DS_Store',
|
||||
'desktop.ini',
|
||||
'*.txt'
|
||||
],
|
||||
'match-options': {
|
||||
'nocase': true
|
||||
}
|
||||
};
|
||||
|
||||
configEditorPage.clickClearButton();
|
||||
|
||||
configEditorPage.enterConfiguration('{' +
|
||||
'"excluded": [' +
|
||||
'".DS_Store",' +
|
||||
'"desktop.ini",' +
|
||||
'"*.txt"' +
|
||||
'],' +
|
||||
'"match-options": {' +
|
||||
'"nocase": true' +
|
||||
'}}');
|
||||
|
||||
configEditorPage.clickSaveButton();
|
||||
await LocalStorageUtil.setConfigField('files', JSON.stringify(filesConfig));
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
@@ -148,27 +140,22 @@ describe('Upload component - Excluded Files', () => {
|
||||
.checkContentIsNotDisplayed(txtFileModel.name);
|
||||
});
|
||||
|
||||
it('[C274688] Should extension type added as excluded and accepted not be uploaded', () => {
|
||||
it('[C274688] Should extension type added as excluded and accepted not be uploaded', async () => {
|
||||
|
||||
browser.refresh();
|
||||
|
||||
navigationBarPage.clickConfigEditorButton();
|
||||
const filesConfig = {
|
||||
'excluded': [
|
||||
'.DS_Store',
|
||||
'desktop.ini',
|
||||
'*.png'
|
||||
],
|
||||
'match-options': {
|
||||
'nocase': true
|
||||
}
|
||||
};
|
||||
|
||||
configEditorPage.clickFileConfiguration();
|
||||
|
||||
configEditorPage.clickClearButton();
|
||||
|
||||
configEditorPage.enterConfiguration('{' +
|
||||
'"excluded": [' +
|
||||
'".DS_Store",' +
|
||||
'"desktop.ini",' +
|
||||
'"*.png"' +
|
||||
'],' +
|
||||
'"match-options": {' +
|
||||
'"nocase": true' +
|
||||
'}}');
|
||||
|
||||
configEditorPage.clickSaveButton();
|
||||
await LocalStorageUtil.setConfigField('files', JSON.stringify(filesConfig));
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
|
Reference in New Issue
Block a user