@sankhyalabs/core 5.20.0-dev.51 → 5.20.0-dev.52

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.
@@ -1,127 +1,121 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <unitTest version="1">
3
+ <file path="/builds/dti/design-system/sankhyacore/test/util/MaskFormatter.spec.ts">
4
+ <testCase name="Mask Formatter mask:CPF complete valid" duration="55"/>
5
+ <testCase name="Mask Formatter mask:CPF complete valid literals" duration="1"/>
6
+ <testCase name="Mask Formatter mask:CPF incomplete valid" duration="1"/>
7
+ <testCase name="Mask Formatter mask:CPF incomplete valid placeholder" duration="0"/>
8
+ <testCase name="Mask Formatter mask:CPF too long valid" duration="0"/>
9
+ <testCase name="Mask Formatter mask:CPF invalid for string" duration="113"/>
10
+ <testCase name="Mask Formatter mask:CPF invalid for being too long" duration="1"/>
11
+ <testCase name="Mask Formatter mask:Licence plate valid uppercase" duration="1"/>
12
+ <testCase name="Mask Formatter mask:Licence plate valid lowercase" duration="1"/>
13
+ <testCase name="Mask Formatter mask:Licence plate invalid" duration="2"/>
14
+ <testCase name="Mask Formatter mask:Licence plate invalid for being too short" duration="1"/>
15
+ <testCase name="Mask Formatter mask:Licence plate invalid for being too short with placeholder" duration="1"/>
16
+ <testCase name="Mask Formatter mask:Licence plate invalid" duration="2"/>
17
+ <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
18
+ <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="0"/>
19
+ <testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
20
+ <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
21
+ <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="1"/>
22
+ <testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
23
+ <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
24
+ <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="0"/>
25
+ <testCase name="Mask Formatter mask:Licence plate invalid" duration="2"/>
26
+ </file>
3
27
  <file path="/builds/dti/design-system/sankhyacore/src/utils/test/objectUtils.spec.ts">
4
- <testCase name="ObjectUtils hasEquivalentValues should return true if both objects have the same property value" duration="91"/>
28
+ <testCase name="ObjectUtils hasEquivalentValues should return true if both objects have the same property value" duration="83"/>
5
29
  <testCase name="ObjectUtils hasEquivalentValues should return false if both objects have different property values" duration="0"/>
6
- <testCase name="ObjectUtils hasEquivalentValues should return true if both objects are equivalent with custom property to compare" duration="0"/>
7
- <testCase name="ObjectUtils hasEquivalentValues should return false if both objects are not equivalent with custom property to compare" duration="7"/>
8
- <testCase name="ObjectUtils hasEquivalentValues should return false if one object does not have the property" duration="1"/>
9
- <testCase name="ObjectUtils hasEquivalentValues should return true if comparing primitive values directly" duration="1"/>
10
- <testCase name="ObjectUtils hasEquivalentValues should return false if comparing different primitive values" duration="1"/>
30
+ <testCase name="ObjectUtils hasEquivalentValues should return true if both objects are equivalent with custom property to compare" duration="1"/>
31
+ <testCase name="ObjectUtils hasEquivalentValues should return false if both objects are not equivalent with custom property to compare" duration="1"/>
32
+ <testCase name="ObjectUtils hasEquivalentValues should return false if one object does not have the property" duration="0"/>
33
+ <testCase name="ObjectUtils hasEquivalentValues should return true if comparing primitive values directly" duration="0"/>
34
+ <testCase name="ObjectUtils hasEquivalentValues should return false if comparing different primitive values" duration="0"/>
11
35
  <testCase name="ObjectUtils hasEquivalentValues should return true when comparing object with a null value" duration="1"/>
12
- <testCase name="ObjectUtils hasEquivalentValues should return false when comparing object with null and non-null value" duration="1"/>
13
- <testCase name="ObjectUtils hasEquivalentValues should return true when comparing non-object values that are equal" duration="1"/>
36
+ <testCase name="ObjectUtils hasEquivalentValues should return false when comparing object with null and non-null value" duration="0"/>
37
+ <testCase name="ObjectUtils hasEquivalentValues should return true when comparing non-object values that are equal" duration="0"/>
14
38
  <testCase name="ObjectUtils should get an object value based on its path" duration="1"/>
15
39
  <testCase name="ObjectUtils should get an object value based on its path" duration="0"/>
16
40
  <testCase name="ObjectUtils should return undefined if the path doesn&apos;t exist in the object" duration="1"/>
17
41
  </file>
18
42
  <file path="/builds/dti/design-system/sankhyacore/test/util/CriteriaModel.spec.ts">
19
- <testCase name="StringUtils it should return the undefined and [] to Criteria Props through new class with empty constructor" duration="95"/>
43
+ <testCase name="StringUtils it should return the undefined and [] to Criteria Props through new class with empty constructor" duration="11"/>
20
44
  <testCase name="StringUtils it should modify &quot;expressions&quot; and &quot;parameters&quot; properties through Setters methods" duration="1"/>
21
- <testCase name="StringUtils it should return &quot;expression&quot; and &quot;parameters&quot; setted through constructor method" duration="0"/>
45
+ <testCase name="StringUtils it should return &quot;expression&quot; and &quot;parameters&quot; setted through constructor method" duration="1"/>
22
46
  <testCase name="StringUtils it should return a Criteria class with &quot;expression&quot; and &quot;parameters&quot; as needed setted through &quot;append&quot; method" duration="1"/>
23
- <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;append&quot; method" duration="1"/>
24
- <testCase name="StringUtils it should return undefined as &quot;expression&quot; and &quot;[]&quot; as parameters as we use an empty criteria as first entry in the constructor" duration="0"/>
25
- <testCase name="StringUtils it should return a Criteria class with &quot;Expression&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;OR&quot; method" duration="77"/>
47
+ <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;append&quot; method" duration="83"/>
48
+ <testCase name="StringUtils it should return undefined as &quot;expression&quot; and &quot;[]&quot; as parameters as we use an empty criteria as first entry in the constructor" duration="1"/>
49
+ <testCase name="StringUtils it should return a Criteria class with &quot;Expression&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;OR&quot; method" duration="1"/>
50
+ <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;OR&quot; method" duration="0"/>
26
51
  <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;OR&quot; method" duration="1"/>
27
- <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;OR&quot; method" duration="1"/>
28
- <testCase name="StringUtils it should return a Criteria class with &quot;Expression&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;AND&quot; method" duration="2"/>
52
+ <testCase name="StringUtils it should return a Criteria class with &quot;Expression&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;AND&quot; method" duration="73"/>
29
53
  <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;AND&quot; method" duration="0"/>
30
54
  <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;AND&quot; method" duration="1"/>
31
- <testCase name="StringUtils it should return a toJSON object with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;AND&quot; method" duration="2"/>
55
+ <testCase name="StringUtils it should return a toJSON object with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;AND&quot; method" duration="1"/>
32
56
  <testCase name="StringUtils it should return a toJSON object with through empty constructor" duration="0"/>
33
57
  </file>
34
- <file path="/builds/dti/design-system/sankhyacore/test/util/MaskFormatter.spec.ts">
35
- <testCase name="Mask Formatter mask:CPF complete valid" duration="8"/>
36
- <testCase name="Mask Formatter mask:CPF complete valid literals" duration="1"/>
37
- <testCase name="Mask Formatter mask:CPF incomplete valid" duration="1"/>
38
- <testCase name="Mask Formatter mask:CPF incomplete valid placeholder" duration="79"/>
39
- <testCase name="Mask Formatter mask:CPF too long valid" duration="1"/>
40
- <testCase name="Mask Formatter mask:CPF invalid for string" duration="123"/>
41
- <testCase name="Mask Formatter mask:CPF invalid for being too long" duration="0"/>
42
- <testCase name="Mask Formatter mask:Licence plate valid uppercase" duration="73"/>
43
- <testCase name="Mask Formatter mask:Licence plate valid lowercase" duration="1"/>
44
- <testCase name="Mask Formatter mask:Licence plate invalid" duration="2"/>
45
- <testCase name="Mask Formatter mask:Licence plate invalid for being too short" duration="1"/>
46
- <testCase name="Mask Formatter mask:Licence plate invalid for being too short with placeholder" duration="0"/>
47
- <testCase name="Mask Formatter mask:Licence plate invalid" duration="3"/>
48
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
49
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="0"/>
50
- <testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
51
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
52
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="0"/>
53
- <testCase name="Mask Formatter mask:Licence plate invalid" duration="12"/>
54
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="0"/>
55
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="1"/>
56
- <testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
57
- </file>
58
58
  <file path="/builds/dti/design-system/sankhyacore/test/http/HttpProvider.spec.ts">
