Giter Club home page Giter Club logo

mimock's People

Contributors

aditilahare avatar aravinve avatar dependabot[bot] avatar depfu[bot] avatar mend-bolt-for-github[bot] avatar nageswari-droid avatar neel1996 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mimock's Issues

[UI] Add login page

Issue by neel1996
Saturday Feb 26, 2022 at 18:35 GMT
Originally opened as https://github.com/neel1996/mimock/issues/38


Should accept user name and password to let the user login to mimock

  • Should make api call to authenticate user
  • If authentication fails, respective error label should be displayed
  • If login succeeds, the auth token should be obtained to authorize further interactions

Handle exceptions gracefully

Issue by neel1996
Thursday Feb 03, 2022 at 18:05 GMT
Originally opened as https://github.com/neel1996/mimock/issues/15


The exception in all layers need to be handled gracefully and propagated to the controller as an error response that could be sent back to the client

E.g:

try{
   repo.insertSomething();
} catch(Exception e){
   log(e.getMessage());
   return new Error("ERROR", "Failed while inserting data!");
}

[CLOSED] create new mimock user

Issue by neel1996
Monday Jan 24, 2022 at 05:47 GMT
Originally opened as https://github.com/neel1996/mimock/issues/8


Add components to create new mimock user and tag respective roles to the user

Roles:

  • Admin - should be allowed to manage users and mocks (all CRUD operations)
  • Manager - should be allowed to manage mocks alone (all CRUD operations)
  • Viewer - should be allowed to view the mocks that are already setup

[CLOSED] Add new mock

Issue by neel1996
Sunday Jan 23, 2022 at 08:27 GMT
Originally opened as https://github.com/neel1996/mimock/issues/1


Add api to setup mocks

Request contract

{
    "route": string,
    "httpMethod": string,
    "responseContentType": string,
    "queryParams": {
        "key": string,
        "value": string,
    },
    "statusCode": number,
    "textResponse": string,
    "binaryFile": multipart,
}
HTTP 200 OK

{
    "code": string,
    "message": string,
}

[API] Check and improve test coverage

The test coverage for the service layers is less than 85% due to missing tests for exception scenarios.

The unit tests need to be revised to cover exception scenarios to improve the test coverage.

[UI + API] Add polling to validate auth token

Add react polling to validate the auth token every 'n' minutes

  • The api [GET] /api/mimock/v1/auth-token/validate can be used to validate the token

  • The auth token will be populated by the axios client and the same token will be validated by this endpoint

  • If the token is valid then the api returns status 200

  • If the token is not valid or has expired, then a 4xx status will be returned

  • If the token is invalid, all the auth related cookies must be cleared so the user can authenticate again to fetch a new token

  • Add new api to validate token

  • Add hook in UI to validate token by polling

[CLOSED] Add Platform Settings

Issue by aravinve
Friday Feb 11, 2022 at 01:47 GMT
Originally opened as https://github.com/neel1996/mimock/issues/26


To add a table platform settings holding master data for the mimock platform.

Based on the master table configuration the platform functionalities are enabled/disabled.

Configuration should be allowed to modify only for admin scoped user.

Add separate endpoint and resource path to handle this functionality.

Tentative Colums include: (TODO)

  • isCategoryExecutionEnabled
  • isStepsExecutionEnabled
  • isExportImportEnabled
  • isFlushRecycleBinCronEnabled

Use case:
Mimock platform will be self hosted by users in the build pipeline as per their needs and wants targeting different environments.

Platform settings provide the flexibility in extending the mimock platform for different types of users. Based on the settings configured by the admin they are allowed to fine tune the functionalities.

Examples:

  • Most users will not require category execution in pipeline. So I want to disable that function.
  • Some users have compliance not to flush the deleted mocks via cron.

Add E2E tests

Issue by neel1996
Saturday Feb 26, 2022 at 18:38 GMT
Originally opened as https://github.com/neel1996/mimock/issues/40


Prepare UI automation test suite using puppeteer to run in pipeline

  • The test suite should run an instance of mimock to mock the backend api calls
  • Should cover all the scenarios of user journey
  • It will act as a demo to show different use cases of mimock

[CLOSED] Add endpoint to archive and unarchive a mock

Issue by aravinve
Tuesday Feb 08, 2022 at 14:01 GMT
Originally opened as https://github.com/neel1996/mimock/issues/23


  • create a new endpoint which accepts mock resource and converts the entity status to archived
  • create a new endpoint which accepts archived mock resource and converts it back to unarchived i.e entity status back to none

These apis will be helpful in displaying 3 different views in UI

  1. Regular list view
  2. Archived list view
  3. Recently deleted list view

[SPIKE] Explore UI automation suites

Explore viable UI automation test suites to be used for mimock UI. Once the framework is finalized, a new pipeline will be created to run the automation tests.

The automation tests will use mimock itself to mimick the rest endpoints to simulate various scenarios

[CLOSED] Add request body and header matching for mocks

