mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-08-07 17:48:27 +00:00
[ACS-4010] Rule sets listing regrouping (#2803)
* [ACS-4010] Rule sets listing regrouping * Linting * Unit tests * Remove TODOs
This commit is contained in:
@@ -66,6 +66,15 @@ export const getRuleSetsResponseMock = {
|
||||
}
|
||||
};
|
||||
|
||||
export const getDefaultRuleSetResponseMock = {
|
||||
entry: {
|
||||
linkedToBy: [],
|
||||
owningFolder: owningFolderIdMock,
|
||||
isLinkedTo: false,
|
||||
id: 'rule-set-no-links'
|
||||
}
|
||||
};
|
||||
|
||||
export const ruleSetMock = (rules: Rule[] = []): RuleSet => ({
|
||||
id: 'rule-set-id',
|
||||
isLinkedTo: false,
|
||||
@@ -76,7 +85,7 @@ export const ruleSetMock = (rules: Rule[] = []): RuleSet => ({
|
||||
loadingRules: false
|
||||
});
|
||||
|
||||
const ruleSetWithNoLinksMock: RuleSet = {
|
||||
export const ownedRuleSetMock: RuleSet = {
|
||||
id: 'rule-set-no-links',
|
||||
isLinkedTo: false,
|
||||
owningFolder: owningFolderMock,
|
||||
@@ -86,7 +95,7 @@ const ruleSetWithNoLinksMock: RuleSet = {
|
||||
loadingRules: false
|
||||
};
|
||||
|
||||
const ruleSetWithLinkMock: RuleSet = {
|
||||
export const ruleSetWithLinkMock: RuleSet = {
|
||||
id: 'rule-set-with-link',
|
||||
isLinkedTo: true,
|
||||
owningFolder: otherFolderMock,
|
||||
@@ -96,7 +105,7 @@ const ruleSetWithLinkMock: RuleSet = {
|
||||
loadingRules: false
|
||||
};
|
||||
|
||||
const inheritedRuleSetMock: RuleSet = {
|
||||
export const inheritedRuleSetMock: RuleSet = {
|
||||
id: 'inherited-rule-set',
|
||||
isLinkedTo: false,
|
||||
owningFolder: otherFolderMock,
|
||||
@@ -106,4 +115,4 @@ const inheritedRuleSetMock: RuleSet = {
|
||||
loadingRules: false
|
||||
};
|
||||
|
||||
export const ruleSetsMock: RuleSet[] = [inheritedRuleSetMock, ruleSetWithNoLinksMock, ruleSetWithLinkMock];
|
||||
export const ruleSetsMock: RuleSet[] = [inheritedRuleSetMock, ownedRuleSetMock, ruleSetWithLinkMock];
|
||||
|
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
import { Rule } from '../model/rule.model';
|
||||
import { RuleGroupingItem } from '../model/rule-grouping-item.model';
|
||||
|
||||
export const getRulesResponseMock = {
|
||||
list: {
|
||||
@@ -158,3 +159,14 @@ export const manyRulesMock: Rule[] = [ruleMock('rule1'), ruleMock('rule2'), rule
|
||||
export const ownedRulesMock: Rule[] = [ruleMock('owned-rule-1'), ruleMock('owned-rule-2')];
|
||||
export const linkedRulesMock: Rule[] = [ruleMock('linked-rule-1'), ruleMock('linked-rule-2')];
|
||||
export const inheritedRulesMock: Rule[] = [ruleMock('inherited-rule-1'), ruleMock('inherited-rule-2')];
|
||||
|
||||
export const ruleListGroupingItemsMock: RuleGroupingItem[] = [
|
||||
{
|
||||
type: 'rule',
|
||||
rule: ruleMock('rule1')
|
||||
},
|
||||
{
|
||||
type: 'rule',
|
||||
rule: ruleMock('rule2')
|
||||
}
|
||||
];
|
||||
|
Reference in New Issue
Block a user