Wunderbyte-GmbH / moodle-local_shopping_cart

Other
4 stars 6 forks source link

Test Shopping Cart History / Ledger for Cancellations #74

Open eynimeni opened 5 months ago

eynimeni commented 5 months ago

Hello @semteacher

I've made two more video for you because we kindly ask you to write new behat tests in order to check if all values and behaviours of booking and cancellations are executed as intended.

Please create scenarios with different settings, as also mentioned in the video. You can find the videos here:

https://we.tl/t-YSZyk8BUq7

(We know a bug for users booking & cancelling for themselves, please ignore this for the moment. )

Validation of ledger table in:

semteacher commented 5 months ago
  1. We already have number of tests for cashier feature. Those tests could be extended to verify statuses (final or intermediate) on the ledger (report) page. It will slightly violate Moodle's approach for behat (1 feature per test) but will significantly save execution time.
  2. Should ledger (report) statuses has to be tested for cashier feature only? Or I can try to add it to other test (where it is possible)?
eynimeni commented 2 months ago

Hi @semteacher , sorry for the late replay. It's ok if we add the functionality to existing tests. So if it hasn't been done yet, please proceed.

semteacher commented 1 week ago

@eynimeni @georgmaisser I have added validation of ledger table's data for all behat tests. Have serious doubts about if it will make sence to do it in the phpunit now:

eynimeni commented 1 week ago

Dear @semteacher ,

thank you for your work and comments! A refactoring of report.php is under construction at the moment, so it makes no sense to write extensive tests for the exisiting one.