59
- <testCase name="HttpProvider Metodo GET" duration="1"/>
59
+ <testCase name="HttpProvider Metodo GET" duration="35"/>
60
60
  </file>
61
61
  <file path="/builds/dti/design-system/sankhyacore/test/http/SkwHttpProvider.ts.spec.ts">
62
- <testCase name="HttpProvider Metodo POST" duration="1"/>
63
- </file>
64
- <file path="/builds/dti/design-system/sankhyacore/test/util/OverflowWatcher.spec.ts">
65
- <testCase name="OverflowWatcher should initialize with provided parameters" duration="82"/>
66
- <testCase name="OverflowWatcher should disconect ResizeObserver when destroy is called" duration="2"/>
67
- <testCase name="OverflowWatcher Should call callback on forceUpdate" duration="211"/>
68
- <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan" duration="86"/>
69
- <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan when notOverFlow is empty" duration="11"/>
70
- <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan considering overflowed elements" duration="198"/>
71
- <testCase name="OverflowWatcher Should call callback on forceUpdate with empty list" duration="89"/>
72
- <testCase name="OverflowWatcher should ignore elements that can not overflow" duration="116"/>
73
- <testCase name="OverflowWatcher Should not call callback on forceUpdate" duration="1"/>
62
+ <testCase name="HttpProvider Metodo POST" duration="5"/>
74
63
  </file>
75
- <file path="/builds/dti/design-system/sankhyacore/test/util/CriteriaParameter.spec.ts">
76
- <testCase name="StringUtils it should return the correct values of &quot;value&quot; and &quot;type&quot; through the getters methods initial setted by the constructor" duration="1"/>
77
- <testCase name="StringUtils it should return the correct values of &quot;value&quot; and &quot;type&quot; through the getters methods initial setted by the setters methods" duration="1"/>
78
- <testCase name="StringUtils it should return the correct JSON/Object value through the buildParam method" duration="1"/>
64
+ <file path="/builds/dti/design-system/sankhyacore/test/util/NumberUtils.spec.ts">
65
+ <testCase name="StringUtils stringToNumber" duration="30"/>
66
+ <testCase name="StringUtils format" duration="95"/>
67
+ <testCase name="StringUtils format without formatnumber parameter" duration="1"/>
68
+ <testCase name="StringUtils format without formatnumber parameter" duration="7"/>
69
+ <testCase name="StringUtils format round number" duration="59"/>
79
70
  </file>
80
71
  <file path="/builds/dti/design-system/sankhyacore/test/util/StringUtils.spec.ts">
81
72
  <testCase name="StringUtils valor vazio" duration="1"/>
82
73
  <testCase name="StringUtils valor em branco" duration="1"/>
83
- <testCase name="StringUtils valor null" duration="83"/>
84
- <testCase name="StringUtils valor undefined" duration="1"/>
85
- <testCase name="StringUtils valor 0" duration="0"/>
86
- <testCase name="StringUtils com valor" duration="0"/>
87
- <testCase name="StringUtils substitui vogais com acento por vogais sem acento" duration="2"/>
74
+ <testCase name="StringUtils valor null" duration="0"/>
75
+ <testCase name="StringUtils valor undefined" duration="0"/>
76
+ <testCase name="StringUtils valor 0" duration="1"/>
77
+ <testCase name="StringUtils com valor" duration="1"/>
78
+ <testCase name="StringUtils substitui vogais com acento por vogais sem acento" duration="1"/>
88
79
  <testCase name="StringUtils should return the original value when called with an object without a toString method" duration="2"/>
89
- <testCase name="StringUtils should return the original value when called with undefined" duration="2"/>
80
+ <testCase name="StringUtils should return the original value when called with undefined" duration="1"/>
90
81
  </file>
91
- <file path="/builds/dti/design-system/sankhyacore/test/util/NumberUtils.spec.ts">
92
- <testCase name="StringUtils stringToNumber" duration="102"/>
93
- <testCase name="StringUtils format" duration="92"/>
94
- <testCase name="StringUtils format without formatnumber parameter" duration="86"/>
95
- <testCase name="StringUtils format without formatnumber parameter" duration="1"/>
96
- <testCase name="StringUtils format round number" duration="2"/>
82
+ <file path="/builds/dti/design-system/sankhyacore/test/util/CriteriaParameter.spec.ts">
83
+ <testCase name="StringUtils it should return the correct values of &quot;value&quot; and &quot;type&quot; through the getters methods initial setted by the constructor" duration="1"/>
84
+ <testCase name="StringUtils it should return the correct values of &quot;value&quot; and &quot;type&quot; through the getters methods initial setted by the setters methods" duration="0"/>
85
+ <testCase name="StringUtils it should return the correct JSON/Object value through the buildParam method" duration="1"/>
97
86
  </file>
