activateTheme() method for WPBrowser module
How come WPBrowser module does not have a method activateTheme() but has activatePlugin()?
As a workaround, what is the recommended way to activate theme? I know WPDb has useTheme() but it does not fire any hooks or filters so it is not really appropriate. Maybe wp-cli?
Looking at activatePlugin (and related methods), this looks like a fairly straight forward way to implement it. If @lucatume don't object, I can give it a shot at creating a PR for this
@alexkuc,
thanks for opening an issue to report this.
You are correct: the WPDb module does have a useTheme method, but that method will not apply the full, user-like, flow.
A activateTheme (or should it be switchTheme?) method should have an implementation available both in the WPBrowser module and in the WPWebDriver one.
I have to work on the code for #484, I might, as well, get to this.
As per objections to a PR: none whatsoever. I'd like any change to have full test coverage, if you could add those too, it would be great, else I will add those in a wrapping PR.
I will drop a note here to let you know when I start working on this to avoid duplicate work.
Thanks!
@lucatume
Hopefully this week I will have the time to look into this 👨💻
Edit: typo
Added in version 3.2.0 and 4.0.1.