-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1560 from dhis2/update-storybook
chore: update storybook
- Loading branch information
Showing
437 changed files
with
13,202 additions
and
11,339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ jobs: | |
- uses: c-hive/gha-yarn-cache@v1 | ||
- run: yarn install --frozen-lockfile | ||
|
||
- run: yarn build:legacy | ||
- run: yarn build | ||
|
||
- uses: nwtgck/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
collections/forms/src/CheckboxFieldFF/CheckboxFieldFF.e2e.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from 'react' | ||
import { Field } from 'react-final-form' | ||
import { formDecorator } from '../formDecorator.js' | ||
import { hasValue } from '../validators/index.js' | ||
import { CheckboxFieldFF } from './CheckboxFieldFF.js' | ||
|
||
// https://github.com/final-form/react-final-form-arrays/issues/111 | ||
const initialValue = ['yes'] | ||
|
||
export default { title: 'Testing:Checkbox', decorators: [formDecorator] } | ||
export const Unchecked = () => ( | ||
<Field | ||
type="checkbox" | ||
component={CheckboxFieldFF} | ||
className="checkbox" | ||
name="checkbox" | ||
label="Label text" | ||
validate={hasValue} | ||
required | ||
/> | ||
) | ||
export const Checked = () => ( | ||
<Field | ||
type="checkbox" | ||
component={CheckboxFieldFF} | ||
className="checkbox" | ||
name="checkbox" | ||
label="Label text" | ||
initialValue={true} | ||
/> | ||
) | ||
export const UncheckedWithValue = () => ( | ||
<Field | ||
type="checkbox" | ||
component={CheckboxFieldFF} | ||
className="checkbox" | ||
name="checkbox" | ||
label="Label text" | ||
value="yes" | ||
/> | ||
) | ||
export const CheckedWithValue = () => ( | ||
<Field | ||
type="checkbox" | ||
component={CheckboxFieldFF} | ||
className="checkbox" | ||
name="checkbox" | ||
label="Label text" | ||
value="yes" | ||
initialValue={initialValue} | ||
/> | ||
) |
File renamed without changes.
54 changes: 0 additions & 54 deletions
54
collections/forms/src/CheckboxFieldFF/CheckboxFieldFF.stories.e2e.js
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
19 changes: 19 additions & 0 deletions
19
collections/forms/src/InputFieldFF/InputFieldFF.e2e.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react' | ||
import { Field } from 'react-final-form' | ||
import { formDecorator } from '../formDecorator.js' | ||
import { hasValue } from '../validators/index.js' | ||
import { InputFieldFF } from './InputFieldFF.js' | ||
|
||
export default { title: 'Testing:InputFieldFF', decorators: [formDecorator] } | ||
export const Default = () => ( | ||
<Field component={InputFieldFF} name="agree" label="Do you agree?" /> | ||
) | ||
export const Required = () => ( | ||
<Field | ||
name="agree" | ||
component={InputFieldFF} | ||
required | ||
validate={hasValue} | ||
label="Do you agree?" | ||
/> | ||
) |
File renamed without changes.
21 changes: 0 additions & 21 deletions
21
collections/forms/src/InputFieldFF/InputFieldFF.stories.e2e.js
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
collections/forms/src/MultiSelectFieldFF/MultiSelectFieldFF.e2e.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react' | ||
import { Field } from 'react-final-form' | ||
import { formDecorator } from '../formDecorator.js' | ||
import { hasValue } from '../validators/index.js' | ||
import { MultiSelectFieldFF } from './MultiSelectFieldFF.js' | ||
|
||
const defaultOptions = [ | ||
{ value: 'first', label: 'First' }, | ||
{ value: 'second', label: 'Second' }, | ||
] | ||
|
||
export default { | ||
title: 'MultiSelectFieldFF', | ||
component: MultiSelectFieldFF, | ||
decorators: [formDecorator], | ||
} | ||
|
||
export const Required = (_, { cypressProps }) => ( | ||
<Field | ||
required | ||
name="multiSelect" | ||
label="Multi select" | ||
component={MultiSelectFieldFF} | ||
validate={hasValue} | ||
options={cypressProps.options || defaultOptions} | ||
/> | ||
) |
File renamed without changes.
25 changes: 0 additions & 25 deletions
25
collections/forms/src/MultiSelectFieldFF/MultiSelectFieldFF.stories.e2e.js
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
collections/forms/src/MultiSelectFieldFF/features/common/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { Given } from '@badeball/cypress-cucumber-preprocessor' | ||
|
||
Given('a required MultiSelect with no selected value', () => { | ||
cy.visitStory('Testing:MultiSelectFieldFF', 'Required') | ||
cy.visitStory('MultiSelectFieldFF', 'Required') | ||
cy.getFormValue('multiSelect') | ||
cy.verifyFormValue('multiSelect', undefined) | ||
}) |
39 changes: 39 additions & 0 deletions
39
collections/forms/src/RadioFieldFF/RadioFieldFF.e2e.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react' | ||
import { Field } from 'react-final-form' | ||
import { FieldGroupFF } from '../FieldGroupFF/FieldGroupFF.js' | ||
import { formDecorator } from '../formDecorator.js' | ||
import { hasValue } from '../validators/index.js' | ||
import { RadioFieldFF } from './RadioFieldFF.js' | ||
|
||
export default { title: 'Testing:RadioFieldFF', decorators: [formDecorator] } | ||
export const RequiredAndNoSelectedValue = () => ( | ||
<FieldGroupFF name="choice"> | ||
<Field | ||
type="radio" | ||
component={RadioFieldFF} | ||
name="choice" | ||
label="One" | ||
value="one" | ||
validate={hasValue} | ||
required | ||
/> | ||
<Field | ||
type="radio" | ||
component={RadioFieldFF} | ||
name="choice" | ||
label="Two" | ||
value="two" | ||
validate={hasValue} | ||
required | ||
/> | ||
<Field | ||
type="radio" | ||
component={RadioFieldFF} | ||
name="choice" | ||
label="Three" | ||
value="three" | ||
validate={hasValue} | ||
required | ||
/> | ||
</FieldGroupFF> | ||
) |
File renamed without changes.
Oops, something went wrong.