|
26 | 26 | import java.util.concurrent.TimeoutException;
|
27 | 27 |
|
28 | 28 | import com.adobe.cq.testing.selenium.pagewidgets.cq.InsertComponentDialog;
|
| 29 | +import com.codeborne.selenide.Condition; |
| 30 | +import com.codeborne.selenide.DragAndDropOptions; |
| 31 | +import com.codeborne.selenide.ElementsCollection; |
| 32 | +import com.codeborne.selenide.Selenide; |
| 33 | +import com.codeborne.selenide.SelenideElement; |
| 34 | +import com.codeborne.selenide.WebDriverRunner; |
29 | 35 | import org.apache.commons.lang.StringUtils;
|
30 | 36 | import org.apache.commons.lang3.RandomStringUtils;
|
31 | 37 | import org.apache.http.HttpStatus;
|
|
58 | 64 | import com.adobe.cq.testing.selenium.utils.TestContentBuilder;
|
59 | 65 | import com.adobe.cq.wcm.core.components.it.seljup.util.constant.RequestConstants;
|
60 | 66 | import com.adobe.cq.wcm.core.components.it.seljup.util.constant.Selectors;
|
61 |
| -import com.codeborne.selenide.Condition; |
62 |
| -import com.codeborne.selenide.ElementsCollection; |
63 |
| -import com.codeborne.selenide.Selenide; |
64 |
| -import com.codeborne.selenide.SelenideElement; |
65 |
| -import com.codeborne.selenide.WebDriverRunner; |
66 | 67 |
|
67 | 68 | import static com.adobe.cq.testing.selenium.Constants.DEFAULT_RETRY_DELAY;
|
68 | 69 | import static com.adobe.cq.testing.selenium.Constants.DEFAULT_SMALL_SIZE;
|
@@ -922,6 +923,12 @@ public static void makeInlineEditorEditable() {
|
922 | 923 | ((JavascriptExecutor) webDriver).executeScript("document.getElementsByName('actionUpdate')[0].style.display='inline'");
|
923 | 924 | }
|
924 | 925 |
|
| 926 | + public static void dragSidePanelImageToComponent(String imagePath, String componentPath) { |
| 927 | + SelenideElement image = $(String.format("coral-card.cq-draggable[data-path=\"%s\"]", imagePath)); |
| 928 | + DragAndDropOptions.DragAndDropTarget.CssSelector targetComp = new DragAndDropOptions.DragAndDropTarget.CssSelector(String.format("[data-type='Editable'][data-path='%s']", componentPath)); |
| 929 | + image.dragAndDrop(new DragAndDropOptions(targetComp, DragAndDropOptions.DragAndDropMethod.ACTIONS)); |
| 930 | + } |
| 931 | + |
925 | 932 | /**
|
926 | 933 | * Class representing a simple page that can be opened in a Selenium browser.
|
927 | 934 | */
|
|
0 commit comments