-
Notifications
You must be signed in to change notification settings - Fork 0
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
Agree page to test #1
Comments
I propose we start with two pages:
|
I think the two pages @adamsilverstein identified are a good starting point. One question I have is whether we want to hard-pin our tests to a specific version of those themes to avoid variance due to code changes in those themes or if our tests should be inclusive of changes to those themes and always load the latest version? Alternatives to consider:
This might be too many use cases for an initial pass, but wanted to get us thinking about how we might build out these tests over time to cover more use cases. |
Assigning to @felixarntz and @adamsilverstein to kindly review comments here please. |
@adamsilverstein @joemcgill I think for now going with the respective home page for 2023 and 2021 like @adamsilverstein is saying is a good start, to have a basic test for both block and classic themes. Regarding the content though, I think it would be good to align the tests across the two themes to use rather similar content. For this first set of having only 1 test for each theme, I would suggest the following:
I think using similar content makes most sense, while of course keeping in mind that, to achieve a similar outcome, minor differences may be needed given how block themes and classic themes work differently. Making sure that both test cases now display a list of latest posts also sets us up for a future like @joemcgill is saying: This first test could basically be our scenario "home page with posts list". For now it'd be the only one, but we could likely keep it as is later and just add more scenarios. WDYT? |
I agree that we can use the same test data for all tests. the wp-theme.com site uses the Theme Unit Test Data maintained by the Themes team (see more: https://developer.wordpress.org/themes/advanced-topics/theme-testing/). We'll need to add a step to our workflows to import the theme data before running the performance tests. I don't see prior art on any of the other repos, but we can probably use WP-CLI like this:
One limitation to be aware of is that the theme test data does not currently get automatically updated as Gutenberg iterates on the way content is authored by the block editor, so there is a chance some markup introduced through a more recent version of the editor could affect our results. I don't think it's a major problem, just something to be aware of and maybe a future place where we can improve the overall tooling landscape for automating WP testing. |
@mukeshpanchal27 @joemcgill I see this issue is in progress but with Felix and Adam, could I ask who is actually working on this one please, and ask that assignees are kept accurate and up to date. |
@eclarke1 Looks to me like we have alignment on the following: We have agreed on a theme: Twenty Twenty Three (fully block theme) and Twenty Twenty One (classic theme) There is no other work to be done here, so I'm going to mark this as resolved and reflect these decisions in the requirements for #4. |
The `$credentials['user_login']` and `$credentials['user_password']` parameters are passed by reference to the `wp_authenticate` action, and are at that point [https://www.php.net/manual/en/language.references.pass.php#124383 created as null] if they don't exist in the array. This commit sets those values to an empty string, resolving two PHP 8.1 deprecation notices: * One from `preg_replace()` in `wp_strip_all_tags()` via `sanitize_user()` in `wp_authenticate()`: {{{ Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated }}} * One from `trim()` in `wp_authenticate()` itself: {{{ Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated }}} Includes documenting the `$credentials` parameter using hash notation. Follow-up to [6643], [37697]. Props lenasterg, TobiasBg, ocean90, afragen, lkraav, SergeyBiryukov. Fixes #56850. git-svn-id: https://develop.svn.wordpress.org/trunk@55301 602fd350-edb4-49c9-b593-d223f7449a82
…air screen. The table is no longer created by core as of WordPress 3.0, and support for global terms was removed in WordPress 6.1, so `$wpdb->sitecategories` is unset by default. This commit resolves a "passing null to non-nullable" deprecation notice on PHP 8.1: {{{ Deprecated: addcslashes(): Passing null to parameter #1 ($string) of type string is deprecated in wp-includes/class-wpdb.php on line 1804 }}} The `tables_to_repair` filter is available for plugins to readd the table or include any additional tables to repair. Follow-up to [14854], [14880], [54240]. Props ipajen, chiragrathod103, SergeyBiryukov. Fixes #57762. git-svn-id: https://develop.svn.wordpress.org/trunk@55421 602fd350-edb4-49c9-b593-d223f7449a82
…om next_posts(). The `esc_url()` function expects to a string for `$url` parameter. There is no input validation within that function. The function contains a `ltrim()` which also expects a string. Passing `null` to this parameter results in `Deprecated: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated` notice on PHP 8.1+. Tracing the stack back, a `null` is being passed to it within `next_posts()` when `get_next_posts_page_link()` returns `null` (it can return a string or `null`). On PHP 7.0 to PHP 8.x, an empty string is returned from `esc_url()` when `null` is passed to it. The change in this changeset avoids the deprecation notice by not invoking `esc_url()` when `get_next_posts_page_link()` returns `null` and instead sets the `$output` to an empty string, thus maintain the same behavior as before (minus the deprecation notice). Adds a test to validate an empty string is returned and the absence of the deprecation (when running on PHP 8.1+). Follow-up to [11383], [9632]. Props codersantosh, nihar007, hellofromTonya, mukesh27, oglekler, rajinsharwar. Fixes #59154. git-svn-id: https://develop.svn.wordpress.org/trunk@56740 602fd350-edb4-49c9-b593-d223f7449a82
…Info screen. This resolves a fatal error if `strict_types` PHP setting is enabled: {{{ Argument #1 ($num) must be of type float, string given }}} Since the goal of the Site Health Info screen is to display raw values where possible, the `number_format()` call here does not seem to provide any benefit. Props krishneup, sabernhardt, audrasjb, SergeyBiryukov. Fixes #60364. git-svn-id: https://develop.svn.wordpress.org/trunk@58847 602fd350-edb4-49c9-b593-d223f7449a82
In order to conduct automated tests on WP Core, we need to agree on which theme or theme(s) to use, which page(s)/template(s) we will test, and what content should be loaded on those pages.
Acceptance
The text was updated successfully, but these errors were encountered: