CART: Order projects #25

Merged
akrdzic merged 10 commits from order-projects into master 2018-09-26 16:13:05 +02:00
akrdzic commented 2018-09-24 22:47:15 +02:00 (Migrated from gitlab.com)

CART: Handle order projects

CART: Save and return all order details entered during checkout process

CART: Handle adding and removing addons and options along with package

https://app.asana.com/0/697944902557002/834017653237020

https://app.asana.com/0/697944902557002/834017653237023

https://app.asana.com/0/697944902557002/834017653237030

Description

Implementing:

  • handling of order projects for orders
  • saving data entered during checkout process
  • adding and removing addons and options with packages

Unit tests

Unit tests are added for Order Project logic, since that logic is completed.
Cart and Checkout logic has pending document handling logic and after that is complete unit testing will be added for them.

Execute unit tests and check all are passing:

 cd backend/app/plugins/wiaas
./test/bin/setup.sh [root] [pass]
phpunit

SMOKE Test

Handle order projects

  1. Login to backend interface

  2. Check that under Woocommerce menu there is additional submenu called Order projects

  3. Go to Order projects submenu and notice there is Is Available? additional field on form for creating new order project

  4. Create few order project (at least on available and at least one unavailable)

  5. Login to frontend as customer

  6. Add packages to cart

  7. Go to cart and examine Project dropdown

  8. Notice that dropdown is populated with only newly created available order projects

  9. Go back to backend and change availability for some of the order projects (at least one of both cases)

  10. Go back to frontend cart and notice that populated projects are again only available order projects from backend

  11. Try adding new order project from frontend with empty field

  12. Notice error is displayed that field cannot be empty

  13. Try adding new order project with name longer thatn 100 characters

  14. Notice error is displayed that field cannot be longer thatn 100 characters

  15. Create new order project with valid project name

  16. Go back to backend and notice new order project is listed and it is available for customers

Save and return all order details entered during checkout process

  1. Create new order with populated all necessary fields (Location Details, Invoice Reference, Project)

  2. Open order details for new order on frontend and check all fields are present

  3. Go to backend and open order details for created order and check it is assigned to correct order project

  4. Go to Order projects submenu and check that corresponding order project has its count column correctly updated

  5. Click on count column and check that order is listed as part of that order project

  6. Repeat steps for adding package into cart

  7. Create new order without populating fields (Location Details, Invoice Reference, Project)

  8. Notice order is succesfully created and corresponding fields are empty on frontend order details

  9. Go to backend and open new order details

  10. Check order has no project assigned to it

Adding and removing addons and options with package

  1. Add package with at least one option and addon to cart

  2. Login as customer to backend and go to /cart page

  3. Review that standard package and all option and addons are listed in cart

  4. Remove package from cart on frontend

  5. Go back to backend cart page and notice that all packages are removed

  6. Again add the same package to cart

  7. Update cart count to some value greater than 1

  8. Go to backend cart page and check that all packages have correct quantity

  9. Remove package from cart on frontend

  10. Go back to backend cart page and notice that all packages are removed

**CART: Handle order projects** **CART: Save and return all order details entered during checkout process** **CART: Handle adding and removing addons and options along with package** https://app.asana.com/0/697944902557002/834017653237020 https://app.asana.com/0/697944902557002/834017653237023 https://app.asana.com/0/697944902557002/834017653237030 **Description** Implementing: * handling of order projects for orders * saving data entered during checkout process * adding and removing addons and options with packages **Unit tests** Unit tests are added for Order Project logic, since that logic is completed. Cart and Checkout logic has pending document handling logic and after that is complete unit testing will be added for them. Execute unit tests and check all are passing: ``` cd backend/app/plugins/wiaas ./test/bin/setup.sh [root] [pass] phpunit ``` **SMOKE Test** *Handle order projects* 1) Login to backend interface 2) Check that under *Woocommerce* menu there is additional submenu called *Order projects* 3) Go to *Order projects* submenu and notice there is *Is Available?* additional field on form for creating new order project 4) Create few order project (at least on available and at least one unavailable) 5) Login to frontend as customer 6) Add packages to cart 7) Go to cart and examine *Project* dropdown 8) Notice that dropdown is populated with only newly created available order projects 9) Go back to backend and change availability for some of the order projects (at least one of both cases) 10) Go back to frontend cart and notice that populated projects are again only available order projects from backend 11) Try adding new order project from frontend with empty field 12) Notice error is displayed that field cannot be empty 13) Try adding new order project with name longer thatn 100 characters 14) Notice error is displayed that field cannot be longer thatn 100 characters 15) Create new order project with valid project name 16) Go back to backend and notice new order project is listed and it is available for customers *Save and return all order details entered during checkout process* 17) Create new order with populated all necessary fields (Location Details, Invoice Reference, Project) 18) Open order details for new order on frontend and check all fields are present 19) Go to backend and open order details for created order and check it is assigned to correct order project 20) Go to *Order projects* submenu and check that corresponding order project has its count column correctly updated 21) Click on count column and check that order is listed as part of that order project 22) Repeat steps for adding package into cart 23) Create new order without populating fields (Location Details, Invoice Reference, Project) 24) Notice order is succesfully created and corresponding fields are empty on frontend order details 25) Go to backend and open new order details 26) Check order has no project assigned to it *Adding and removing addons and options with package* 1) Add package with at least one option and addon to cart 2) Login as customer to backend and go to /cart page 3) Review that standard package and all option and addons are listed in cart 4) Remove package from cart on frontend 5) Go back to backend cart page and notice that all packages are removed 6) Again add the same package to cart 7) Update cart count to some value greater than 1 8) Go to backend cart page and check that all packages have correct quantity 9) Remove package from cart on frontend 10) Go back to backend cart page and notice that all packages are removed
nedimu commented 2018-09-25 13:05:27 +02:00 (Migrated from gitlab.com)

Smoke test failed for this ticket.

After completing all of the step 15 Create new order project with valid project name, and repeating it one more time immediately after. An error has accrued , and I would receive this error every time after i try to reload a cart page http://localhost:3001/cart

err1

err2

I am stoping smoke test until this is investigated

Smoke test failed for this ticket. After completing all of the step 15 Create new order project with valid project name, and repeating it one more time immediately after. An error has accrued , and I would receive this error every time after i try to reload a cart page http://localhost:3001/cart ![err1](/uploads/5a3b0e3a2e97eaeba3e10eb393838d0d/err1.png) ![err2](/uploads/50c625c1ba32dbc5ef34da7b896f551a/err2.png) I am stoping smoke test until this is investigated
akrdzic commented 2018-09-25 13:18:15 +02:00 (Migrated from gitlab.com)

added 1 commit

  • 4ecadc8b - Fix error for html client response handling

Compare with previous version

added 1 commit <ul><li>4ecadc8b - Fix error for html client response handling</li></ul> [Compare with previous version](https://gitlab.com/saburly/wiaas/new-wiaas/merge_requests/25/diffs?diff_id=23852381&start_sha=fdc01b974eb8c67a1b67ff5a519d806471366750)
nedimu commented 2018-09-25 13:46:47 +02:00 (Migrated from gitlab.com)

A small issue

When saving project names in frontend (smoke test step 15) Name of the project on backend is saved as url frendly
Example prodject name "BIG LETTERS" is saved as "big-letters"

A small issue When saving project names in frontend (smoke test step 15) Name of the project on backend is saved as url frendly Example prodject name "BIG LETTERS" is saved as "big-letters"
akrdzic commented 2018-09-25 13:47:34 +02:00 (Migrated from gitlab.com)

added 1 commit

  • e1a1b4dc - Fix filtering unavailable order projects

Compare with previous version

added 1 commit <ul><li>e1a1b4dc - Fix filtering unavailable order projects</li></ul> [Compare with previous version](https://gitlab.com/saburly/wiaas/new-wiaas/merge_requests/25/diffs?diff_id=23854103&start_sha=4ecadc8bcc2f88d8490370ccc7614bb3d0897fd6)
nedimu commented 2018-09-25 14:47:54 +02:00 (Migrated from gitlab.com)

Smoke test
I was unable to confirm
"Adding and removing addons and options with package" step:

5 .Go back to backend cart page and notice that all packages are removed

By now I was supposed to have 1 standard package, 1 addon and 1 option i cart.
And when I remove standard package on backend I need to observe that "all packages are removed"

And I have observed that only that package is removed, not "all packages" as stated in smoke test.

Is this correct behavior or a problem ???

Other than that, smoke test passed

Smoke test I was unable to confirm "Adding and removing addons and options with package" step: 5 .Go back to backend cart page and notice that all packages are removed By now I was supposed to have 1 standard package, 1 addon and 1 option i cart. And when I remove standard package on backend I need to observe that "all packages are removed" And I have observed that only that package is removed, not "all packages" as stated in smoke test. Is this correct behavior or a problem ??? Other than that, smoke test passed
akrdzic commented 2018-09-26 11:03:27 +02:00 (Migrated from gitlab.com)

We resolved this issue with correct way of adding addons and options to standard package.

We resolved this issue with correct way of adding addons and options to standard package.
akrdzic commented 2018-09-26 11:11:53 +02:00 (Migrated from gitlab.com)

added 1 commit

  • 12805678 - Change order project name sanitize function

Compare with previous version

added 1 commit <ul><li>12805678 - Change order project name sanitize function</li></ul> [Compare with previous version](https://gitlab.com/saburly/wiaas/new-wiaas/merge_requests/25/diffs?diff_id=23933492&start_sha=e1a1b4dc4914ff0a61017c8e58b3d47eefc6437f)
nedimu commented 2018-09-26 11:15:26 +02:00 (Migrated from gitlab.com)

Why is this init function empty ??

Why is this init function empty ??
nedimu commented 2018-09-26 11:37:21 +02:00 (Migrated from gitlab.com)

Remove commented code

Remove commented code
akrdzic commented 2018-09-26 16:01:25 +02:00 (Migrated from gitlab.com)

Commented code contains logic for implementation which is not yet completed, so i left it for reference until it is completed :D

Commented code contains logic for implementation which is not yet completed, so i left it for reference until it is completed :D
akrdzic commented 2018-09-26 16:01:53 +02:00 (Migrated from gitlab.com)

changed this line in version 5 of the diff

changed this line in [version 5 of the diff](https://gitlab.com/saburly/wiaas/new-wiaas/merge_requests/25/diffs?diff_id=23961570&start_sha=12805678b147a8c015d87adff9f9a76b868ec110#40e0ba1a46c3e28110cb08f5ff2bd98c02050dce_7_5)
akrdzic commented 2018-09-26 16:01:53 +02:00 (Migrated from gitlab.com)

added 1 commit

Compare with previous version

added 1 commit <ul><li>415c5d87 - Remove empty function</li></ul> [Compare with previous version](https://gitlab.com/saburly/wiaas/new-wiaas/merge_requests/25/diffs?diff_id=23961570&start_sha=12805678b147a8c015d87adff9f9a76b868ec110)
akrdzic commented 2018-09-26 16:07:25 +02:00 (Migrated from gitlab.com)

added 5 commits

  • 415c5d87...aa8aa421 - 3 commits from branch master
  • 0e592726 - Merge branch 'master' into order-projects
  • 5f744f01 - remove call to empty function

Compare with previous version

added 5 commits <ul><li>415c5d87...aa8aa421 - 3 commits from branch <code>master</code></li><li>0e592726 - Merge branch &#39;master&#39; into order-projects</li><li>5f744f01 - remove call to empty function</li></ul> [Compare with previous version](https://gitlab.com/saburly/wiaas/new-wiaas/merge_requests/25/diffs?diff_id=23961976&start_sha=415c5d874762d518d075f9739387ad6cb4d9a1e5)
akrdzic commented 2018-09-26 16:07:45 +02:00 (Migrated from gitlab.com)

resolved all discussions

resolved all discussions
nedimu commented 2018-09-26 16:13:05 +02:00 (Migrated from gitlab.com)

merged

merged
nedimu commented 2018-09-26 16:13:05 +02:00 (Migrated from gitlab.com)

mentioned in commit 6afffc7eca

mentioned in commit 6afffc7ecab73ab68e44b11574730751092a480e
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: senaduka/old-new-wiaas#25