@sankhyalabs/core 5.20.0-dev.63 → 5.20.0-dev.65

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,175 +1,175 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <unitTest version="1">
3
- <file path="/builds/dti/design-system/sankhyacore/test/http/HttpProvider.spec.ts">
4
- <testCase name="HttpProvider Metodo GET" duration="73"/>
5
- </file>
6
- <file path="/builds/dti/design-system/sankhyacore/test/http/SkwHttpProvider.ts.spec.ts">
7
- <testCase name="HttpProvider Metodo POST" duration="16"/>
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 &quot;value&quot; and &quot;type&quot; through the getters methods initial setted by the constructor" duration="91"/>
11
- <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"/>
12
- <testCase name="StringUtils it should return the correct JSON/Object value through the buildParam method" duration="13"/>
13
- </file>
14
3
  <file path="/builds/dti/design-system/sankhyacore/src/utils/test/objectUtils.spec.ts">
15
- <testCase name="ObjectUtils hasEquivalentValues should return true if both objects have the same property value" duration="116"/>
16
- <testCase name="ObjectUtils hasEquivalentValues should return false if both objects have different property values" duration="1"/>
17
- <testCase name="ObjectUtils hasEquivalentValues should return true if both objects are equivalent with custom property to compare" duration="1"/>
18
- <testCase name="ObjectUtils hasEquivalentValues should return false if both objects are not equivalent with custom property to compare" duration="1"/>
4
+ <testCase name="ObjectUtils hasEquivalentValues should return true if both objects have the same property value" duration="86"/>
5
+ <testCase name="ObjectUtils hasEquivalentValues should return false if both objects have different property values" duration="2"/>
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="0"/>
19
8
  <testCase name="ObjectUtils hasEquivalentValues should return false if one object does not have the property" duration="1"/>
20
9
  <testCase name="ObjectUtils hasEquivalentValues should return true if comparing primitive values directly" duration="1"/>
21
- <testCase name="ObjectUtils hasEquivalentValues should return false if comparing different primitive values" duration="0"/>
22
- <testCase name="ObjectUtils hasEquivalentValues should return true when comparing object with a null value" duration="1"/>
23
- <testCase name="ObjectUtils hasEquivalentValues should return false when comparing object with null and non-null value" duration="0"/>
10
+ <testCase name="ObjectUtils hasEquivalentValues should return false if comparing different primitive values" duration="2"/>
11
+ <testCase name="ObjectUtils hasEquivalentValues should return true when comparing object with a null value" duration="0"/>
12
+ <testCase name="ObjectUtils hasEquivalentValues should return false when comparing object with null and non-null value" duration="1"/>
24
13
  <testCase name="ObjectUtils hasEquivalentValues should return true when comparing non-object values that are equal" duration="0"/>
25
- <testCase name="ObjectUtils should get an object value based on its path" duration="0"/>
14
+ <testCase name="ObjectUtils should get an object value based on its path" duration="1"/>
26
15
  <testCase name="ObjectUtils should get an object value based on its path" duration="1"/>
27
16
  <testCase name="ObjectUtils should return undefined if the path doesn&apos;t exist in the object" duration="0"/>
28
17
  </file>
29
- <file path="/builds/dti/design-system/sankhyacore/test/util/StringUtils.spec.ts">
30
- <testCase name="StringUtils valor vazio" duration="99"/>
31
- <testCase name="StringUtils valor em branco" duration="1"/>
32
- <testCase name="StringUtils valor null" duration="0"/>
33
- <testCase name="StringUtils valor undefined" duration="1"/>
34
- <testCase name="StringUtils valor 0" duration="4"/>
35
- <testCase name="StringUtils com valor" duration="0"/>
36
- <testCase name="StringUtils substitui vogais com acento por vogais sem acento" duration="1"/>
37
- <testCase name="StringUtils should return the original value when called with an object without a toString method" duration="7"/>
38
- <testCase name="StringUtils should return the original value when called with undefined" duration="1"/>
39
- </file>
40
- <file path="/builds/dti/design-system/sankhyacore/test/util/NumberUtils.spec.ts">
41
- <testCase name="StringUtils stringToNumber" duration="203"/>
42
- <testCase name="StringUtils format" duration="193"/>
43
- <testCase name="StringUtils format without formatnumber parameter" duration="82"/>
44
- <testCase name="StringUtils format without formatnumber parameter" duration="1"/>
45
- <testCase name="StringUtils format round number" duration="2"/>
46
- </file>
47
18
  <file path="/builds/dti/design-system/sankhyacore/test/util/CriteriaModel.spec.ts">
