- On navbar click on links to check if they are sending to the corespondent page.
- Click on different categories to check if they are sending to the correspondent page.
- Click on one of the three header from the carousel and check they are sending the user to the corresponding page.
- Click on different cards to check if they are sending to the review or product detail page.
- Click on the social icons to check if they are sending to the correspondent website.
- On home page click on one product card and go to the page view.
- After register and login check if it is possible to add a comment.
- If the comment is created, check if it is possible to delete this comment.
- When not logged in check if the comment form is disabled.
- Check if the view is adding one per view you did.
- On the navbar or side card called categories click on a category as
Electronics
,Home & Garden
orMotors
. - On the category page, check if the products are based within the correspondent category. Like, electronics into Electronics category.
- Click on a product to see whether the user is sent to the correspondent product view or not receive a error message.
- Check if the pagination is working, like, if on the last page it should stop the pagination button, not loading empty page.
- On navbar click on the register link.
- On the register page add your username, email and password.
- Click the sign up button and check if the user is redirected to the login page.
- On navbar click on the login link.
- On the login page add your email address and your password.
- If the login is done, the user will be redirected to his account page.
- On the account page select the category on the form.
- Add a product name.
- Add a price.
- Add url link.
- Add description and click submit.
- If the form is submitted a message will be displayed telling the user the product was listed successful and redirected to the same page.
- The product will be displayed at the account page after the page is redirected.
- After listing a product click on the
edit
(green) button. - The user will be redirected to a page to change the category, product name, price, image url and description.
- After the changes is submitted the user will be redirected to its account page with the product edited.
- After listing a product click on the
see
(blue) button. - The user will be redirected to the product detail, being able to visualize their product.
The devices that the application was tested were:
- BlackBerry Z30
- Galaxy Note 3
- Moto G4
- Galaxy S5
- Pixel 2
- Pixel 2 XL
- iPhone 4
- iPhone 5 SE
- iPhone 6, 7 and 8
- iPhone 6, 7 and 8 Plus
- iPhone X
- iPad
- iPad Mini
- iPad Pro
- ThinkPad X1 Carbon
- ThinkPad T430
- Macbook Pro
There had some issues with function authentication and users without being logged having access to sensitive functions
such as edit_product
. I had to learn it and add session based access only logged users to have access based on their own
posts. Therefore, to make sure it was working well I added the function on the url and added a product id without being logged
to check whether I had access and finally they were fixed.
There still a small issue with the edit_product
function
in which only logged users if trying to edit other user's product can be redirected to the edit_product form page but with no access to details, not damaging any user data.
Example of function authentication:
@app.route('/edit_product/<product_id>')
def edit_product(product_id):
+ seller = session['name']
+ if not seller:
return redirect(url_for('register'))
try:
the_product = mongo.db.products.find_one({"_id": ObjectId(product_id), 'seller':seller})
all_categories = mongo.db.category.find()
except:
return redirect(url_for('index'))
return render_template('editproduct.html', product=the_product, categories=all_categories)