playtender_tender.robot
84.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
*** Settings ***
Resource playtender_common.robot
Resource playtender_variables.robot
Resource playtender_question.robot
Resource playtender_claim.robot
Resource playtender_bid.robot
Resource playtender_viewer.robot
*** Keywords ***
open new tender form
[Documentation] відкриття сторінки створення тендеру
open page and wait element by locator ${broker_baseurl}/tender/create ${tender_form_locator}
update tender queue
[Documentation] запускає оновлення тендерів з ЦБД і додає їх в чергу, тобто синхронізація може відбутися не відразу
... поточна сторіка повертається
${current_url} = get location
go to ${broker_baseurl}/utils/queue-tender-update
go to ${current_url}
open tender form by uaid
[Arguments] ${tender_uaid}
[Documentation] відкриття сторінки редагування плану
open tender page by uaid ${tender_uaid}
click visible element and wait until page contains element ${tender_edit_btn_locator} ${tender_form_locator}
open tender page by uaid
[Arguments] ${uaid}
[Documentation] відкриває сторінку з тендером
Run Keyword And Return If "Можливість знайти звіт про укладений договір по ідентифікатору" in "${TEST_NAME}" Reload Page
open site page and wait content element ${broker_baseurl}/tender/${uaid}
${is_tender_found} = get is element exist ${tender_view_checker_element_locator}
return from keyword if ${is_tender_found} == ${True}
${is_tender_not_found} = get is 404 page
${is_needed_to_update_and_wait_sync} = set variable if ${is_test_role_owner} == ${False} and ${is_tender_not_found} ${True} ${False}
run keyword if ${is_needed_to_update_and_wait_sync} update tender queue
run keyword if ${is_needed_to_update_and_wait_sync} wait until 404 page disappears
${is_tender_found} = get is element exist ${tender_view_checker_element_locator}
run keyword if ${is_tender_found} == ${False} fail Opening tender page by uaid fails.
fill tender form
[Arguments] ${data}
[Documentation] заповнення форми з масива даних
fill tender general info ${data}
${features} = get from dictionary by keys ${data} features
run keyword if condition is not none ${features} fill tender form features ${features} ${tender_form_general_panel_add_feature_btn_locator}
${items} = get from dictionary by keys ${data} items
run keyword if condition is not none ${items} fill tender form items ${items}
${milestones} = get from dictionary by keys ${data} milestones
run keyword and ignore error run keyword if condition is not none ${milestones} fill tender form milestones ${milestones}
${lots} = get from dictionary by keys ${data} lots
run keyword if condition is not none ${lots} fill tender form lots ${lots}
${supplier_data} = op_robot_tests.tests_files.service_keywords . Test Supplier Data
##### BOF - TMP for negotiation milestone 1 lot#####
run keyword if '${mode}' in 'reporting negotiation' Set Global Variable ${rep_val} ${data.value.amount}
##### EOF - TMP #####
run keyword if '${mode}' in 'negotiation reporting' fill tender from award reporting ${data.value.amount} ${supplier_data.data.suppliers[0]}
Run Keyword And Ignore Error fill tender required documents
${procurement_method_type} = get from dictionary by keys ${data} procurementMethodType
Run Keyword And Ignore Error run keyword if '${mode}' in 'openeu open_esco open_framework' or ('${mode}' == 'open_competitive_dialogue' and '${procurement_method_type}' == 'competitiveDialogueEU') fill tender contact person ${data}
# Run Keyword And Ignore Error Execute Javascript $('a.btn.btn-default.btn-update.js-form-popup-add').click()
fill tender form 2 stage
[Arguments] ${data}
[Documentation] заповнення форми з масива даних
fill tender general info 2 stage ${data}
${features} = get from dictionary by keys ${data} features
run keyword if condition is not none ${features} fill tender form features ${features} ${tender_form_general_panel_add_feature_btn_locator}
${items} = get from dictionary by keys ${data} items
# run keyword if condition is not none ${items} fill tender form items ${items}
run keyword if condition is not none ${items} fill tender form ${items}
${milestones} = get from dictionary by keys ${data} milestones
run keyword and ignore error run keyword if condition is not none ${milestones} fill tender form milestones ${milestones}
${lots} = get from dictionary by keys ${data} lots
run keyword if condition is not none ${lots} fill tender form lots 2 stage ${lots}
${supplier_data} = op_robot_tests.tests_files.service_keywords . Test Supplier Data
run keyword if '${mode}' in 'negotiation reporting' fill tender from award reporting ${data.value.amount} ${supplier_data.data.suppliers[0]}
Run Keyword And Ignore Error fill tender required documents
fill tender general info
[Arguments] ${data}
[Documentation] обирає потрібний тип закупівлі, чекає оновлення форми, вказує мультилотовість, заповнює
... приховані поля + відкриває попап основних даних, заповнює його і закриває
Execute Javascript $(window).scrollTop(0)
wait until page does not contain element ${tender_load_form_after_mode_locator}
wait until page contains element ${tender_form_procurement_method_type_input_locator}
capture page screenshot
${procurement_method_type} = get from dictionary by keys ${data} procurementMethodType
capture page screenshot
run keyword if condition is not none ${procurement_method_type} select from list by value ${tender_form_procurement_method_type_input_locator} ${procurement_method_type}
wait until page does not contain element ${tender_load_form_after_mode_locator}
capture page screenshot
${lots} = get from dictionary by keys ${data} lots
run keyword if condition is not none ${lots} Run Keyword And Ignore Error Execute Javascript $('[id$="form-is_multilot"]').click()
wait until page does not contain element ${tender_load_form_after_mode_locator} 20
capture page screenshot
open popup by btn locator ${plan_form_general_panel_edit_btn_locator}
${plan_path} = Get Variable Value ${ARTIFACT_FILE} artifact_plan.yaml
${closeFrameworkAgreementSelectionUA_path} = Get Variable Value ${ARTIFACT_FILE} artifact.yaml
${ARTIFACT} = load_data_from ${plan_path}
run keyword and ignore error run keyword if condition is not none ${ARTIFACT.tender_uaid} input text to visible input ${tender_form_general_tender_plan_id_locator} ${ARTIFACT.tender_uaid}
${ARTIFACT2} = load_data_from ${closeFrameworkAgreementSelectionUA_path}
run keyword and ignore error run keyword if condition is not none ${ARTIFACT.tender_uaid} input text to visible input ${tender_form_general_agreementid_input_locator} ${ARTIFACT2.tender_uaid}
${title} = get from dictionary by keys ${data} title
run keyword if condition is not none ${title} input text to visible input ${tender_form_general_tender_title_locator} ${title}
${title_en} = get from dictionary by keys ${data} title_en
run keyword if condition is not none ${title} input text to exist visible input ${tender_form_general_tender_title_en_locator} ${title_en}
${description} = get from dictionary by keys ${data} description
run keyword if condition is not none ${title} input text to visible input ${tender_form_general_tender_description_locator} ${description}
${description_en} = get from dictionary by keys ${data} description_en
run keyword if condition is not none ${title} input text to exist visible input ${tender_form_general_tender_description_en_locator} ${description_en}
${funders} = get from dictionary by keys ${data} funders
run keyword if condition is not none ${funders} Click Element ${tender_form_general_tender_funder_locator}
run keyword if condition is not none ${funders} fill tender form funders ${funders}
${amount} = get from dictionary by keys ${data} value amount
run keyword and ignore error run keyword if condition is not none ${amount} run keyword and ignore error input number to exist visible input ${tender_form_general_value_amount_input_locator} ${amount}
${currency} = get from dictionary by keys ${data} value currency
run keyword if condition is not none ${currency} select from visible list by value ${tender_form_general_value_currency_input_locator} ${currency}
${value_added_tax_included} = get from dictionary by keys ${data} value valueAddedTaxIncluded
run keyword if condition is not none ${value_added_tax_included} run keyword if ${value_added_tax_included} Execute Javascript $('[id$="form-value_added_tax_included"]').click()
##run keyword and ignore error
##click element ${tender_form_general_value_added_tax_input_locator}
Execute Javascript $('[id$="form-test_mode"]').click()
${min_step_amount} = get from dictionary by keys ${data} minimalStep amount
run keyword if condition is not none ${min_step_amount} input number to exist visible input ${tender_form_general_minimalStep_amount_input_locator} ${min_step_amount}
${main_procurement_category} = get from dictionary by keys ${data} mainProcurementCategory
run keyword if condition is not none ${main_procurement_category} select from visible list by value ${tender_form_general_main_procurement_category_input_locator} ${main_procurement_category}
${tender_enquiry_period_start_date} = get from dictionary by keys ${data} enquiryPeriod startDate
# run keyword if condition is not none ${tender_enquiry_period_start_date} select from visible list by year of date ${tender_enquiry_period_start_date_input_locator} ${tender_enquiry_period_start_date}
run keyword and ignore error run keyword if condition is not none ${tender_enquiry_period_start_date} input datetime to visible input ${tender_enquiry_period_start_date_input_locator} ${tender_enquiry_period_start_date}
${tender_enquiry_period_end_date} = get from dictionary by keys ${data} enquiryPeriod endDate
# run keyword if condition is not none ${tender_enquiry_period_start_date} select from visible list by year of date ${tender_enquiry_period_start_date_input_locator} ${tender_enquiry_period_start_date}
run keyword if condition is not none ${tender_enquiry_period_end_date} input datetime to visible input ${tender_enquiry_period_end_date_input_locator} ${tender_enquiry_period_end_date}
${tender_start_date} = get from dictionary by keys ${data} tenderPeriod startDate
run keyword if condition is not none ${tender_start_date} run keyword and ignore error input datetime to visible input ${tender_tender_period_start_date_input_locator} ${tender_start_date}
${tender_end_date} = get from dictionary by keys ${data} tenderPeriod endDate
run keyword if condition is not none ${tender_end_date} input datetime to visible input ${tender_tender_period_end_date_input_locator} ${tender_end_date}
# run keyword and ignore error click element ${tender_tender_quick_mode_locator}
run keyword and ignore error Execute Javascript $('[id$="form-quick_mode"]').click()
run keyword and ignore error Execute Javascript $('[id$="form-auction_skip_mode"]').click()
${classification} = get from dictionary by keys ${data} classification
run keyword if condition is not none ${classification} select classification by code attributes ${plan_form_classification_edit_btn_locator} ${classification}
${additional_classifications} = get from dictionary by keys ${data} additionalClassifications
run keyword if condition is not none ${additional_classifications} select classification by array of code attributes ${plan_form_additional_classification_edit_btn_locator} ${additional_classifications} ${None} ${kekv_schemes}
run keyword if condition is not none ${additional_classifications} select classification by array of code attributes ${plan_form_kekv_classification_edit_btn_locator} ${additional_classifications} ${kekv_schemes}
${funding_kind} = get from dictionary by keys ${data} fundingKind
run keyword if condition is not none ${funding_kind} select from visible list by value ${tender_form_general_funding_kind_input_locator} ${funding_kind}
#esco
${nbu_discount_rate} = get from dictionary by keys ${data} NBUdiscountRate
${nbu_discount_rate} = Run keyword If '${nbu_discount_rate}' != '${None}' set_value_minimalStepPercentage ${nbu_discount_rate}
${nbu_discount_rate} = Run keyword If '${nbu_discount_rate}' != '${None}' convert_esco__float_to_string ${nbu_discount_rate}
run keyword and ignore error run keyword if condition is not none ${nbu_discount_rate} input number to exist visible input ${tender_form_general_nbu_discount_rate_input_locator} ${nbu_discount_rate}
#esco
${yearly_payments_percentage_range} = get from dictionary by keys ${data} yearlyPaymentsPercentageRange
${yearly_payments_percentage_range} = Run keyword If '${yearly_payments_percentage_range}' != '${None}' set_value_minimalStepPercentage ${yearly_payments_percentage_range}
${yearly_payments_percentage_range} = Run keyword If '${yearly_payments_percentage_range}' != '${None}' convert_esco__float_to_string ${yearly_payments_percentage_range}
run keyword if condition is not none ${yearly_payments_percentage_range} input number to exist visible input ${tender_form_general_yearly_payments_percentage_range_input_locator} ${yearly_payments_percentage_range}
${minimal_step_percentage} = get from dictionary by keys ${data} minimalStepPercentage
${minimal_step_percentage} = Run keyword If '${minimal_step_percentage}' != '${None}' set_value_minimalStepPercentage ${minimal_step_percentage}
${minimal_step_percentage} = Run keyword If '${minimal_step_percentage}' != '${None}' convert_esco__float_to_string ${minimal_step_percentage}
run keyword if condition is not none ${minimal_step_percentage} input number to exist visible input ${tender_form_general_minimal_step_percentage_input_locator} ${minimal_step_percentage}
#closeframework
${max_awards_count} = get from dictionary by keys ${data} maxAwardsCount
run keyword if condition is not none ${max_awards_count} input text to exist visible input ${tender_form_general_max_awards_count_input_locator} ${max_awards_count}
${agreement_duration_years} = get from dictionary by keys ${data} agreementDuration
${agreement_duration_years1}= Run keyword If '${agreement_duration_years}' != '${None}' split_agreementDuration ${agreement_duration_years} year
run keyword if condition is not none ${agreement_duration_years} select from visible list by value ${tender_form_general_agreement_duration_years_input_locator} ${agreement_duration_years1}
${agreement_duration_months} = get from dictionary by keys ${data} agreementDuration
${agreement_duration_months1}= Run keyword If '${agreement_duration_months}' != '${None}' split_agreementDuration ${agreement_duration_months} month
run keyword if condition is not none ${agreement_duration_months} select from visible list by value ${tender_form_general_agreement_duration_months_input_locator} ${agreement_duration_months1}
${agreement_duration_days} = get from dictionary by keys ${data} agreementDuration
${agreement_duration_days1}= Run keyword If '${agreement_duration_days}' != '${None}' split_agreementDuration ${agreement_duration_years} day
run keyword if condition is not none ${agreement_duration_days} select from visible list by value ${tender_form_general_agreement_duration_days_input_locator} ${agreement_duration_days1}
#closeFrameworkAgreementSelectionUA
${max_awards_count} = get from dictionary by keys ${data} maxAwardsCount
run keyword if condition is not none ${max_awards_count} input text to exist visible input ${tender_form_general_max_awards_count_input_locator} ${max_awards_count}
${agreement_duration_years} = get from dictionary by keys ${data} agreementDuration
${agreement_duration_years1}= Run keyword If '${agreement_duration_years}' != '${None}' split_agreementDuration ${agreement_duration_years} year
run keyword if condition is not none ${agreement_duration_years} select from visible list by value ${tender_form_general_agreement_duration_years_input_locator} ${agreement_duration_years1}
${agreement_duration_months} = get from dictionary by keys ${data} agreementDuration
${agreement_duration_months1}= Run keyword If '${agreement_duration_months}' != '${None}' split_agreementDuration ${agreement_duration_months} month
run keyword if condition is not none ${agreement_duration_months} select from visible list by value ${tender_form_general_agreement_duration_months_input_locator} ${agreement_duration_months1}
${agreement_duration_days} = get from dictionary by keys ${data} agreementDuration
${agreement_duration_days1}= Run keyword If '${agreement_duration_days}' != '${None}' split_agreementDuration ${agreement_duration_years} day
run keyword if condition is not none ${agreement_duration_days} select from visible list by value ${tender_form_general_agreement_duration_days_input_locator} ${agreement_duration_days1}
#negotiation
${cause} = get from dictionary by keys ${data} cause
run keyword if condition is not none ${cause} select from visible list by value ${tender_form_general_cause_input_locator} ${cause}
${cause_description} = get from dictionary by keys ${data} causeDescription
run keyword if condition is not none ${cause_description} input text to visible input ${tender_form_general_cause_description_input_locator} ${cause_description}
#complaints
Run Keyword If '${SUITE_NAME}' == 'Tests Files.Complaints' click visible element ${tender_form_auction_skip_mode_input_locator}
submit current visible popup
fill tender general info 2 stage
[Arguments] ${data}
[Documentation] обирає потрібний тип закупівлі, чекає оновлення форми, вказує мультилотовість, заповнює
... приховані поля + відкриває попап основних даних, заповнює його і закриває
Execute Javascript $(window).scrollTop(0)
wait until page does not contain element ${tender_load_form_after_mode_locator}
wait until page contains element ${tender_form_procurement_method_type_input_locator}
capture page screenshot
${procurement_method_type} = get from dictionary by keys ${data} procurementMethodType
capture page screenshot
run keyword if condition is not none ${procurement_method_type} select from list by value ${tender_form_procurement_method_type_input_locator} ${procurement_method_type}
wait until page does not contain element ${tender_load_form_after_mode_locator}
${lots} = get from dictionary by keys ${data} lots
run keyword if condition is not none ${lots} Run Keyword And Ignore Error Click Element ${tender_multilot_locator}
wait until page does not contain element ${tender_load_form_after_mode_locator} 20
open popup by btn locator ${plan_form_general_panel_edit_btn_locator}
${closeFrameworkAgreementSelectionUA_path} = Get Variable Value ${ARTIFACT_FILE} artifact.yaml
${ARTIFACT2} = load_data_from ${closeFrameworkAgreementSelectionUA_path}
run keyword and ignore error run keyword if condition is not none ${ARTIFACT.tender_uaid} input text to visible input ${tender_form_general_agreementid_input_locator} ${ARTIFACT2.tender_uaid}
${main_procurement_category} = get from dictionary by keys ${data} mainProcurementCategory
run keyword if condition is not none ${main_procurement_category} Execute Javascript $('[id$="form-main_procurement_category"]').val('${main_procurement_category}').change()
${title} = get from dictionary by keys ${data} title
run keyword if condition is not none ${title} input text to visible input ${tender_form_general_tender_title_locator} ${title}
${title_en} = get from dictionary by keys ${data} title_en
run keyword if condition is not none ${title} input text to exist visible input ${tender_form_general_tender_title_en_locator} ${title_en}
${description} = get from dictionary by keys ${data} description
run keyword if condition is not none ${title} input text to visible input ${tender_form_general_tender_description_locator} ${description}
${description_en} = get from dictionary by keys ${data} description_en
run keyword if condition is not none ${title} input text to exist visible input ${tender_form_general_tender_description_en_locator} ${description_en}
${amount} = get from dictionary by keys ${data} value amount
run keyword and ignore error run keyword if condition is not none ${amount} run keyword and ignore error input number to exist visible input ${tender_form_general_value_amount_input_locator} ${amount}
${currency} = get from dictionary by keys ${data} value currency
run keyword if condition is not none ${currency} select from visible list by value ${tender_form_general_value_currency_input_locator} ${currency}
${value_added_tax_included} = get from dictionary by keys ${data} value valueAddedTaxIncluded
run keyword if condition is not none ${value_added_tax_included} run keyword if ${value_added_tax_included} Click Element ${tender_form_general_value_added_tax_input_locator}
${min_step_amount} = get from dictionary by keys ${data} minimalStep amount
run keyword if condition is not none ${min_step_amount} input number to exist visible input ${tender_form_general_minimalStep_amount_input_locator} ${min_step_amount}
${tender_enquiry_period_start_date} = get from dictionary by keys ${data} enquiryPeriod startDate
# run keyword if condition is not none ${tender_enquiry_period_start_date} select from visible list by year of date ${tender_enquiry_period_start_date_input_locator} ${tender_enquiry_period_start_date}
run keyword if condition is not none ${tender_enquiry_period_start_date} input datetime to visible input ${tender_enquiry_period_start_date_input_locator} ${tender_enquiry_period_start_date}
${tender_enquiry_period_end_date} = get from dictionary by keys ${data} enquiryPeriod endDate
# run keyword if condition is not none ${tender_enquiry_period_start_date} select from visible list by year of date ${tender_enquiry_period_start_date_input_locator} ${tender_enquiry_period_start_date}
run keyword if condition is not none ${tender_enquiry_period_end_date} input datetime to visible input ${tender_enquiry_period_end_date_input_locator} ${tender_enquiry_period_end_date}
${tender_start_date} = get from dictionary by keys ${data} tenderPeriod startDate
run keyword if condition is not none ${tender_start_date} run keyword and ignore error input datetime to visible input ${tender_tender_period_start_date_input_locator} ${tender_start_date}
${tender_end_date} = get from dictionary by keys ${data} tenderPeriod endDate
run keyword if condition is not none ${tender_end_date} input datetime to visible input ${tender_tender_period_end_date_input_locator} ${tender_end_date}
${date_start} = Get Current Date increment=03:00:00
run keyword if condition is none ${tender_end_date} input datetime to visible input ${tender_tender_period_end_date_input_locator} ${date_start}
run keyword and ignore error click element ${tender_tender_quick_mode_locator}
run keyword and ignore error click element ${tender_tender_auction_skip_mode_locator}
${classification} = get from dictionary by keys ${data} classification
run keyword if condition is not none ${classification} select classification by code attributes ${plan_form_classification_edit_btn_locator} ${classification}
${additional_classifications} = get from dictionary by keys ${data} additionalClassifications
run keyword if condition is not none ${additional_classifications} select classification by array of code attributes ${plan_form_additional_classification_edit_btn_locator} ${additional_classifications} ${None} ${kekv_schemes}
run keyword if condition is not none ${additional_classifications} select classification by array of code attributes ${plan_form_kekv_classification_edit_btn_locator} ${additional_classifications} ${kekv_schemes}
${funding_kind} = get from dictionary by keys ${data} fundingKind
run keyword if condition is not none ${funding_kind} select from visible list by value ${tender_form_general_funding_kind_input_locator} ${funding_kind}
#closeframework
${max_awards_count} = get from dictionary by keys ${data} maxAwardsCount
run keyword if condition is not none ${max_awards_count} input text to exist visible input ${tender_form_general_max_awards_count_input_locator} ${max_awards_count}
${agreement_duration_years} = get from dictionary by keys ${data} agreementDuration
${agreement_duration_years1}= Run keyword If '${agreement_duration_years}' != '${None}' split_agreementDuration ${agreement_duration_years} year
run keyword if condition is not none ${agreement_duration_years} select from visible list by value ${tender_form_general_agreement_duration_years_input_locator} ${agreement_duration_years1}
${agreement_duration_months} = get from dictionary by keys ${data} agreementDuration
${agreement_duration_months1}= Run keyword If '${agreement_duration_months}' != '${None}' split_agreementDuration ${agreement_duration_months} month
run keyword if condition is not none ${agreement_duration_months} select from visible list by value ${tender_form_general_agreement_duration_months_input_locator} ${agreement_duration_months1}
${agreement_duration_days} = get from dictionary by keys ${data} agreementDuration
${agreement_duration_days1}= Run keyword If '${agreement_duration_days}' != '${None}' split_agreementDuration ${agreement_duration_years} day
run keyword if condition is not none ${agreement_duration_days} select from visible list by value ${tender_form_general_agreement_duration_days_input_locator} ${agreement_duration_days1}
#closeFrameworkAgreementSelectionUA
${max_awards_count} = get from dictionary by keys ${data} maxAwardsCount
run keyword if condition is not none ${max_awards_count} input text to exist visible input ${tender_form_general_max_awards_count_input_locator} ${max_awards_count}
${agreement_duration_years} = get from dictionary by keys ${data} agreementDuration
${agreement_duration_years1}= Run keyword If '${agreement_duration_years}' != '${None}' split_agreementDuration ${agreement_duration_years} year
run keyword if condition is not none ${agreement_duration_years} select from visible list by value ${tender_form_general_agreement_duration_years_input_locator} ${agreement_duration_years1}
${agreement_duration_months} = get from dictionary by keys ${data} agreementDuration
${agreement_duration_months1}= Run keyword If '${agreement_duration_months}' != '${None}' split_agreementDuration ${agreement_duration_months} month
run keyword if condition is not none ${agreement_duration_months} select from visible list by value ${tender_form_general_agreement_duration_months_input_locator} ${agreement_duration_months1}
${agreement_duration_days} = get from dictionary by keys ${data} agreementDuration
${agreement_duration_days1}= Run keyword If '${agreement_duration_days}' != '${None}' split_agreementDuration ${agreement_duration_years} day
run keyword if condition is not none ${agreement_duration_days} select from visible list by value ${tender_form_general_agreement_duration_days_input_locator} ${agreement_duration_days1}
submit current visible popup
fill tender form items
[Arguments] ${item_attributes_array}
[Documentation] заповнення номенклатури тендеру
:FOR ${item_attributes} IN @{item_attributes_array}
\ run keyword and ignore error open popup by btn locator ${tender_form_item_add_edit_btn_locator}
# \ wait until popup is visible
\ fill tender item form in opened popup ${item_attributes}
\ submit current visible popup
\ ${features} = get from dictionary by keys ${item_attributes} features
\ run keyword if condition is not none ${features} fill tender form features ${features} ${tender_form_item_panel_add_feature_btn_locator}
fill tender form items 2 stage
[Arguments] ${item_attributes_array}
[Documentation] заповнення номенклатури тендеру
:FOR ${item_attributes} IN @{item_attributes_array}
\ run keyword and ignore error open popup by btn locator ${tender_form_item_edit_btn_locator}
# \ wait until popup is visible
\ fill tender item form in opened popup ${item_attributes}
\ submit current visible popup
\ ${features} = get from dictionary by keys ${item_attributes} features
\ run keyword if condition is not none ${features} fill tender form features ${features} ${tender_form_item_panel_add_feature_btn_locator}
fill tender item form in opened popup
[Arguments] ${data}
[Documentation] заповнює відкриту форму згідно вказаних даних
fill item form in opened popup ${data}
${region} = get from dictionary by keys ${data} deliveryAddress region
run keyword if condition is not none ${region} select from visible list by label ${item_form_popup_delivery_region_id_input_locator} ${region}
${postal_code} = get from dictionary by keys ${data} deliveryAddress postalCode
run keyword if condition is not none ${postal_code} input text to visible input ${item_form_popup_delivery_postal_code_input_locator} ${postal_code}
${locality} = get from dictionary by keys ${data} deliveryAddress locality
run keyword if condition is not none ${locality} input text to visible input ${item_form_popup_delivery_locality_input_locator} ${locality}
${street_address} = get from dictionary by keys ${data} deliveryAddress streetAddress
run keyword if condition is not none ${street_address} input text to visible input ${item_form_popup_delivery_street_address_input_locator} ${street_address}
${delivery_start_date} = get from dictionary by keys ${data} deliveryDate startDate
${delivery_start_date} = Run keyword If '${delivery_start_date}' != '${None}' parse_deliveryPeriod_date ${delivery_start_date}
# run keyword if condition is not none ${delivery_start_date} run keyword and ignore error input datetime to exist visible input ${item_form_popup_delivery_start_date_input_locator} ${delivery_start_date}
run keyword if condition is not none ${delivery_start_date} run keyword and ignore error input text to visible input ${item_form_popup_delivery_start_date_input_locator} ${delivery_start_date}
${delivery_end_date} = get from dictionary by keys ${data} deliveryDate endDate
${delivery_end_date} = Run keyword If '${delivery_end_date}' != '${None}' parse_deliveryPeriod_date ${delivery_end_date}
run keyword if condition is not none ${delivery_end_date} run keyword and ignore error input text ${item_form_popup_delivery_end_date_input_locator} ${delivery_end_date}
## run keyword if condition is not none ${delivery_end_date} run keyword and ignore error input datetime to exist visible input ${item_form_popup_delivery_end_date_input_locator} ${delivery_end_date}
fill tender form milestones
[Arguments] ${milestone_attributes_array}
[Documentation] заповнення умов оплати тендеру
open popup by btn locator ${tender_form_milestones_panel_edit_btn_locator}
# click visible element ${tender_form_milestones_panel_edit_btn_locator}
# wait until popup is visible
:FOR ${milestone_attributes} IN @{milestone_attributes_array}
\ click visible element ${milestone_form_popup_add_btn_locator}
\ wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
\ fill milestone form in opened popup ${milestone_attributes}
submit current visible popup
fill tender form milestones fake
[Documentation] заповнення умов оплати тендеру
open popup by btn locator ${tender_form_milestones_panel_edit_btn_locator}
click visible element ${milestone_form_popup_add_btn_locator}
wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
select from visible list by value ${milestone_form_popup_title_input_locator} submissionDateOfApplications
input text to exist visible input ${milestone_form_popup_description_input_locator} submissionDateOfApplications
input text to exist visible input ${milestone_form_popup_percentage_input_locator} 100
select from visible list by value ${milestone_form_popup_code_input_locator} postpayment
input text to exist visible input ${milestone_form_popup_duration_days_input_locator} 145
select from visible list by value ${milestone_form_popup_duration_type_input_locator} working
submit current visible popup
fill milestone form in opened popup
[Arguments] ${data}
[Documentation] заповнює відкриту форму в активній вкладці згідно вказаних даних
${title} = get from dictionary by keys ${data} title
run keyword if condition is not none ${title} select from visible list by value ${milestone_form_popup_title_input_locator} ${title}
${description} = get from dictionary by keys ${data} description
run keyword if condition is not none ${description} input text to exist visible input ${milestone_form_popup_description_input_locator} ${description}
${percentage} = get from dictionary by keys ${data} percentage
run keyword if condition is not none ${percentage} input text to exist visible input ${milestone_form_popup_percentage_input_locator} ${percentage}
${code} = get from dictionary by keys ${data} code
run keyword if condition is not none ${code} select from visible list by value ${milestone_form_popup_code_input_locator} ${code}
${duration_days} = get from dictionary by keys ${data} duration days
run keyword if condition is not none ${duration_days} input text to exist visible input ${milestone_form_popup_duration_days_input_locator} ${duration_days}
${duration_type} = get from dictionary by keys ${data} duration type
run keyword if condition is not none ${duration_type} select from visible list by value ${milestone_form_popup_duration_type_input_locator} ${duration_type}
fill tender form features
[Arguments] ${feature_attributes_array} ${add_btn_locator}
[Documentation] заповнення нецінові крітерії тендеру
open popup by btn locator ${add_btn_locator}
# click visible element ${add_btn_locator}
# wait until popup is visible
:FOR ${feature_attributes} IN @{feature_attributes_array}
# \ click visible element ${tender_form_features_panel_edit_btn_locator}
\ execute javascript ${tender_form_features_panel_edit_btn_locator}
\ wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
\ fill feature form in opened popup ${feature_attributes}
submit current visible popup
fill tender form features2
[Arguments] ${feature_attributes_array} ${add_btn_locator}
[Documentation] заповнення нецінові крітерії тендеру
open popup by btn locator ${add_btn_locator}
# click visible element ${add_btn_locator}
# wait until popup is visible
click visible element ${tender_form_features_panel_edit_btn_locator}
wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
fill feature form in opened popup ${feature_attributes_array}
submit current visible popup
fill feature form in opened popup
[Arguments] ${data}
[Documentation] заповнює відкриту форму в активній вкладці згідно вказаних даних
${title} = get from dictionary by keys ${data} title
run keyword if condition is not none ${title} input text to exist visible input ${feature_form_popup_title_input_locator} ${title}
${description} = get from dictionary by keys ${data} description
run keyword if condition is not none ${description} input text to exist visible input ${feature_form_popup_description_input_locator} ${description}
${title_en} = get from dictionary by keys ${data} title_en
run keyword if condition is not none ${title_en} input text to exist visible input ${feature_form_popup_title_en_input_locator} ${title_en}
${description_en} = get from dictionary by keys ${data} description
run keyword if condition is not none ${description_en} input text to exist visible input ${feature_form_popup_description_en_input_locator} ${description_en}
${options} = Get From Dictionary ${data} enum
${count} = Get Length ${options}
${ex}= Evaluate ${count} - 1
: FOR ${INDEX} IN RANGE 0 ${count}
\ run keyword if condition is not none ${options[${INDEX}].title} input text to exist visible input ${feature_form_popup_enum_title_input_locator} ${options[${INDEX}].title}
\ run keyword and ignore error input text to exist visible input ${feature_form_popup_enum_title_en_input_locator} test2
# \ run keyword if condition is not none ${options[${INDEX}].title_en} input text to exist visible input ${feature_form_popup_enum_title_en_input_locator} ${options[${INDEX}].title_en}
\ ${value} = convert_float_to_string ${options[${INDEX}].value}
\ ${value} = Convert To Number ${value}
\ ${value} = multiply_hundred ${value}
\ ${value} = convert_float_to_string ${value}
\ run keyword if condition is not none ${options[${INDEX}].value} input text to exist visible input ${feature_form_popup_enum_value_input_locator} ${value}
\ Continue For Loop If '${INDEX}' == '${ex}'
\ Run Keyword If ${count} != 1 click visible element ${feature_form_popup_add-enums_btn_locator}
\ wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
fill tender form lots
[Arguments] ${lot_attributes_array}
[Documentation] заповнення номенклатури тендеру
##### BOF - TMP for negotiation milestone 1 lot#####
${prepared_tender_data} = Get From Dictionary ${td_railway_crutch} data
${milestones1} = Run Keyword If "${mode}" in "negotiation" Get From Dictionary ${prepared_tender_data} milestones
##### EOF - TMP #####
capture page screenshot
:FOR ${lot_attributes} IN @{lot_attributes_array}
\ run keyword if '${mode}' not in 'open_framework' open popup by btn locator ${tender_form_lots_panel_edit_btn_locator}
\ ... ELSE Execute Javascript $('#Lots #collapseLots #Lots0 .actions-wrapper a.btn.btn-default.btn-update.js-form-popup-update:first').click()
# \ run keyword if '${mode}' not in 'open_framework' open popup by btn locator ${tender_form_lots_panel_edit_btn_locator}
# \ ... ELSE click visible element ${tender_form_lots_edit_lot1_btn_locator}
# \ open popup by btn locator ${tender_form_lots_panel_edit_btn_locator}
# \ click visible element ${tender_form_lots_panel_edit_btn_locator}
# \ wait until popup is visible
\ capture page screenshot
\ fill lot form in opened popup ${lot_attributes}
\ submit current visible popup
\ ${features} = get from dictionary by keys ${lot_attributes} features
\ run keyword if condition is not none ${features} fill tender form features ${features} ${tender_form_lot_panel_add_feature_btn_locator}
\ ${milestones} = get from dictionary by keys ${lot_attributes} milestones
\ run keyword if condition is not none ${milestones} fill tender form milestones ${milestones}
\ run keyword if condition is none ${milestones} run keyword if "${mode}" in "negotiation" fill tender form milestones ${milestones1}
\ ${items} = get from dictionary by keys ${lot_attributes} items
\ run keyword if condition is not none ${items} fill tender form items ${items}
capture page screenshot
fill tender form lots 2 stage
[Arguments] ${lot_attributes_array}
[Documentation] заповнення номенклатури тендеру
##### BOF - TMP for negotiation milestone 1 lot#####
${prepared_tender_data} = Get From Dictionary ${td_railway_crutch} data
${milestones1} = Run Keyword If "${mode}" in "negotiation" Get From Dictionary ${prepared_tender_data} milestones
##### EOF - TMP #####
:FOR ${lot_attributes} IN @{lot_attributes_array}
\ open popup by btn locator ${tender_form_lots_edit_lot1_btn_locator}
##\ open popup by btn locator ${tender_form_lots_panel_edit_btn_locator}
\ fill lot form in opened popup ${lot_attributes}
\ submit current visible popup
\ ${features} = get from dictionary by keys ${lot_attributes} features
\ run keyword if condition is not none ${features} fill tender form features ${features} ${tender_form_lot_panel_add_feature_btn_locator}
\ ${milestones} = get from dictionary by keys ${lot_attributes} milestones
\ run keyword if condition is not none ${milestones} fill tender form milestones ${milestones}
\ run keyword if condition is none ${milestones} run keyword if "${mode}" in "negotiation" fill tender form milestones ${milestones1}
\ run keyword if condition is none ${milestones} run keyword if "${mode}" in "framework_selection" fill tender form milestones fake
\ ${items} = get from dictionary by keys ${lot_attributes} items
\ run keyword if condition is not none ${items} fill tender form items 2 stage ${items}
fill lot form in opened popup
[Arguments] ${data}
[Documentation] заповнює відкриту форму згідно вказаних даних
log many ${data}
${title} = get from dictionary by keys ${data} title
run keyword if condition is not none ${title} input text to visible input ${lot_form_popup_title_input_locator} ${title}
${title_en} = get from dictionary by keys ${data} title_en
run keyword if condition is not none ${title_en} input text to exist visible input ${lot_form_popup_title_en_input_locator} ${title_en}
${description} = get from dictionary by keys ${data} description
run keyword if condition is not none ${description} input text to visible input ${lot_form_popup_description_input_locator} ${description}
${description_en} = get from dictionary by keys ${data} description_en
run keyword if condition is not none ${description_en} input text to exist visible input ${lot_form_popup_description_en_input_locator} ${description_en}
capture page screenshot
${description_ru} = get from dictionary by keys ${data} description_ru
run keyword if condition is not none ${description_ru} input text to exist visible input ${item_form_popup_description_ru_input_locator} ${description_ru}
${amount} = get from dictionary by keys ${data} value amount
run keyword if condition is not none ${amount} input number to exist visible input ${lot_form_popup_value_amount_input_locator} ${amount}
${min_step_amount} = get from dictionary by keys ${data} minimalStep amount
run keyword if condition is not none ${min_step_amount} input number to exist visible input ${lot_form_popup_minimalstep_amount_input_locator} ${min_step_amount}
${yearly_payments_percentage_range} = get from dictionary by keys ${data} yearlyPaymentsPercentageRange
${yearly_payments_percentage_range} = Run keyword If '${yearly_payments_percentage_range}' != '${None}' set_value_minimalStepPercentage ${yearly_payments_percentage_range}
${yearly_payments_percentage_range} = Run keyword If '${yearly_payments_percentage_range}' != '${None}' convert_esco__float_to_string ${yearly_payments_percentage_range}
run keyword if condition is not none ${yearly_payments_percentage_range} input number to exist visible input ${tender_form_general_yearly_payments_percentage_range_input_locator} ${yearly_payments_percentage_range}
${minimal_step_percentage} = get from dictionary by keys ${data} minimalStepPercentage
${minimal_step_percentage} = Run keyword If '${minimal_step_percentage}' != '${None}' set_value_minimalStepPercentage ${minimal_step_percentage}
${minimal_step_percentage} = Run keyword If '${minimal_step_percentage}' != '${None}' convert_esco__float_to_string ${minimal_step_percentage}
run keyword if condition is not none ${minimal_step_percentage} input number to exist visible input ${tender_form_general_minimal_step_percentage_input_locator} ${minimal_step_percentage}
# ${currency} = get from dictionary by keys ${data} value currency
# run keyword if condition is not none ${currency} select from visible list by value ${tender_form_lots_value_currency_input_locator} ${currency}
# ${valueAddedTaxIncluded} = get from dictionary by keys ${data} value valueAddedTaxIncluded
# run keyword if condition is not none ${valueAddedTaxIncluded} run keyword if ${valueAddedTaxIncluded} Click Element ${tender_form_lots_value_added_tax_input_locator}
fill tender form funders
[Arguments] ${funder_attributes_array}
[Documentation] заповнення донорів тендеру
:FOR ${funder_attributes} IN @{funder_attributes_array}
\ ${name} = get from dictionary by keys ${funder_attributes} name
\ run keyword if condition is not none ${name} select from visible list by label ${tender_form_general_tender_funder_name_locator} ${name}
fill tender required documents
[Documentation] додає документ до усієї закупівлі для успішної валідації форми
${file_path} ${file_name} ${file_content} = create_fake_doc
click visible element ${tender_form_general_panel_add_document_btn_locator}
choose file ${add_file_to_form_locator} ${file_path}
wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
submit current visible popup
fill tender from award reporting
[Arguments] ${budget} ${award_attributes_array}
[Documentation] заповнення переможця reporting тендеру
capture page screenshot
# run keyword and ignore error click visible element ${tender_form_general_panel_update_award_negotiation_btn_locator}
run keyword and ignore error run keyword if '${mode}' in 'negotiation' Execute Javascript $('#collapseLots0 div[data-attribute="awards"] .js-form-popup-update').click()
run keyword and ignore error run keyword if '${mode}' in 'reporting' Execute Javascript $('.js-form-popup-update[data-url="#awards-form-popup"]').click()
capture page screenshot
# Run Keyword If "${TEST_NAME}" == "Можливість створити переговорну процедуру" open popup by btn locator ${tender_form_general_panel_add_award_negotiation_btn_locator}
run keyword and ignore error Run Keyword If "${TEST_NAME}" == "Можливість створити переговорну процедуру" open popup by btn locator ${tender_form_general_panel_add_award_negotiation_btn_locator}
... ELSE IF "${TEST_NAME}" == "Можливість створити звіт про укладений договір" open popup by btn locator ${tender_form_general_panel_update_award_reporting_btn_locator}
capture page screenshot
Run Keyword If "${TEST_NAME}" == "Можливість зареєструвати і підтвердити постачальника до звіту про укладений договір" open popup by btn locator ${tender_form_general_panel_update_award_reporting_btn_locator}
capture page screenshot
# Run Keyword If "${TEST_NAME}" == "Можливість зареєструвати і підтвердити постачальника до переговорної процедури" open popup by btn locator ${tender_form_general_panel_update_award_negotiation_btn_locator}
capture page screenshot
fill award reporting form in opened popup ${budget} ${award_attributes_array}
submit current visible popup
fill award reporting form in opened popup
[Arguments] ${budget} ${data}
[Documentation] заповнює відкриту форму в активній вкладці згідно вказаних даних
${org_name} = get from dictionary by keys ${data} identifier legalName
run keyword if condition is not none ${org_name} input text to exist visible input ${tender_form_award_organization_name_locator} ${org_name}
capture page screenshot
${organization_identifier_code} = get from dictionary by keys ${data} identifier id
capture page screenshot
run keyword if condition is not none ${organization_identifier_code} input text to exist visible input ${tender_form_award_organization_identifier_code_locator} ${organization_identifier_code}
${award_organization_scale} = get from dictionary by keys ${data} scale
capture page screenshot
run keyword if condition is not none ${award_organization_scale} select from visible list by value ${tender_form_award_organization_scale_locator} ${award_organization_scale}
capture page screenshot
${region} = get from dictionary by keys ${data} address region
run keyword if condition is not none ${region} select from visible list by label ${tender_form_award_organization_region_id_locator} ${region}
${postal_code} = get from dictionary by keys ${data} address postalCode
run keyword if condition is not none ${postal_code} input text to exist visible input ${tender_form_award_organization_postal_code_locator} ${postal_code}
${locality} = get from dictionary by keys ${data} address locality
run keyword if condition is not none ${locality} input text to exist visible input ${tender_form_award_organization_locality_locator} ${locality}
${street_address} = get from dictionary by keys ${data} address streetAddress
run keyword if condition is not none ${street_address} input text to exist visible input ${tender_form_award_organization_street_address_locator} ${street_address}
${contact_point_name} = get from dictionary by keys ${data} contactPoint name
run keyword if condition is not none ${contact_point_name} input text to exist visible input ${tender_form_award_organization_contact_point_name_locator} ${contact_point_name}
${contact_point_email} = get from dictionary by keys ${data} contactPoint email
run keyword if condition is not none ${contact_point_email} input text to exist visible input ${tender_form_award_organization_contact_point_email_locator} ${contact_point_email}
${contact_point_phone} = get from dictionary by keys ${data} contactPoint telephone
run keyword if condition is not none ${contact_point_phone} input text to exist visible input ${tender_form_award_organization_contact_point_phone_locator} ${contact_point_phone}
# ${duration_days} = get from dictionary by keys ${data} contactPoint days
# run keyword if condition is not none ${duration_days} input text to exist visible input ${milestone_form_popup_duration_days_input_locator} ${duration_days}
${budget_value} = get from dictionary by keys ${data} value amount
run keyword if '${mode}' in 'reporting' input number to exist visible input ${tender_form_award_budget_locator} ${rep_val}
#${budget}
run keyword if '${mode}' in 'negotiation' input number to exist visible input ${tender_form_award_budget_locator} ${rep_val}
#${budget_value}
open tender search form
[Documentation] відкриває сторінку з пошуком тендерів
open page and wait element by locator ${broker_baseurl}/tenders ${tender_search_form_locator}
save tender form and wait synchronization
[Documentation] натискає кнопку "Зберегти" і чекає синхронізації тендеру
### submit form and check result ${tender_form_submit_btn_locator} ${tender_form_submit_success_msg} ${tender_created_checker_element_locator} ${true}
submit form and check result ${tender_form_submit_btn_locator} ${tender_form_submit_success_msg} ${tender_created_checker_element_locator} ${false}
wait until page does not contain element with reloading ${tender_sync_element_locator}
add document in tender
[Arguments] ${filepath}
[Documentation] Завантажити документ, який знаходиться по шляху filepath.
click visible element ${tender_form_general_panel_edit_add_document_btn_locator}
choose file ${add_file_to_form_locator} ${filepath}
wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
submit current visible popup
add document in lot
[Arguments] ${filepath} ${lot_id}
[Documentation] Завантажити в лот (з ідентіфікатором ${lot_id}) документ, який знаходиться по шляху filepath.
${open_form_add_doc_lot_btn_locator} = replace string ${tender_form_lot_panel_add_document_btn_locator_tpl} %lot_id% ${lot_id}
click visible element and wait until page contains element ${open_form_add_doc_lot_btn_locator} jquery=.modal.modal-form.js-form-popup.fancybox-content
choose file ${add_file_to_form_locator} ${filepath}
wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
submit current visible popup
confirm-stage2
[Documentation] Перевести тендер tender_uaid в статус active.stage2.waiting.
Wait Until Keyword Succeeds 300 s 20 s Wait For stage2button
click visible element ${tender_stage2_open_btn_locator}
Wait Until Page Contains ${tender_stage2_submit_success_msg} 60
# click visible element ${tender_stage2_submit_success_btn_locator}
# submit form and check result ${tender_stage2_submit_success_btn_locator} ${tender_stage2_submit_alert_success_msg} ${tender_created_checker_element_locator}
execute javascript ${tender_stage2_submit_js_success_btn_locator}
Wait Until Page Contains ${tender_stage2_submit_alert_success_msg} 60
wait until alert is visible ${tender_stage2_submit_alert_success_msg}
run keyword and ignore error close current visible alert
activate stage 2
[Documentation] Перевести тендер tender_uaid в статус active.tendering.
open popup by btn locator ${tender_form_general_panel_edit_btn_locator}
${tender_end_date} = Get Current Date increment=00:35:00
input datetime to visible input ${tender_tender_period_end_date_input_locator} ${tender_end_date}
capture page screenshot
run keyword and ignore error click visible element ${tender_form_general_panel_draft_mode_input_locator}
capture page screenshot
submit current visible popup
capture page screenshot
${file_path} ${file_name} ${file_content} = create_fake_doc
click visible element ${tender_form_general_panel_document_stage2_input_locator}
choose file ${add_file_to_form_locator} ${file_path}
wait until element is visible ${stage2_form_add_document_type_input_locator}
click visible element ${stage2_form_add_document_description_btn_locator}
capture page screenshot
wait until element is visible ${stage2_form_add_document_description_input_locator}
input text to exist visible input ${stage2_form_add_document_description_input_locator} test2
click visible element ${stage2_form_add_document_close_description_btn_locator}
capture page screenshot
submit current visible popup
capture page screenshot
fix awards data in global Users variable
[Arguments] ${username}
[Documentation] Фікс для помилки "Resolving variable '${award.value.amount}' failed: AttributeError: value"
:FOR ${user} IN @{USERS}
\ continue for loop if '${user}' == '${username}'
\ ${is_user_has_data} = run keyword and return status dictionary should contain key ${USERS.users} ${user}
\ continue for loop if ${is_user_has_data} == ${False}
\ ${user_data} = set variable ${USERS.users['${user}']}
\ ${is_user_has_tender_data} = run keyword and return status dictionary should contain key ${user_data} tender_data
\ continue for loop if ${is_user_has_tender_data} == ${False}
\ ${status} ${award_data} = run keyword and ignore error get_from_object ${USERS.users['${user}'].tender_data.data} awards
\ continue for loop if '${status}' != 'PASS'
\ set to object ${USERS.users['${username}'].tender_data.data} awards ${award_data}
\ exit for loop
fill tender contact person
[Arguments] ${data}
[Documentation] заповнює відкриту форму згідно вказаних даних
run keyword and ignore error open popup by btn locator ${tender_form_cp_edit_btn_locator}
${organization_name_en} = get from dictionary by keys ${data} procuringEntity name_en
run keyword if condition is not none ${organization_name_en} input text to visible input ${tender_form_organization_name_en_input_locator} ${organization_name_en}
${contact_point_name_en} = get from dictionary by keys ${data} procuringEntity contactPoint name_en
run keyword if condition is not none ${contact_point_name_en} input text to visible input ${tender_form_contact_point_name_en_input_locator} ${contact_point_name_en}
submit current visible popup
decline tender
[Arguments] ${username} ${tender_uaid} ${cancellation_reason} ${cancellation_reasonType} ${doc_name} ${cancellation_data}
[Documentation] Скасувати закупівлю
open tender page by uaid ${tender_uaid}
go to ${broker_baseurl}/tender-cancellation/create?tenderId=${tender_uaid}
# Execute Javascript $('#aside-part-pjax a[href*="/tender-cancellation/create?tenderId"]').click()
capture page screenshot
wait until page contains element with reloading jquery=#cancellationform-reason
capture page screenshot
input text to exist visible input jquery=#cancellationform-reason ${cancellation_reason}
capture page screenshot
choose file jquery=#tender-cancel-form input[type$="file"] ${doc_name}
capture page screenshot
# wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
sleep 5
capture page screenshot
Execute Javascript $('button:contains("Скасувати закупівлю")').click()
capture page screenshot
sleep 10
close current visible alert
capture page screenshot
Execute Javascript $('button[data-sign-url*="/tender-cancellation/create-sign"]').click()
capture page screenshot
run keyword and ignore error Load Sign
capture page screenshot
run keyword and ignore error close current visible alert
capture page screenshot
submit form and check result ${bid_form_refresh_btn_locator} ${bid_form_refresh_success_msg} ${tender_created_checker_element_locator} ${true}
${cancellation_id} = get value by locator on opened page jquery=.cancellation-without-pseudo-table .cancellation-info-wrapper .info-row.opid .value
${cancellation} = playtender_tender.Перевести скасування закупівлі в період очікування ${username} ${tender_uaid} ${cancellation_id}
# ${cancellation} = prepare tender data cancellation ${tender_data['data']}
# ${cancellation} = openprocurement_client.Перевести скасування закупівлі в період очікування ${username} ${tender_uaid} ${cancellation_id}
Set To Dictionary ${USERS.users['${tender_owner}']} cancellation_data=${cancellation}
Перевести скасування закупівлі в період очікування
[Documentation]
... [Arguments] Username, tender uaid, cancellation number
... Find tender using uaid, get cancellation test_confirmation data and call patch_cancellation
... [Return] Nothing
[Arguments] ${username} ${tender_uaid} ${cancel_id}
# ${tender}= openprocurement_client.Пошук тендера по ідентифікатору ${username} ${tender_uaid}
${internalid} = get value by locator on opened page jquery=#tender-general-info .info-row.opid .value
Log ${username}
${tender}= getTenderDataByTenderUaId ${API_HOST_URL}/api/${API_VERSION} ${tender_uaid}
${tender}= op_robot_tests.tests_files.service_keywords.Munchify ${tender}
Log ${tender}
# ${tender}= playtender_tender.Отримати тендер по внутрішньому ідентифікатору ${username} ${internalid}
# ${tender}= openprocurement_client.Отримати тендер по внутрішньому ідентифікатору ${username} ${internalid}
${data}= test_cancel_pending_data ${cancel_id}
Log ${data}
${tender_с}= getTenderDataByTenderCancellationsUaId ${API_HOST_URL}/api/${API_VERSION} ${tender_uaid}
${tender_с}= op_robot_tests.tests_files.service_keywords.Munchify ${tender_с}
Log ${tender_с}
[Return] ${tender_с}
Отримати тендер по внутрішньому ідентифікатору
[Arguments] ${username} ${internalid} ${save_key}=tender_data
${tender}= Call Method ${USERS.users['${username}']} get_tender ${internalid}
${tender}= set_access_key ${tender} ${USERS.users['${username}'].access_token}
Set To Dictionary ${USERS.users['${username}']} ${save_key}=${tender}
${tender}= munch_dict arg=${tender}
Log ${tender}
[return] ${tender}
GetTenderContract
[Arguments] ${tender_uaid}
[Documentation]
... Username, tender uaid
${contract}= getTenderDataByTenderAgreementContractUaId ${API_HOST_URL}/api/${API_VERSION} ${tender_uaid}
${contract}= op_robot_tests.tests_files.service_keywords.Munchify ${contract}
Log ${contract}
# Set To Dictionary ${USERS.users['${tender_owner}']} agreement_data=${contract}
Set To Dictionary ${USERS.users['${username}']} agreement_data=${contract}
log ${USERS.users['${username}'].agreement_data}
decline lot
[Arguments] ${username} ${tender_uaid} ${lot_id} ${cancellation_reason} ${cancellation_reasonType} ${doc_name} ${cancellation_data}
[Documentation] Скасувати закупівлю
open tender page by uaid ${tender_uaid}
go to ${broker_baseurl}/tender-cancellation/create?tenderId=${tender_uaid}
# Execute Javascript $('#aside-part-pjax a[href*="/tender-cancellation/create?tenderId"]').click()
capture page screenshot
wait until page contains element with reloading jquery=#cancellationform-reason
capture page screenshot
Execute Javascript $('#cancellationform-related_of').val('lot').change()
capture page screenshot
input text to exist visible input jquery=#cancellationform-reason ${cancellation_reason}
capture page screenshot
choose file jquery=#tender-cancel-form input[type$="file"] ${doc_name}
capture page screenshot
# wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
sleep 5
capture page screenshot
Execute Javascript $('button:contains("Скасувати закупівлю")').click()
capture page screenshot
sleep 10
close current visible alert
capture page screenshot
Execute Javascript $('button[data-sign-url*="/tender-cancellation/create-sign"]').click()
capture page screenshot
run keyword and ignore error Load Sign
capture page screenshot
run keyword and ignore error close current visible alert
capture page screenshot
submit form and check result ${bid_form_refresh_btn_locator} ${bid_form_refresh_success_msg} ${tender_created_checker_element_locator} ${true}
${cancellation_id} = get value by locator on opened page jquery=#lots .cancellation-info-wrapper .info-row.opid .value
${cancellation} = playtender_tender.Перевести скасування закупівлі в період очікування ${username} ${tender_uaid} ${cancellation_id}
# ${cancellation} = prepare tender data cancellation ${tender_data['data']}
# ${cancellation} = openprocurement_client.Перевести скасування закупівлі в період очікування ${username} ${tender_uaid} ${cancellation_id}
Set To Dictionary ${USERS.users['${tender_owner}']} cancellation_data=${cancellation}
cancell cancellation
[Arguments] ${username} ${tender_uaid} ${cancellations_index}
[Documentation] Скасувати cancellation
open tender page by uaid ${tender_uaid}
capture page screenshot
wait until page contains element with reloading jquery=a[data-sign-url*="/tender-cancellation/cancel-sign"]
capture page screenshot
Execute Javascript $('a[data-sign-url*="/tender-cancellation/cancel-sign"]').click()
capture page screenshot
run keyword and ignore error Load Sign
capture page screenshot
close current visible alert
capture page screenshot
submit form and check result ${bid_form_refresh_btn_locator} ${bid_form_refresh_success_msg} ${tender_created_checker_element_locator} ${true}