The Page Experience Editor Test

01 April 2017

This is a non-technical (and non-joke) article on testing components (renderings) in Sitecore. It is for developers to use as a sanity check before handing work over to QA. It is also useful for QA people as a first step before more complex testing.

Why we need this

As a developers, we often finish a component before checking if it is usable in the experience editor. We forget that it only works when everything is already in place and configured 100% the way we intended.

How to test a component

Follow these steps when you finish a component to the point that it displays all the pieces of content it needs to.

#1 Close the Content Editor / Sitecore rocks

Don't demand that users know the full details of the Sitecore tree to work with your solution.

#2 Open the Page Experience Editor

Assume that most of your users will only use this interface.

#3 Create a new page

Use a template that does not contain the component by default.

#4 Select a (relevant) Placeholder and add your Component to it

You can add it to the appropriate placeholder right? If not, edit the relevant placeholder settings items to enable this.
If your component only uses the page item as it's datasource then go to step 6 now.

#5 Set the datasource

Verify that you can

  1. select an existing item
  2. create a new datasource item
  3. only select items of the correct template type

Make sure the user does not have to wade through the entire content tree to get to the required datasource item.

#6 Ensure text and images are editable

Sometimes it may be necessary to make certain content non-editable. Requirements should inform this decision, not lack of technical skill. Almost everything can be editable. Never hard-code content, either in a controller, cshtml file, or ascx control.

Final thoughts

This is a short post, but that is the point. It's meant as a simple check list you can do before handing work over to someone else. If your code fails parts of this test, see my component development checklist. It describes the technical steps to resolve these problems.

Tags: Sitecore 101Best Practices
comments powered by Disqus