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: Idea for E2E runtime store unhandled action mutations #9061

Open
aduth opened this issue Aug 16, 2018 · 2 comments
Open

Testing: Idea for E2E runtime store unhandled action mutations #9061

aduth opened this issue Aug 16, 2018 · 2 comments
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Enhancement A suggestion for improvement.

Comments

@aduth
Copy link
Member

aduth commented Aug 16, 2018

Related: #1084

If a store's reducer returns a new object value for an unhandled action, it can result in significant performance degradation. It is not certain that this currently exists, but we should include test case(s) to assure that it is not introduced. This is difficult to achieve in Gutenberg because there are many stores, and while a test case could be added for each package's reducer, this is not necessarily obvious to developers nor the most efficient approach.

Instead, we might consider introducing this to end-to-end tests, leveraging the new data plugin API (#8341). The plugin would simply be responsible for hooking in to the registration of a store, running the simple test case (d0158e0) and throwing an error to trigger the E2E failure. This would capture all unnecessary action handling for the default set of editor stores.

@aduth aduth added [Type] Enhancement A suggestion for improvement. [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. labels Aug 16, 2018
@nerrad nerrad added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Jun 3, 2019
@nerrad
Copy link
Contributor

nerrad commented Jun 3, 2019

This still something to do/needed eventually @aduth ?

@aduth
Copy link
Member Author

aduth commented Jun 3, 2019

I think the general problem is still valuable to solve. It is extremely easy to introduce a faulty reducer implementation which ruins performance benefits we'd gain by otherwise maintaining reference of an unchanging state.

The proposed implementation might need a rethink, particularly if we're slated to deprecate plugins (#11449).

@aduth aduth removed the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants