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

dev: first initial support for playwright #943

Merged
merged 28 commits into from
Jun 5, 2024

Conversation

Soare-Robert-Daniel
Copy link
Contributor

@Soare-Robert-Daniel Soare-Robert-Daniel commented May 23, 2024

Summary

  • Added E2E with Playwright similar to Gutenberg config
  • Simplified the JS build pipeline

Warning

E2E for chained actions UI has been disabled since they are too flaky. The UI does not respond to tell to browser automation.

Details

To add Playwright support, I needed to update the wp-scripts package to a newer version. Since the packages were very old, many more upgrades were required to complete the process.

One of them was upgrading the build JS commands. With the newer version, we get a modern compiler that uses modern JS; thus, the build files are now smaller. But also, we get a smarter lint , which was disabled for the moment, and it will be addressed separately since many issues have been reported.

With the upgrade, I also simplified the build process, simplifying and removing some old steps that were no longer needed.

With the wp-scripts and wp-env, the writing test experience should be much smoother and help us maintain good peace with out goals.

Note

The Tagify library used for feed settings is problematic because it uses some custom events that do not seem to trigger the data saving into the input field. Some workaround must be done (like directly injecting the values).

JS Build Files

Our JS build files for feeds import where queuing React from WordPress and also shipping another react version in the build files.

File Old Size (kb) New Size (kb) Reduction (%)
import-onboarding.js 666 101 85
action-popup.js 642 54 91.5
feedback.js 578 4.9 99
block.js 47 40 15

Will affect visual aspect of the product

NO

Test instructions

  • Check if everything it is alright.

Check before Pull Request is ready:

Closes #931

@Soare-Robert-Daniel Soare-Robert-Daniel added the pr-checklist-skip Allow this Pull Request to skip checklist. label May 23, 2024
@Soare-Robert-Daniel Soare-Robert-Daniel linked an issue May 24, 2024 that may be closed by this pull request
@Soare-Robert-Daniel Soare-Robert-Daniel marked this pull request as ready for review May 29, 2024 13:37
@Soare-Robert-Daniel Soare-Robert-Daniel self-assigned this May 29, 2024
@pirate-bot
Copy link
Contributor

pirate-bot commented May 29, 2024

Plugin build for 627a5d8 is ready 🛎️!

@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label May 31, 2024
Copy link
Contributor

@preda-bogdan preda-bogdan left a comment

Choose a reason for hiding this comment

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

I left a few changes and concerns that you can check before moving forward with this.

includes/gutenberg/feedzy-rss-feeds-gutenberg-block.php Outdated Show resolved Hide resolved
includes/admin/feedzy-rss-feeds-admin.php Show resolved Hide resolved
includes/admin/feedzy-rss-feeds-admin.php Show resolved Hide resolved
includes/admin/feedzy-rss-feeds-admin.php Show resolved Hide resolved
js/ActionPopup/action-popup.js Outdated Show resolved Hide resolved
tests/e2e/specs/feed.spec.js Outdated Show resolved Hide resolved
tests/e2e/specs/import.spec.js Outdated Show resolved Hide resolved
tests/e2e/specs/upsell.spec.js Outdated Show resolved Hide resolved
tests/e2e/utils.js Outdated Show resolved Hide resolved
@Soare-Robert-Daniel
Copy link
Contributor Author

Soare-Robert-Daniel commented Jun 5, 2024

Changes

  • Fixed typo for UTM fallback-image
  • Added inline-source-map for DEV mode. The naming with .min. has dropped; others from our plugins use the same thing. No collision will happen since the build files are now separated in their folder.
  • Created an issue to discuss the flaky behavior of the Feed Edit [DEV] Flaky interface for Feed Edit page #947
  • Created an issue for JS linting [DEV] JS formatting and recommendation  #948
  • Issue linked regarding the Featured Image problem.

@Soare-Robert-Daniel Soare-Robert-Daniel merged commit c54664c into development Jun 5, 2024
8 checks passed
@Soare-Robert-Daniel Soare-Robert-Daniel deleted the fix/playwright branch June 5, 2024 11:54
@Soare-Robert-Daniel Soare-Robert-Daniel mentioned this pull request Jun 6, 2024
@pirate-bot
Copy link
Contributor

🎉 This PR is included in version 4.4.10 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist. released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DEV] Move E2E to Playwright
3 participants