@@ -122,7 +122,7 @@ Expiration
122122 expect ( await screen . findByText ( 'Vote Requests' ) ) . toBeDefined ( ) ;
123123 } ) ;
124124
125- test ( 'see proper time format in popup' , { timeout : 10000 } , async ( ) => {
125+ test ( 'see proper time format in popup' , async ( ) => {
126126 const user = userEvent . setup ( ) ;
127127 render ( < AppWithConfig /> ) ;
128128
@@ -190,131 +190,119 @@ describe('An SetConfig request', () => {
190190 ) . toBe ( true ) ;
191191 } ) ;
192192
193- test (
194- 'displays a warning when an SV tries to modify a DsoRules field already changed by another request' ,
195- { timeout : 10000 } ,
196- async ( ) => {
197- const user = userEvent . setup ( ) ;
198- render ( < AppWithConfig /> ) ;
193+ test ( 'displays a warning when an SV tries to modify a DsoRules field already changed by another request' , async ( ) => {
194+ const user = userEvent . setup ( ) ;
195+ render ( < AppWithConfig /> ) ;
199196
200- expect ( await screen . findByText ( 'Governance' ) ) . toBeDefined ( ) ;
201- await user . click ( screen . getByText ( 'Governance' ) ) ;
197+ expect ( await screen . findByText ( 'Governance' ) ) . toBeDefined ( ) ;
198+ await user . click ( screen . getByText ( 'Governance' ) ) ;
202199
203- expect ( await screen . findByText ( 'Vote Requests' ) ) . toBeDefined ( ) ;
204- expect ( await screen . findByText ( 'Governance' ) ) . toBeDefined ( ) ;
200+ expect ( await screen . findByText ( 'Vote Requests' ) ) . toBeDefined ( ) ;
201+ expect ( await screen . findByText ( 'Governance' ) ) . toBeDefined ( ) ;
205202
206- changeAction ( 'SRARC_SetConfig' ) ;
203+ changeAction ( 'SRARC_SetConfig' ) ;
207204
208- const input = screen . getByTestId (
209- 'decentralizedSynchronizer.synchronizers.0.1.acsCommitmentReconciliationInterval-value'
210- ) ;
211- await user . clear ( input ) ;
212- await user . type ( input , '481516' ) ;
213- expect ( await screen . findByDisplayValue ( '481516' ) ) . toBeDefined ( ) ;
205+ const input = screen . getByTestId (
206+ 'decentralizedSynchronizer.synchronizers.0.1.acsCommitmentReconciliationInterval-value'
207+ ) ;
208+ await user . clear ( input ) ;
209+ await user . type ( input , '481516' ) ;
210+ expect ( await screen . findByDisplayValue ( '481516' ) ) . toBeDefined ( ) ;
214211
215- const summaryInput = screen . getByTestId ( 'create-reason-summary' ) ;
216- await user . type ( summaryInput , 'summaryABC' ) ;
217- expect ( await screen . findByDisplayValue ( 'summaryABC' ) ) . toBeDefined ( ) ;
212+ const summaryInput = screen . getByTestId ( 'create-reason-summary' ) ;
213+ await user . type ( summaryInput , 'summaryABC' ) ;
214+ expect ( await screen . findByDisplayValue ( 'summaryABC' ) ) . toBeDefined ( ) ;
218215
219- const urlInput = screen . getByTestId ( 'create-reason-url' ) ;
220- await user . type ( urlInput , 'https://vote-request.url' ) ;
216+ const urlInput = screen . getByTestId ( 'create-reason-url' ) ;
217+ await user . type ( urlInput , 'https://vote-request.url' ) ;
221218
222- const warning = screen . getByTestId ( 'voterequest-creation-alert' ) ;
223- expect ( warning ) . toBeDefined ( ) ;
224- expect ( warning . textContent ) . toContain (
225- 'A Vote Request aiming to change similar fields already exists. ' +
226- 'You are therefore not allowed to modify the fields: decentralizedSynchronizer.synchronizers.acsCommitmentReconciliationInterval'
227- ) ;
219+ const warning = screen . getByTestId ( 'voterequest-creation-alert' ) ;
220+ expect ( warning ) . toBeDefined ( ) ;
221+ expect ( warning . textContent ) . toContain (
222+ 'A Vote Request aiming to change similar fields already exists. ' +
223+ 'You are therefore not allowed to modify the fields: decentralizedSynchronizer.synchronizers.acsCommitmentReconciliationInterval'
224+ ) ;
228225
229- const button = screen . getByRole ( 'button' , { name : 'Send Request to Super Validators' } ) ;
230- expect ( button . getAttribute ( 'disabled' ) ) . toBeDefined ( ) ;
231- }
232- ) ;
226+ const button = screen . getByRole ( 'button' , { name : 'Send Request to Super Validators' } ) ;
227+ expect ( button . getAttribute ( 'disabled' ) ) . toBeDefined ( ) ;
228+ } ) ;
233229
234- test (
235- 'displays a warning when an SV tries to modify an AmuletRules field already changed by another request' ,
236- { timeout : 10000 } ,
237- async ( ) => {
238- const user = userEvent . setup ( ) ;
239- render ( < AppWithConfig /> ) ;
230+ test ( 'displays a warning when an SV tries to modify an AmuletRules field already changed by another request' , async ( ) => {
231+ const user = userEvent . setup ( ) ;
232+ render ( < AppWithConfig /> ) ;
240233
241- expect ( await screen . findByText ( 'Governance' ) ) . toBeDefined ( ) ;
242- await user . click ( screen . getByText ( 'Governance' ) ) ;
234+ expect ( await screen . findByText ( 'Governance' ) ) . toBeDefined ( ) ;
235+ await user . click ( screen . getByText ( 'Governance' ) ) ;
243236
244- expect ( await screen . findByText ( 'Vote Requests' ) ) . toBeDefined ( ) ;
237+ expect ( await screen . findByText ( 'Vote Requests' ) ) . toBeDefined ( ) ;
245238
246- changeAction ( 'CRARC_SetConfig' ) ;
239+ changeAction ( 'CRARC_SetConfig' ) ;
247240
248- const input = screen . getByTestId ( 'transferConfig.createFee.fee-value' ) ;
249- await user . clear ( input ) ;
250- await user . type ( input , '481516' ) ;
251- expect ( await screen . findByDisplayValue ( '481516' ) ) . toBeDefined ( ) ;
241+ const input = screen . getByTestId ( 'transferConfig.createFee.fee-value' ) ;
242+ await user . clear ( input ) ;
243+ await user . type ( input , '481516' ) ;
244+ expect ( await screen . findByDisplayValue ( '481516' ) ) . toBeDefined ( ) ;
252245
253- const input2 = screen . getByTestId ( 'create-reason-summary' ) ;
254- await user . type ( input2 , 'summaryABC' ) ;
255- expect ( await screen . findByDisplayValue ( 'summaryABC' ) ) . toBeDefined ( ) ;
246+ const input2 = screen . getByTestId ( 'create-reason-summary' ) ;
247+ await user . type ( input2 , 'summaryABC' ) ;
248+ expect ( await screen . findByDisplayValue ( 'summaryABC' ) ) . toBeDefined ( ) ;
256249
257- const urlInput = screen . getByTestId ( 'create-reason-url' ) ;
258- await user . type ( urlInput , 'https://vote-request.url' ) ;
250+ const urlInput = screen . getByTestId ( 'create-reason-url' ) ;
251+ await user . type ( urlInput , 'https://vote-request.url' ) ;
259252
260- const warning = screen . getByTestId ( 'voterequest-creation-alert' ) ;
261- expect ( warning ) . toBeDefined ( ) ;
262- expect ( warning . textContent ) . toContain (
263- 'A Vote Request aiming to change similar fields already exists. ' +
264- 'You are therefore not allowed to modify the fields: transferConfig.createFee.fee'
265- ) ;
266- const button = screen . getByTestId ( 'create-voterequest-submit-button' ) ;
267- expect ( button . getAttribute ( 'disabled' ) ) . toBeDefined ( ) ;
268- }
269- ) ;
253+ const warning = screen . getByTestId ( 'voterequest-creation-alert' ) ;
254+ expect ( warning ) . toBeDefined ( ) ;
255+ expect ( warning . textContent ) . toContain (
256+ 'A Vote Request aiming to change similar fields already exists. ' +
257+ 'You are therefore not allowed to modify the fields: transferConfig.createFee.fee'
258+ ) ;
259+ const button = screen . getByTestId ( 'create-voterequest-submit-button' ) ;
260+ expect ( button . getAttribute ( 'disabled' ) ) . toBeDefined ( ) ;
261+ } ) ;
270262
271- test (
272- 'disables the Proceed button in the confirmation dialog if a conflict arises after request creation' ,
273- { timeout : 10000 } ,
274- async ( ) => {
275- server . use (
276- rest . get ( `${ svUrl } /v0/admin/sv/voterequests` , ( _ , res , ctx ) => {
277- return res ( ctx . json < ListDsoRulesVoteRequestsResponse > ( { dso_rules_vote_requests : [ ] } ) ) ;
278- } )
279- ) ;
263+ test ( 'disables the Proceed button in the confirmation dialog if a conflict arises after request creation' , async ( ) => {
264+ server . use (
265+ rest . get ( `${ svUrl } /v0/admin/sv/voterequests` , ( _ , res , ctx ) => {
266+ return res ( ctx . json < ListDsoRulesVoteRequestsResponse > ( { dso_rules_vote_requests : [ ] } ) ) ;
267+ } )
268+ ) ;
280269
281- const user = userEvent . setup ( ) ;
282- render ( < AppWithConfig /> ) ;
270+ const user = userEvent . setup ( ) ;
271+ render ( < AppWithConfig /> ) ;
283272
284- expect ( await screen . findByText ( 'Governance' ) ) . toBeDefined ( ) ;
285- await user . click ( screen . getByText ( 'Governance' ) ) ;
273+ expect ( await screen . findByText ( 'Governance' ) ) . toBeDefined ( ) ;
274+ await user . click ( screen . getByText ( 'Governance' ) ) ;
286275
287- expect ( await screen . findByText ( 'Vote Requests' ) ) . toBeDefined ( ) ;
288- expect ( await screen . findByText ( 'Governance' ) ) . toBeDefined ( ) ;
276+ expect ( await screen . findByText ( 'Vote Requests' ) ) . toBeDefined ( ) ;
277+ expect ( await screen . findByText ( 'Governance' ) ) . toBeDefined ( ) ;
289278
290- changeAction ( 'CRARC_SetConfig' ) ;
279+ changeAction ( 'CRARC_SetConfig' ) ;
291280
292- const input = screen . getByTestId ( 'transferConfig.createFee.fee-value' ) ;
293- await user . clear ( input ) ;
294- await user . type ( input , '481516' ) ;
295- expect ( await screen . findByDisplayValue ( '481516' ) ) . toBeDefined ( ) ;
281+ const input = screen . getByTestId ( 'transferConfig.createFee.fee-value' ) ;
282+ await user . clear ( input ) ;
283+ await user . type ( input , '481516' ) ;
284+ expect ( await screen . findByDisplayValue ( '481516' ) ) . toBeDefined ( ) ;
296285
297- const input2 = screen . getByTestId ( 'create-reason-summary' ) ;
298- await user . type ( input2 , 'summaryABC' ) ;
299- expect ( await screen . findByDisplayValue ( 'summaryABC' ) ) . toBeDefined ( ) ;
286+ const input2 = screen . getByTestId ( 'create-reason-summary' ) ;
287+ await user . type ( input2 , 'summaryABC' ) ;
288+ expect ( await screen . findByDisplayValue ( 'summaryABC' ) ) . toBeDefined ( ) ;
300289
301- const urlInput = screen . getByTestId ( 'create-reason-url' ) ;
302- await user . type ( urlInput , 'https://vote-request.url' ) ;
303- expect ( await screen . findByDisplayValue ( 'https://vote-request.url' ) ) . toBeDefined ( ) ;
290+ const urlInput = screen . getByTestId ( 'create-reason-url' ) ;
291+ await user . type ( urlInput , 'https://vote-request.url' ) ;
292+ expect ( await screen . findByDisplayValue ( 'https://vote-request.url' ) ) . toBeDefined ( ) ;
304293
305- expect ( await screen . findByText ( 'Send Request to Super Validators' ) ) . toBeDefined ( ) ;
306- await user . click ( screen . getByText ( 'Send Request to Super Validators' ) ) ;
294+ expect ( await screen . findByText ( 'Send Request to Super Validators' ) ) . toBeDefined ( ) ;
295+ await user . click ( screen . getByText ( 'Send Request to Super Validators' ) ) ;
307296
308- server . use (
309- rest . get ( `${ svUrl } /v0/admin/sv/voterequests` , ( _ , res , ctx ) => {
310- return res ( ctx . json < ListDsoRulesVoteRequestsResponse > ( voteRequests ) ) ;
311- } )
312- ) ;
297+ server . use (
298+ rest . get ( `${ svUrl } /v0/admin/sv/voterequests` , ( _ , res , ctx ) => {
299+ return res ( ctx . json < ListDsoRulesVoteRequestsResponse > ( voteRequests ) ) ;
300+ } )
301+ ) ;
313302
314- const button = screen . getByRole ( 'button' , { name : 'Proceed' } ) ;
315- expect ( button . getAttribute ( 'disabled' ) ) . toBeDefined ( ) ;
316- }
317- ) ;
303+ const button = screen . getByRole ( 'button' , { name : 'Proceed' } ) ;
304+ expect ( button . getAttribute ( 'disabled' ) ) . toBeDefined ( ) ;
305+ } ) ;
318306} ) ;
319307
320308describe ( 'An AddFutureAmuletConfigSchedule request' , ( ) => {
0 commit comments