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

[Tariffs] Active buttons for deactivating and activating location card for employee who doesn't have permission to deactivate and activate location card #6103

Closed DanaIuich closed 1 year ago

DanaIuich commented 1 year ago

Environment: all Reproducible: always Build found: 25/07/2023

Preconditions

  1. User should be on position which doesn't have permission to deactivate and activate a location card (e.x. navigator)
  2. User should be logged
  3. Go to https://www.greencity.social/#/ubs-admin/tariffs

Steps to reproduce

  1. Select region in dropdown list in the top of page (e.x. Kharkiv region)
  2. Select location card and on location card press 3 dots and in dropdown list click on "Deactivation"
  3. In pop-up window "Confirm deactivation" press on "Deactivate" button
  4. Select region in dropdown list in the top of page (e.x. Kharkiv region) and choose state "Inactive"
  5. In inactive card press on spinner and in pop-up window "Restore confirmation" press on "Restore"button

Actual result

  1. In dropdown list "Deactivation" is active. In pop-up window "Confirm deactivation" "Deactivate" button is active. After clicking "Deactivate" button message 403 appears.
  2. Spinner for activation card is active. Pop-up window ""Restore confirmation" appears. After clicking "Restore" button message 403 appears.

Expected result

  1. In dropdown list "Deactivation" is disabled
  2. The spinner for activation is disabled

https://github.com/ita-social-projects/GreenCity/assets/128155213/271693a9-625b-40bb-b8c4-2e45cdff96cd

User story and test case links E.g.: https://github.com/ita-social-projects/GreenCity/issues/5538

https://github.com/ita-social-projects/GreenCity/assets/128155213/c502fea1-a31e-4815-8b75-0be992729e1f

DanaIuich commented 1 year ago

Bug is fixed