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

Testing: Explore possible ways to integrate with React prerelease channels #18216

Closed
gziolo opened this issue Oct 31, 2019 · 11 comments
Closed
Labels
Needs Dev Ready for, and needs developer efforts [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.

Comments

@gziolo
Copy link
Member

gziolo commented Oct 31, 2019

There was an announcement from the React team about official prerelease channels:

https://twitter.com/reactjs/status/1186721158210576385

https://reactjs.org/blog/2019/10/22/react-release-channels.html

This post will be most relevant to developers who work on frameworks, libraries, or developer tooling. Developers who use React primarily to build user-facing applications should not need to worry about our prerelease channels.

At first glance, it seems like this is it mostly npm install'ing it and then poking around to make sure nothing explodes? Everything builds, all tests pass, etc.

According to the document, in our case, we would also need to tweak PHP code as well, because we use react as an external library in the webpack config and enqueue it using WordPress API. Related PR with react version upgrade might be useful here to better explain it:
#16982

This topic was discussed during the last weekly WordPress core JS chat (link requires registration):
https://wordpress.slack.com/archives/C5UNMSU4R/p1572357832196200

@gziolo gziolo added [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. Needs Dev Ready for, and needs developer efforts labels Oct 31, 2019
@lozinska
Copy link
Contributor

lozinska commented Jan 8, 2020

Hi! I would like to work on solving this issue

@gziolo
Copy link
Member Author

gziolo commented Jan 8, 2020

Hi! I would like to work on solving this issue

Excellent 👍

@lozinska
Copy link
Contributor

lozinska commented Jan 11, 2020

Hi @gziolo I have a question, after I went through the link you have posted in a comment above I wonder which React PreRelease channel should be implemented for Gutenberg Next or Experimental. Thank you

@gziolo
Copy link
Member Author

gziolo commented Jan 13, 2020

I guess it applies mostly to Experimental but we could cover both as well. It would make it easier to make the decision about upgrading to the next stable version of React when Next is well tested.

@lozinska
Copy link
Contributor

Ok, thank you!

@lozinska
Copy link
Contributor

Hi @gziolo. I have been looking into this issue for the past 2 weeks and I have another question. So far I updated all react 16.9.0 to experimental. I stack on the testing part. I just wonder if I have to write any tests, because it seems that test against updated react package already exist in this file. Moreover when I try to run tests (npm run test-unit) locally it is failing because of

>wp-scripts test-unit-js --config test/unit/jest.config.js
No test found, exiting with code 1
I just wonder if it has to do with testing updated packages.
Thank you

@gziolo
Copy link
Member Author

gziolo commented Jan 20, 2020

@lozinska, can you share your code, it's hard to tell what might go wrong otherwise. If you run the same tests on masters you should see tons of them. It feels like your setup doesn't quite work as it should.

@lozinska
Copy link
Contributor

lozinska commented Jan 20, 2020

Hi @gziolo. Here is my code snippets where I updated react version.
package.json

check1

class-vendor-script-filename-test.php
check2

And this is a screenshot of the problem I'm running into while i execute command
npm run test-unit
check3

@lozinska
Copy link
Contributor

@gziolo another question is: after I update React version to "experimental" do I have to create any additional test that will check failures towards updates in "experimental"? Thank you

@gziolo
Copy link
Member Author

gziolo commented Jan 21, 2020

I have no idea what might be wrong here. You probably need to start with the fresh master and debug for each dependency updated.

@gziolo
Copy link
Member Author

gziolo commented Nov 24, 2020

Let's close this one since we depend too much on React Native releases which are always delayed a few weeks compared to the React core releases.

@gziolo gziolo closed this as completed Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Dev Ready for, and needs developer efforts [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
Projects
None yet
Development

No branches or pull requests

2 participants