Issue by neel1996
Saturday Feb 05, 2022 at 14:10 GMT
Originally opened as https://github.com/neel1996/mimock/issues/21


The current mock setup will look for matching mocks based on route + path params + query string. This needs to be extended to perform request body and header based matching as well.

Accepted request types

  • Empty request body
  • Raw request body (json, xml and plain text)
  • URL encoded request
  • Form data request (limited to text fields alone and file based inputs can be added as placeholders but files should not be accepted)

Headers

  • Headers can include any set of key value pairs
  • The header matching should include both a loose matching and an exact matching.
  • If loose matching is selected, then the service will look for expected fields to be present and will not bother about additional header fields (if a client sends additional header fields, then the matching will not fail)
  • If exact matching is selected, then the validation should be performed field by field and any variation from the defined schema should should not be accepted

[CLOSED] Add "name" field for mocks table

Issue by neel1996
Saturday Feb 05, 2022 at 14:32 GMT
Originally opened as https://github.com/neel1996/mimock/issues/22


Add a new "name" column to the mocks table which needs to be fetched from the user during mock creation

  • The name field should be unique and non nullable
  • It will serve as an identifier to lookup for mocks in the UI
  • It can also serve as an option to let the user search for a mock in the UI

Scope

  • Update existing entity and repo tests
  • Add new "name" field to request field in mock management
  • Update service layer tests

Binary files more than 1MB cannot be inserted

Issue by neel1996
Thursday Feb 03, 2022 at 18:18 GMT
Originally opened as https://github.com/neel1996/mimock/issues/17


While setting up a new mock, binary image more than 1MB was not being accepted as the response.

The service throws the following exception

org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size exceeded; nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.impl.FileSizeLimitExceededException: The field binaryFile exceeds its maximum permitted size of 1048576 bytes

Create common styled components for UI

Issue by neel1996
Thursday Feb 17, 2022 at 18:16 GMT
Originally opened as https://github.com/neel1996/mimock/issues/36


Use tailwind-styled-components to create common style elements such as Cards, Buttons, Radio buttons etc.

The components must be extensible but at the same time should restrict the styling attributes to maintain a uniform design language across the application.

Components required

  • Button
  • Labels (Normal text containers)
  • Pills (Like bootstrap pills)
  • Textbox
  • Checkbox
  • Radio buttons
  • Cards
  • Title card with random soft backgrounds (Refer figma design)
  • List view
  • Tables
  • Code view
  • Form

[CLOSED] Bump follow-redirects from 1.14.7 to 1.14.8 in /mimock-ui

Issue by dependabot[bot]
Tuesday Feb 15, 2022 at 07:22 GMT
Originally opened as https://github.com/neel1996/mimock/pull/34


Bumps follow-redirects from 1.14.7 to 1.14.8.

Commits
  • 3d81dc3 Release version 1.14.8 of the npm package.
  • 62e546a Drop confidential headers across schemes.
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.


dependabot[bot] included the following code: https://github.com/neel1996/mimock/pull/34/commits

[API/UI] Import mocks as csv file

Feature:
Option to import csv file to add new mocks in bulk

Scope:

  • The UI should support uploading the allowed CSV template
  • The UI should parse the CSV file and perform field validation
  • The parsed values must be displayed on the screen and on submitting, the new mocks should be created

[CLOSED] Enhance controller to handle requests for mocks

Issue by neel1996
Monday Jan 24, 2022 at 05:41 GMT
Originally opened as https://github.com/neel1996/mimock/issues/6


Enhance the functionality of the generic controller to handle requests for mocks that are already setup in mimock

  • The URL that does not start with the mimock api prefix (/api/mimock/v1) should be handled by this controller

  • It must pick the matching response from the mocks table and return it as response

  • should match request based on path + query param + request body + headers

  • should be able to handle both text and binary responses

[UI][BUG] Style props getting propagated to DOM for TW styled components

Describe the bug
The additional style props being passed to tailwind styled components are getting propagated to the DOM which results in an error. Even though this is not breaking the app, it needs to be handled properly as per tailwind-styled-components documentation

To Reproduce
Steps to reproduce the behavior:

  1. Go to any component which uses tw-styled-components with additional props passed from the parent component
  2. Check the console for error logs and inspect the element to see the invalid props which are added as attributes in the DOM

Expected behavior
tailwind-styled-components docs recommend using $ prefix in front of additional props which should not be directed to the DOM

Prefix the props name with a dollar sign ($) to prevent forwarding them to the DOM element

Issue Type

  • UI Issue
  • Performance Issue
  • Feature Breaking Issue
  • Security Issue

Severity

  • Critical (The application crashes / breaks completely)
  • High (Blocks you from performing a critical operation)
  • Moderate (Bearable or Manageable issue)
  • Low (Something is not right, but the impact is minimal)

[UI] Add mock landing page

Add new page to display all the mocks

  • Make an api call to GET mocks to fetch the list of all mocks
  • The mock page should display each mock with info such as Name, description, HTTP method, route etc

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.