98
- <file path="/builds/dti/design-system/sankhyacore/src/dataunit/state/slice/test/RecordsSlice.spec.ts">
99
- <testCase name="RecordsSlice should return newlines at the end" duration="2"/>
87
+ <file path="/builds/dti/design-system/sankhyacore/test/util/OverflowWatcher.spec.ts">
88
+ <testCase name="OverflowWatcher should initialize with provided parameters" duration="12"/>
89
+ <testCase name="OverflowWatcher should disconect ResizeObserver when destroy is called" duration="2"/>
90
+ <testCase name="OverflowWatcher Should call callback on forceUpdate" duration="205"/>
91
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan" duration="119"/>
92
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan when notOverFlow is empty" duration="74"/>
93
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan considering overflowed elements" duration="10"/>
94
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with empty list" duration="4"/>
95
+ <testCase name="OverflowWatcher should ignore elements that can not overflow" duration="88"/>
96
+ <testCase name="OverflowWatcher Should not call callback on forceUpdate" duration="1"/>
100
97
  </file>
101
98
  <file path="/builds/dti/design-system/sankhyacore/test/util/TimeFormatter.spec.ts">
102
- <testCase name="TimeFormatter Case: input string unformated with showSeconds" duration="3"/>
103
- <testCase name="TimeFormatter Case: input string unformated without showSeconds" duration="1"/>
104
- <testCase name="TimeFormatter Case: validateTime" duration="2"/>
99
+ <testCase name="TimeFormatter Case: input string unformated with showSeconds" duration="2"/>
100
+ <testCase name="TimeFormatter Case: input string unformated without showSeconds" duration="0"/>
101
+ <testCase name="TimeFormatter Case: validateTime" duration="12"/>
105
102
  </file>
106
- <file path="/builds/dti/design-system/sankhyacore/src/dataunit/test/DataUnit.spec.ts">
107
- <testCase name="DataUnit should return false when not waiting to reload" duration="2"/>
108
- <testCase name="DataUnit should set waitingToReload to true" duration="1"/>
109
- <testCase name="DataUnit should set waitingToReload to false" duration="1"/>
110
- <testCase name="DataUnit should dispatch SAVING_CANCELED action with correct fields and recordId" duration="0"/>
103
+ <file path="/builds/dti/design-system/sankhyacore/src/dataunit/state/slice/test/RecordsSlice.spec.ts">
104
+ <testCase name="RecordsSlice should return newlines at the end" duration="67"/>
111
105
  </file>
112
106
  <file path="/builds/dti/design-system/sankhyacore/test/util/DataUnitStorage.spec.ts">
113
- <testCase name="DataUnitStorage put should store a DataUnit instance in the DataUnitStorage" duration="2"/>
114
- <testCase name="DataUnitStorage get should return the stored DataUnit instance from the DataUnitStorage" duration="1"/>
115
- <testCase name="DataUnitStorage get should return undefined if the DataUnit instance is not found in the DataUnitStorage" duration="0"/>
107
+ <testCase name="DataUnitStorage put should store a DataUnit instance in the DataUnitStorage" duration="1"/>
108
+ <testCase name="DataUnitStorage get should return the stored DataUnit instance from the DataUnitStorage" duration="0"/>
109
+ <testCase name="DataUnitStorage get should return undefined if the DataUnit instance is not found in the DataUnitStorage" duration="1"/>
116
110
  <testCase name="DataUnitStorage remove should remove the specified DataUnit instance from the DataUnitStorage" duration="1"/>
117
111
  <testCase name="DataUnitStorage remove should remove the DataUnit instance with the specified name from the DataUnitStorage" duration="1"/>
118
- <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"/>
112
+ <testCase name="DataUnitStorage remove should not remove any DataUnit instance if the specified DataUnit instance or name is not found in the DataUnitStorage" duration="1"/>
119
113
  </file>
120
114
  <file path="/builds/dti/design-system/sankhyacore/test/util/ElementIDUtils.spec.ts">