48
- <testCase name="StringUtils it should return the undefined and [] to Criteria Props through new class with empty constructor" duration="81"/>
19
+ <testCase name="StringUtils it should return the undefined and [] to Criteria Props through new class with empty constructor" duration="10"/>
49
20
  <testCase name="StringUtils it should modify &quot;expressions&quot; and &quot;parameters&quot; properties through Setters methods" duration="1"/>
50
21
  <testCase name="StringUtils it should return &quot;expression&quot; and &quot;parameters&quot; setted through constructor method" duration="1"/>
51
- <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"/>
52
- <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"/>
22
+ <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="79"/>
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="9"/>
53
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="1"/>
54
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="1"/>
55
26
  <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"/>
56
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"/>
57
- <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="7"/>
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="1"/>
29
+ <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="93"/>
58
30
  <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"/>
59
- <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="13"/>
60
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="1"/>
61
32
  <testCase name="StringUtils it should return a toJSON object with through empty constructor" duration="0"/>
62
33
  </file>
63
- <file path="/builds/dti/design-system/sankhyacore/test/util/OverflowWatcher.spec.ts">
64
- <testCase name="OverflowWatcher should initialize with provided parameters" duration="19"/>
65
- <testCase name="OverflowWatcher should disconect ResizeObserver when destroy is called" duration="80"/>
66
- <testCase name="OverflowWatcher Should call callback on forceUpdate" duration="515"/>
67
- <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan" duration="78"/>
68
- <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan when notOverFlow is empty" duration="25"/>
69
- <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan considering overflowed elements" duration="95"/>
70
- <testCase name="OverflowWatcher Should call callback on forceUpdate with empty list" duration="12"/>
71
- <testCase name="OverflowWatcher should ignore elements that can not overflow" duration="81"/>
72
- <testCase name="OverflowWatcher Should not call callback on forceUpdate" duration="1"/>
73
- </file>
74
- <file path="/builds/dti/design-system/sankhyacore/src/dataunit/state/slice/test/RecordsSlice.spec.ts">
75
- <testCase name="RecordsSlice should return newlines at the end" duration="1"/>
76
- </file>
77
- <file path="/builds/dti/design-system/sankhyacore/test/util/TimeFormatter.spec.ts">
78
- <testCase name="TimeFormatter Case: input string unformated with showSeconds" duration="2"/>
79
- <testCase name="TimeFormatter Case: input string unformated without showSeconds" duration="68"/>
80
- <testCase name="TimeFormatter Case: validateTime" duration="1"/>
81
- </file>
82
34
  <file path="/builds/dti/design-system/sankhyacore/test/util/MaskFormatter.spec.ts">
83
- <testCase name="Mask Formatter mask:CPF complete valid" duration="14"/>
35
+ <testCase name="Mask Formatter mask:CPF complete valid" duration="99"/>
84
36
  <testCase name="Mask Formatter mask:CPF complete valid literals" duration="1"/>
85
37
  <testCase name="Mask Formatter mask:CPF incomplete valid" duration="1"/>
86
- <testCase name="Mask Formatter mask:CPF incomplete valid placeholder" duration="0"/>
87
- <testCase name="Mask Formatter mask:CPF too long valid" duration="0"/>
88
- <testCase name="Mask Formatter mask:CPF invalid for string" duration="391"/>
38
+ <testCase name="Mask Formatter mask:CPF incomplete valid placeholder" duration="1"/>
39
+ <testCase name="Mask Formatter mask:CPF too long valid" duration="1"/>
40
+ <testCase name="Mask Formatter mask:CPF invalid for string" duration="113"/>
89
41
  <testCase name="Mask Formatter mask:CPF invalid for being too long" duration="1"/>
