@@ -51,8 +51,8 @@ describe('BLOCK PRODUCTION WON SLOTS TABLE', () => {
51
51
. then ( getBPWonSlots )
52
52
. then ( ( state : BlockProductionWonSlotsState ) => {
53
53
if ( condition ( state ) ) {
54
- cy . get ( 'mina-toolbar span' )
55
- . then ( ( span : any ) => expect ( span ) . contain ( 'Block Production ' ) ) ;
54
+ cy . get ( 'mina-toolbar span.title ' )
55
+ . then ( ( span : any ) => expect ( span . text ( ) ) . contain ( 'block production ' ) ) ;
56
56
}
57
57
} ) ;
58
58
} ) ) ;
@@ -83,92 +83,141 @@ describe('BLOCK PRODUCTION WON SLOTS TABLE', () => {
83
83
} ) ) ;
84
84
85
85
it ( 'sort by name' , ( ) => execute ( ( ) => {
86
- cy . get ( 'mina-block-production-won-slots-table .head > span:nth-child(1)' )
87
- . click ( )
88
- . window ( )
86
+ cy . window ( )
89
87
. its ( 'store' )
90
88
. then ( getBPWonSlots )
91
89
. then ( ( state : BlockProductionWonSlotsState ) => {
92
90
if ( condition ( state ) ) {
93
- checkSorting ( state . filteredSlots , 'message' , Sort . DSC ) ;
91
+ cy . get ( 'mina-block-production-won-slots-table .head > span:nth-child(1)' )
92
+ . click ( )
93
+ . window ( )
94
+ . its ( 'store' )
95
+ . then ( getBPWonSlots )
96
+ . then ( ( state2 : BlockProductionWonSlotsState ) => {
97
+ if ( condition ( state2 ) ) {
98
+ checkSorting ( state2 . filteredSlots , 'message' , Sort . DSC ) ;
99
+ }
100
+ } ) ;
94
101
}
95
102
} ) ;
96
103
} ) ) ;
97
104
98
105
it ( 'sort by height' , ( ) => execute ( ( ) => {
99
- cy . get ( 'mina-block-production-won-slots-table .head > span:nth-child(3)' )
100
- . click ( )
101
- . window ( )
106
+ cy . window ( )
102
107
. its ( 'store' )
103
108
. then ( getBPWonSlots )
104
109
. then ( ( state : BlockProductionWonSlotsState ) => {
105
110
if ( condition ( state ) ) {
106
- checkSorting ( state . filteredSlots , 'height' , Sort . ASC ) ;
111
+ cy . get ( 'mina-block-production-won-slots-table .head > span:nth-child(3)' )
112
+ . click ( )
113
+ . window ( )
114
+ . its ( 'store' )
115
+ . then ( getBPWonSlots )
116
+ . then ( ( state : BlockProductionWonSlotsState ) => {
117
+ if ( condition ( state ) ) {
118
+ checkSorting ( state . filteredSlots , 'height' , Sort . ASC ) ;
119
+ }
120
+ } ) ;
107
121
}
108
122
} ) ;
109
123
} ) ) ;
110
124
111
125
it ( 'sort by global slot' , ( ) => execute ( ( ) => {
112
- cy . get ( 'mina-block-production-won-slots-table .head > span:nth-child(4)' )
113
- . click ( )
114
- . window ( )
126
+ cy . window ( )
115
127
. its ( 'store' )
116
128
. then ( getBPWonSlots )
117
129
. then ( ( state : BlockProductionWonSlotsState ) => {
118
130
if ( condition ( state ) ) {
119
- checkSorting ( state . filteredSlots , 'globalSlot' , Sort . ASC ) ;
131
+ cy . get ( 'mina-block-production-won-slots-table .head > span:nth-child(4)' )
132
+ . click ( )
133
+ . window ( )
134
+ . its ( 'store' )
135
+ . then ( getBPWonSlots )
136
+ . then ( ( state : BlockProductionWonSlotsState ) => {
137
+ if ( condition ( state ) ) {
138
+ checkSorting ( state . filteredSlots , 'globalSlot' , Sort . ASC ) ;
139
+ }
140
+ } ) ;
120
141
}
121
142
} ) ;
122
143
} ) ) ;
123
144
124
145
it ( 'sort by transactions' , ( ) => execute ( ( ) => {
125
- cy . get ( 'mina-block-production-won-slots-table .head > span:nth-child(6)' )
126
- . click ( )
127
- . window ( )
146
+ cy . window ( )
128
147
. its ( 'store' )
129
148
. then ( getBPWonSlots )
130
149
. then ( ( state : BlockProductionWonSlotsState ) => {
131
150
if ( condition ( state ) ) {
132
- checkSorting ( state . filteredSlots , 'transactionsTotal' , Sort . ASC ) ;
151
+ cy . get ( 'mina-block-production-won-slots-table .head > span:nth-child(6)' )
152
+ . click ( )
153
+ . window ( )
154
+ . its ( 'store' )
155
+ . then ( getBPWonSlots )
156
+ . then ( ( state : BlockProductionWonSlotsState ) => {
157
+ if ( condition ( state ) ) {
158
+ checkSorting ( state . filteredSlots , 'transactionsTotal' , Sort . ASC ) ;
159
+ }
160
+ } ) ;
133
161
}
134
162
} ) ;
135
163
} ) ) ;
136
164
137
165
it ( 'sort by snark fees' , ( ) => execute ( ( ) => {
138
- cy . get ( 'mina-block-production-won-slots-table .head > span:nth-child(8)' )
139
- . click ( )
140
- . window ( )
166
+ cy . window ( )
141
167
. its ( 'store' )
142
168
. then ( getBPWonSlots )
143
169
. then ( ( state : BlockProductionWonSlotsState ) => {
144
170
if ( condition ( state ) ) {
145
- checkSorting ( state . filteredSlots , 'snarkFees' , Sort . ASC ) ;
171
+ cy . get ( 'mina-block-production-won-slots-table .head > span:nth-child(8)' )
172
+ . click ( )
173
+ . window ( )
174
+ . its ( 'store' )
175
+ . then ( getBPWonSlots )
176
+ . then ( ( state : BlockProductionWonSlotsState ) => {
177
+ if ( condition ( state ) ) {
178
+ checkSorting ( state . filteredSlots , 'snarkFees' , Sort . ASC ) ;
179
+ }
180
+ } ) ;
146
181
}
147
182
} ) ;
148
183
} ) ) ;
149
184
150
185
it ( 'sort by snark coinbase rewards' , ( ) => execute ( ( ) => {
151
- cy . get ( 'mina-block-production-won-slots-table .head > span:nth-child(9)' )
152
- . click ( )
153
- . window ( )
186
+ cy . window ( )
154
187
. its ( 'store' )
155
188
. then ( getBPWonSlots )
156
189
. then ( ( state : BlockProductionWonSlotsState ) => {
157
190
if ( condition ( state ) ) {
158
- checkSorting ( state . filteredSlots , 'coinbaseRewards' , Sort . ASC ) ;
191
+ cy . get ( 'mina-block-production-won-slots-table .head > span:nth-child(9)' )
192
+ . click ( )
193
+ . window ( )
194
+ . its ( 'store' )
195
+ . then ( getBPWonSlots )
196
+ . then ( ( state : BlockProductionWonSlotsState ) => {
197
+ if ( condition ( state ) ) {
198
+ checkSorting ( state . filteredSlots , 'coinbaseRewards' , Sort . ASC ) ;
199
+ }
200
+ } ) ;
159
201
}
160
202
} ) ;
161
203
} ) ) ;
162
204
163
205
it ( 'sort by snark tx fees rewards' , ( ) => execute ( ( ) => {
164
- cy . get ( 'mina-block-production-won-slots-table .head > span:nth-child(10)' )
165
- . click ( )
166
- . window ( )
206
+ cy . window ( )
167
207
. its ( 'store' )
168
208
. then ( getBPWonSlots )
169
209
. then ( ( state : BlockProductionWonSlotsState ) => {
170
210
if ( condition ( state ) ) {
171
- checkSorting ( state . filteredSlots , 'txFeesRewards' , Sort . ASC ) ;
211
+ cy . get ( 'mina-block-production-won-slots-table .head > span:nth-child(10)' )
212
+ . click ( )
213
+ . window ( )
214
+ . its ( 'store' )
215
+ . then ( getBPWonSlots )
216
+ . then ( ( state : BlockProductionWonSlotsState ) => {
217
+ if ( condition ( state ) ) {
218
+ checkSorting ( state . filteredSlots , 'txFeesRewards' , Sort . ASC ) ;
219
+ }
220
+ } ) ;
172
221
}
173
222
} ) ;
174
223
} ) ) ;
0 commit comments