Giter Club home page Giter Club logo

lendsqr-fe-test's Introduction


lendsqr logo
Lendsqr Frontend Engineer Assessment

A Dashboard Frontend with REST API and indexedDB.


Build Status version MIT License

All Contributors PRs Welcome

Frontend Assessment

Build out a Frontend with React and SCSS, with indexedDB/LocalStorage to persist user data, as well as a mock API to get all users.

Solution

Please follow the table of contents below as a guide through the application.

Table of Contents

Installation

This project is distributed via npm which is bundled with node and should have all dependencies installed:

npm install  

or using Yarn

yarn add  

This package also depends on react. Please make sure you have it installed as well. ๐Ÿ‘

Usage

Upon running the project, you can spin up the server by running the following code:

npm start  

or using Yarn

yarn start  

UI Interaction

Upon running the project, you will first be greeted with the login page, according to the UI design.

The form will not be submitted till you input some data. This is only to demonstrate form validation on the page. The details put in, don't matter.

On the dashboard page, we click the three dots on the users item to open the details modal, as per the UI design. We also click the table header to open the filter dropdown.

Testing

To start the test cases, simply run the test script below:

npm run test 

[Ensure to use in a separate terminal]

Example

import React from "react";
import ReactDOM from "react-dom";
import Input from "../index";
import {render, cleanup,screen } from "@testing-library/react";
import "@testing-library/jest-dom/extend-expect"

afterEach(cleanup)
it("renders input without crashing", () => {
  const div = document.createElement("div");

  ReactDOM.render(
    <Input
    placeholder={"Test"}
    required 
    inputType={"text"}
  ></Input>,div
  );  
});

it("renders input correctly", () => {
    render( <Input
      placeholder={"Test"}
      required 
      inputType={"text"}
  />)
  expect( screen.getByTestId('input-component')).toHaveClass("input_container")
     
  });

Test Case

The Tests are set up to have the positive cases active. To check on negative test cases, you will see the commented code in each test file. You can comment out the positive test code and uncomment the negative test case, then save to restart the test server

Contributors

No Current Contributors:

Contributions of any kind are welcome!

LICENSE

MIT

DEMO

You can check out the live project at live-demo

lendsqr-fe-test's People

Contributors

george5555ish avatar

Watchers

 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.