ita-social-projects / GreenCity

The main aim of “GreenCity” project is to teach people in a playful and challenging way to have an eco-friendly lifestyle. A user can view on the map places that have some eco-initiatives or suggest discounts for being environmentally aware (for instance, coffee shops that give a discount if a customer comes with their own cup). А user can start doing an environment-friendly habit and track their progress with a habit tracker.
MIT License
65 stars 80 forks source link

[UBS. Order details. Admin cabinet] The bonuses is added to user's account when order has underpayment and order status is 'Виконано' on the page 'Order' #5176

Open sorokhteym opened 1 year ago

sorokhteym commented 1 year ago

Environment:Windows 10, Chrome Version 108.0.5359.99 Reproducible: always Build found: 2.02.23

Preconditions

  1. Go to https://www.testgreencity.ga/GreenCityClient/#/ubs
  2. Sign in as Super Admin
  3. Navigate to UBS menu > Orders
  4. The order with the status 'Cформованo' and 'Oплачено' should be created by user

Steps to reproduce

  1. Choose the order with status 'Сформовано' and 'Оплачено' from the table "Orders"
  2. Change status from CФормовано>Узгодження>Підтверджено> На маршруті>Виконано
  3. Scroll down to section 'Деталі замовлення' and add аctual amount of packages in column 'Actual amount'
  4. Pay attention on the underpayment message “Потрібно доплатити <underpayment грн>" in section 'Деталі замовлення'
  5. Press the buttn 'Зберегти'
  6. Pay attention on the underpayment message “Потрібно доплатити <underpayment грн>" in section 'Деталі замовлення' and changes in section 'Oплата замовлення'
  7. Pay attention on Payment status of order (on the top of the page 'Order')

Actual result When the order has underpayment ( status 'Виконано') and admin presses button 'Зберегти':

  1. The underpayment sum 'Потрібно доплатити ' isn't saved properly
  2. System adds the underpayment as a record to section 'Oплата замовлення' and this sum adds as bonuses to user's account
  3. The field 'Замовлення оплачено у розмірі' become '0.00'
  4. The message 'Потрібно доплатити is not displayed on section 'Oплата замовлення'.
  5. Payment status isn't change from 'Оплачено' to 'Частково оплачено'

https://user-images.githubusercontent.com/116512982/216437109-968ca527-5fa2-424a-b5c2-3f3d76938335.mp4

underpayment calculation 1

Expected result Payment status should be changed from 'Оплачено' to 'Частково оплачено'. The message is 'Потрібно доплатити should be displayed after press the button 'Зберегти'. It is displayed in section 'Деталі замовлення' and in section 'Оплата замовлення'.

123

User story and test case links User story : Payment statuses https://github.com/ita-social-projects/GreenCity/issues/2897 [UBS Admin Cabinet] Overpayment and underpayment messages #2899 Тest case: https://jira.softserve.academy/projects/GC?selectedItem=com.thed.zephyr.je:zephyr-tests-page#test-cycles-tab

katia9261 commented 1 year ago

Bug is fixed image

DanaIuich commented 1 year ago

Payment status doesn't change from 'Оплачено' to 'Частково оплачено'. The amounts in the message "Потрібно доплатити 00.0 грн" of the sections Деталі замовлення" and "Оплата замовлення" are different.

https://github.com/ita-social-projects/GreenCity/assets/128155213/4f6d2ec9-e814-4b69-a82e-fba42eb34034