Skip to content

Chakyiu/react-fe-plan-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

To create and choose plan by users' input.

Instruction

  1. Clone the project and run npm install and npm run start under the root folder.
  2. Run npm run build and pull all data in ./build to static server.
  3. Config home page under ./package.json and run npm run deploy

Unit test

  1. Layout showcase

Empty Field: Demo_Img_1 Error Input: Demo_Img_1 (When submit button is clicked during error input, it will have shaking animation to alert user.) Correct Input: Demo_Img_1 Plan Page: Demo_Img_1

  1. Acceptable and sample input format:
{
  "plan": [
    {
      "name": "Standard Plan",
      "element": {
        "General": true,
        "Specialist": true,
        "Physiotherapy": false
      },
      "price": 0
    },
    {
      "name": "Premium Plan",
      "element": {
        "General": true,
        "Specialist": false
      },
      "price": 388
    }
  ]
}

Result: Demo_Img_1

  1. More than three plans inputed:
{
  "plan": [
    {
      "name": "Standard Plan",
      "element": {
        "General": true,
        "Specialist": true,
        "Physiotherapy": false
      },
      "price": 0
    },
    {
      "name": "Premium Plan",
      "element": {
        "General": true,
        "Specialist": false
      },
      "price": 388
    },
    {
      "name": "Premium Plan",
      "element": {
        "General": true,
        "Specialist": false
      },
      "price": 388
    },
    {
      "name": "Premium Plan",
      "element": {
        "General": true,
        "Specialist": false
      },
      "price": 388
    },
    {
      "name": "Premium Plan",
      "element": {
        "General": true,
        "Specialist": false
      },
      "price": 388
    },
    {
      "name": "Premium Plan",
      "element": {
        "General": true,
        "Specialist": false
      },
      "price": 388
    }
  ]
}

Result: Demo_Img_2

  1. Empty JSON
{}

Result: Demo_Img_2 4. Empty Plan

{
  "plan": []
}

Result: Demo_Img_2

  1. Plan with no "Name"
{
  "plan": [
    {
      "element": {
        "General": true,
        "Specialist": true,
        "Physiotherapy": false
      },
      "price": 0
    }
  ]
}

Result: Demo_Img_2

  1. Plan with no "Element"
{
  "plan": [
    {
      "name": "Standard Plan",
      "price": 0
    }
  ]
}

Result: Demo_Img_2

  1. Plan with no "Price"
{
  "plan": [
    {
      "name": "Standard Plan",
      "element": {
        "General": true,
        "Specialist": true,
        "Physiotherapy": false
      }
    }
  ]
}

Result: Demo_Img_2

  1. Responsive layout

Demo_Img_2 Demo_Img_2 (For too many plans inputed, the plan list can be scolled horizontally.)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors