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
Sidekick
Mikołaj Mański edited this page Jul 18, 2016
·
6 revisions
Bobcat provides classes that allows to perform actions on AEM Classic Sidekick.
Main elements:
- AemSidekick - page object that represents whole sidekick
- SidekickActions - helper class for performing operations (included in AemSideKick)
- SidekickTab - enum for tabs on sidekick (marked by red color)
- ModeIcon - enum for choosing different sidekick modes (marked by blue color)
- PageOperation - enum for choosing different page operations (marked by black color)
- SidekickSection - enum for opening different sections if they are available on tab (marked by green color)
For all available methods please look into javadoc
sidekick.clickComponentGroupToggle("General");
sidekick.isComponentGroupPresent("General");
sidekick.isComponentPresent("Component", "Incorrect group");
sidekick.activatePage();
sidekick.clickTab(SidekickTab.PAGE);
sidekick.clickOperation(PageOperation.PAGE_PROPERTIES);
sidekick.clickModeIcon(ModeIcon.PREVIEW);
The example below shows how to implement a test for activating page from the sidekick:
package com.cognifide.test.summer;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import com.cognifide.qa.bb.aem.AemLogin;
import com.cognifide.qa.bb.aem.ui.messages.AemBubbleMessage;
import com.cognifide.qa.bb.aem.ui.sidekick.AemSidekick;
import com.cognifide.qa.bb.junit.Modules;
import com.cognifide.qa.bb.junit.TestRunner;
import com.cognifide.test.GuiceModule;
import com.google.inject.Inject;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(TestRunner.class)
@Modules(GuiceModule.class)
public class SidekickTest {
private static final String PAGE_SUCCESSFULLY_ACTIVATED_MESSAGE = "Page successfully activated";
@Inject
private AemLogin aemLogin;
@Inject
private SummerBlockbusterHitsPage summerBlockbusterHitsPage;
@Inject
private AemSidekick sidekick;
@Inject
private AemBubbleMessage bubbleMessage;
@Before
public void openSiteadminPage() {
aemLogin.authorLogin();
summerBlockbusterHitsPage.open();
assertTrue(summerBlockbusterHitsPage.isDisplayed());
}
@Test
public void pageShouldBeActivatedProperlyUsingSidekick() {
sidekick.activatePage();
String bubbleMessageText = bubbleMessage.waitForAemBubbleMessage().getBubbleMessageText();
assertThat(bubbleMessageText, is(PAGE_SUCCESSFULLY_ACTIVATED_MESSAGE));
}
}
The only one thing to explain here is actually the AemBubbleMessage
- you can use that when you want to check the notification info that AEM sends you via bubble message as shown below:
- 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