Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing API to append Data #16

Merged
merged 7 commits into from
Sep 6, 2023
Merged

Testing API to append Data #16

merged 7 commits into from
Sep 6, 2023

Conversation

Prakhar-commits
Copy link
Contributor

@Prakhar-commits Prakhar-commits commented Aug 29, 2023

Fixes #17

ADR : https://www.notion.so/avantifellows/ADR-Appending-Data-9ca0b4f09f47413e8e5df1844c7a4029?pvs=4

Summary

Test Plan

NEXT_PUBLIC_BACKEND_URL Represents the URL at which the DB is present currently using local db.json for storing and fetching the SessionDetails which will be replaced by PostgresDB

  • Test Responsiveness
    • Laptop (1200px)
    • Tablet (760px)
    • Phone (320px)
  • Cross-Browser Testing
    • Chrome
    • Firefox
  • Local Language Support
  • Hygiene and Housekeeping
    • Self-review
    • Comments have been added appropriately
    • Check for bundle size here if adding a package
    • Added relevant details like Labels/Projects/Milestones etc.
    • If adding or removing any environment variable, update docs/ENV.md, .env.example and the Github workflows.
  • Testing
    • Wrote tests
    • Tested locally
    • Tested on staging
    • Tested on an actual physical phone
    • Tested on production
  • Lighthouse Checks
    • Images have alt attributes
    • Any <img> tags have width and height specified
    • Any target="_blank" links have rel="noopener"
    • Only SVGs are used as images. If PNGs are used, their size has been optimised.
    • Any SVG buttons without text have their aria-label attributes set

<table style={{ width: "100%" }}>
<tbody>
<tr>
<td>Test_type: {type}</td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a configurable list via a separate json file. you can loop over them. keep a note of this and make an issue.

json file will have key_name and key pair.
{"Test Takers Count": "testTakers", "Test Format": "format"}

and you can write a loop here -- that iterates over this json file. it displays the key_name in header, and db_row[key] as column value.

Current code is not easily configurable. With this json file, we just have to make a change in json and it will handle everything. Also, current code is repetitive wherein each column/row can be easily iterated over.

src/utils/rootclient.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@suryabulusu suryabulusu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@suryabulusu suryabulusu merged commit 7c424c5 into main Sep 6, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Appending Data to the UI
2 participants