90
- <testCase name="Mask Formatter mask:Licence plate valid uppercase" duration="188"/>
91
- <testCase name="Mask Formatter mask:Licence plate valid lowercase" duration="1"/>
92
- <testCase name="Mask Formatter mask:Licence plate invalid" duration="80"/>
93
- <testCase name="Mask Formatter mask:Licence plate invalid for being too short" duration="0"/>
42
+ <testCase name="Mask Formatter mask:Licence plate valid uppercase" duration="1"/>
43
+ <testCase name="Mask Formatter mask:Licence plate valid lowercase" duration="69"/>
44
+ <testCase name="Mask Formatter mask:Licence plate invalid" duration="20"/>
45
+ <testCase name="Mask Formatter mask:Licence plate invalid for being too short" duration="1"/>
94
46
  <testCase name="Mask Formatter mask:Licence plate invalid for being too short with placeholder" duration="1"/>
95
- <testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
47
+ <testCase name="Mask Formatter mask:Licence plate invalid" duration="2"/>
96
48
  <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
97
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="0"/>
98
- <testCase name="Mask Formatter mask:Licence plate invalid" duration="6"/>
99
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="0"/>
100
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="0"/>
49
+ <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="1"/>
101
50
  <testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
102
51
  <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
103
52
  <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="1"/>
104
53
  <testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
54
+ <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
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="76"/>
105
57
  </file>
106
- <file path="/builds/dti/design-system/sankhyacore/test/util/DataUnitStorage.spec.ts">
107
- <testCase name="DataUnitStorage put should store a DataUnit instance in the DataUnitStorage" duration="6"/>
108
- <testCase name="DataUnitStorage get should return the stored DataUnit instance from the DataUnitStorage" duration="1"/>
109
- <testCase name="DataUnitStorage get should return undefined if the DataUnit instance is not found in the DataUnitStorage" duration="1"/>
110
- <testCase name="DataUnitStorage remove should remove the specified DataUnit instance from the DataUnitStorage" duration="1"/>
111
- <testCase name="DataUnitStorage remove should remove the DataUnit instance with the specified name from the DataUnitStorage" duration="1"/>
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"/>
58
+ <file path="/builds/dti/design-system/sankhyacore/test/http/HttpProvider.spec.ts">
59
+ <testCase name="HttpProvider Metodo GET" duration="1"/>
60
+ </file>
61
+ <file path="/builds/dti/design-system/sankhyacore/test/util/StringUtils.spec.ts">
62
+ <testCase name="StringUtils valor vazio" duration="1"/>
63
+ <testCase name="StringUtils valor em branco" duration="1"/>
64
+ <testCase name="StringUtils valor null" duration="0"/>
65
+ <testCase name="StringUtils valor undefined" duration="1"/>
66
+ <testCase name="StringUtils valor 0" duration="0"/>
67
+ <testCase name="StringUtils com valor" duration="0"/>
68
+ <testCase name="StringUtils substitui vogais com acento por vogais sem acento" duration="2"/>
69
+ <testCase name="StringUtils should return the original value when called with an object without a toString method" duration="2"/>
70
+ <testCase name="StringUtils should return the original value when called with undefined" duration="1"/>
71
+ </file>
72
+ <file path="/builds/dti/design-system/sankhyacore/test/http/SkwHttpProvider.ts.spec.ts">
73
+ <testCase name="HttpProvider Metodo POST" duration="1"/>
74
+ </file>
75
+ <file path="/builds/dti/design-system/sankhyacore/test/util/NumberUtils.spec.ts">
76
+ <testCase name="StringUtils stringToNumber" duration="94"/>
77
+ <testCase name="StringUtils format" duration="292"/>
78
+ <testCase name="StringUtils format without formatnumber parameter" duration="1"/>
79
+ <testCase name="StringUtils format without formatnumber parameter" duration="1"/>
80
+ <testCase name="StringUtils format round number" duration="1"/>
81
+ </file>
82
+ <file path="/builds/dti/design-system/sankhyacore/test/util/OverflowWatcher.spec.ts">
83
+ <testCase name="OverflowWatcher should initialize with provided parameters" duration="87"/>
84
+ <testCase name="OverflowWatcher should disconect ResizeObserver when destroy is called" duration="10"/>
85
+ <testCase name="OverflowWatcher Should call callback on forceUpdate" duration="285"/>
86
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan" duration="108"/>
87
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan when notOverFlow is empty" duration="12"/>
88
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan considering overflowed elements" duration="84"/>
89
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with empty list" duration="7"/>
90
+ <testCase name="OverflowWatcher should ignore elements that can not overflow" duration="93"/>
91
+ <testCase name="OverflowWatcher Should not call callback on forceUpdate" duration="1"/>
92
+ </file>
93
+ <file path="/builds/dti/design-system/sankhyacore/test/util/CriteriaParameter.spec.ts">
94
+ <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"/>
95
+ <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"/>
96
+ <testCase name="StringUtils it should return the correct JSON/Object value through the buildParam method" duration="1"/>
97
+ </file>
98
+ <file path="/builds/dti/design-system/sankhyacore/test/util/TimeFormatter.spec.ts">
99
+ <testCase name="TimeFormatter Case: input string unformated with showSeconds" duration="2"/>
100
+ <testCase name="TimeFormatter Case: input string unformated without showSeconds" duration="1"/>
101
+ <testCase name="TimeFormatter Case: validateTime" duration="1"/>
102
+ </file>
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="3"/>
113
105
  </file>
