mirror of
https://github.com/Haiti-Distributed-Healthcare-System/hdhs.git
synced 2026-10-30 19:36:19 +00:00
test skeleton
This commit is contained in:
1 parent
a94ec1b811
commit
32027335ee
1 file changed
+49
-7
@@ -1,8 +1,50 @@
|
||||
import React from "react";
|
||||
import { render, fireEvent } from "@testing-library/react";
|
||||
import DiagnosisForm from "./DiagnosisForm";
|
||||
import React from 'react'
|
||||
import { render, fireEvent } from '@testing-library/react'
|
||||
import DiagnosisForm from './DiagnosisForm'
|
||||
|
||||
test("renders the form", async () => {
|
||||
const dom = render(<DiagnosisForm />);
|
||||
expect(dom.getByTestId("diagnosis-form-wrapper")).toBeTruthy();
|
||||
});
|
||||
/*
|
||||
|
||||
Diagnosis Fields are stored in DiagnosisFields.json in the format:
|
||||
|
||||
{
|
||||
"diagnoses" : [
|
||||
{
|
||||
"name": "Name",
|
||||
"id": "id",
|
||||
"text-input-title": "Title",
|
||||
"text-input-type": "type" (i.e. number)
|
||||
"group-title": "Group Title",
|
||||
"group": [
|
||||
{ "name": "Name1", "id": "id1" },
|
||||
{ "name": "Name2", "id": "id2" }
|
||||
]
|
||||
},
|
||||
{...}
|
||||
]
|
||||
}
|
||||
*/
|
||||
|
||||
test('renders the form', async () => {
|
||||
const dom = render(<DiagnosisForm />)
|
||||
expect(dom.getByTestId('diagnosis-form-wrapper')).toBeTruthy()
|
||||
})
|
||||
|
||||
test('renders each diagnoses.name data field as a checkbox', () => {})
|
||||
|
||||
test(' each diagnoses.name data is able to be checked/unchecked', () => {})
|
||||
|
||||
test('finds and element with each id in the DOM', () => {})
|
||||
|
||||
test('renders each diagnoses.text-input-title data field as a text entry field', () => {})
|
||||
|
||||
test('each diagnoses.text-input-title data field is able to recieve text input', () => {})
|
||||
|
||||
test('renders each diagnoses.group-title data field as a header', () => {})
|
||||
|
||||
test('renders each diagnoses.group entry in the same list element', () => {})
|
||||
|
||||
test('renders each diagnoses.[el].name data field as a checkbox', () => {})
|
||||
|
||||
test(' each diagnoses.[el].name data is able to be checked/unchecked', () => {})
|
||||
|
||||
test('finds and element with each group.[el].id in the DOM', () => {})
|
||||
Reference in new issue
Block a user