mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Add e2e test in ADF main repo (#3534)
* move e2e to ADF main repo * lint e2e test * enable first set of tests * enable test * firs test js-api integrated * try change name protractor demo shell file * remove fdescribe * Update .travis.yml * exclude failing test and rewrite analytics component with JS-API * remove fdescribe * move first part of tests to js-api * refactor test alfresco-js-api * replace js-api step 3 * remove adf prefix * remove unused code * remove unused part 2 * add option in e2e test for single test and browser * exclude temp failing test * refactoring test step 1 * refactoring test step 2 * refactoring test step 3 * refactoring test step 4 * refactoring test step 5 * run against localhost and proxy options * fix command * improve configuration * improve configuration * use dev configuratio * fix defering * comment out not working remotely test * fix promise login page e2e * remove console log * change test * revert * improve utils * improve task list test util add also numbers in generation of the email * remove part of the multi selector * reinsert trashcan test * uncomment document list test * try increase delay in search sorting * improve document list selector * execute different util methods * Upload error screenshot * make oncomplete async * add z-finish screenshot workaround * option save * remove fit
This commit is contained in:
committed by
Eugenio Romano
parent
4ecea64e19
commit
3d86044594
56
e2e/models/ACS/acsUserModel.js
Normal file
56
e2e/models/ACS/acsUserModel.js
Normal file
@@ -0,0 +1,56 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var Util = require('../../util/util');
|
||||
|
||||
var AcsUserModel = function (details) {
|
||||
|
||||
this.firstName = Util.generateRandomString();
|
||||
this.lastName = Util.generateRandomString();
|
||||
this.password = Util.generateRandomString();
|
||||
this.email = Util.generateRandomString();
|
||||
this.id = Util.generateRandomString();
|
||||
this.jobTitle = "N/A";
|
||||
|
||||
this.getFirstName = function () {
|
||||
return this.firstName;
|
||||
};
|
||||
|
||||
this.getLastName = function () {
|
||||
return this.lastName;
|
||||
};
|
||||
|
||||
this.getPassword = function () {
|
||||
return this.password;
|
||||
};
|
||||
|
||||
this.getEmail = function () {
|
||||
return this.email;
|
||||
};
|
||||
|
||||
this.getId = function () {
|
||||
return this.id;
|
||||
};
|
||||
|
||||
this.getJobTitle = function () {
|
||||
return this.jobTitle;
|
||||
};
|
||||
|
||||
Object.assign(this, details);
|
||||
|
||||
};
|
||||
module.exports = AcsUserModel;
|
51
e2e/models/ACS/contentModel.js
Normal file
51
e2e/models/ACS/contentModel.js
Normal file
@@ -0,0 +1,51 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var ContentModel = function (details) {
|
||||
|
||||
this.mimeType = '';
|
||||
this.mimeTypeName = '';
|
||||
this.sizeInBytes = '';
|
||||
this.encoding = '';
|
||||
|
||||
this.getMimeType = function () {
|
||||
return this.mimeType;
|
||||
};
|
||||
|
||||
this.getMimeTypeName = function () {
|
||||
return this.mimeTypeName;
|
||||
};
|
||||
|
||||
this.getSizeInBytes = function () {
|
||||
if (this.sizeInBytes>=1024)
|
||||
{
|
||||
var bytes=(this.sizeInBytes/1024).toFixed(2)+' KB';
|
||||
return bytes;
|
||||
}
|
||||
else {
|
||||
return this.sizeInBytes;
|
||||
}
|
||||
};
|
||||
|
||||
this.getEncoding = function () {
|
||||
return this.encoding;
|
||||
};
|
||||
|
||||
Object.assign(this, details);
|
||||
|
||||
};
|
||||
module.exports = ContentModel;
|
38
e2e/models/ACS/contentProperties.js
Normal file
38
e2e/models/ACS/contentProperties.js
Normal file
@@ -0,0 +1,38 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var ContentPropertiesModel = function (details) {
|
||||
this['cm:author'] = '';
|
||||
this['cm:description'] = '';
|
||||
this['cm:title'] = '';
|
||||
|
||||
this.getAuthor = function () {
|
||||
return this['cm:author'];
|
||||
};
|
||||
|
||||
this.getDescription = function () {
|
||||
return this['cm:description'];
|
||||
};
|
||||
|
||||
this.getTitle = function () {
|
||||
return this['cm:title'];
|
||||
};
|
||||
|
||||
Object.assign(this, details);
|
||||
|
||||
};
|
||||
module.exports = ContentPropertiesModel;
|
36
e2e/models/ACS/createdByModel.js
Normal file
36
e2e/models/ACS/createdByModel.js
Normal file
@@ -0,0 +1,36 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var Util = require('../../util/util');
|
||||
|
||||
var AcsUserModel = function (details) {
|
||||
|
||||
this.displayName = Util.generateRandomString();
|
||||
this.id = Util.generateRandomString();
|
||||
|
||||
this.getId = function () {
|
||||
return this.id;
|
||||
};
|
||||
|
||||
this.getDisplayName = function () {
|
||||
return this.displayName;
|
||||
};
|
||||
|
||||
Object.assign(this, details);
|
||||
|
||||
};
|
||||
module.exports = AcsUserModel;
|
116
e2e/models/ACS/fileModel.js
Normal file
116
e2e/models/ACS/fileModel.js
Normal file
@@ -0,0 +1,116 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var Util = require('../../util/util');
|
||||
var resources = require('../../util/resources');
|
||||
var CreatedByModel = require('./createdByModel');
|
||||
var ContentModel = require('./contentModel');
|
||||
var ContentPropertiesModel = require('./contentProperties');
|
||||
|
||||
var FileModel = function (details) {
|
||||
|
||||
this.id = Util.generateRandomString();
|
||||
this.name = Util.generateRandomString();
|
||||
this.shortName = this.name;
|
||||
this.location = resources.Files.ADF_DOCUMENTS.PDF.file_location;
|
||||
this.tooltip = this.name;
|
||||
this.version = "";
|
||||
this.firstPageText = resources.Files.ADF_DOCUMENTS.PDF.first_page_text;
|
||||
this.lastPageText = resources.Files.ADF_DOCUMENTS.PDF.last_page_text;
|
||||
this.secondPageText = resources.Files.ADF_DOCUMENTS.PDF.second_page_text;
|
||||
this.lastPageNumber = resources.Files.ADF_DOCUMENTS.PDF.last_page_number;
|
||||
this.createdAt = "";
|
||||
this.createdByUser = {};
|
||||
this.modifiedByUser = {};
|
||||
this.content = {};
|
||||
this.properties = {};
|
||||
|
||||
this.getName = function () {
|
||||
return this.name;
|
||||
};
|
||||
|
||||
this.setVersion = function (ver) {
|
||||
this.version = "-" + ver;
|
||||
};
|
||||
|
||||
this.getVersionName = function () {
|
||||
var extension = this.name.split(".")[1];
|
||||
var name = this.name.split(".")[0];
|
||||
return name + this.version + "." + extension;
|
||||
};
|
||||
|
||||
this.getShortName = function () {
|
||||
return this.shortName;
|
||||
};
|
||||
|
||||
this.getLocation = function () {
|
||||
return this.location;
|
||||
};
|
||||
|
||||
this.getTooltip = function () {
|
||||
return this.tooltip;
|
||||
};
|
||||
|
||||
this.getId = function () {
|
||||
return this.id;
|
||||
};
|
||||
|
||||
this.getFirstPageText = function () {
|
||||
return this.firstPageText;
|
||||
};
|
||||
|
||||
this.getLastPageText = function () {
|
||||
return this.lastPageText;
|
||||
};
|
||||
|
||||
this.getSecondPageText = function () {
|
||||
return this.secondPageText;
|
||||
};
|
||||
|
||||
this.getLastPageNumber = function () {
|
||||
return this.lastPageNumber;
|
||||
};
|
||||
|
||||
this.getCreatedByUser = function () {
|
||||
return this.createdByUser;
|
||||
};
|
||||
|
||||
this.getModifiedByUser = function () {
|
||||
return this.modifiedByUser;
|
||||
};
|
||||
|
||||
this.getContent = function () {
|
||||
return this.content;
|
||||
};
|
||||
|
||||
this.getProperties = function () {
|
||||
return this.properties;
|
||||
};
|
||||
|
||||
this.update = function(details) {
|
||||
Object.assign(this, {
|
||||
createdByUser: new CreatedByModel(details.createdByUser),
|
||||
modifiedByUser: new CreatedByModel(details.modifiedByUser),
|
||||
content: new ContentModel(details.content),
|
||||
properties: new ContentPropertiesModel(details.properties)
|
||||
})
|
||||
}
|
||||
|
||||
Object.assign(this, details);
|
||||
|
||||
};
|
||||
module.exports = FileModel;
|
34
e2e/models/ACS/filesModel.js
Normal file
34
e2e/models/ACS/filesModel.js
Normal file
@@ -0,0 +1,34 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var FileModel = require('./fileModel');
|
||||
|
||||
var FilesModel = function () {
|
||||
|
||||
var files = null;
|
||||
|
||||
this.setFiles = function (arr) {
|
||||
files = arr.map(function(item) {
|
||||
return new FileModel(item.entry);
|
||||
});
|
||||
};
|
||||
|
||||
this.getFiles = function () {
|
||||
return files;
|
||||
};
|
||||
};
|
||||
module.exports = FilesModel;
|
52
e2e/models/ACS/folderModel.js
Normal file
52
e2e/models/ACS/folderModel.js
Normal file
@@ -0,0 +1,52 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var Util = require('../../util/util');
|
||||
|
||||
var FolderModel = function (details) {
|
||||
|
||||
this.id = Util.generateRandomString();
|
||||
this.name = Util.generateRandomString();
|
||||
this.shortName = this.name;
|
||||
this.tooltip = this.name;
|
||||
this.location = "";
|
||||
|
||||
this.getName = function () {
|
||||
return this.name;
|
||||
};
|
||||
|
||||
this.getShortName = function () {
|
||||
return this.shortName;
|
||||
};
|
||||
|
||||
this.getTooltip = function () {
|
||||
return this.tooltip;
|
||||
};
|
||||
|
||||
this.getId = function () {
|
||||
return this.id;
|
||||
};
|
||||
|
||||
this.getLocation = function () {
|
||||
return this.location;
|
||||
};
|
||||
|
||||
Object.assign(this, details);
|
||||
|
||||
};
|
||||
module.exports = FolderModel;
|
||||
|
39
e2e/models/APS/AppDefinition.js
Normal file
39
e2e/models/APS/AppDefinition.js
Normal file
@@ -0,0 +1,39 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* App definition representation JSON Object
|
||||
*
|
||||
* @param details - JSON object used to overwrite the default values
|
||||
* @constructor
|
||||
*/
|
||||
|
||||
var AppDefinition = function (details) {
|
||||
this.defaultAppId = "1";
|
||||
this.deploymentId = "1";
|
||||
this.description = "App deployment";
|
||||
this.icon = "default icon";
|
||||
this.id = 0;
|
||||
this.modelId = 0;
|
||||
this.name = "App name";
|
||||
this.tenantId = 0;
|
||||
this.theme = "default theme";
|
||||
|
||||
Object.assign(this, details);
|
||||
};
|
||||
|
||||
module.exports = AppDefinition;
|
31
e2e/models/APS/AppPublish.js
Normal file
31
e2e/models/APS/AppPublish.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* App definition publish representation JSON Object
|
||||
*
|
||||
* @param details - JSON object used to overwrite the default values
|
||||
* @constructor
|
||||
*/
|
||||
var AppPublish = function (details) {
|
||||
this.comment = '';
|
||||
this.force = true;
|
||||
|
||||
Object.assign(this, details);
|
||||
};
|
||||
|
||||
module.exports = AppPublish;
|
58
e2e/models/APS/FormDefinitionFieldModel.js
Normal file
58
e2e/models/APS/FormDefinitionFieldModel.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var FormDefinitionFieldModel = function (details) {
|
||||
|
||||
this.fieldType;
|
||||
this.id;
|
||||
this.name;
|
||||
this.value;
|
||||
this.type;
|
||||
this.required;
|
||||
this.readOnly;
|
||||
this.overrideId;
|
||||
this.colspan;
|
||||
this.placeholder;
|
||||
this.minLength;
|
||||
this.maxLength;
|
||||
this.minValue;
|
||||
this.maxValue;
|
||||
this.regexPattern;
|
||||
this.optionType;
|
||||
this.hasEmptyValue;
|
||||
this.options;
|
||||
this.restUrl;
|
||||
this.restResponsePath;
|
||||
this.restIdProperty;
|
||||
this.setRestLabelProperty;
|
||||
this.tab;
|
||||
this.className;
|
||||
this.dateDisplayFormat;
|
||||
this.layout = {};
|
||||
this.sizeX;
|
||||
this.sizeY;
|
||||
this.row;
|
||||
this.col;
|
||||
this.columnDefinitions;
|
||||
this.visibilityCondition;
|
||||
this.numberOfColumns;
|
||||
this.fields = {};
|
||||
|
||||
Object.assign(this, details);
|
||||
};
|
||||
module.exports = FormDefinitionFieldModel;
|
||||
|
61
e2e/models/APS/FormDefinitionModel.js
Normal file
61
e2e/models/APS/FormDefinitionModel.js
Normal file
@@ -0,0 +1,61 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var FormDefinitionFieldModel = require('./FormDefinitionFieldModel');
|
||||
|
||||
var FormDefinitionModel = function (fields) {
|
||||
|
||||
var fields = null;
|
||||
var widgets = null;
|
||||
|
||||
this.setFields = function (arr) {
|
||||
fields = arr.map(function(item) {
|
||||
return new FormDefinitionFieldModel(item);
|
||||
})
|
||||
};
|
||||
|
||||
this.setAllWidgets = function (arr) {
|
||||
widgets = arr.reduce(function(acc, item) {
|
||||
if(item.type === 'container') {
|
||||
var children = Object.keys(item.fields).map(function(key) {
|
||||
return item.fields[key][0];
|
||||
});
|
||||
|
||||
return acc.concat(children);
|
||||
}
|
||||
return acc.concat(item);
|
||||
}, []);
|
||||
};
|
||||
|
||||
this.getWidgets = function () {
|
||||
return widgets;
|
||||
};
|
||||
|
||||
this.getWidgetBy = function (key, value) {
|
||||
return widgets.find(function(widget) {
|
||||
return widget[key]===value;
|
||||
})
|
||||
};
|
||||
|
||||
this.findFieldBy = function(key, value) {
|
||||
return fields.find(function(field) {
|
||||
return field[key]===value;
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = FormDefinitionModel;
|
58
e2e/models/APS/FormModel.js
Normal file
58
e2e/models/APS/FormModel.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var FormModel = function (details) {
|
||||
|
||||
this.id;
|
||||
this.name;
|
||||
this.description;
|
||||
this.modelId;
|
||||
this.appDefinitionId;
|
||||
this.appDeploymentId;
|
||||
this.tenantId;
|
||||
|
||||
this.getName = function () {
|
||||
return this.name;
|
||||
};
|
||||
|
||||
this.getId = function () {
|
||||
return this.id;
|
||||
};
|
||||
|
||||
this.getDescription = function () {
|
||||
return this.description;
|
||||
};
|
||||
|
||||
this.getModelId = function () {
|
||||
return this.modelId;
|
||||
};
|
||||
|
||||
this.getAppDefinitionId = function () {
|
||||
return this.appDefinitionId;
|
||||
};
|
||||
|
||||
this.getAppDeploymentId = function () {
|
||||
return this.appDeploymentId;
|
||||
};
|
||||
|
||||
this.getTenantId = function () {
|
||||
return this.tenantId;
|
||||
};
|
||||
|
||||
Object.assign(this, details);
|
||||
};
|
||||
module.exports = FormModel;
|
37
e2e/models/APS/Group.js
Normal file
37
e2e/models/APS/Group.js
Normal file
@@ -0,0 +1,37 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var Util = require('../../util/util');
|
||||
|
||||
/**
|
||||
* Create Group Object
|
||||
*
|
||||
* @param details - Group object used to overwrite the default values
|
||||
* @constructor
|
||||
*/
|
||||
|
||||
var Group = function (details) {
|
||||
|
||||
this.name = Util.generateRandomString();
|
||||
this.type = "1";
|
||||
this.parentGroupId = null;
|
||||
this.tenantId = "1";
|
||||
|
||||
Object.assign(this, details);
|
||||
};
|
||||
|
||||
module.exports = Group;
|
49
e2e/models/APS/ProcessCreatedByModel.js
Normal file
49
e2e/models/APS/ProcessCreatedByModel.js
Normal file
@@ -0,0 +1,49 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var ProcessCreatedByModel = function (details) {
|
||||
|
||||
this.id;
|
||||
this.firstName;
|
||||
this.lastName;
|
||||
this.email;
|
||||
|
||||
this.getFirstName = function () {
|
||||
return this.firstName;
|
||||
};
|
||||
|
||||
this.getId = function () {
|
||||
return this.id;
|
||||
};
|
||||
|
||||
this.getLastName = function () {
|
||||
return this.lastName;
|
||||
};
|
||||
|
||||
this.getEmail = function () {
|
||||
return this.email;
|
||||
};
|
||||
|
||||
this.getEntireName = function() {
|
||||
return this.firstName + " " + this.getLastName();
|
||||
};
|
||||
|
||||
Object.assign(this, details);
|
||||
|
||||
};
|
||||
|
||||
module.exports = ProcessCreatedByModel;
|
32
e2e/models/APS/ProcessInstance.js
Normal file
32
e2e/models/APS/ProcessInstance.js
Normal file
@@ -0,0 +1,32 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Process Instance representation JSON Object
|
||||
*
|
||||
* @param details - JSON object used to overwrite the default values
|
||||
* @constructor
|
||||
*/
|
||||
|
||||
var ProcessInstance = function (details) {
|
||||
this.processDefinitionId = 1234;
|
||||
this.name = "Process started from REST API";
|
||||
|
||||
Object.assign(this, details);
|
||||
};
|
||||
|
||||
module.exports = ProcessInstance;
|
83
e2e/models/APS/ProcessModel.js
Normal file
83
e2e/models/APS/ProcessModel.js
Normal file
@@ -0,0 +1,83 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var ProcessCreatedByModel = require('./ProcessCreatedByModel');
|
||||
|
||||
var ProcessModel = function (details) {
|
||||
|
||||
this.id;
|
||||
this.name;
|
||||
this.version;
|
||||
this.modelType;
|
||||
this.description;
|
||||
this.createdByFullName;
|
||||
this.createdBy;
|
||||
this.lastUpdatedByFullName;
|
||||
this.lastUpdatedBy;
|
||||
this.lastUpdated;
|
||||
this.startedBy = {};
|
||||
|
||||
this.getName = function () {
|
||||
return this.name;
|
||||
};
|
||||
|
||||
this.getId = function () {
|
||||
return this.id;
|
||||
};
|
||||
|
||||
this.getVersion = function () {
|
||||
return this.version;
|
||||
};
|
||||
|
||||
this.getModelType = function () {
|
||||
return this.modelType;
|
||||
};
|
||||
|
||||
this.getDescription = function () {
|
||||
return this.description;
|
||||
};
|
||||
|
||||
this.getCreatedByFullName = function () {
|
||||
return this.createdByFullName;
|
||||
};
|
||||
|
||||
this.getCreatedBy = function () {
|
||||
return this.createdBy;
|
||||
};
|
||||
|
||||
this.getLastUpdatedByFullName = function () {
|
||||
return this.lastUpdatedByFullName;
|
||||
};
|
||||
|
||||
this.getLastUpdatedBy = function () {
|
||||
return this.lastUpdatedBy;
|
||||
};
|
||||
|
||||
this.getLastUpdated = function () {
|
||||
return this.lastUpdated;
|
||||
};
|
||||
|
||||
this.getStartedBy = function () {
|
||||
return this.startedBy;
|
||||
};
|
||||
|
||||
Object.assign(this, details);
|
||||
Object.assign(this.startedBy, new ProcessCreatedByModel(details.startedBy));
|
||||
|
||||
|
||||
};
|
||||
module.exports = ProcessModel;
|
33
e2e/models/APS/StandaloneTask.js
Normal file
33
e2e/models/APS/StandaloneTask.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var Util = require('../../util/util');
|
||||
|
||||
/**
|
||||
* Create Json Object for standalone task
|
||||
*
|
||||
* @param details - JSON object used to overwrite the default values
|
||||
* @constructor
|
||||
*/
|
||||
|
||||
var StandaloneTask = function (details) {
|
||||
|
||||
this.name = Util.generateRandomString();
|
||||
|
||||
Object.assign(this, details);
|
||||
};
|
||||
module.exports = StandaloneTask;
|
32
e2e/models/APS/Task.js
Normal file
32
e2e/models/APS/Task.js
Normal file
@@ -0,0 +1,32 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create and manage task JSON Object
|
||||
*
|
||||
* @param details - JSON object used to overwrite the default values
|
||||
* @constructor
|
||||
*/
|
||||
|
||||
var Task = function (details) {
|
||||
|
||||
this.processInstanceId;
|
||||
this.sort;
|
||||
|
||||
Object.assign(this, details);
|
||||
};
|
||||
module.exports = Task;
|
49
e2e/models/APS/TaskAssigneeModel.js
Normal file
49
e2e/models/APS/TaskAssigneeModel.js
Normal file
@@ -0,0 +1,49 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var TaskAssigneeModel = function (details) {
|
||||
|
||||
this.id;
|
||||
this.firstName;
|
||||
this.lastName;
|
||||
this.email;
|
||||
|
||||
this.getFirstName = function () {
|
||||
return this.firstName;
|
||||
};
|
||||
|
||||
this.getId = function () {
|
||||
return this.id;
|
||||
};
|
||||
|
||||
this.getLastName = function () {
|
||||
return this.lastName;
|
||||
};
|
||||
|
||||
this.getEmail = function () {
|
||||
return this.email;
|
||||
};
|
||||
|
||||
this.getEntireName = function() {
|
||||
return this.firstName + " " + this.getLastName();
|
||||
};
|
||||
|
||||
Object.assign(this, details);
|
||||
|
||||
};
|
||||
|
||||
module.exports = TaskAssigneeModel;
|
76
e2e/models/APS/TaskModel.js
Normal file
76
e2e/models/APS/TaskModel.js
Normal file
@@ -0,0 +1,76 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var TaskAssigneeModel = require('./TaskAssigneeModel');
|
||||
|
||||
var TaskModel = function (details) {
|
||||
|
||||
this.id;
|
||||
this.name;
|
||||
this.description;
|
||||
this.category;
|
||||
this.created;
|
||||
this.dueDate;
|
||||
this.priority;
|
||||
this.parentTaskName;
|
||||
this.formKey;
|
||||
this.assignee = {};
|
||||
|
||||
this.getName = function () {
|
||||
return this.name;
|
||||
};
|
||||
|
||||
this.getId = function () {
|
||||
return this.id;
|
||||
};
|
||||
|
||||
this.getDescription = function () {
|
||||
return this.description;
|
||||
};
|
||||
|
||||
this.getCategory = function () {
|
||||
return this.category;
|
||||
};
|
||||
|
||||
this.getCreated = function () {
|
||||
return this.created;
|
||||
};
|
||||
|
||||
this.getDueDate = function () {
|
||||
return this.dueDate;
|
||||
};
|
||||
|
||||
this.getPriority = function () {
|
||||
return this.priority;
|
||||
};
|
||||
|
||||
this.getParentTaskName = function () {
|
||||
return this.parentTaskName;
|
||||
};
|
||||
|
||||
this.getFormKey = function () {
|
||||
return this.formKey;
|
||||
};
|
||||
|
||||
this.getAssignee = function () {
|
||||
return this.assignee;
|
||||
};
|
||||
|
||||
Object.assign(this, details);
|
||||
Object.assign(this.assignee, new TaskAssigneeModel(details.assignee));
|
||||
};
|
||||
module.exports = TaskModel;
|
36
e2e/models/APS/Tenant.js
Normal file
36
e2e/models/APS/Tenant.js
Normal file
@@ -0,0 +1,36 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var Util = require('../../util/util');
|
||||
|
||||
/**
|
||||
* Create tenant JSON Object
|
||||
*
|
||||
* @param details - JSON object used to overwrite the default values
|
||||
* @constructor
|
||||
*/
|
||||
var Tenant = function (details) {
|
||||
this.active = true;
|
||||
this.configuration = "DefaultConfig";
|
||||
this.domain = "DefaultDomain";
|
||||
this.maxUsers = 10;
|
||||
this.name = Util.generateRandomString();
|
||||
|
||||
Object.assign(this, details);
|
||||
};
|
||||
|
||||
module.exports = Tenant;
|
39
e2e/models/APS/User.js
Normal file
39
e2e/models/APS/User.js
Normal file
@@ -0,0 +1,39 @@
|
||||
/*!
|
||||
* @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.
|
||||
*/
|
||||
|
||||
var Util = require('../../util/util');
|
||||
|
||||
/**
|
||||
* Create User JSON Object
|
||||
*
|
||||
* @param details - JSON object used to overwrite the default values
|
||||
* @constructor
|
||||
*/
|
||||
|
||||
var User = function (details) {
|
||||
|
||||
this.email = Util.generateRandomEmail();
|
||||
this.firstName = Util.generateRandomString();
|
||||
this.lastName = Util.generateRandomString();
|
||||
this.password = Util.generatePasswordString();
|
||||
this.type = 'enterprise';
|
||||
this.tenantId = "1";
|
||||
this.company = null;
|
||||
|
||||
Object.assign(this, details);
|
||||
};
|
||||
module.exports = User;
|
Reference in New Issue
Block a user