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

Default theme image options can make test fail #261

Closed
joemcgill opened this issue Nov 28, 2015 · 2 comments
Closed

Default theme image options can make test fail #261

joemcgill opened this issue Nov 28, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@joemcgill
Copy link
Member

Once WP changed the default theme to Twenty Sixteen, several of our tests began failing because Twenty Sixteen includes support for a soft-cropped 'post-thumbnail' image size.
See: https://core.trac.wordpress.org/ticket/34790

There are a few ways we can fix these tests. The first, which you can see in this patch to the original ticket, is to loop through all the defined image sizes and assume they will be included in expected srcset attributes.

Another, is to unhook the theme setup functions for Twenty Sixteen before our tests run, which is how the Customizer tests work, see Konstantin's comment here: https://core.trac.wordpress.org/ticket/34790#comment:3

The other thing we can do is mock the data we want to use in our tests rather than using a real upload.

@joemcgill joemcgill added this to the 3.1.1 milestone Nov 28, 2015
@joemcgill joemcgill added the bug label Nov 28, 2015
@joemcgill
Copy link
Member Author

Fixes landed here: https://core.trac.wordpress.org/changeset/35751

We need to apply the same fixes here.

@joemcgill
Copy link
Member Author

Fixed in #262

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant