aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/test-utils/factories/softwareProduct
diff options
context:
space:
mode:
authortalig <talig@amdocs.com>2017-12-20 14:30:43 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-12-21 11:12:33 +0000
commit8e9c0653dd6c6862123c9609ae34e1206d86456e (patch)
tree5eeef00ec0677133baa439ca8d7ffd7aca4804b6 /openecomp-ui/test-utils/factories/softwareProduct
parent785ebcc95de3e064e843bec04ba7a209d854fc7c (diff)
Add collaboration feature
Issue-ID: SDC-767 Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795 Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'openecomp-ui/test-utils/factories/softwareProduct')
-rw-r--r--openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductComponentsMonitoringFactories.js9
-rw-r--r--openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductDependenciesFactories.js4
-rw-r--r--openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductEditorFactories.js5
-rw-r--r--openecomp-ui/test-utils/factories/softwareProduct/VersionControllerUtilsFactory.js10
4 files changed, 7 insertions, 21 deletions
diff --git a/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductComponentsMonitoringFactories.js b/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductComponentsMonitoringFactories.js
index 550e1a6d6c..8cb2221bea 100644
--- a/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductComponentsMonitoringFactories.js
+++ b/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductComponentsMonitoringFactories.js
@@ -26,13 +26,10 @@ export const VSPComponentsMonitoringRestFactory = new Factory()
.option('createPoll', false)
.option('createVes', false)
- .attr(trap, ['createTrap'], (createTrap) => {return (createTrap) ? randomstring.generate() : undefined})
- .attr(poll, ['createPoll'], (createPoll) => {return (createPoll) ? randomstring.generate() : undefined})
- .attr(ves, ['createVes'], (createVes) => {return (createVes) ? randomstring.generate() : undefined});
+ .attr(trap, ['createTrap'], (createTrap) => createTrap ? randomstring.generate() : undefined)
+ .attr(poll, ['createPoll'], (createPoll) => createPoll ? randomstring.generate() : undefined)
+ .attr(ves, ['createVes'], (createVes) => createVes ? randomstring.generate() : undefined);
export const VSPComponentsMonitoringViewFactory = new Factory()
.extend(VSPComponentsMonitoringRestFactory);
-// .after(monitoring => {
-
-// });
diff --git a/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductDependenciesFactories.js b/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductDependenciesFactories.js
index 6521c58a35..fab3f5f79e 100644
--- a/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductDependenciesFactories.js
+++ b/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductDependenciesFactories.js
@@ -23,10 +23,10 @@ const SoftwareProductDependenciesBaseFactory = new Factory()
.attrs({ sourceId: () => randomstring.generate(),
targetId: () => randomstring.generate(),
relationType: relationTypes.DEPENDS_ON
- });
+ }).extend(IdMixin);
export const SoftwareProductDependenciesResponseFactory = new Factory()
- .extend(SoftwareProductDependenciesBaseFactory);
+ .extend(SoftwareProductDependenciesBaseFactory).extend(IdMixin);
export const SoftwareProductDependenciesStoreFactory = new Factory()
.extend(SoftwareProductDependenciesBaseFactory)
diff --git a/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductEditorFactories.js b/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductEditorFactories.js
index 5c5936155e..a820b70600 100644
--- a/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductEditorFactories.js
+++ b/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductEditorFactories.js
@@ -16,7 +16,6 @@
import {Factory} from 'rosie';
import IdMixin from 'test-utils/factories/mixins/IdMixin.js';
import randomstring from 'randomstring';
-import VersionControllerUtilsFactory from 'test-utils/factories/softwareProduct/VersionControllerUtilsFactory.js';
Factory.define('VSPBaseFactory')
.attrs(
@@ -30,7 +29,7 @@ Factory.define('VSPBaseFactory')
licensingVersion: {id: '1', label: '1'},
licensingData: {},
icon: 'icon',
- version: {id: '1', label: '1'}
+ version: {id: '123'}
}
);
@@ -46,7 +45,6 @@ Factory.define('LicensingDataMixin')
export const VSPEditorFactory = new Factory()
.extend('VSPBaseFactory')
- .extend(VersionControllerUtilsFactory)
.extend(IdMixin);
export const VSPEditorPostFactory = new Factory()
@@ -54,7 +52,6 @@ export const VSPEditorPostFactory = new Factory()
export const VSPEditorFactoryWithLicensingData = new Factory()
.extend('VSPBaseFactory')
- .extend(VersionControllerUtilsFactory)
.extend('LicensingDataMixin')
.extend(IdMixin);
diff --git a/openecomp-ui/test-utils/factories/softwareProduct/VersionControllerUtilsFactory.js b/openecomp-ui/test-utils/factories/softwareProduct/VersionControllerUtilsFactory.js
index 8c9640714d..ba3946be48 100644
--- a/openecomp-ui/test-utils/factories/softwareProduct/VersionControllerUtilsFactory.js
+++ b/openecomp-ui/test-utils/factories/softwareProduct/VersionControllerUtilsFactory.js
@@ -14,17 +14,9 @@
* permissions and limitations under the License.
*/
import {Factory} from 'rosie';
-import {statusEnum} from 'nfvo-components/panel/versionController/VersionControllerConstants.js';
export default new Factory()
.attrs({
version: { id: '1.2', label: '1.2'},
- viewableVersions: [{id: '1.0', label: '1.0'}, {id: '1.1', label: '1.1'}, {id: '1.2', label: '1.2'}],
- status: statusEnum.CHECK_OUT_STATUS,
- lockingUser: 'current'
- }).after(function(inst) {
- if (inst.status !== statusEnum.CHECK_OUT_STATUS) {
- delete inst.lockingUser;
- }
+ viewableVersions: [{id: '1.0', label: '1.0'}, {id: '1.1', label: '1.1'}, {id: '1.2', label: '1.2'}]
});
-