Imagine a sample sorter: a machine that is responsible for placing a test tube into one of many racks. This machine can recognize the test tube (read its id) and place it into the specified rack. Here comes your task. Write an application that will allow the user to insert a list of test tubes, and then it will assign them to racks based on the following logic:
- Each tube contains a material for a specific patient
- It is illegal to place patients of the same age into the same rack
- It is illegal to place patients working in the same company into the same rack
- It is illegal to place patients who live in the same city district into the same rack
- It is illegal to place patients with the same vision defect into the same rack
- The number of racks is very limited
- Install proper version of Node
nvm i
using NVM - Use installed Node version
nvm use
- Pull the app from github: https://github.com/gunitguy/marcel-fe-task
npm i
- install dependenciesnpm run build
- running the webpack- Then built app files will show in βdistβ folder.
npm run start
- Open app in browser at
localhost:8080
- Put test json with data (from
/data/test-tubes.json
) into file input - Add limit for racks
- Submit and see the result (group tubes and hwo many additional racks were needed)
npm run test
- run unit testsnpm run lint
- run eslint and prettier checksnpm run lint:fix
- run eslint and prettier with fixnpm run test:all
- run all checks (prettier, eslint, jest tests)
- more unit tests can be added
- E2E tests can be added
- media queries to be apply responsiveness
- validation for object in file input
- more advanced error handling