Coder Social home page Coder Social logo

react-crud-tdd-sample's Introduction

React CRUD TDD Sample

Instructions

This repo contains an empty react app. Your job is to implement the following user stories in TDD fashion:

  1. Given a browser, when I browse to the site, then I see an "Add Person" button.
  2. Given I see the "Add Person" button, when I click it, then I am taken to an Add Person page.
  3. Given I am on the Add Person page, when I fill in the fields and click "Add", I am taken back to the list page.
  4. Given that I have added a person, when I am on the list page, then I see my people.
  5. Given that I see people in the list, when I click a person, I am taken to a Person Edit page.
  6. Given I am on the person edit page, when I change a persons name and click Save, then I am taken back to the list page.
  7. Given that I have made updates to people, when I am on the list page, I should see the modified information.
  8. Given that I am on the edit page, then I see a delete button.
  9. Given that I am on the edit page, when I click the delete button, then I am taken back to the list page.
  10. Given that I have deleted a person, when I am on the list page, then I no longer see the deleted people.

Tips:

  • Use simulate to simulate text change and click events
  • Use sinon to stub the onEdit() call
  • Verify the stub was called with the correct arguments.
  • Use controlled components for input.

Resources

react-crud-tdd-sample's People

Contributors

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