chore: initial deploy for code base

This commit is contained in:
Thom Lamb
2026-05-12 09:39:01 -05:00
parent 6b355f82d1
commit 0a80e96b32
345 changed files with 37208 additions and 1 deletions
+48
View File
@@ -0,0 +1,48 @@
import React from 'react';
import { render, screen,} from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import '@testing-library/jest-dom';
import Checkbox from './Checkbox';
test('verify check', () => {
const handleChange = () => {console.log("You clicked!")};
render(<>
<Checkbox onChange={handleChange}>One</Checkbox>
</>);
// get checkbox by text
const checkboxOne = screen.getByRole("checkbox", { name: "One" });
userEvent.click(checkboxOne);
expect(checkboxOne).toBeChecked();
});
test('disabled checkbox not clickable', () => {
const handleChange = () => {console.log("You clicked!")};
render(<>
<Checkbox disabled onChange={handleChange}>One</Checkbox>
</>);
// get checkbox by text
const checkboxOne = screen.getByRole("checkbox", { name: "One" });
userEvent.click(checkboxOne);
expect(checkboxOne).not.toBeChecked();
});
test('checked checkbox becomes unchecked', () => {
const handleChange = () => {console.log("You clicked!")};
render(<>
<Checkbox defaultChecked onChange={handleChange}>One</Checkbox>
</>);
// get checkbox by text
const checkboxOne = screen.getByRole("checkbox", { name: "One" });
//make sure the checkbox is checked by default
expect(checkboxOne).toBeChecked();
//now uncheck it
userEvent.click(checkboxOne);
expect(checkboxOne).not.toBeChecked();
});