114
106
  <file path="/builds/dti/design-system/sankhyacore/src/dataunit/test/DataUnit.spec.ts">
115
107
  <testCase name="DataUnit should return false when not waiting to reload" duration="3"/>
116
- <testCase name="DataUnit should set waitingToReload to true" duration="1"/>
117
- <testCase name="DataUnit should set waitingToReload to false" duration="0"/>
108
+ <testCase name="DataUnit should set waitingToReload to true" duration="0"/>
109
+ <testCase name="DataUnit should set waitingToReload to false" duration="1"/>
118
110
  <testCase name="DataUnit should dispatch SAVING_CANCELED action with correct fields and recordId" duration="2"/>
119
111
  </file>
112
+ <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="0"/>
115
+ <testCase name="DataUnitStorage get should return undefined if the DataUnit instance is not found in the DataUnitStorage" duration="1"/>
116
+ <testCase name="DataUnitStorage remove should remove the specified DataUnit instance from the DataUnitStorage" duration="1"/>
117
+ <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"/>
119
+ </file>
120
120
  <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="12"/>
122
- <testCase name="addIDInfo 2 - should add data-element-id with valid id &quot;brComSankhyaFinCadMovimentacaofinanceira_snkApplication&quot;" duration="1"/>
123
- <testCase name="addIDInfo 3 - should add data-element-id with valid id &quot;movFinanceira_br.com.sankhya.fin.cad.movimentacaoFinanceira&quot;" duration="70"/>
124
- <testCase name="addIDInfo 4 - should add data-element-id with valid id &quot;meuID2_snkApplication&quot;" duration="2"/>
125
- <testCase name="addIDInfo 5 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="1"/>
126
- <testCase name="addIDInfo 6 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="2"/>
127
- <testCase name="addIDInfo 7 - should add data-element-id with valid id &quot;componenteNameTest_snkApplication&quot;" duration="1"/>
121
+ <testCase name="addIDInfo 1 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="20"/>
122
+ <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"/>
125
+ <testCase name="addIDInfo 5 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="2"/>
126
+ <testCase name="addIDInfo 6 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="1"/>
127
+ <testCase name="addIDInfo 7 - should add data-element-id with valid id &quot;componenteNameTest_snkApplication&quot;" duration="2"/>
128
128
  <testCase name="addIDInfo 8 - should add data-element-id with valid id &quot;componentLabel_snkApplication&quot;" duration="1"/>
129
129
  <testCase name="addIDInfo 9 - should add data-element-id with valid id &quot;dataunitFinanceiro_br.com.sankhya.fin.cad.movimentacaoFinanceira&quot;" duration="1"/>
