Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(devdeps): update dependency @storybook/testing-react to v1 #931

Merged
merged 1 commit into from
Dec 2, 2021

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 22, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@storybook/testing-react 0.0.22 -> 1.0.0 age adoption passing confidence

Release Notes

storybookjs/testing-react

v1.0.0

Compare Source

🎉 This release contains work from new contributors! 🎉

Thanks for all your work!

❤️ Tom Coleman (@​tmeasday)

❤️ null@​jonniebigodes

Release Notes
Version 1.0.0 (#​60)
💥 Breaking Change

Updates Storybook peer dependency to 6.4

Features
CSF3

Storybook 6.4 released a new version of CSF, where the story can also be an object. This is supported in @storybook/testing-react, but you have to match the requisites:

1 - Either your story has a render method or your meta contains a component property:

// Example 1: Meta with component property
export default {
  title: 'Button',
  component: Button // <-- This is strictly necessary
}

// Example 2: Story with render method:
export const Primary = {
  render: (args) => <Button {...args}>
}
Play function

Storybook 6.4 also brings a new function called play, where you can write automated interactions to the story.

In @storybook/testing-react, the play function does not run automatically for you, but rather comes in the returned component, and you can execute it as you please.

Consider the following example:

export const InputFieldFilled: Story<InputFieldProps> = {
  play: async ({ canvasElement }) => {
    const canvas = within(canvasElement);
    await userEvent.type(canvas.getByRole('textbox'), 'Hello world!');
  },
};

You can use the play function like this:

const { InputFieldFilled } = composeStories(stories);

test('renders with play function', async () => {
  const { container } = render(<InputFieldFilled />);

  // pass container as canvasElement and play an interaction that fills the input
  await InputFieldFilled.play({ canvasElement: container });

  const input = screen.getByRole('textbox') as HTMLInputElement;
  expect(input.value).toEqual('Hello world!');
});

📝 Documentation
Authors: 3


Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 22, 2021

size-limit report 📦

Path Size
dist/src/index.js, dist/react-datepicker/dist/react-datepicker.min.css.js, dist/react-toastify/dist/ReactToastify.min.css.js, dist/src/helpers/isJSON.js, dist/src/helpers/keycode.js, dist/src/helpers/legend.js, dist/src/helpers/numbers.js, dist/src/helpers/recursivelyGetChildrenString.js, dist/src/theme/colors.js, dist/src/theme/index.js, dist/src/utils/animations.js, dist/src/utils/ids.js, dist/src/utils/orderBy.js, dist/intl-tel-input/build/css/intlTelInput.css.js, dist/src/components/ActionBar/index.js, dist/src/components/ActivityIndicator/index.js, dist/src/components/Alert/index.js, dist/src/components/Avatar/avatar.svg.js, dist/src/components/Avatar/index.js, dist/src/components/Badge/index.js, dist/src/components/BarChart/Tooltip.js, dist/src/components/BarChart/index.js, dist/src/components/BarStack/index.js, dist/src/components/Box/index.js, dist/src/components/Boxer/index.js, dist/src/components/Breadcrumbs/index.js, dist/src/components/BulletList/index.js, dist/src/components/Button/index.js, dist/src/components/Checkbox/index.js, dist/src/components/Container/index.js, dist/src/components/Counter/index.js, dist/src/components/CreationProgress/index.js, dist/src/components/DateInput/index.js, dist/src/components/Description/index.js, dist/src/components/Dot/index.js, dist/src/components/DotSteps/index.js, dist/src/components/Expandable/index.js, dist/src/components/ExtendedReminder/index.js, dist/src/components/FlexBox/index.js, dist/src/components/Grid/Col.js, dist/src/components/Grid/Grid.js, dist/src/components/Grid/Row.js, dist/src/components/Icon/index.js, dist/src/components/Image/index.js, dist/src/components/Label/index.js, dist/src/components/LineChart/CustomLegend.js, dist/src/components/LineChart/Tooltip.js, dist/src/components/LineChart/helpers.js, dist/src/components/LineChart/index.js, dist/src/components/Link/index.js, dist/src/components/List/Cell.js, dist/src/components/List/SelectBar.js, dist/src/components/List/SortIcon.js, dist/src/components/List/context.js, dist/src/components/List/index.js, dist/src/components/List/variantExplorer.js, dist/src/components/List/variantProduct.js, dist/src/components/List/variantTable.js, dist/src/components/MarkDown/index.js, dist/src/components/Menu/Item.js, dist/src/components/Menu/index.js, dist/src/components/Modal/index.js, dist/src/components/NavigationStepper/index.js, dist/src/components/Notice/index.js, dist/src/components/Pagination/getPageNumbers.js, dist/src/components/Pagination/index.js, dist/src/components/Pagination/usePagination.js, dist/src/components/PasswordCheck/index.js, dist/src/components/PasswordStrengthMeter/index.js, dist/src/components/Pentagon/index.js, dist/src/components/PhoneInput/flags.png.js, dist/src/components/PhoneInput/[email protected], dist/src/components/PhoneInput/index.js, dist/src/components/PieChart/Legends.js, dist/src/components/PieChart/Tooltip.js, dist/src/components/PieChart/index.js, dist/src/components/PieChart/patterns.js, dist/src/components/Placeholder/Block.js, dist/src/components/Placeholder/Blocks.js, dist/src/components/Placeholder/BoxWithIcon.js, dist/src/components/Placeholder/Donut.js, dist/src/components/Placeholder/Line.js, dist/src/components/Placeholder/List.js, dist/src/components/Placeholder/Slider.js, dist/src/components/Placeholder/index.js, dist/src/components/Popper/index.js, dist/src/components/ProgressBar/index.js, dist/src/components/ProgressionButton/index.js, dist/src/components/Radio/index.js, dist/src/components/RadioBorderedBox/index.js, dist/src/components/Range/index.js, dist/src/components/Reminder/index.js, dist/src/components/RichSelect/index.js, dist/src/components/ScrollView/index.js, dist/src/components/Separator/index.js, dist/src/components/Slider/index.js, dist/src/components/Sphere/index.js, dist/src/components/StateBar/index.js, dist/src/components/StatusIndicator/index.js, dist/src/components/StealthCopiable/index.js, dist/src/components/Stepper/index.js, dist/src/components/Switch/index.js, dist/src/components/SwitchButton/index.js, dist/src/components/TabGroup/Tab.js, dist/src/components/TabGroup/index.js, dist/src/components/Table/index.js, dist/src/components/Tag/index.js, dist/src/components/Tags/index.js, dist/src/components/TagsPoplist/index.js, dist/src/components/TextBox/index.js, dist/src/components/TimeInput/index.js, dist/src/components/Toaster/index.js, dist/src/components/Tooltip/index.js, dist/src/components/TooltipIcon/index.js, dist/src/components/Touchable/index.js, dist/src/components/Typography/index.js, dist/src/components/UnitInput/index.js, dist/src/components/UniversalLink/index.js, dist/src/components/VerificationCode/index.js, dist/src/components/VolumeSize/index.js, dist/src/utils/responsive/Breakpoint.js, dist/src/utils/responsive/utilities.js 209.46 KB (0%)

@codecov
Copy link

codecov bot commented Nov 22, 2021

Codecov Report

Merging #931 (34895a9) into main (0a21e8c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #931   +/-   ##
=======================================
  Coverage   92.94%   92.94%           
=======================================
  Files         118      118           
  Lines        3047     3047           
  Branches      469      469           
=======================================
  Hits         2832     2832           
  Misses        161      161           
  Partials       54       54           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a21e8c...34895a9. Read the comment docs.

@philibea philibea requested review from a team, vincentaudebert and DorianMaliszewski and removed request for a team November 25, 2021 16:25
@renovate renovate bot force-pushed the renovate/storybook-testing-react-1.x branch from ebcf984 to 155e8a4 Compare December 1, 2021 10:39
@renovate renovate bot force-pushed the renovate/storybook-testing-react-1.x branch from 155e8a4 to 34895a9 Compare December 1, 2021 11:07
@chambo-e chambo-e merged commit 2f50f28 into main Dec 2, 2021
@chambo-e chambo-e deleted the renovate/storybook-testing-react-1.x branch December 2, 2021 16:47
scaleway-bot pushed a commit that referenced this pull request Dec 6, 2021
### [0.126.3](v0.126.2...v0.126.3) (2021-12-06)

### ⚡ Refactor

* **theme:** renamed colors into deprecatedColors ([#960](#960)) ([b881213](b881213))

### 📦 Chore

* **devdeps:** update dependency @storybook/testing-react to v1 ([#931](#931)) ([2f50f28](2f50f28))
* **devdeps:** update dependency @svgr/rollup to v6 ([#944](#944)) ([495c6f0](495c6f0))
* **devdeps:** update dependency date-fns to v2.27.0 ([#967](#967)) ([fd32df3](fd32df3))
* **devdeps:** update dependency jest to v27.4.3 ([#969](#969)) ([7dc5dc7](7dc5dc7))
* **devdeps:** update dependency postcss to v8.4.4 ([#964](#964)) ([0a9ebb4](0a9ebb4))
* **devdeps:** update dependency prettier to v2.5.1 ([#968](#968)) ([fc30b77](fc30b77))
* **devdeps:** update storybook monorepo to v6.4.5 ([#965](#965)) ([8692741](8692741))
* **devdeps:** update storybook monorepo to v6.4.7 ([#966](#966)) ([bc0f17f](bc0f17f))

### 🐛 Bug Fixes

* **Touchable:** correct invalid css class ([#963](#963)) ([faac4c4](faac4c4))
@scaleway-bot
Copy link
Collaborator

🎉 This PR is included in version 0.126.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants