Skip to content

Commit

Permalink
Merge pull request #4427 from developerium/fix_defaut_typo
Browse files Browse the repository at this point in the history
Refactor variable name defaut to default
  • Loading branch information
fzaninotto committed Feb 17, 2020
2 parents 5d5a591 + aaf4fdf commit 151bb8c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 30 deletions.
33 changes: 18 additions & 15 deletions packages/ra-ui-materialui/src/input/FileInput.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import FileInput from './FileInput';
describe('<FileInput />', () => {
afterEach(cleanup);

const defautProps = {
const defaultProps = {
source: 'image',
resource: 'posts',
};

const defautPropsMultiple = {
const defaultPropsMultiple = {
source: 'images',
resource: 'posts',
multiple: true,
Expand All @@ -25,7 +25,7 @@ describe('<FileInput />', () => {
<Form
onSubmit={jest.fn()}
render={() => (
<FileInput {...defautProps}>
<FileInput {...defaultProps}>
<div />
</FileInput>
)}
Expand All @@ -40,7 +40,7 @@ describe('<FileInput />', () => {
<Form
onSubmit={jest.fn()}
render={() => (
<FileInput {...defautProps} multiple>
<FileInput {...defaultProps} multiple>
<div />
</FileInput>
)}
Expand All @@ -62,7 +62,7 @@ describe('<FileInput />', () => {
onSubmit={onSubmit}
render={({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<FileInput {...defautProps}>
<FileInput {...defaultProps}>
<div />
</FileInput>
<button type="submit" aria-label="Save" />
Expand Down Expand Up @@ -99,7 +99,7 @@ describe('<FileInput />', () => {
onSubmit={onSubmit}
render={({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<FileInput {...defautPropsMultiple}>
<FileInput {...defaultPropsMultiple}>
<div />
</FileInput>
<button type="submit" aria-label="Save" />
Expand Down Expand Up @@ -145,7 +145,7 @@ describe('<FileInput />', () => {
onSubmit={onSubmit}
render={({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<FileInput {...defautProps}>
<FileInput {...defaultProps}>
<FileField source="src" title="title" />
</FileInput>
<button type="submit" aria-label="Save" />
Expand Down Expand Up @@ -183,7 +183,7 @@ describe('<FileInput />', () => {
onSubmit={onSubmit}
render={({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<FileInput {...defautPropsMultiple}>
<FileInput {...defaultPropsMultiple}>
<FileField source="src" title="title" />
</FileInput>
<button type="submit" aria-label="Save" />
Expand Down Expand Up @@ -226,7 +226,7 @@ describe('<FileInput />', () => {
onSubmit={onSubmit}
render={({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<FileInput {...defautPropsMultiple}>
<FileInput {...defaultPropsMultiple}>
<FileField source="src" title="title" />
</FileInput>
<button type="submit" aria-label="Save" />
Expand Down Expand Up @@ -256,7 +256,10 @@ describe('<FileInput />', () => {
<Form
onSubmit={jest.fn()}
render={() => (
<FileInput {...defautProps} placeholder={expectedLabel}>
<FileInput
{...defaultProps}
placeholder={expectedLabel}
>
<div />
</FileInput>
)}
Expand Down Expand Up @@ -285,7 +288,7 @@ describe('<FileInput />', () => {
}}
onSubmit={jest.fn()}
render={() => (
<FileInput {...defautProps} source="image">
<FileInput {...defaultProps} source="image">
<ImageField source="url" title="title" />
</FileInput>
)}
Expand Down Expand Up @@ -316,7 +319,7 @@ describe('<FileInput />', () => {
],
}}
render={() => (
<FileInput {...defautPropsMultiple}>
<FileInput {...defaultPropsMultiple}>
<ImageField source="url" title="title" />
</FileInput>
)}
Expand Down Expand Up @@ -347,7 +350,7 @@ describe('<FileInput />', () => {
},
}}
render={() => (
<FileInput {...defautProps} source="image">
<FileInput {...defaultProps} source="image">
<ImageField source="url" title="title" />
</FileInput>
)}
Expand All @@ -370,7 +373,7 @@ describe('<FileInput />', () => {
},
}}
render={() => (
<FileInput {...defautProps} source="image">
<FileInput {...defaultProps} source="image">
<ImageField source="url" title="title" />
</FileInput>
)}
Expand All @@ -396,7 +399,7 @@ describe('<FileInput />', () => {
onSubmit={onSubmit}
render={({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<FileInput {...defautPropsMultiple}>
<FileInput {...defaultPropsMultiple}>
<ImageField source="url" />
</FileInput>
<button type="submit" aria-label="Save" />
Expand Down
30 changes: 15 additions & 15 deletions packages/ra-ui-materialui/src/input/ImageInput.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import ImageInput from './ImageInput';
describe('<ImageInput />', () => {
afterEach(cleanup);

const defautProps = {
const defaultProps = {
source: 'image',
resource: 'posts',
};

const defautPropsMultiple = {
const defaultPropsMultiple = {
source: 'images',
resource: 'posts',
multiple: true,
Expand All @@ -24,7 +24,7 @@ describe('<ImageInput />', () => {
<Form
onSubmit={jest.fn()}
render={() => (
<ImageInput {...defautProps}>
<ImageInput {...defaultProps}>
<div />
</ImageInput>
)}
Expand All @@ -39,7 +39,7 @@ describe('<ImageInput />', () => {
<Form
onSubmit={jest.fn()}
render={() => (
<ImageInput {...defautProps} multiple>
<ImageInput {...defaultProps} multiple>
<div />
</ImageInput>
)}
Expand All @@ -61,7 +61,7 @@ describe('<ImageInput />', () => {
onSubmit={onSubmit}
render={({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<ImageInput {...defautProps}>
<ImageInput {...defaultProps}>
<div />
</ImageInput>
<button type="submit" aria-label="Save" />
Expand Down Expand Up @@ -98,7 +98,7 @@ describe('<ImageInput />', () => {
onSubmit={onSubmit}
render={({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<ImageInput {...defautPropsMultiple}>
<ImageInput {...defaultPropsMultiple}>
<div />
</ImageInput>
<button type="submit" aria-label="Save" />
Expand Down Expand Up @@ -144,7 +144,7 @@ describe('<ImageInput />', () => {
onSubmit={onSubmit}
render={({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<ImageInput {...defautProps}>
<ImageInput {...defaultProps}>
<ImageField source="src" title="title" />
</ImageInput>
<button type="submit" aria-label="Save" />
Expand Down Expand Up @@ -182,7 +182,7 @@ describe('<ImageInput />', () => {
onSubmit={onSubmit}
render={({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<ImageInput {...defautPropsMultiple}>
<ImageInput {...defaultPropsMultiple}>
<ImageField source="src" title="title" />
</ImageInput>
<button type="submit" aria-label="Save" />
Expand Down Expand Up @@ -225,7 +225,7 @@ describe('<ImageInput />', () => {
onSubmit={onSubmit}
render={({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<ImageInput {...defautPropsMultiple}>
<ImageInput {...defaultPropsMultiple}>
<ImageField source="src" title="title" />
</ImageInput>
<button type="submit" aria-label="Save" />
Expand Down Expand Up @@ -256,7 +256,7 @@ describe('<ImageInput />', () => {
onSubmit={jest.fn()}
render={() => (
<ImageInput
{...defautProps}
{...defaultProps}
placeholder={expectedLabel}
>
<div />
Expand Down Expand Up @@ -287,7 +287,7 @@ describe('<ImageInput />', () => {
}}
onSubmit={jest.fn()}
render={() => (
<ImageInput {...defautProps} source="image">
<ImageInput {...defaultProps} source="image">
<ImageField source="url" title="title" />
</ImageInput>
)}
Expand Down Expand Up @@ -318,7 +318,7 @@ describe('<ImageInput />', () => {
],
}}
render={() => (
<ImageInput {...defautPropsMultiple}>
<ImageInput {...defaultPropsMultiple}>
<ImageField source="url" title="title" />
</ImageInput>
)}
Expand Down Expand Up @@ -349,7 +349,7 @@ describe('<ImageInput />', () => {
},
}}
render={() => (
<ImageInput {...defautProps} source="image">
<ImageInput {...defaultProps} source="image">
<ImageField source="url" title="title" />
</ImageInput>
)}
Expand All @@ -372,7 +372,7 @@ describe('<ImageInput />', () => {
},
}}
render={() => (
<ImageInput {...defautProps} source="image">
<ImageInput {...defaultProps} source="image">
<ImageField source="url" title="title" />
</ImageInput>
)}
Expand All @@ -398,7 +398,7 @@ describe('<ImageInput />', () => {
onSubmit={onSubmit}
render={({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<ImageInput {...defautPropsMultiple}>
<ImageInput {...defaultPropsMultiple}>
<ImageField source="url" />
</ImageInput>
<button type="submit" aria-label="Save" />
Expand Down

0 comments on commit 151bb8c

Please sign in to comment.