-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
E2E Tests: Fix theme colors and font sizes. #18761
Conversation
Couldn't we achieve this by just nullifying the theme-specific customizations directly, so it falls back to the default editor appearance, rather than adding an additional layer of styling to the same effect? In other words, could the function normalize_theme_init() {
remove_theme_support( 'editor-color-palette' );
remove_theme_support( 'editor-font-sizes' );
} |
I didn't know we could do that. Yes, that is much cleaner. Updated 😄 |
So should we now update the editor default colors and font sizes to match twentytwenty's or should we update the tests to expect the defaults? |
@epiqueras IMO, the latter. The tests should target the default appearance of the editor, not specific to any theme. And I don't know that there's a desire for the default appearance to align more closely to what's themed by TwentyTwenty. |
f561445
to
e5f9309
Compare
Yes, that makes a lot of sense. Updated 👍 |
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.
Well, the build error is disappointing, since it was what #18773 was intended to resolve.
But otherwise, this looks in good shape.
This PR disables theme color palettes in the testing docker environment bundled with Gutenberg. Is that expected? |
Right! this seems not great for development @nosolosw We should find a way to enable plugins in tests but not in dev. That's the reason I didn't add the "disableAnimations" plugin to the mu folder, so you enable/disable in tests and in development. |
This reminds me of prior conversations at #14245 . If you're using the test container, shouldn't you expect that it behaves just as it would in tests? Why would we need a setup procedure for the tests-specific requirements to be put in place in the tests container (vs. those being there by default)? |
Yes, same discussion, for me the test container and the dev container are the same, I don't see why I need two environments to work locally. |
But at least as it stands today, they are two environments? And the changes here impact only the test environment? |
That's a good question. I don't know the answer since I use my own setup and the built-in setup changed so much lately. |
OK, so this was expected. So I've got a couple of more questions:
My preference would be to keep using the bundled environment ( |
To clarify. I'm not sure what this means or what the difference between the test or dev container is. What I reported is that the bundled environment I use for development (I guess this is what you call dev container?) is affected by these changes (so I go to |
This would be unexpected to me, yes. I think the default development as you describe should not be impacted by these changes. I'm not sure yet if that's a specific issue in the default development environment, or something we can hope to reconcile by consolidating between this and the "other" development environment. |
For what is worth, this is reproducible via (the instructions we give to contributors):
|
|
mmm, is it? The documentation and the messages after |
Oh, you're using the Core env which only has one container. I recommend you use: https://github.com/WordPress/gutenberg/tree/master/packages/env. |
If our current setup instructions will cause this plugin to be loaded as must-use, I think we either should change this to be a regular I think the first of these options would be the easiest for the short-term, to change this from being an |
Why not,
? We already send people there every time someone has an issue. |
Just learned that the reason I've not been seeing theme color palettes for a long time is probably because of what Andres noted in #18761 (comment). That was tricky to unearth. |
Description
This PR takes an alternative approach to #18699, in improving the developer experience of E2E tests.
Instead of allowing tests to specify a required active theme, this PR seeks to normalize themes so that tests are mostly theme agnostic.
The first logical step for this was fixing editor colors and font sizes.
How has this been tested?
It was verified that tests that were failing in twentynineteen now pass.
Checklist: