Coder Social home page Coder Social logo

katanox-travel-app's Introduction

For Katanox

For the assignment I created this app per the discussed requirements. It's a basic create-react-app, so the usual scripts are there in package.json. But you would probably want to use:

npm start

I've inserted comments starting with TD to indicate "Technical Debt" as per the requirements.

E2E tests

I decided to not spend too much time on it, but here's an idea of how I would approach it.

We could describe a "feature" in Gherkin and pull it through Cucumber (preprocessor) + the Cypress E2E framework. We could describe a test scenario as follows, e.g. if we want to verify the outcome when a user presses the button "Show statistics":

Feature: Show statistics

  Scenario: User opens the travel app
    Given: User selects one or more hotel rows in the "Select" column 
    When: User clicks on "Show statistics"
    Then: User sees a list of the selected hotel names

Addressing ambiguities in assessment

My retrospective would be now (2-11-2021):

  • "Once the user selects a value from the filtered hotels, it should print it in the console." -- I only enabled the user to select the name once the filtered list is down to one. It's not very intuitive and user friendly like this, it should've been done for all columns or at least some css:hover, but I am a bit on a tight schedule this week with many assessments.
  • "You can use bootstrap or any other framework for it’s grid system (not the js part though)" -- I think I misinterpreted this, since I used a React component called rc-table, while you in fact expected me to create a 2D grid for the main table.
  • For task 2 I was figuring out how to maintain the state between components, and it seemed useful to add an extra prop. But for task 3, I maintained state with the useState hook. In hindsight it would've been nicer to keep the state both with useState as the extra prop is unnecessarily limiting, or with Redux.
  • In an e-mail I asked whether I could dynamically print the list, but it was easier to place a button because the event logic is much simpler. I think this insight should come with experience, so I will pay attention next time.

katanox-travel-app's People

Contributors

0-sv 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.