mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
inital
This commit is contained in:
@@ -372,7 +372,7 @@ const BasicForm: ForwardRefExoticComponent<any> = forwardRef(
|
||||
);
|
||||
}
|
||||
|
||||
// if the field is still null but has a default value then... have the default inital value
|
||||
// if the field is still null but has a default value then... have the default initial value
|
||||
if (
|
||||
field.defaultValue &&
|
||||
(values as any)[fieldName] === undefined
|
||||
|
||||
@@ -117,7 +117,7 @@ describe('Input', () => {
|
||||
expect(screen.getByDisplayValue(value)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('value overrides initalValue', () => {
|
||||
test('value overrides initialValue', () => {
|
||||
const value: string = 'value';
|
||||
const initialValue: string = 'initial value';
|
||||
|
||||
@@ -136,7 +136,7 @@ describe('Input', () => {
|
||||
expect(screen.getByDisplayValue(newValue)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('resets input to initalValue when value changes to empty string', () => {
|
||||
test('resets input to initialValue when value changes to empty string', () => {
|
||||
const value: string = 'value';
|
||||
const initialValue: string = 'initial value';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import TextArea from '../../Components/TextArea/TextArea';
|
||||
import '@testing-library/jest-dom/extend-expect';
|
||||
|
||||
describe('TextArea', () => {
|
||||
test('renders textarea element with initalValue only', () => {
|
||||
test('renders textarea element with initialValue only', () => {
|
||||
const { getByRole } = render(<TextArea initialValue="initial value" />);
|
||||
const textarea: HTMLElement = getByRole('textbox');
|
||||
|
||||
@@ -67,7 +67,7 @@ describe('TextArea', () => {
|
||||
expect(onBlur).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
test('sets initalValue', () => {
|
||||
test('sets initialValue', () => {
|
||||
const { getByDisplayValue } = render(
|
||||
<TextArea initialValue="initial value" />
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user