121
- <testCase name="addIDInfo 1 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="77"/>
115
+ <testCase name="addIDInfo 1 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="29"/>
122
116
  <testCase name="addIDInfo 2 - should add data-element-id with valid id &quot;brComSankhyaFinCadMovimentacaofinanceira_snkApplication&quot;" duration="2"/>
123
- <testCase name="addIDInfo 3 - should add data-element-id with valid id &quot;movFinanceira_br.com.sankhya.fin.cad.movimentacaoFinanceira&quot;" duration="2"/>
124
- <testCase name="addIDInfo 4 - should add data-element-id with valid id &quot;meuID2_snkApplication&quot;" duration="1"/>
117
+ <testCase name="addIDInfo 3 - should add data-element-id with valid id &quot;movFinanceira_br.com.sankhya.fin.cad.movimentacaoFinanceira&quot;" duration="1"/>
118
+ <testCase name="addIDInfo 4 - should add data-element-id with valid id &quot;meuID2_snkApplication&quot;" duration="3"/>
125
119
  <testCase name="addIDInfo 5 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="1"/>
126
120
  <testCase name="addIDInfo 6 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="1"/>
127
121
  <testCase name="addIDInfo 7 - should add data-element-id with valid id &quot;componenteNameTest_snkApplication&quot;" duration="1"/>
@@ -131,18 +125,29 @@
131
125
  <testCase name="addIDInfo 11 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira&quot;" duration="1"/>
132
126
  <testCase name="addIDInfo 12 - should add data-element-id with valid id &quot;dataunitFinanceiro_movFinanceira_movimentacaoFinanceira&quot;" duration="2"/>
133
127
  <testCase name="addIDInfo 13 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira&quot;" duration="1"/>
134
- <testCase name="addIDInfo 14 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_movimentacaoFinanceira&quot;" duration="75"/>
128
+ <testCase name="addIDInfo 14 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_movimentacaoFinanceira&quot;" duration="2"/>
135
129
  <testCase name="addIDInfo 15 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_snkApplication&quot;" duration="1"/>
136
130
  <testCase name="addIDInfo 16 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_snkApplication&quot;" duration="1"/>
137
131
  <testCase name="addIDInfo 17 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
138
132
  <testCase name="addIDInfo 18 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
139
133
  <testCase name="addIDInfo 19 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
140
134
  <testCase name="addIDInfo 20 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
141
- <testCase name="addIDInfo 21 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="0"/>
142
- <testCase name="addIDInfo 22 - should add data-element-id with valid id &quot;bancoObrigatorio_movimentacaoFinanceira&quot;" duration="1"/>
135
+ <testCase name="addIDInfo 21 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
136
+ <testCase name="addIDInfo 22 - should add data-element-id with valid id &quot;bancoObrigatorio_movimentacaoFinanceira&quot;" duration="0"/>
137
+ </file>
138
+ <file path="/builds/dti/design-system/sankhyacore/src/dataunit/test/DataUnit.spec.ts">
139
+ <testCase name="DataUnit should return false when not waiting to reload" duration="3"/>
140
+ <testCase name="DataUnit should set waitingToReload to true" duration="1"/>
141
+ <testCase name="DataUnit should set waitingToReload to false" duration="0"/>
142
+ <testCase name="DataUnit should dispatch SAVING_CANCELED action with correct fields and recordId" duration="2"/>
143
+ </file>
144
+ <file path="/builds/dti/design-system/sankhyacore/test/util/ElementUtils.spec.ts">
145
+ <testCase name="calcMarginSize should calculate correctly the size of horizontal margin" duration="39"/>
146
+ <testCase name="calcMarginSize should calculate correctly the size of vertical margin" duration="2"/>
147
+ <testCase name="calcMarginSize should threat values defined as zero" duration="16"/>
143
148
  </file>
144
149
  <file path="/builds/dti/design-system/sankhyacore/test/dataunit/formatting/PrettyFormatter.spec.ts">
145
- <testCase name="getFormattedValue should return empty string when value is null" duration="6"/>
150
+ <testCase name="getFormattedValue should return empty string when value is null" duration="9"/>
146
151
  <testCase name="getFormattedValue should return empty string when value is not an array" duration="1"/>
147
152
  <testCase name="getFormattedValue should return empty string when value is an empty array" duration="0"/>
148
153
  <testCase name="getFormattedValue should return file name when value is an array with one file object" duration="1"/>