130
- <testCase name="addIDInfo 10 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIDTeste_br.com.sankhya.fin.cad.movimentacaoFinanceira&quot;" duration="2"/>
131
- <testCase name="addIDInfo 11 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira&quot;" duration="1"/>
132
- <testCase name="addIDInfo 12 - should add data-element-id with valid id &quot;dataunitFinanceiro_movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
133
- <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="2"/>
135
- <testCase name="addIDInfo 15 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_snkApplication&quot;" duration="1"/>
136
- <testCase name="addIDInfo 16 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_snkApplication&quot;" duration="1"/>
137
- <testCase name="addIDInfo 17 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
130
+ <testCase name="addIDInfo 10 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIDTeste_br.com.sankhya.fin.cad.movimentacaoFinanceira&quot;" duration="3"/>
131
+ <testCase name="addIDInfo 11 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira&quot;" duration="2"/>
132
+ <testCase name="addIDInfo 12 - should add data-element-id with valid id &quot;dataunitFinanceiro_movFinanceira_movimentacaoFinanceira&quot;" duration="62"/>
133
+ <testCase name="addIDInfo 13 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira&quot;" duration="2"/>
134
+ <testCase name="addIDInfo 14 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_movimentacaoFinanceira&quot;" duration="13"/>
135
+ <testCase name="addIDInfo 15 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_snkApplication&quot;" duration="23"/>
136
+ <testCase name="addIDInfo 16 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_snkApplication&quot;" duration="2"/>
137
+ <testCase name="addIDInfo 17 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="76"/>
138
138
  <testCase name="addIDInfo 18 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
139
139
  <testCase name="addIDInfo 19 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
140
- <testCase name="addIDInfo 20 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
140
+ <testCase name="addIDInfo 20 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="5"/>
141
141
  <testCase name="addIDInfo 21 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
142
- <testCase name="addIDInfo 22 - should add data-element-id with valid id &quot;bancoObrigatorio_movimentacaoFinanceira&quot;" duration="0"/>
142
+ <testCase name="addIDInfo 22 - should add data-element-id with valid id &quot;bancoObrigatorio_movimentacaoFinanceira&quot;" duration="1"/>
143
143
  </file>
144
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="72"/>
146
- <testCase name="calcMarginSize should calculate correctly the size of vertical margin" duration="3"/>
147
- <testCase name="calcMarginSize should threat values defined as zero" duration="5"/>
145
+ <testCase name="calcMarginSize should calculate correctly the size of horizontal margin" duration="18"/>
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="3"/>
148
148
  </file>
149
149
  <file path="/builds/dti/design-system/sankhyacore/test/dataunit/formatting/PrettyFormatter.spec.ts">
150
150
  <testCase name="getFormattedValue should return empty string when value is null" duration="6"/>
151
- <testCase name="getFormattedValue should return empty string when value is not an array" duration="0"/>
151
+ <testCase name="getFormattedValue should return empty string when value is not an array" duration="1"/>
152
152
  <testCase name="getFormattedValue should return empty string when value is an empty array" duration="0"/>
153
- <testCase name="getFormattedValue should return file name when value is an array with one file object" duration="0"/>
154
- <testCase name="getFormattedValue should return file count when value is an array with multiple file objects" duration="1"/>
153
+ <testCase name="getFormattedValue should return file name when value is an array with one file object" duration="1"/>
154
+ <testCase name="getFormattedValue should return file count when value is an array with multiple file objects" duration="0"/>
155
155
  <testCase name="getFormattedValue should return empty string for undefined file" duration="0"/>
156
- <testCase name="getFormattedValue should handle OBJECT type with value field" duration="1"/>
156
+ <testCase name="getFormattedValue should handle OBJECT type with value field" duration="0"/>
157
157
  <testCase name="getFormattedValue should return empty string when value is undefined" duration="0"/>
158
158
  <testCase name="getFormattedValue should return value as string when value is not an object" duration="1"/>
159
- <testCase name="getFormattedValue should return value.toString() when value is an object without value property" duration="0"/>
160
- <testCase name="getFormattedValue should handle BOOLEAN type" duration="1"/>
159
+ <testCase name="getFormattedValue should return value.toString() when value is an object without value property" duration="1"/>
160
+ <testCase name="getFormattedValue should handle BOOLEAN type" duration="0"/>
161
161
  <testCase name="getFormattedValue should format numbers correctly" duration="16"/>
