-
Notifications
You must be signed in to change notification settings - Fork 56
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
Fixing issues of tour test for awesome_tshirt #1
base: master
Are you sure you want to change the base?
Conversation
BT-rmartin
commented
Oct 14, 2022
- Fixing issue in the workflow. When trying to run this tour test I got an issue because the new order was not found. By debugging it the problem was that as we weren't clicking on the "Order" button, it wasn't calling to the other controller /awesome_tshirt/validate_order where the order is really created. Now it clicks the button and in the next endpoint it finds the "Make another order" button to switch to the /web. Therefore now the order is created
- Fixing typo in the class o_list_number. Otherwise despite the order was created it couldn't find and element in the UI with that content, as it was not a class
- Fixing issue in the workflow. When trying to run this tour test I got an issue because the new order was not found. By debugging it the problem was that as we weren't clicking on the "Order" button, it wasn't calling to the other controller /awesome_tshirt/validate_order where the order is really created. Now it clicks the button and in the next endpoint it finds the "Make another order" button to switch to the /web. Therefore now the order is created - Fixing typo in the class o_list_number. Otherwise despite the order was created it couldn't find and element in the UI with that content, as it was not a class
@ged-odoo Continuing with the exercises of the SmartClasses I found an issue here. By the way, I have a more general question. In my opinion, tours should be more close to Selenium, and there we should check all results in the UI. Perhaps the point there is that we should just do tours in case there is some logic in JS in the endpoint, but if the endpoint is just a plain representation of a controller, we can simply do it with HttpCase. Looking forward to hear from your expertise. Thanks a lot in advance. |
@ged-odoo @fdardenne @aab-odoo Could you please double check this? |
Hello @BT-rmartin thank you for your PR,
In my opinion the check that the data has been inserted in the database should be done at the python level (here the verification is probably done at the JS level for educational purposes).
I think this problem should be reported in an issue in Odoo and not in this training repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me except for the string of content that should be changed 👍
First of all @fdardenne thanks a lot for replying.
But then, if you need to verify intermediate steps of your tour, you need to create several smaller tours, call them, and do the checks in Python in the middle right?
Regarding this, you are right, if the target of the form changes we are not testing that the workflow succeeds for the end user. In other words, I would like to know when it's better to do tour tests, when testing controllers with HttpCase, when just QUnit, when just Unit tests. And the answer will be probably "it depends", but I would appreciate to get some examples or your advice.
|
bc95e11
to
9383c2a
Compare
Hello @BT-rmartin , For the moment the solutions are merged in a private repo and are then cherry-picked on this public repo. All of this is temporary, we want to transfer the code and solutions in a new repo in the Odoo organization because we are rewriting the tutorial in the Odoo documentation. Do you agree that we squash your commit in the right commit in the private repo ? We'll add your name in the co-author |
@fdardenne Sure, no problem. Could you please answer when it's better to do tour tests, when testing controllers with HttpCase, when just QUnit, when just Unit tests. And the answer will be probably "it depends", but I would appreciate to get some examples or your advice. |
Thanks 👍 For controllers:
I'm not a testing expert, this is my opinion and hope that this is useful to you :) |