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: remove .state() assertions in tests #4232

Merged
merged 6 commits into from
Jul 23, 2021
Merged

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Jul 23, 2021

This PR removes .state() assertions by Enzyme from our tests.

This is a required step as all components will become functional and will use native ref forwarding via React.forwardRef.

@vercel
Copy link

vercel bot commented Jul 23, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/semantic-ui/semantic-ui-react/EvqtPnNUHLKWcngRLvFMVjoYt2ni
✅ Preview: https://semantic-ui-react-git-chore-no-state.semantic-ui.vercel.app

@layershifter layershifter changed the title chore: remove .state() assertions chore: remove .state() assertions in tests Jul 23, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jul 23, 2021

Codecov Report

Merging #4232 (966fced) into next-v3 (abaf123) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           next-v3    #4232   +/-   ##
========================================
  Coverage    99.75%   99.75%           
========================================
  Files          180      180           
  Lines         3241     3242    +1     
========================================
+ Hits          3233     3234    +1     
  Misses           8        8           
Impacted Files Coverage Δ
src/modules/Embed/Embed.js 100.00% <100.00%> (ø)
src/modules/Transition/Transition.js 100.00% <100.00%> (ø)

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 abaf123...966fced. Read the comment docs.

@layershifter layershifter merged commit 314c44c into next-v3 Jul 23, 2021
@layershifter layershifter deleted the chore/no-state branch July 23, 2021 12:46
layershifter added a commit that referenced this pull request Aug 4, 2021
* Ember: remove .state() usage in Enzyme

* AccordionAccordion: remove .state() usage in Enzyme

* Checkbox: remove .state() usage in Enzyme

* TransitionablePortal: remove .state() usage in Enzyme

* Transition: remove .state() usage in Enzyme

* Dropdown: remove .state() usage in Enzyme
layershifter added a commit that referenced this pull request Feb 1, 2022
* Ember: remove .state() usage in Enzyme

* AccordionAccordion: remove .state() usage in Enzyme

* Checkbox: remove .state() usage in Enzyme

* TransitionablePortal: remove .state() usage in Enzyme

* Transition: remove .state() usage in Enzyme

* Dropdown: remove .state() usage in Enzyme
layershifter added a commit that referenced this pull request Feb 18, 2022
* Ember: remove .state() usage in Enzyme

* AccordionAccordion: remove .state() usage in Enzyme

* Checkbox: remove .state() usage in Enzyme

* TransitionablePortal: remove .state() usage in Enzyme

* Transition: remove .state() usage in Enzyme

* Dropdown: remove .state() usage in Enzyme
layershifter added a commit that referenced this pull request Apr 22, 2022
* Ember: remove .state() usage in Enzyme

* AccordionAccordion: remove .state() usage in Enzyme

* Checkbox: remove .state() usage in Enzyme

* TransitionablePortal: remove .state() usage in Enzyme

* Transition: remove .state() usage in Enzyme

* Dropdown: remove .state() usage in Enzyme
layershifter added a commit that referenced this pull request Jun 21, 2022
* Ember: remove .state() usage in Enzyme

* AccordionAccordion: remove .state() usage in Enzyme

* Checkbox: remove .state() usage in Enzyme

* TransitionablePortal: remove .state() usage in Enzyme

* Transition: remove .state() usage in Enzyme

* Dropdown: remove .state() usage in Enzyme
layershifter added a commit that referenced this pull request Dec 12, 2022
* Ember: remove .state() usage in Enzyme

* AccordionAccordion: remove .state() usage in Enzyme

* Checkbox: remove .state() usage in Enzyme

* TransitionablePortal: remove .state() usage in Enzyme

* Transition: remove .state() usage in Enzyme

* Dropdown: remove .state() usage in Enzyme
layershifter added a commit that referenced this pull request Dec 13, 2022
* Ember: remove .state() usage in Enzyme

* AccordionAccordion: remove .state() usage in Enzyme

* Checkbox: remove .state() usage in Enzyme

* TransitionablePortal: remove .state() usage in Enzyme

* Transition: remove .state() usage in Enzyme

