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

CPLAT-8834 fix tests for redux 7.1.3 #440

Merged
merged 2 commits into from
Dec 12, 2019

Conversation

kealjones-wk
Copy link
Contributor

@kealjones-wk kealjones-wk commented Dec 11, 2019

Motivation

The NPM package react-redux that over_react consumes from react-dart changed its "Provider" component from a class based component to a function component in the 7.1.1 patch version. This broke some expectations that our tests had in place for over_react_redux.

Changes

  • Remove usage of Class only features from over_react_redux Provider tests

Release Notes

Review

See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.

Please review:

QA Checklist

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed
    • Steps from PR author:
      • open react-dart and update packages.json's react-redux version to "7.1.3"
      • run npm run build and publink react-dart to over_react.
      • run pub run dart_dev test -P dartdevc and make sure all tests pass.
      • run pub run dart_dev test --build-args="-r" -P dart2js and make sure all tests pass.
    • Anything falling under manual testing criteria outlined in CONTRIBUTING.md

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Client Platform member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

@aviary3-wk
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

test/over_react_redux/connect_test.dart Outdated Show resolved Hide resolved
test/over_react_redux/connect_test.dart Outdated Show resolved Hide resolved
test/over_react_redux/connect_test.dart Outdated Show resolved Hide resolved
Copy link
Contributor

@greglittlefield-wf greglittlefield-wf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

// then `areStatesEqual` shows up 2 times due to `initialState`.
expect(methodsCalled, ['mapStateToProps', 'areStatesEqual', 'areStatesEqual']);
expect(methodsCalled, contains('mapStateToProps'));
expect(methodsCalled, contains('areStatesEqual'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI you can also do

containsAll(['mapStateToProps', 'areStatesEqual']));

@rmconsole2-wf rmconsole2-wf changed the title fix tests for redux 7.1.3 CPLAT-8834 fix tests for redux 7.1.3 Dec 11, 2019
aaronlademann-wf added a commit to Workiva/react-dart that referenced this pull request Dec 12, 2019
+ Once we get all consumers sorted out with their tests that were assuming that the js `Provider` exposed by react-redux (e.g. Workiva/over_react#440), we can safely release this.
Copy link
Contributor

@aaronlademann-wf aaronlademann-wf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+10

  • All tests passed locally when pointing to Workiva/react-dart@fb5fdab - which contains the version of react-redux that broke all the things before.

@Workiva/release-management-pp

@rm-astro-wf rm-astro-wf merged commit b3e73a9 into master Dec 12, 2019
@rm-astro-wf rm-astro-wf deleted the fix-over_react_redux-tests-redux-7.1.3 branch December 12, 2019 17:19
keepsimple7 added a commit to keepsimple7/react-dart-expander that referenced this pull request Aug 15, 2022
+ Once we get all consumers sorted out with their tests that were assuming that the js `Provider` exposed by react-redux (e.g. Workiva/over_react#440), we can safely release this.
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.

6 participants