@sankhyalabs/core 5.20.0-dev.27 → 5.20.0-dev.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -76,6 +76,54 @@ src/utils/ObjectUtils.ts:84
|
|
|
76
76
|
|
|
77
77
|
***
|
|
78
78
|
|
|
79
|
+
### isEmpty()
|
|
80
|
+
|
|
81
|
+
> `static` **isEmpty**(`obj`): `boolean`
|
|
82
|
+
|
|
83
|
+
Verifica se o objeto está vazio (sem atributos).
|
|
84
|
+
|
|
85
|
+
#### Parameters
|
|
86
|
+
|
|
87
|
+
• **obj**: `object`
|
|
88
|
+
|
|
89
|
+
Objeto a ser verificado.
|
|
90
|
+
|
|
91
|
+
#### Returns
|
|
92
|
+
|
|
93
|
+
`boolean`
|
|
94
|
+
|
|
95
|
+
- True caso o objeto esteja vazio.
|
|
96
|
+
|
|
97
|
+
#### Source
|
|
98
|
+
|
|
99
|
+
src/utils/ObjectUtils.ts:94
|
|
100
|
+
|
|
101
|
+
***
|
|
102
|
+
|
|
103
|
+
### isNotEmpty()
|
|
104
|
+
|
|
105
|
+
> `static` **isNotEmpty**(`obj`): `boolean`
|
|
106
|
+
|
|
107
|
+
Verifica se o objeto NÃO está vazio (sem atributos).
|
|
108
|
+
|
|
109
|
+
#### Parameters
|
|
110
|
+
|
|
111
|
+
• **obj**: `object`
|
|
112
|
+
|
|
113
|
+
Objeto a ser verificado.
|
|
114
|
+
|
|
115
|
+
#### Returns
|
|
116
|
+
|
|
117
|
+
`boolean`
|
|
118
|
+
|
|
119
|
+
- True caso o objeto NÃO esteja vazio
|
|
120
|
+
|
|
121
|
+
#### Source
|
|
122
|
+
|
|
123
|
+
src/utils/ObjectUtils.ts:104
|
|
124
|
+
|
|
125
|
+
***
|
|
126
|
+
|
|
79
127
|
### objectToString()
|
|
80
128
|
|
|
81
129
|
> `static` **objectToString**(`data`): `string`
|
|
@@ -52,4 +52,18 @@ export default class ObjectUtils {
|
|
|
52
52
|
* @returns - Se o objeto 1 é igual ao objeto 2.
|
|
53
53
|
*/
|
|
54
54
|
static equals(obj1: any, obj2: any): any;
|
|
55
|
+
/**
|
|
56
|
+
* Verifica se o objeto está vazio (sem atributos).
|
|
57
|
+
*
|
|
58
|
+
* @param obj - Objeto a ser verificado.
|
|
59
|
+
* @returns - True caso o objeto esteja vazio.
|
|
60
|
+
*/
|
|
61
|
+
static isEmpty(obj: object): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Verifica se o objeto NÃO está vazio (sem atributos).
|
|
64
|
+
*
|
|
65
|
+
* @param obj - Objeto a ser verificado.
|
|
66
|
+
* @returns - True caso o objeto NÃO esteja vazio
|
|
67
|
+
*/
|
|
68
|
+
static isNotEmpty(obj: object): boolean;
|
|
55
69
|
}
|
|
@@ -74,5 +74,23 @@ export default class ObjectUtils {
|
|
|
74
74
|
static equals(obj1, obj2) {
|
|
75
75
|
return ObjectUtils.objectToString(obj1) === ObjectUtils.objectToString(obj2);
|
|
76
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Verifica se o objeto está vazio (sem atributos).
|
|
79
|
+
*
|
|
80
|
+
* @param obj - Objeto a ser verificado.
|
|
81
|
+
* @returns - True caso o objeto esteja vazio.
|
|
82
|
+
*/
|
|
83
|
+
static isEmpty(obj) {
|
|
84
|
+
return Object.keys(obj).length === 0 && obj.constructor === Object;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Verifica se o objeto NÃO está vazio (sem atributos).
|
|
88
|
+
*
|
|
89
|
+
* @param obj - Objeto a ser verificado.
|
|
90
|
+
* @returns - True caso o objeto NÃO esteja vazio
|
|
91
|
+
*/
|
|
92
|
+
static isNotEmpty(obj) {
|
|
93
|
+
return !this.isEmpty(obj);
|
|
94
|
+
}
|
|
77
95
|
}
|
|
78
96
|
//# sourceMappingURL=ObjectUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectUtils.js","sourceRoot":"","sources":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AI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,GAAG,CAAC,WAAW,KAAK,MAAM,CAAC;IACrE,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,UAAU,CAAC,GAAW;QAClC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;CACJ"}
|
package/package.json
CHANGED
package/reports/test-report.xml
CHANGED
|
@@ -1,151 +1,151 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<unitTest version="1">
|
|
3
3
|
<file path="/builds/dti/design-system/sankhyacore/test/http/HttpProvider.spec.ts">
|
|
4
|
-
<testCase name="HttpProvider Metodo GET" duration="
|
|
4
|
+
<testCase name="HttpProvider Metodo GET" duration="5"/>
|
|
5
5
|
</file>
|
|
6
6
|
<file path="/builds/dti/design-system/sankhyacore/test/http/SkwHttpProvider.ts.spec.ts">
|
|
7
|
-
<testCase name="HttpProvider Metodo POST" duration="
|
|
7
|
+
<testCase name="HttpProvider Metodo POST" duration="5"/>
|
|
8
|
+
</file>
|
|
9
|
+
<file path="/builds/dti/design-system/sankhyacore/test/util/CriteriaParameter.spec.ts">
|
|
10
|
+
<testCase name="StringUtils it should return the correct values of "value" and "type" through the getters methods initial setted by the constructor" duration="92"/>
|
|
11
|
+
<testCase name="StringUtils it should return the correct values of "value" and "type" through the getters methods initial setted by the setters methods" duration="1"/>
|
|
12
|
+
<testCase name="StringUtils it should return the correct JSON/Object value through the buildParam method" duration="93"/>
|
|
8
13
|
</file>
|
|
9
14
|
<file path="/builds/dti/design-system/sankhyacore/test/util/CriteriaModel.spec.ts">
|
|
10
|
-
<testCase name="StringUtils it should return the undefined and [] to Criteria Props through new class with empty constructor" duration="
|
|
15
|
+
<testCase name="StringUtils it should return the undefined and [] to Criteria Props through new class with empty constructor" duration="7"/>
|
|
11
16
|
<testCase name="StringUtils it should modify "expressions" and "parameters" properties through Setters methods" duration="1"/>
|
|
12
17
|
<testCase name="StringUtils it should return "expression" and "parameters" setted through constructor method" duration="0"/>
|
|
13
|
-
<testCase name="StringUtils it should return a Criteria class with "expression" and "parameters" as needed setted through "append" method" duration="
|
|
14
|
-
<testCase name="StringUtils it should return a Criteria class with "Criteria class" and "parameters" concatenaded as needed setted through "append" method" duration="
|
|
18
|
+
<testCase name="StringUtils it should return a Criteria class with "expression" and "parameters" as needed setted through "append" method" duration="2"/>
|
|
19
|
+
<testCase name="StringUtils it should return a Criteria class with "Criteria class" and "parameters" concatenaded as needed setted through "append" method" duration="1"/>
|
|
15
20
|
<testCase name="StringUtils it should return undefined as "expression" and "[]" as parameters as we use an empty criteria as first entry in the constructor" duration="1"/>
|
|
16
21
|
<testCase name="StringUtils it should return a Criteria class with "Expression" and "parameters" concatenaded as needed setted through "OR" method" duration="1"/>
|
|
22
|
+
<testCase name="StringUtils it should return a Criteria class with "Criteria class" and "parameters" concatenaded as needed setted through "OR" method" duration="0"/>
|
|
17
23
|
<testCase name="StringUtils it should return a Criteria class with "Criteria class" and "parameters" concatenaded as needed setted through "OR" method" duration="1"/>
|
|
18
|
-
<testCase name="StringUtils it should return a Criteria class with "
|
|
19
|
-
<testCase name="StringUtils it should return a Criteria class with "Expression" and "parameters" concatenaded as needed setted through "AND" method" duration="94"/>
|
|
20
|
-
<testCase name="StringUtils it should return a Criteria class with "Criteria class" and "parameters" concatenaded as needed setted through "AND" method" duration="1"/>
|
|
24
|
+
<testCase name="StringUtils it should return a Criteria class with "Expression" and "parameters" concatenaded as needed setted through "AND" method" duration="86"/>
|
|
21
25
|
<testCase name="StringUtils it should return a Criteria class with "Criteria class" and "parameters" concatenaded as needed setted through "AND" method" duration="0"/>
|
|
22
|
-
<testCase name="StringUtils it should return a
|
|
23
|
-
<testCase name="StringUtils it should return a toJSON object with through
|
|
26
|
+
<testCase name="StringUtils it should return a Criteria class with "Criteria class" and "parameters" concatenaded as needed setted through "AND" method" duration="0"/>
|
|
27
|
+
<testCase name="StringUtils it should return a toJSON object with "Criteria class" and "parameters" concatenaded as needed setted through "AND" method" duration="1"/>
|
|
28
|
+
<testCase name="StringUtils it should return a toJSON object with through empty constructor" duration="9"/>
|
|
24
29
|
</file>
|
|
25
|
-
<file path="/builds/dti/design-system/sankhyacore/test/util/
|
|
26
|
-
<testCase name="
|
|
27
|
-
<testCase name="
|
|
28
|
-
<testCase name="
|
|
30
|
+
<file path="/builds/dti/design-system/sankhyacore/test/util/TimeFormatter.spec.ts">
|
|
31
|
+
<testCase name="TimeFormatter Case: input string unformated with showSeconds" duration="3"/>
|
|
32
|
+
<testCase name="TimeFormatter Case: input string unformated without showSeconds" duration="1"/>
|
|
33
|
+
<testCase name="TimeFormatter Case: validateTime" duration="94"/>
|
|
29
34
|
</file>
|
|
30
35
|
<file path="/builds/dti/design-system/sankhyacore/test/util/MaskFormatter.spec.ts">
|
|
31
|
-
<testCase name="Mask Formatter mask:CPF complete valid" duration="
|
|
32
|
-
<testCase name="Mask Formatter mask:CPF complete valid literals" duration="
|
|
33
|
-
<testCase name="Mask Formatter mask:CPF incomplete valid" duration="
|
|
34
|
-
<testCase name="Mask Formatter mask:CPF incomplete valid placeholder" duration="
|
|
36
|
+
<testCase name="Mask Formatter mask:CPF complete valid" duration="83"/>
|
|
37
|
+
<testCase name="Mask Formatter mask:CPF complete valid literals" duration="1"/>
|
|
38
|
+
<testCase name="Mask Formatter mask:CPF incomplete valid" duration="0"/>
|
|
39
|
+
<testCase name="Mask Formatter mask:CPF incomplete valid placeholder" duration="1"/>
|
|
35
40
|
<testCase name="Mask Formatter mask:CPF too long valid" duration="0"/>
|
|
36
|
-
<testCase name="Mask Formatter mask:CPF invalid for string" duration="
|
|
37
|
-
<testCase name="Mask Formatter mask:CPF invalid for being too long" duration="
|
|
41
|
+
<testCase name="Mask Formatter mask:CPF invalid for string" duration="199"/>
|
|
42
|
+
<testCase name="Mask Formatter mask:CPF invalid for being too long" duration="1"/>
|
|
38
43
|
<testCase name="Mask Formatter mask:Licence plate valid uppercase" duration="1"/>
|
|
39
44
|
<testCase name="Mask Formatter mask:Licence plate valid lowercase" duration="1"/>
|
|
40
45
|
<testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
|
|
41
46
|
<testCase name="Mask Formatter mask:Licence plate invalid for being too short" duration="0"/>
|
|
42
|
-
<testCase name="Mask Formatter mask:Licence plate invalid for being too short with placeholder" duration="
|
|
43
|
-
<testCase name="Mask Formatter mask:Licence plate invalid" duration="
|
|
47
|
+
<testCase name="Mask Formatter mask:Licence plate invalid for being too short with placeholder" duration="0"/>
|
|
48
|
+
<testCase name="Mask Formatter mask:Licence plate invalid" duration="10"/>
|
|
44
49
|
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
|
|
45
50
|
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="1"/>
|
|
46
|
-
<testCase name="Mask Formatter mask:Licence plate invalid" duration="3"/>
|
|
47
|
-
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
|
|
48
|
-
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="0"/>
|
|
49
51
|
<testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
|
|
50
52
|
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="0"/>
|
|
53
|
+
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="81"/>
|
|
54
|
+
<testCase name="Mask Formatter mask:Licence plate invalid" duration="3"/>
|
|
55
|
+
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="0"/>
|
|
51
56
|
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="1"/>
|
|
52
57
|
<testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
|
|
53
58
|
</file>
|
|
54
|
-
<file path="/builds/dti/design-system/sankhyacore/test/util/TimeFormatter.spec.ts">
|
|
55
|
-
<testCase name="TimeFormatter Case: input string unformated with showSeconds" duration="88"/>
|
|
56
|
-
<testCase name="TimeFormatter Case: input string unformated without showSeconds" duration="1"/>
|
|
57
|
-
<testCase name="TimeFormatter Case: validateTime" duration="1"/>
|
|
58
|
-
</file>
|
|
59
59
|
<file path="/builds/dti/design-system/sankhyacore/test/util/OverflowWatcher.spec.ts">
|
|
60
|
-
<testCase name="OverflowWatcher should initialize with provided parameters" duration="
|
|
61
|
-
<testCase name="OverflowWatcher should disconect ResizeObserver when destroy is called" duration="
|
|
62
|
-
<testCase name="OverflowWatcher Should call callback on forceUpdate" duration="
|
|
63
|
-
<testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan" duration="
|
|
64
|
-
<testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan when notOverFlow is empty" duration="
|
|
65
|
-
<testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan considering overflowed elements" duration="
|
|
66
|
-
<testCase name="OverflowWatcher Should call callback on forceUpdate with empty list" duration="
|
|
67
|
-
<testCase name="OverflowWatcher should ignore elements that can not overflow" duration="
|
|
68
|
-
<testCase name="OverflowWatcher Should not call callback on forceUpdate" duration="
|
|
69
|
-
</file>
|
|
70
|
-
<file path="/builds/dti/design-system/sankhyacore/test/util/NumberUtils.spec.ts">
|
|
71
|
-
<testCase name="StringUtils stringToNumber" duration="192"/>
|
|
72
|
-
<testCase name="StringUtils format" duration="182"/>
|
|
73
|
-
<testCase name="StringUtils format without formatnumber parameter" duration="5"/>
|
|
74
|
-
<testCase name="StringUtils format without formatnumber parameter" duration="2"/>
|
|
75
|
-
<testCase name="StringUtils format round number" duration="6"/>
|
|
60
|
+
<testCase name="OverflowWatcher should initialize with provided parameters" duration="8"/>
|
|
61
|
+
<testCase name="OverflowWatcher should disconect ResizeObserver when destroy is called" duration="3"/>
|
|
62
|
+
<testCase name="OverflowWatcher Should call callback on forceUpdate" duration="202"/>
|
|
63
|
+
<testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan" duration="10"/>
|
|
64
|
+
<testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan when notOverFlow is empty" duration="189"/>
|
|
65
|
+
<testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan considering overflowed elements" duration="9"/>
|
|
66
|
+
<testCase name="OverflowWatcher Should call callback on forceUpdate with empty list" duration="4"/>
|
|
67
|
+
<testCase name="OverflowWatcher should ignore elements that can not overflow" duration="93"/>
|
|
68
|
+
<testCase name="OverflowWatcher Should not call callback on forceUpdate" duration="0"/>
|
|
76
69
|
</file>
|
|
77
70
|
<file path="/builds/dti/design-system/sankhyacore/test/util/StringUtils.spec.ts">
|
|
78
|
-
<testCase name="StringUtils valor vazio" duration="
|
|
79
|
-
<testCase name="StringUtils valor em branco" duration="
|
|
80
|
-
<testCase name="StringUtils valor null" duration="
|
|
71
|
+
<testCase name="StringUtils valor vazio" duration="83"/>
|
|
72
|
+
<testCase name="StringUtils valor em branco" duration="84"/>
|
|
73
|
+
<testCase name="StringUtils valor null" duration="1"/>
|
|
81
74
|
<testCase name="StringUtils valor undefined" duration="1"/>
|
|
82
|
-
<testCase name="StringUtils valor 0" duration="
|
|
75
|
+
<testCase name="StringUtils valor 0" duration="1"/>
|
|
83
76
|
<testCase name="StringUtils com valor" duration="0"/>
|
|
84
|
-
<testCase name="StringUtils substitui vogais com acento por vogais sem acento" duration="
|
|
85
|
-
<testCase name="StringUtils should return the original value when called with an object without a toString method" duration="
|
|
77
|
+
<testCase name="StringUtils substitui vogais com acento por vogais sem acento" duration="3"/>
|
|
78
|
+
<testCase name="StringUtils should return the original value when called with an object without a toString method" duration="2"/>
|
|
86
79
|
<testCase name="StringUtils should return the original value when called with undefined" duration="0"/>
|
|
87
80
|
</file>
|
|
81
|
+
<file path="/builds/dti/design-system/sankhyacore/test/util/NumberUtils.spec.ts">
|
|
82
|
+
<testCase name="StringUtils stringToNumber" duration="103"/>
|
|
83
|
+
<testCase name="StringUtils format" duration="201"/>
|
|
84
|
+
<testCase name="StringUtils format without formatnumber parameter" duration="1"/>
|
|
85
|
+
<testCase name="StringUtils format without formatnumber parameter" duration="1"/>
|
|
86
|
+
<testCase name="StringUtils format round number" duration="3"/>
|
|
87
|
+
</file>
|
|
88
88
|
<file path="/builds/dti/design-system/sankhyacore/test/util/DataUnitStorage.spec.ts">
|
|
89
89
|
<testCase name="DataUnitStorage put should store a DataUnit instance in the DataUnitStorage" duration="6"/>
|
|
90
90
|
<testCase name="DataUnitStorage get should return the stored DataUnit instance from the DataUnitStorage" duration="1"/>
|
|
91
91
|
<testCase name="DataUnitStorage get should return undefined if the DataUnit instance is not found in the DataUnitStorage" duration="1"/>
|
|
92
92
|
<testCase name="DataUnitStorage remove should remove the specified DataUnit instance from the DataUnitStorage" duration="0"/>
|
|
93
93
|
<testCase name="DataUnitStorage remove should remove the DataUnit instance with the specified name from the DataUnitStorage" duration="0"/>
|
|
94
|
-
<testCase name="DataUnitStorage remove should not remove any DataUnit instance if the specified DataUnit instance or name is not found in the DataUnitStorage" duration="
|
|
94
|
+
<testCase name="DataUnitStorage remove should not remove any DataUnit instance if the specified DataUnit instance or name is not found in the DataUnitStorage" duration="0"/>
|
|
95
95
|
</file>
|
|
96
96
|
<file path="/builds/dti/design-system/sankhyacore/test/util/ElementIDUtils.spec.ts">
|
|
97
|
-
<testCase name="addIDInfo 1 - should add data-element-id with valid id "movFinanceira_snkApplication"" duration="
|
|
98
|
-
<testCase name="addIDInfo 2 - should add data-element-id with valid id "brComSankhyaFinCadMovimentacaofinanceira_snkApplication"" duration="
|
|
97
|
+
<testCase name="addIDInfo 1 - should add data-element-id with valid id "movFinanceira_snkApplication"" duration="9"/>
|
|
98
|
+
<testCase name="addIDInfo 2 - should add data-element-id with valid id "brComSankhyaFinCadMovimentacaofinanceira_snkApplication"" duration="65"/>
|
|
99
99
|
<testCase name="addIDInfo 3 - should add data-element-id with valid id "movFinanceira_br.com.sankhya.fin.cad.movimentacaoFinanceira"" duration="2"/>
|
|
100
100
|
<testCase name="addIDInfo 4 - should add data-element-id with valid id "meuID2_snkApplication"" duration="1"/>
|
|
101
101
|
<testCase name="addIDInfo 5 - should add data-element-id with valid id "movFinanceira_snkApplication"" duration="1"/>
|
|
102
|
-
<testCase name="addIDInfo 6 - should add data-element-id with valid id "movFinanceira_snkApplication"" duration="
|
|
103
|
-
<testCase name="addIDInfo 7 - should add data-element-id with valid id "componenteNameTest_snkApplication"" duration="
|
|
102
|
+
<testCase name="addIDInfo 6 - should add data-element-id with valid id "movFinanceira_snkApplication"" duration="2"/>
|
|
103
|
+
<testCase name="addIDInfo 7 - should add data-element-id with valid id "componenteNameTest_snkApplication"" duration="6"/>
|
|
104
104
|
<testCase name="addIDInfo 8 - should add data-element-id with valid id "componentLabel_snkApplication"" duration="1"/>
|
|
105
105
|
<testCase name="addIDInfo 9 - should add data-element-id with valid id "dataunitFinanceiro_br.com.sankhya.fin.cad.movimentacaoFinanceira"" duration="2"/>
|
|
106
|
-
<testCase name="addIDInfo 10 - should add data-element-id with valid id "dataunitFinanceiro_meuIDTeste_br.com.sankhya.fin.cad.movimentacaoFinanceira"" duration="
|
|
107
|
-
<testCase name="addIDInfo 11 - should add data-element-id with valid id "dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira"" duration="
|
|
108
|
-
<testCase name="addIDInfo 12 - should add data-element-id with valid id "dataunitFinanceiro_movFinanceira_movimentacaoFinanceira"" duration="
|
|
109
|
-
<testCase name="addIDInfo 13 - should add data-element-id with valid id "dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira"" duration="
|
|
110
|
-
<testCase name="addIDInfo 14 - should add data-element-id with valid id "dataunitFinanceiro_meuIdTeste_movimentacaoFinanceira"" duration="
|
|
111
|
-
<testCase name="addIDInfo 15 - should add data-element-id with valid id "dataunitFinanceiro_meuIdTeste_snkApplication"" duration="
|
|
112
|
-
<testCase name="addIDInfo 16 - should add data-element-id with valid id "dataunitFinanceiro_meuIdTeste_snkApplication"" duration="
|
|
113
|
-
<testCase name="addIDInfo 17 - should add data-element-id with valid id "movFinanceira_movimentacaoFinanceira"" duration="
|
|
106
|
+
<testCase name="addIDInfo 10 - should add data-element-id with valid id "dataunitFinanceiro_meuIDTeste_br.com.sankhya.fin.cad.movimentacaoFinanceira"" duration="2"/>
|
|
107
|
+
<testCase name="addIDInfo 11 - should add data-element-id with valid id "dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira"" duration="1"/>
|
|
108
|
+
<testCase name="addIDInfo 12 - should add data-element-id with valid id "dataunitFinanceiro_movFinanceira_movimentacaoFinanceira"" duration="2"/>
|
|
109
|
+
<testCase name="addIDInfo 13 - should add data-element-id with valid id "dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira"" duration="1"/>
|
|
110
|
+
<testCase name="addIDInfo 14 - should add data-element-id with valid id "dataunitFinanceiro_meuIdTeste_movimentacaoFinanceira"" duration="1"/>
|
|
111
|
+
<testCase name="addIDInfo 15 - should add data-element-id with valid id "dataunitFinanceiro_meuIdTeste_snkApplication"" duration="1"/>
|
|
112
|
+
<testCase name="addIDInfo 16 - should add data-element-id with valid id "dataunitFinanceiro_meuIdTeste_snkApplication"" duration="1"/>
|
|
113
|
+
<testCase name="addIDInfo 17 - should add data-element-id with valid id "movFinanceira_movimentacaoFinanceira"" duration="0"/>
|
|
114
114
|
<testCase name="addIDInfo 18 - should add data-element-id with valid id "movFinanceira_movimentacaoFinanceira"" duration="1"/>
|
|
115
115
|
<testCase name="addIDInfo 19 - should add data-element-id with valid id "movFinanceira_movimentacaoFinanceira"" duration="1"/>
|
|
116
116
|
<testCase name="addIDInfo 20 - should add data-element-id with valid id "movFinanceira_movimentacaoFinanceira"" duration="1"/>
|
|
117
117
|
<testCase name="addIDInfo 21 - should add data-element-id with valid id "movFinanceira_movimentacaoFinanceira"" duration="1"/>
|
|
118
118
|
<testCase name="addIDInfo 22 - should add data-element-id with valid id "bancoObrigatorio_movimentacaoFinanceira"" duration="1"/>
|
|
119
119
|
</file>
|
|
120
|
-
<file path="/builds/dti/design-system/sankhyacore/test/util/ElementUtils.spec.ts">
|
|
121
|
-
<testCase name="calcMarginSize should calculate correctly the size of horizontal margin" duration="65"/>
|
|
122
|
-
<testCase name="calcMarginSize should calculate correctly the size of vertical margin" duration="2"/>
|
|
123
|
-
<testCase name="calcMarginSize should threat values defined as zero" duration="3"/>
|
|
124
|
-
</file>
|
|
125
120
|
<file path="/builds/dti/design-system/sankhyacore/test/dataunit/formatting/PrettyFormatter.spec.ts">
|
|
126
|
-
<testCase name="getFormattedValue should return empty string when value is null" duration="
|
|
127
|
-
<testCase name="getFormattedValue should return empty string when value is not an array" duration="
|
|
128
|
-
<testCase name="getFormattedValue should return empty string when value is an empty array" duration="
|
|
129
|
-
<testCase name="getFormattedValue should return file name when value is an array with one file object" duration="
|
|
130
|
-
<testCase name="getFormattedValue should return file count when value is an array with multiple file objects" duration="
|
|
121
|
+
<testCase name="getFormattedValue should return empty string when value is null" duration="4"/>
|
|
122
|
+
<testCase name="getFormattedValue should return empty string when value is not an array" duration="0"/>
|
|
123
|
+
<testCase name="getFormattedValue should return empty string when value is an empty array" duration="1"/>
|
|
124
|
+
<testCase name="getFormattedValue should return file name when value is an array with one file object" duration="0"/>
|
|
125
|
+
<testCase name="getFormattedValue should return file count when value is an array with multiple file objects" duration="1"/>
|
|
131
126
|
<testCase name="getFormattedValue should return empty string for undefined file" duration="0"/>
|
|
132
127
|
<testCase name="getFormattedValue should handle OBJECT type with value field" duration="0"/>
|
|
133
|
-
<testCase name="getFormattedValue should return empty string when value is undefined" duration="
|
|
134
|
-
<testCase name="getFormattedValue should return value as string when value is not an object" duration="
|
|
128
|
+
<testCase name="getFormattedValue should return empty string when value is undefined" duration="1"/>
|
|
129
|
+
<testCase name="getFormattedValue should return value as string when value is not an object" duration="0"/>
|
|
135
130
|
<testCase name="getFormattedValue should return value.toString() when value is an object without value property" duration="0"/>
|
|
136
|
-
<testCase name="getFormattedValue should handle BOOLEAN type" duration="
|
|
137
|
-
<testCase name="getFormattedValue should format numbers correctly" duration="
|
|
138
|
-
<testCase name="getFormattedValue should format dates correctly" duration="
|
|
139
|
-
<testCase name="getFormattedValue should format times correctly" duration="
|
|
140
|
-
<testCase name="getFormattedValue should format datetime correctly" duration="
|
|
131
|
+
<testCase name="getFormattedValue should handle BOOLEAN type" duration="0"/>
|
|
132
|
+
<testCase name="getFormattedValue should format numbers correctly" duration="46"/>
|
|
133
|
+
<testCase name="getFormattedValue should format dates correctly" duration="6"/>
|
|
134
|
+
<testCase name="getFormattedValue should format times correctly" duration="0"/>
|
|
135
|
+
<testCase name="getFormattedValue should format datetime correctly" duration="1"/>
|
|
141
136
|
<testCase name="getFormattedValue should call toString with correct parameters" duration="1"/>
|
|
142
|
-
<testCase name="getFormattedValue should handle undefined descriptor gracefully" duration="
|
|
143
|
-
<testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and matching option" duration="
|
|
137
|
+
<testCase name="getFormattedValue should handle undefined descriptor gracefully" duration="0"/>
|
|
138
|
+
<testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and matching option" duration="1"/>
|
|
144
139
|
<testCase name="getFormattedValue should return value with OPTIONSELECTOR and no matching option" duration="0"/>
|
|
145
|
-
<testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and value as object" duration="
|
|
146
|
-
<testCase name="getFormattedValue should return empty string with OPTIONSELECTOR and value as null" duration="
|
|
140
|
+
<testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and value as object" duration="0"/>
|
|
141
|
+
<testCase name="getFormattedValue should return empty string with OPTIONSELECTOR and value as null" duration="1"/>
|
|
147
142
|
<testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and options as JSON string" duration="0"/>
|
|
148
|
-
<testCase name="getFormattedValue should return value with OPTIONSELECTOR and options as empty array" duration="
|
|
143
|
+
<testCase name="getFormattedValue should return value with OPTIONSELECTOR and options as empty array" duration="1"/>
|
|
149
144
|
<testCase name="getFormattedValue should format masked values correctly" duration="1"/>
|
|
150
145
|
</file>
|
|
146
|
+
<file path="/builds/dti/design-system/sankhyacore/test/util/ElementUtils.spec.ts">
|
|
147
|
+
<testCase name="calcMarginSize should calculate correctly the size of horizontal margin" duration="68"/>
|
|
148
|
+
<testCase name="calcMarginSize should calculate correctly the size of vertical margin" duration="2"/>
|
|
149
|
+
<testCase name="calcMarginSize should threat values defined as zero" duration="3"/>
|
|
150
|
+
</file>
|
|
151
151
|
</unitTest>
|
package/src/utils/ObjectUtils.ts
CHANGED
|
@@ -84,4 +84,24 @@ export default class ObjectUtils{
|
|
|
84
84
|
public static equals(obj1: any, obj2: any): any {
|
|
85
85
|
return ObjectUtils.objectToString(obj1) === ObjectUtils.objectToString(obj2);
|
|
86
86
|
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Verifica se o objeto está vazio (sem atributos).
|
|
90
|
+
*
|
|
91
|
+
* @param obj - Objeto a ser verificado.
|
|
92
|
+
* @returns - True caso o objeto esteja vazio.
|
|
93
|
+
*/
|
|
94
|
+
public static isEmpty(obj: object): boolean{
|
|
95
|
+
return Object.keys(obj).length === 0 && obj.constructor === Object;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Verifica se o objeto NÃO está vazio (sem atributos).
|
|
100
|
+
*
|
|
101
|
+
* @param obj - Objeto a ser verificado.
|
|
102
|
+
* @returns - True caso o objeto NÃO esteja vazio
|
|
103
|
+
*/
|
|
104
|
+
public static isNotEmpty(obj: object): boolean{
|
|
105
|
+
return !this.isEmpty(obj);
|
|
106
|
+
}
|
|
87
107
|
}
|