Git Product home page Git Product logo

fe-tech-test's Introduction

Frontend Tech Test

Objectives

  • Evaluation of programming style
  • Evaluation of language knowledge
  • Evaluation of testing approach

Deadline

  • Assignment should be ready within 5 natural days of inbox reception
  • Assignment is completed when we receive the link to the repository

Task Description

You are the lead FE programmer for a small web shop. You are required to make a simple page where the user can add products to a cart, and the total of the cart is updated in real time.

You will have an API endpoint that returns products with the following structure:

ID Name Price
GR1 Green Tea £3.11
SR1 Strawberries £5.00
CF1 Coffee £11.23

This already implemented for you using mirage in the file mirage/config.js you can modify this file and adapt it to your needs

Special conditions

  • The CEO is a big fan of buy-one-get-one-free offers and of green tea. He wants us to add a rule to do this.
  • The COO, though, likes low prices and wants people buying strawberries to get a price discount for bulk purchases. If you buy 3 or more strawberries, the price should drop to £4.50
  • The CTO is a coffee addict. If you buy 3 or more coffees, the price of all coffees should drop to two thirds of the original price.

We can assume that discounts do not change very often so they can be hardcoded in the application, for display purposes. Our check-out can scan items in any order, and because the C*Os change their minds, it needs to be flexible regarding our pricing rules.

Deliverables

  • A shop route where the user can view all available items and add to basket (a quantity selector would be nice). There is already a route products implemented as an example (files app/templates/products.hbs and app/routes/products.js ), it renders all the product available on the mirage endpoint. You can decided wether to use this route or implemented another. Also there is a Product component you can use as example (files app/components/product.js and app/components/product.hbs)
  • A checkout route where the user can view all items in his basket with:
    • The quantity of each item and the original prices
    • All the discounts currently applied
    • The total price of the basket after discounts applied
  • Some navigation implementation between the routes.
  • A service or similar that is responsible of calculating and persisting total amount.
  • The wireframes to create the components and elements used on the app are specified in this Figma file.

Bonus point

  • Implement tests (integration or acceptance)

Prerequisites

You will need the following things properly installed on your computer.

Installation

  • git clone <repository-url> this repository
  • cd fe-tech-test
  • npm install

With this, you will have an empty app with two routes already implemented index and product. TailwindCSS is installed so you can make use of it. A simple backend is available using Mirage, you can modifiy it and adapt it for your needs. There is no need to install anything else to make the app work, of course you can add any other library you want to use.

Running / Development

Code Generators

Make use of the many generators for code, try ember help generate for more details

Running Tests

  • ember test
  • ember test --server

Linting

  • npm run lint
  • npm run lint:fix

Building

  • ember build (development)
  • ember build --environment production (production)

Deploying

Specify what it takes to deploy your app.

Further Reading / Useful Links

fe-tech-test's People

Contributors

chsanch avatar ember-tomster avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.