-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Update config@3.3.7
(from 3.3.3
)
#33828
Conversation
Test Results SummaryCommit SHA: 33325b1
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
This looks like a pretty straightforward change, but e2e tests are all failing on CI in this PR. I have re-run them just to be sure, and the failures are consistent. I think e2e-environment might be unable to load the config using the updated version for some reason. |
Do you have any hint how to debug it locally? |
I also guess it may fail due to lack of appPath to resolve config paths, due to #33684 |
I don't think so, because other PRs that are up-to-date with This seems to have something to do with the We are just waiting for this to be merged: #33850 Then you can follow this documentation (feedback on documentation is highly appreciated): https://github.com/woocommerce/woocommerce/blob/db50c3249720711f61f7bae29b8a7b5ffba53ba2/plugins/woocommerce/e2e/README.md |
👌
Cool, thanks. That's something new to me.
This doc seem to explain how to test woocommerce itself. What I'm trying to do is to test my Woo extension with |
Hi @tomalec! First of all, thank you very much for creating this PR. We might need to update that documentation since the tests exposed at the bottom of the page are already covered by the new setup based on Playwright that @Luc45 mentioned. If you check the table from the Admin E2E tests documentation, you will see that they are aligned with the activate-and-setup, admin-analytics, admin-marketing, admin-tasks and basic.spec.js Playwright tests. So yes, you can rely on these Playwright specs to test this PR :) You can find here more information about how to run these tests. In concrete, you can use this example to run individually the specs mentioned above, which covers the same as the previous Admin E2E tests:
Please, let us know if anything is not clear or if you need more information! |
Sorry, @alopezari but I'm still pretty much confused.
What you suggest above is to "test" - check that this PR is acceptable? "test" - check that this PR solves the original issue, which was running locally e2e tests in the extension I develop? or "test" in what sense?
Butt this is about testing WooCommerce - the plugin from this repo, and not my use case which is testing WooCommerce extension locally. |
Also, speaking of how to run all of that in this repo.
|
Sorry @tomalec, I missed the extension part and thought you wanted to run regression tests to check the config change didn't cause any major inconveniences. Sorry for the confusion. To be honest, I don't have a clear answer now about how to proceed in your case (this applies also to the PNPM version problem), since we're in the middle of a migration and some things are changing. But I will help you unblock this PR considering it's been here for a while. I'll look for the answers and come back to you once I get something. |
Through my manual cop'n'pasting & checks mentioned in OP, I managed to test it solves at least one step with setting up admin e2e tests for external extension. Speaking of running local
|
054e0cd
to
6fe7c96
Compare
Hi @tomalec, thanks for getting this in! Looks like we have a merge conflict on |
6fe7c96
to
43ce20e
Compare
@tomalec once the conflicts are resolved, feel free to ping me for a re-review so we could merge it in. Thanks! |
4f41ebe
to
2c50a25
Compare
@rodelgc I redid the changes as the conflicts were too far behind. I also added |
Hi @tomalec! The changes look good to me. I followed the testing instructions with the google-listings-and-ads plugin and the tests failed always with the same failure:
However, I don't think it's related to the config change since these tests also fail for that git reference (b14771982bb0c84d6252b27f36684114da06b85a) without updating to config@3.3.7 (in other words, without the changes from this PR). It looks good to me since there isn't any execution error. The config version was also updated in the WooCommerce However, considering the WooCommerce Apart from the review from Atlas, there are new conflicts in the |
Add it to syncpack, to avoid `ReferenceError: node_env_var_name is not defined` when external extension imports and transforms the `admin-e2e-tests` directly from `node_modules`. Include node-config/node-config#642 Redo 10301f5
bee8fff
to
ddffbbd
Compare
I rebased and force-pushed changes to solve pnpm conflicts.
That branch was made over 6months ago, I guess the entire testing environment changed a lot. Given it was not implemented on a stable foundation back then, and there was still not a closed set of problems with importing |
@@ -33,6 +33,15 @@ | |||
"**" | |||
] | |||
}, | |||
{ | |||
"dependencies": [ | |||
"config" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In syncpack the filter
attribute means that syncpack will ignore any dependencies that don't match the filter even if they have a version group object like this.
The API is sort of counterintuitive for what we want to achieve right now and there are possibly some alternatives, but for now you'll need to add "config" to the filter regex if you want this to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I missed it.
Addressed in 105d95a
The API is sort of counterintuitive for what we want to achieve right now
On the other way around: API is intuitive, but our usage is against the design. AFAIU, syncpack by default, tries to keep all packages in sync, then expose versionGroups
to group the exception rules.
What we do is, ignore everything and sync only a few. This is probably the only way to start cleaning it up gradually, without "do it all" revolution.
@samueljseay I resolved conflicts and the PR is ready for another look :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi folks, I am Porter this week and it appears this one has slipped through the net with the Woo DM last week...
Unfortunately, there are some conflicts:
- .syncpackrc
- pnpm-lock.yaml
Feel free to resolve and I will merge - @samueljseay has already stated that he is happy with this one - am sure @tomalec would like to get this one done and dusted 😊
Hi @nigeljamesstevenson, I resolved the conflicts again. Could you approve and merge? |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## trunk #33828 +/- ##
========================================
Coverage 46.6% 46.6%
Complexity 17164 17164
========================================
Files 429 429
Lines 64724 64724
========================================
Hits 30193 30193
Misses 34531 34531 |
Conflicts were resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Thank you so much for this, love seeing everyone help us move forward with syncpack.
All Submissions:
Changes proposed in this Pull Request:
Update
config@3.3.7
(from3.3.3
)to avoid
ReferenceError: node_env_var_name is not defined
when external extension imports and transforms theadmin-e2e-tests
directly fromnode_modules
.Include node-config/node-config#642
How to test the changes in this Pull Request:
Bug repro
npx wc-e2e docker:up && npx wc-e2e test:e2e
fix
Install this version of e2e-*npx wc-e2e docker:up && npx wc-e2e test:e2e
Other information:
I was not able to run build and fully test locally due to #33684
pnpm changelog add --filter=<project>
?So I added the changelog entry manually to
CHANGELOG.md
FOR PR REVIEWER ONLY: