This repository has been archived by the owner on Nov 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Using Aem Author Helper
Mikołaj Mański edited this page Jul 18, 2016
·
1 revision
AemAuthorHelper
is a utility class which provides methods to easily obtain parsys, component's scope or a component dialog. Let's obtain a dialog for given component on the n-th level using this BDD example:
@Inject
private AemClassicAuthorHelper authorHelper;
//..
@And("^I configure the \"([^\"]*)\" component index \"([^\"]*)\" using my component configuration data$")
public void iConfigureTheComponentIndexXUsingMyComponentConfigurationData(String componentName,
Integer x) {
aemDialog = authorHelper.getDialog(scenarioContext.getString(PARSYS_NAME_KEY),
DemoComponents.fromString(componentName), x);
aemDialog.open();
//..
}
For more information about ScenarioContext
you should refer to the Scenario Context tutorial.
Example DemoComponents
implementation:
public enum DemoComponents implements Components {
SECTION_HEADER_COMPONENT(SectionHeaderComponent.class)
//..
private Class<?> clazz;
DemoComponents(Class<?> clazz) {
this.clazz = clazz;
}
public static DemoComponents fromString(String componentName) {
String normalized = componentName.replace(" ", "_").toUpperCase();
return DemoComponents.valueOf(normalized);
}
@Override
public Class<?> getComponentClass() {
return clazz;
}
}
Appropriate Gherkin scenario:
Scenario: As an author I can show title of Section Header Component
Given I have opened Feedback page
And parsys I'm working with is named "par"
And my component configuration data is:
| tab | type | label | value |
| Section header | text field | Header Text | text |
| Section header | dropdown | Header size | Medium (h3) |
And I configure the "Section Header Component" component index "2" using my component configuration data
Then Text Field Component with index "2" Title field is visible
You can see other available methods by reading javadoc.
- Configuring Bobcat
- Selenium enhancements
- Cucumber enhancements
- Traffic analyzer
- Email support
- Reporting
- Cloud integration
- Mobile integration
- Executing tests on different environments
- Working with multiple threads
- Tips and tricks
- Authoring tutorial - Classic
- AEM Classic Authoring Advanced usage
- Siteadmin
- Sidekick
- Aem Component
- Working with author pages
- Working with Publish pages
- Advanced component interactions
- Working with Context Menu
- Using Aem Content Tree
- Aem Content Finder
- Storing component configurations
- Working with packages
- Jcr Support
- Authoring tutorial - Touch UI
- Adding and editing a component
- Sites management tutorial