-
Notifications
You must be signed in to change notification settings - Fork 40
Adding a component into parsys
Since we have control of the parsys into which we want to insert our component, let's create our test scenario implementation now:
@Test
public void testAddingAndEditingSectionHeader() {
SectionHeaderComponent sectionHeaderComponent = parsys.insertComponent(SectionHeaderComponent.class);
//wait until page reloads after modifying the component
assertTrue(summerBlockbusterHitsPage.isDisplayed());
sectionHeaderComponent = parsys.getFirstComponentOfType(SectionHeaderComponent.class);
assertThat(sectionHeaderComponent , CoreMatchers.notNullValue());
}
In the first line we are inserting the Section Header Component into our parsys. Class of this component has the following annotation:
@AemComponent(cssClassName = "section-header", group = "Geometrixx Media", name = "Section Header")
It provides information where the component is located in the sidekick so Bobcat can select appropriate component group and component itself to insert it.
The cssClassName
property is helpful during component presence verification. This test case only inserts a component and checks whether it has been added to the page properly. The next step of this tutorial will be focuses on configuring a component using a configuration dialog window.
This is a part of AEM Authoring tutorial, please refer to other tutorial steps:
- Finding a parsys
- Adding a component
- Editing a component
- Summary
- 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