Code Monkey home page Code Monkey logo

hcp-project's Issues

[Admin Panel] Add the Dashboard

Use Case details

The admin should be able to manage the website data from a dashboard.

How should it work?

The Admin can go to /admin to manage the website in the following way:

  1. Update the list of providers. (Separate Use case)
  2. Download the list of new applicants. (Separate Use case)

How to test that it works?

Request /admin/<appropriate-suffix> and verify that it loads and provides the above options.

Assigned to: @twopiaresquared @BlakeC97

[Misc.] Screenshot Wireframes

Provide screenshots of the previously-developed wireframes so we have a reference while developing.

Note our wireframes diverged from the project requirements, so the wireframe should be used as a guiding force, not a set-in-stone design.

[Test-Case] Submit Credit Request

Test Case

Test that we can submit a credit form, for "passing on" to the relevant party. Also test that all input validation is in place.

Test 1 (failure)

  1. Navigate to the credit form.
  2. For each entry, fill out data that can be considered invalid (if there is data to be considered invalid), i.e. check SSN. Ensure that only one piece of info is wrong at a time.
  3. The application should refuse to submit the form.

Test 2 (success)

  1. Navigate to the credit form.
  2. For each entry, fill out data that can be considered valid.
  3. Submit the form.
  4. In the admin backend, check that we receive and store the information entered by the patient.

[Bug] If condition breaks when message = 0

Steps to reproduce

  1. Instantiate object of type either AddressValidator or Existence with message=0

Expected behavior

The condition in if statement (currently)

not message

should evaluate to False as message was provided.

Actual behavior

The condition evaluates to True because python would interpret the not as arithmetical.

Other details

Change this checks in AddressValidator and Existence to the following:

message is not None

[Test-Case] Test the search bar -- Location testing

The test case

Test the search bar by searching for a location, fixing or omitting the practice type (as practice type is not relevant for this test). Ensure that we can successfully obtain a record of a number of local practices.

Test 1 (failure)

  1. Enter a nonsense location name that will definitely not return a valid location, i.e. "dfoigunje"
  2. Fetch the results, check that no locations are returned.

Test 2 (success)

  1. Enter a location with a known list of providers, i.e. "Philadelphia", "Los Angeles, CA"... Anything that can return valid info from the Google Maps API.
  2. Fetch the results, check that we have a non-empty list of locations.
  3. Optionally, check that their contents equal a known set of provider info, to guard against garbage data returns.

Test 3 (success, "human" search)

  1. Enter a location, but phrased as a sentence, i.e. "providers in my area" (with location enabled), "care near Baton Rouge, LA", etc.
  2. Fetch the results, check that we have a non-empty list of locations.
  3. Optionally check for correct/non-garbage data.

[Admin Panel] Remove the Sign-Up

We don't want sign-ups, only the admin can sign in for the admin dashboard.

  • Remove all Front and Back-End for user signup.
  • Setup an account for admin during initdb. (We will use FlaskAdmin)

[Feature Request] Test Case: Admin login success

Please describe the test case.

Test to see if admin can login to view /admin/ page.

Test Procedure

  1. Request /admin/ with credentials from app.config['ADMIN_CREDENTIALS']
  2. Check the response

Pass/Fail criteria.

The response status should be HTTP OK (200)

Additional context

To do this in curl you do the following:
curl -u admin_name:admin_pass host:post/admin/

Alternatively here's the request as sent by google chrome:
note: The weird string in Authorization is Base64 encoded and it translates to - admin_name:admin_pass

GET /admin/ HTTP/1.1
Host: localhost:5000
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Authorization: Basic YWRtaW5fbmFtZTphZG1pbl9wYXNz
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/78.0.3904.108 Chrome/78.0.3904.108 Safari/537.36
Sec-Fetch-User: ?1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8

Assigned to: @BlakeC97

[Bug] No error message on blank data

Steps to reproduce

  1. Load map page.
  2. Hit search without entering data.

Expected behavior

Further instructions to the user.

Actual behavior

No results or feedback returned.

Other details

ref: #41

[Search Results] Add Search results page

Use Case details

The search page allows user to search for and apply to Credit providers.

How should it work?

Design the /search page using wireframe

How to test that it works?

Request /search?query=QUERY and the search page should load with the corresponding results.

NOTE:

Some components(searchbar, styles, scripts) required for the search page will only be available once #8 is merged.

Assigned to: @sh-hka

[Test-Case] Test the search bar -- Provider type testing

Test Case

Test the search bar by searching based on practice, either fixing or omitting a location (as location is not relevant for this test). Ensure that we can obtain a list of practices of strictly one (or more) specified types.

Test 1 (failure)

  1. Enter a search with an invalid practice type: "bramble-blasters near me", etc. or just gibberish.
  2. Fetch the results, check that we have an empty list of results.

Test 2 (success)

  1. Enter a search with a valid practice type: "vet", "veterinarian", "doctor", "surgeon", etc.
  2. Fetch the results, check that we have a non-empty list of results.
  3. Check that all the results are strictly of the searched types.

Test 3 (success, "human" search)

  1. Enter a search with a valid practice type contained in a sentence: "doctors near me", "need a vet", etc.
  2. Fetch results, check for non-empty list.
  3. Check that all results are strictly of the searched type.

[Test-Case] Test the application form

Please describe the test case.

Test the application form added via #36

Test Procedure

Test 1: Get method

  1. Send a get request to /apply and check for HTTP 200 response code and text/html content type

Test 2: Post method (Success)

  1. Prepare a form
  2. Post the form to /apply
  3. Check for response (Expected response: redirect to /index)
  4. Check the db to verify that the data has been added.

Test 3: Post method (Failure)

  1. Create a malformed data.
  2. Post the bad data.
  3. Check db to verify that the data has not been added.

@BlakeC97

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.