JS Test Shopping Cart
JS Test Shopping Cart
On behalf of the whole Forwardslash team, we'd like to thank you for extending your effort to
take this test. We ourselves, as fellow colleagues, are not very eager when it comes to wasting
our time on taking tests. With that in mind, we did our best to create a test with a simple
scenario where you have an open opportunity to use your skills and practices to make it
complicated as much as you find it fit.
With that said, we commit to paying less attention to the actual functionality of your final result if
we get an opportunity to see something like SOLID principles, OOP practices, design patterns,
tests, more strict code written in TypeScript, and/or similar. On the other hand, if you get a
feeling like "Whaaaaaat?", forget about it, the test is designed for all knowledge levels. So make
sure you do the best you can in a reasonable time span because that is the actual point of this
test. We wanna have a glimpse of what YOU can do.
The test comes with a couple of things already preset. You have the opportunity to use any
technologies, packages, or solutions, although we highly prefer to see your programming
principles and skills in vanilla JS (ES6).
Instructions
Please create a private Github repository at https://github.com/, where you can track progress
and commit your work at the end of the day.
Please make sure it is not visible to the public and you give only access to users:
● [email protected]
Please only provide the access once you are completely done with the task and email us the
link to your repo.
index.html - Basic code is written. It should be enough for the assignment, but if you notice
something missing feel free to upgrade the script.
● Append all your shopping cart items to the element with a class selector 'js_cart'.
● Append all the products you compile from the API 'SearchProducts' endpoint to the
element with a class selector 'js_products'.
● Element with the class selector 'js_product_page' represents the search page.
● Element with the class selector 'js_cart_page' represents the shopping cart page.
app.js - You can start with your JS script here. The initial code contains some examples to show
you how to use the ApiClient.
ApiClient.js - ApiClient represents communication with an API and in this case, it will mock
endpoint responses for you. Do not edit the ApiClient code. There are examples in the app.js of
how to use it.
Exception.js - When something goes wrong with ApiClient requests, the script will throw this
exception.
CartItem.html and SearchItem.html - these are HTML templates where you will find the
example code to use to compile content for your pages.
● To compile each cart item, use CartItem.html example code to append items to
index.html in the element with the class selector 'js_cart'.
● To compile each product, use SearchItem.html example code to append items to
index.html in the element with the class selector 'js_products'.