@@ -153,23 +158,18 @@
153
158
  <testCase name="getFormattedValue should return value as string when value is not an object" duration="0"/>
154
159
  <testCase name="getFormattedValue should return value.toString() when value is an object without value property" duration="1"/>
155
160
  <testCase name="getFormattedValue should handle BOOLEAN type" duration="0"/>
156
- <testCase name="getFormattedValue should format numbers correctly" duration="15"/>
157
- <testCase name="getFormattedValue should format dates correctly" duration="70"/>
161
+ <testCase name="getFormattedValue should format numbers correctly" duration="18"/>
162
+ <testCase name="getFormattedValue should format dates correctly" duration="6"/>
158
163
  <testCase name="getFormattedValue should format times correctly" duration="1"/>
159
- <testCase name="getFormattedValue should format datetime correctly" duration="0"/>
164
+ <testCase name="getFormattedValue should format datetime correctly" duration="1"/>
160
165
  <testCase name="getFormattedValue should call toString with correct parameters" duration="1"/>
161
- <testCase name="getFormattedValue should handle undefined descriptor gracefully" duration="1"/>
162
- <testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and matching option" duration="0"/>
163
- <testCase name="getFormattedValue should return value with OPTIONSELECTOR and no matching option" duration="1"/>
164
- <testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and value as object" duration="0"/>
166
+ <testCase name="getFormattedValue should handle undefined descriptor gracefully" duration="0"/>
167
+ <testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and matching option" duration="1"/>
168
+ <testCase name="getFormattedValue should return value with OPTIONSELECTOR and no matching option" duration="0"/>
169
+ <testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and value as object" duration="1"/>
165
170
  <testCase name="getFormattedValue should return empty string with OPTIONSELECTOR and value as null" duration="0"/>
166
171
  <testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and options as JSON string" duration="0"/>
167
172
  <testCase name="getFormattedValue should return value with OPTIONSELECTOR and options as empty array" duration="0"/>
168
173
  <testCase name="getFormattedValue should format masked values correctly" duration="1"/>
169
174
  </file>
170
- <file path="/builds/dti/design-system/sankhyacore/test/util/ElementUtils.spec.ts">
171
- <testCase name="calcMarginSize should calculate correctly the size of horizontal margin" duration="115"/>
172
- <testCase name="calcMarginSize should calculate correctly the size of vertical margin" duration="3"/>
173
- <testCase name="calcMarginSize should threat values defined as zero" duration="3"/>
174
- </file>
175
175
  </unitTest>
@@ -985,11 +985,18 @@ export default class DataUnit {
985
985
  * @param fieldName -Identificador do campo a ser modificado.
986
986
  * @param newValue - Valor a ser inserido no campo.
987
987
  * @param records - Indica quais registros foram afetados pela alteração no valor do campo.
988
+ * @param options - Configurações do evento
988
989
  * @returns - Promise que será resolvida quando o novo valor for persistido no state.
989
- *
990
- */
990
+ *
991
+ */
991
992
  public async setFieldValue(fieldName: string, newValue: any, records?: Array<string>, options?:DataUnitEventOptions): Promise<boolean> {
992
- if(!this.hasNewRecord() && !this.getSelectedRecord()) await this.addRecord();
993
+ const noRecordSelected = !this.hasNewRecord() && !this.getSelectedRecord();
994
+
995
+ const suppressCreateNewRecord = options?.suppressCreateNewRecord;
996
+
997
+ if(noRecordSelected && suppressCreateNewRecord) return Promise.resolve(false);
998
+
999
+ if(noRecordSelected) await this.addRecord();
993
1000
 
994
1001
  const typedValue = this.validateAndTypeValue(fieldName, newValue);
995
1002
  const currentValue = this.getFieldValue(fieldName);
@@ -1002,7 +1009,7 @@ export default class DataUnit {
1002
1009
  const promise:Promise<boolean> = new Promise(accept => {
1003
1010
  newValue.then(resolvedValue => {
1004
1011
  this.dispatchAction(Action.DATA_RESOLVED, { [fieldName]: resolvedValue, records }, undefined);
1005
- accept(this.setFieldValue(fieldName, resolvedValue, records));
1012
+ accept(this.setFieldValue(fieldName, resolvedValue, records, options));
1006
1013
  });
1007
1014
  });
1008
1015
  this._savingLockers.push(promise);