Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend test for cancellations #777

Open
8 tasks
eynimeni opened this issue Nov 6, 2024 · 1 comment
Open
8 tasks

Extend test for cancellations #777

eynimeni opened this issue Nov 6, 2024 · 1 comment
Assignees

Comments

@eynimeni
Copy link
Contributor

eynimeni commented Nov 6, 2024

We need to cover the cancel all booked users functions better with tests to see if the quota and the cancellation fee is correctly applied here.
Quota is defined in Cancellation Settings, there are two options: calculateconsumationfixedpercentage or calculateconsumation. The second one needs a callback function in the plugin of the item (i.e. mod_booking) returning a float value to for the price to be multiplied with (i.e 0.2 if 20% of the option in consumed).

Screenshot 2024-11-06 at 09 05 43

given some users have booked a bookingoption

  • Modal displaying list of booked users with correct price paid

  • if we support tests for pricegroups, this would be great to test here as well - so different prices should be displayed according to the pricegroup of users and settings of bookingoption

  • if quota is given in settings, display correct quota in modal

  • Cancelation fee should be applied and overwrite standard cancellation fee (except for cancelling user himself - in this case, the standard fee should always apply)

  • users should recieve credits: quota is deduced from given price in percentage, then cancellation fee is substracted

  • In the first step, we need tests for calculateconsumationfixedpercentage applied

  • eventually, we will extend them for calculateconsumationfixedpercentage 0 and calculateconsumation checkbox checked in settings

  • the third parameter in cancellation options is the serviceperiod - as I am unaware of the status quo of tests in this regard, we treat this later

@semteacher
Copy link
Contributor

semteacher commented Dec 11, 2024

@eynimeni 1st of all - this test(s) can be implemented only uder "booking" not "shopping_cart". Should I transfer it ?

@semteacher semteacher transferred this issue from Wunderbyte-GmbH/moodle-local_shopping_cart Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants