Giter VIP home page Giter VIP logo

brace-notes's Introduction

React: Notes

Environment

  • React Version: 16.13.1
  • Node Version: 12(LTS)
  • Default Port: 8000

Application Demo:

Functionality Requirements

  • There is an input box for 'Note Title' in which the user can type the title of the note.
  • There is an input box for 'Note Status' in which the user can type the status. For example, 'active', 'complete', 'in progress', 'pending', or anything the user wants. (Status is case insensitive)
  • Clicking on the button 'Add Note' will add the note to the component. After adding, the values in the input boxes are reset.
  • Each node should be added inside the table <tbody data-testid="noteList"> as an individual row. Note name and status should be added using <tr><td>{name}</td><td>{status}</td></tr>.
  • The app has 3 buttons that, when clicked, filter the notes from the list below:
    • 'All' - This is the default selected button, and it displays all the notes added by the user ('Active', 'Completed', and any other status as added by the user.)
    • 'Active' - Clicking on this displays only the notes having the status 'active'. (in the order added by the user)
    • 'Completed' - Clicking on this displays only the notes having the status 'completed'. (in the order added by the user)
  • When 'All' button is clicked, the notes displayed should be in the following order:
    • All notes that have the status ‘active’ (in the order added by the user)
    • All notes that have the status ‘completed’ (in the order added by the user)
    • All other notes in the order added by the user.

Testing Requirements

The following data-testid attributes are required in the component for the tests to pass:

  • Name input should have data-testid attribute 'input-note-name'.
  • Status input should have data-testid attribute 'input-note-status'.
  • Add Note button should have data-testid attribute 'submit-button'.
  • All button should have data-testid attribute 'allButton'.
  • Active button should have data-testid attribute 'activeButton'.
  • Completed button should have data-testid attribute 'completedButton'.
  • The table body should have data-testid attribute 'noteList'.

Please note that component has above data-testids for test cases and certain classes and ids for rendering purposes. It is advised not to change them.

Project Specifications

Read Only Files

  • src/App.test.js

Commands

  • run:
bash bin/env_setup && . $HOME/.nvm/nvm.sh && npm start
  • install:
bash bin/env_setup && . $HOME/.nvm/nvm.sh && npm install
  • test:
bash bin/env_setup && . $HOME/.nvm/nvm.sh && npm test

brace-notes's People

Contributors

mvoloz avatar

Watchers

 avatar  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.