162
- <testCase name="getFormattedValue should format dates correctly" duration="5"/>
163
- <testCase name="getFormattedValue should format times correctly" duration="1"/>
162
+ <testCase name="getFormattedValue should format dates correctly" duration="4"/>
163
+ <testCase name="getFormattedValue should format times correctly" duration="0"/>
164
164
  <testCase name="getFormattedValue should format datetime correctly" duration="1"/>
165
165
  <testCase name="getFormattedValue should call toString with correct parameters" duration="0"/>
166
166
  <testCase name="getFormattedValue should handle undefined descriptor gracefully" duration="1"/>
167
167
  <testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and matching option" duration="0"/>
168
- <testCase name="getFormattedValue should return value with OPTIONSELECTOR and no matching option" duration="1"/>
169
- <testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and value as object" duration="0"/>
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"/>
170
170
  <testCase name="getFormattedValue should return empty string with OPTIONSELECTOR and value as null" duration="0"/>
171
171
  <testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and options as JSON string" duration="0"/>
172
172
  <testCase name="getFormattedValue should return value with OPTIONSELECTOR and options as empty array" duration="1"/>
173
- <testCase name="getFormattedValue should format masked values correctly" duration="1"/>
173
+ <testCase name="getFormattedValue should format masked values correctly" duration="36"/>
174
174
  </file>
175
175
  </unitTest>
@@ -30,12 +30,12 @@ import SortingUtils from "../utils/SortingUtils.js";
30
30
  import ServiceCanceledException from "../exceptions/ServiceCanceledException.js";
31
31
  import SilentException from "../exceptions/SilentException.js";
32
32
 
33
- export const CHANGING_PAGE_LOADING_SOURCE = "CHANGING_PAGE_LOADING_SOURCE";
34
-
35
33
  /***
36
34
  * `DataUnit`: Atua como uma camada de abstração entre o back-end e a interface do usuário.
37
35
  */
38
36
  export default class DataUnit {
37
+
38
+ public static CHANGING_PAGE_LOADING_SOURCE = "CHANGING_PAGE_LOADING_SOURCE";
39
39
  public static ALL_RECORDS_SELECTION_SOURCE = "ALL_RECORDS_SELECTION_SOURCE";
40
40
  public static DEFAULT_DATAUNIT_NAME = "dataunit";
41
41
 
@@ -390,7 +390,7 @@ export default class DataUnit {
390
390
  limit: this._pageSize,
391
391
  offset: page * this._pageSize,
392
392
  keepSelection: true,
393
- source: CHANGING_PAGE_LOADING_SOURCE
393
+ source: DataUnit.CHANGING_PAGE_LOADING_SOURCE
394
394
  }, executionCtx);
395
395
  }
396
396
  }
