Commit 4f9f4653b884b636b2d2fd325d19151e696e8f2b
1 parent
873f04bf
Add contracting contract amountNet tests
Showing
2 changed files
with
39 additions
and
10 deletions
... | ... | @@ -161,15 +161,28 @@ Suite Teardown Test Suite Teardown |
161 | 161 | Run As ${tender_owner} Редагувати поле договору ${CONTRACT_UAID} title ${title} |
162 | 162 | |
163 | 163 | |
164 | +Можливість редагувати вартість договору без ПДВ | |
165 | + ${tender_owner_data}= Get From Dictionary ${USERS.users} ${tender_owner} | |
166 | + [Tags] ${tender_owner_data.broker}: Редагування договору | |
167 | + ... tender_owner | |
168 | + ... ${tender_owner_data.broker} | |
169 | + ... modify_contract | |
170 | + [Teardown] Оновити LAST_MODIFICATION_DATE | |
171 | + ${amount_net}= create_fake_amount_net ${tender_owner_data.contract_data.data.value.amount} | |
172 | + Set to dictionary ${tender_owner_data} new_amount_net=${amount_net} | |
173 | + Run As ${tender_owner} Редагувати поле договору ${CONTRACT_UAID} value.amountNet ${amount_net} | |
174 | + | |
175 | + | |
164 | 176 | Можливість редагувати вартість договору |
165 | - [Tags] ${USERS.users['${tender_owner}'].broker}: Редагування договору | |
177 | + ${tender_owner_data}= Get From Dictionary ${USERS.users} ${tender_owner} | |
178 | + [Tags] ${tender_owner_data.broker}: Редагування договору | |
166 | 179 | ... tender_owner |
167 | - ... ${USERS.users['${tender_owner}'].broker} | |
180 | + ... ${tender_owner_data.broker} | |
168 | 181 | ... modify_contract |
169 | 182 | [Teardown] Оновити LAST_MODIFICATION_DATE |
170 | - ${value.amount}= create_fake_value_amount | |
171 | - Set to dictionary ${USERS.users['${tender_owner}']} new_amount=${value.amount} | |
172 | - Run As ${tender_owner} Редагувати поле договору ${CONTRACT_UAID} value.amount ${value.amount} | |
183 | + ${amount}= create_fake_amount ${tender_owner_data.contract_data.data.value.amount} | |
184 | + Set to dictionary ${tender_owner_data} new_amount=${amount} | |
185 | + Run As ${tender_owner} Редагувати поле договору ${CONTRACT_UAID} value.amount ${amount} | |
173 | 186 | |
174 | 187 | |
175 | 188 | Можливість редагувати дату завершення дії договору |
... | ... | @@ -245,15 +258,31 @@ Suite Teardown Test Suite Teardown |
245 | 258 | ... title |
246 | 259 | |
247 | 260 | |
261 | +Відображення відредагованої вартості договору без ПДВ | |
262 | + ${tender_owner_data}= Get From Dictionary ${USERS.users} ${tender_owner} | |
263 | + ${viewer_data}= Get From Dictionary ${USERS.users} ${viewer} | |
264 | + [Tags] ${viewer_data.broker}: Редагування договору | |
265 | + ... viewer | |
266 | + ... ${viewer_data.broker} | |
267 | + ... modify_contract | |
268 | + Звірити поле договору із значенням | |
269 | + ... ${viewer} | |
270 | + ... ${CONTRACT_UAID} | |
271 | + ... ${tender_owner_data.new_amount_net} | |
272 | + ... value.amountNet | |
273 | + | |
274 | + | |
248 | 275 | Відображення відредагованої вартості договору |
249 | - [Tags] ${USERS.users['${viewer}'].broker}: Редагування договору | |
276 | + ${tender_owner_data}= Get From Dictionary ${USERS.users} ${tender_owner} | |
277 | + ${viewer_data}= Get From Dictionary ${USERS.users} ${viewer} | |
278 | + [Tags] ${viewer_data.broker}: Редагування договору | |
250 | 279 | ... viewer |
251 | - ... ${USERS.users['${viewer}'].broker} | |
280 | + ... ${viewer_data.broker} | |
252 | 281 | ... modify_contract |
253 | 282 | Звірити поле договору із значенням |
254 | 283 | ... ${viewer} |
255 | 284 | ... ${CONTRACT_UAID} |
256 | - ... ${USERS.users['${tender_owner}'].new_amount} | |
285 | + ... ${tender_owner_data.new_amount} | |
257 | 286 | ... value.amount |
258 | 287 | |
259 | 288 | ... | ... |
... | ... | @@ -44,7 +44,7 @@ def get_fake_funder_scheme(): |
44 | 44 | return fake.funder_scheme() |
45 | 45 | |
46 | 46 | |
47 | -def create_fake_amount(award_amount, value_added_tax_included): | |
47 | +def create_fake_amount(award_amount, value_added_tax_included=False): | |
48 | 48 | half_min_amount_net = award_amount - award_amount * 0.2 |
49 | 49 | if value_added_tax_included: |
50 | 50 | return round(random.uniform(half_min_amount_net, award_amount), 2) |
... | ... | @@ -54,7 +54,7 @@ def create_fake_amount(award_amount, value_added_tax_included): |
54 | 54 | return round(random.uniform(award_amount, award_amount + range_amount_net / 2), 2) |
55 | 55 | |
56 | 56 | |
57 | -def create_fake_amount_net(award_amount, value_added_tax_included): | |
57 | +def create_fake_amount_net(award_amount, value_added_tax_included=False): | |
58 | 58 | half_min_amount_net = award_amount - award_amount * 0.2 |
59 | 59 | if value_added_tax_included: |
60 | 60 | min_amount_net = award_amount - award_amount * 0.2 | ... | ... |
Please
register
or
login
to post a comment