Fix the issues in this repo and make this program work.
- Fork this repository
- Clone your forked repository
- Create a virtualenv and activate it
pip install -r requirements.txt
- Run the test using the command
pytest -k e2e
Complete the weather shopper exercise using the code provided to you. Your assignment is to:
- fix the errors in the existing code
- complete the payment structure using a code structure similar to what has been used for the other actions
- use the same design patterns and programming style used in this repository
- Run the test using the command
pytest -k e2e
- Observe, debug and fix the error
- Test your fix
- Commit your change and push
- Repeat steps 1-4 for the next error
If you fix all the bugs in this code, your test should perform like the gif below:
Remember, you should not stop at just fixing the existing code. You should also complete the instructions on the cart page.
Here are some useful debugging tips that do not involve the use of debugger:
- Search for strings in all files
- Search for sub-strings in all files if the exact string does not exist
- F12 to follow the definition of a method
- Add debug messages to figure out the flow
- if True: trick (to get exact error messages, in the test, replace
try:
withif True:
and comment out theexcept
portion) - Read the log messages backwards
- Sometimes the error happens in the line before the failure!
- Use Python3
- We recommend using Visual Studio code as your IDE
- We recomment using a virtualenv
- You need to have Chrome driver installed