A quick blog post about Content Testing feature of Sitecore and its unfriendliness towards
I went through a few content testing scenarios recently and one thing really puzzled me: Content Testing dialogs stumble upon
If you try to set up a test in the Sitecore Commerce reference storefront and send the page through the workflow, here’s how the variants screenshots will look like:
The base controller is using
Context.Site for view path resolution:
protected string GetRenderingView(string renderingViewName = null)
And it won’t find anything in the
Trying the same workflow with test in Habitat stumbles upon the validation step:
Context.Site is being used for custom dictionary functionality:
private Item GetDictionaryRoot(SiteContext site)
And it also errors out in
Just in case you wondered,
Preview.ResolveSite doesn’t help.
Alistair Deneys explained that Content Testing needs to run screenshot generation in context of
shell to render unpublished content of different versions.
Content Testing needs to quickly learn how to do everything it needs in the context of the current site while getting everything from the
While you probably shouldn’t use
Context.Site for view path resolution - we now have official support for MVC areas, and probably shouldn’t use custom dictionary implementation - here’s my blog post on how to make standard dictionary items editable in Experience Editor, you should be allowed to use
Context.Site in your page rendering logic if you need it.