* Dropdown: remove .state() usage in Enzyme
levithomason pushed a commit that referenced this pull request Feb 28, 2023
* chore: remove .state() assertions in tests (#4232)

* Ember: remove .state() usage in Enzyme

* AccordionAccordion: remove .state() usage in Enzyme

* Checkbox: remove .state() usage in Enzyme

* TransitionablePortal: remove .state() usage in Enzyme

* Transition: remove .state() usage in Enzyme

* Dropdown: remove .state() usage in Enzyme

* chore(Image): use React.forwardRef() (#4234)

* chore(Placeholder): use React.forwardRef() (#4236)

* chore(Header): use React.forwardRef() (#4237)

* chore(Segment): use React.forwardRef() (#4238)

* chore(Table): use React.forwardRef() (#4239)

* chore(Table): use React.forwardRef()

* fix naming

* chore(Step): use React.forwardRef() (#4240)

* chore: disable ESLint rule for function names (#4241)

* chore(Comment): use React.forwardRef() (#4242)

* chore(Comment): use React.forwardRef()

* fix displayName

* fix tests

* chore(Card): use React.forwardRef() (#4243)

* chore(Feed): use React.forwardRef() (#4244)

* chore(Statistic): use React.forwardRef() (#4245)

* chore(Item): use React.forwardRef() (#4247)

* chore(Container|Divider|Loader|Rail): use React.forwardRef() (#4248)

* chore(Accordion): use React.forwardRef() (#4249)

* chore(Advertisement|Breadcrumb): use React.forwardRef() (#4250)

* chore(Message): use React.forwardRef() (#4251)

* chore(Label|List): use React.forwardRef() (#4252)

* chore(Menu): use React.forwardRef() (#4254)

* chore(Pagination): use React.forwardRef() (#4255)

* chore(Button): use React.forwardRef() (#4256)

* chore(Modal|Portal|Popup): use React.forwardRef() (#4253)

* chore(Modal|Portal): use React.forwardRef()

* remove redundant statics

* migrate Popup

* chore(Rating|Reveal): use React.forwardRef() (#4258)

* chore(Dimmer|Grid|Sidebar): use React.forwardRef() (#4260)

* chore(Modal*|Popup*): use React.forwardRef() (#4261)

* chore(Confirm|Checkbox|Embed|Radio|TextArea): use React.forwardRef() (#4262)

* chore(Flag|Icon|ImageGroup): use React.forwardRef() (#4264)

* chore(Tab): use React.forwardRef() (#4265)

* chore(TransitionGroup): use React.forwardRef() (#4266)

* chore(Input): use React.forwardRef() (#4267)

* chore(Sticky): use React.forwardRef() (#4263)

* chore(TransitionablePortal): convert to be functional component (#4269)

* chore(Search*): use React.forwardRef() (#4270)

* chore(Dropdown*): use React.forwardRef() (#4273)

* chore(Dropdown*): use React.forwardRef()

* fix examples-test

* chore(Visibility): remove component (#4257)

* chore(Visibility): remove component

* remove behaviors section

* chore(Ref): remove component (#4286)

* chore(Ref): remove component

* fix tests

* chore(Search): use React.forwardRef() (#4330)

* chore(Search): use React.forwardRef()

* add test for ref forwarding

* fix tests, add comments

* chore: refactor Modal tests (#4339)

* chore: remove unused test utils (#4340)

* chore: refactor tests for classnames to use mount() (#4341)

* chore: refactor tests for shorthands to use mount() (#4342)

* chore: refactor tests for shorthands to use mount()

* add comment

* fix tests with unmount

* fix(Dropdown): use ref forwarding (#4338)

* Add forward ref to Form (#4364)

* Convert form to function component

* Add ref forwarding to Form component

* Update test/specs/collections/Form/Form-test.js

Co-authored-by: Oleksandr Fediashov <[email protected]>

Co-authored-by: Oleksandr Fediashov <[email protected]>

* Add ref to components (#4373)

* Add ref to FormButton

* Add ref to FormCheckbox

* Add forwardRef to FormGroup

* Remove accidental `only` calls

* chore(FormField): use React.forwardRef() (#4359)

* Add ref to form field component

* Move ref to controlProps

* Add more forwardsRef tests

* Remove unnecessary describe wrapper

* update tests

Co-authored-by: Oleksandr Fediashov <[email protected]>

* chore(FormTextArea): use React.forwardRef() (#4405)

* chore(FormRadio): use React.forwardRef() (#4406)

* chore(FormInput): use React.forwardRef() (#4407)

* chore(Select,FormSelect,FormDropdown): use React.forwardRef() (#4408)

* chore(Select): use React.forwardRef()

* chore(FormSelect): use React.forwardRef()

* chore(FormDropdown): use React.forwardRef()

* fix tests, fix Dropdown component

Co-authored-by: Oleksandr Fediashov <[email protected]>

---------

Co-authored-by: Brandon Olivier <[email protected]>
Co-authored-by: Felix Mosheev <[email protected]>
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.

2 participants