@@ -1185,35 +1185,53 @@ export default class DataUnit {
1185
1185
  *
1186
1186
  * @param selection - IDs dos registros selecionados no snapshot atual
1187
1187
  * @param executionCtx - Contexto de execução da seleção dos registros do DataUnit.
1188
- *
1189
1188
  * @returns - Informações sobre a seleção.
1190
1189
  */
1191
1190
  public updatePageSelection(selection: Array<string>, executionCtx?: ExecutionContext): Promise<SelectionInfo|undefined>{
1192
-
1193
- if(!selection){
1194
- return Promise.resolve(this.getSelectionInfo());
1195
- }
1191
+ if(!selection) return Promise.resolve(this.getSelectionInfo());
1196
1192
 
1197
1193
  return new Promise(resolve => {
1198
- const newSelection: Set<string> = new Set(getSelection(this._stateManager));
1199
- const currentRecords = getCurrentRecords(this._stateManager) || new Map();
1200
- Array.from(currentRecords.keys()).forEach(
1201
- recordId => {
1202
- if(selection.includes(recordId)){
1203
- newSelection.add(recordId);
1204
- } else {
1205
- newSelection.delete(recordId);
1206
- }
1207
- }
1208
- );
1194
+ const newSelection: Set<string> = new Set(selection);
1209
1195
 
1210
1196
  this.dispatchAction(Action.SELECTION_CHANGED, { type: "id", selection: Array.from(newSelection) }, executionCtx)
1211
- .then(()=>{
1212
- resolve(this.getSelectionInfo())
1213
- });
1197
+ .then(()=> resolve(this.getSelectionInfo()));
1214
1198
  });
1215
1199
  }
1216
1200
 
1201
+
1202
+ private updatePageSelectionAll(addRecords: boolean): Promise<SelectionInfo|undefined>{
1203
+ return new Promise(resolve => {
1204
+ const newSelection: Set<string> = new Set<string>();
1205
+
1206
+ const cachedSelection = getSelection(this._stateManager);
1207
+ cachedSelection.forEach(item => newSelection.add(item));
1208
+
1209
+ const recordsIds = this.records.map(r => r.__record__id__);
1210
+ recordsIds.forEach(id => addRecords ? newSelection.add(id): newSelection.delete(id));
1211
+
1212
+ this.dispatchAction(Action.SELECTION_CHANGED, { type: "id", selection: Array.from(newSelection) })
1213
+ .then(()=> resolve(this.getSelectionInfo()));
1214
+ });
1215
+ }
1216
+
1217
+ /**
1218
+ * Seleciona todos os registros da página.
1219
+ *
1220
+ * @returns - Informações sobre a seleção.
1221
+ */
1222
+ public selectAllRecords(): Promise<SelectionInfo|undefined>{
1223
+ return this.updatePageSelectionAll(true);
1224
+ }
1225
+
1226
+ /**
1227
+ * Desseleciona todos os registros da página.
1228
+ *
1229
+ * @returns - Informações sobre a seleção.
1230
+ */
1231
+ public unSelectAllRecords(): Promise<SelectionInfo|undefined>{
1232
+ return this.updatePageSelectionAll(false);
1233
+ }
1234
+
1217
1235
  /**
1218
1236
  *
1219
1237
  * Obtém informações sobre a seleção atual.
package/src/index.ts CHANGED
@@ -9,7 +9,7 @@ import { HttpProvider } from "./http/HttpProvider.js";
9
9
  import { SkwHttpProvider } from "./http/SkwHttpProvider.js";
10
10
  import { RequestMetadata } from "./http/RequestMetadata.js";
11
11
  import { AuthorizedServiceCaller } from "./http/AuthorizedServiceCaller.js";
12
- import DataUnit, {SavedRecord, Record, Change, ChangeOperation, DUActionInterceptor, WaitingChange, PageRequest, QuickFilter, SelectionMode, SelectionInfo, DataUnitEventOptions, CHANGING_PAGE_LOADING_SOURCE} from "./dataunit/DataUnit.js";
12
+ import DataUnit, {SavedRecord, Record, Change, ChangeOperation, DUActionInterceptor, WaitingChange, PageRequest, QuickFilter, SelectionMode, SelectionInfo, DataUnitEventOptions} from "./dataunit/DataUnit.js";
13
13
  import { DataType } from "./dataunit/metadata/DataType.js";
14
14
  import { UnitMetadata, FieldDescriptor, UserInterface, Sort, SortMode, SortingProvider, Filter, DependencyType, ChildDescriptor, ChildLink } from "./dataunit/metadata/UnitMetadata.js";
15
15
  import { DataUnitAction, Action, ExecutionContext } from "./dataunit/state/action/DataUnitAction.js";
@@ -123,6 +123,5 @@ export {
123
123
  OVERFLOWED_CLASS_NAME,
124
124
  DataUnitEventOptions,
125
125
  ServiceCanceledException,
126
- SilentException,
127
- CHANGING_PAGE_LOADING_SOURCE
126
+ SilentException
128
127
  };
@@ -1,13 +0,0 @@
1
- [**@sankhyalabs/core**](../README.md) • **Docs**
2
-
3
- ***
4
-
5
- [@sankhyalabs/core](../globals.md) / CHANGING\_PAGE\_LOADING\_SOURCE
6
-
7
- # Variable: CHANGING\_PAGE\_LOADING\_SOURCE
8
-
9
- > `const` **CHANGING\_PAGE\_LOADING\_SOURCE**: `"CHANGING_PAGE_LOADING_SOURCE"` = `"CHANGING_PAGE_LOADING_SOURCE"`
10
-
11
- ## Source
12
-
13
- src/dataunit/DataUnit.ts:33