Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
schrodinger: export popup panel coverage + test
- Loading branch information
1 parent
c528412
commit 2b79761
Showing
3 changed files
with
76 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...ger/src/main/java/com/evolveum/midpoint/schrodinger/component/modal/ExportPopupPanel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.evolveum.midpoint.schrodinger.component.modal; | ||
|
||
import com.codeborne.selenide.Condition; | ||
import com.codeborne.selenide.SelenideElement; | ||
|
||
import com.evolveum.midpoint.schrodinger.MidPoint; | ||
import com.evolveum.midpoint.schrodinger.component.common.table.Table; | ||
import com.evolveum.midpoint.schrodinger.util.Schrodinger; | ||
|
||
import static com.codeborne.selenide.Selenide.$; | ||
|
||
public class ExportPopupPanel<T> extends ModalBox<T> { | ||
|
||
public ExportPopupPanel(T parent, SelenideElement parentElement) { | ||
super(parent, parentElement); | ||
} | ||
|
||
public Table<ExportPopupPanel<T>> table() { | ||
return new Table<>(this, | ||
getParentElement().$(Schrodinger.bySelfOrDescendantElementAttributeValue("div", "data-s-id", "table", | ||
"style", "float: left; padding-bottom: 5px;")) | ||
.waitUntil(Condition.visible, MidPoint.TIMEOUT_DEFAULT_2_S)); | ||
} | ||
|
||
public ExportPopupPanel<T> setReportName(String reportName) { | ||
getParentElement().$x("//div[@data-s-id='name']").waitUntil(Condition.visible, MidPoint.TIMEOUT_DEFAULT_2_S) | ||
.setValue(reportName); | ||
return this; | ||
} | ||
|
||
public T exportSelectedColumns() { | ||
$(Schrodinger.byDataId("export")).waitUntil(Condition.visible, MidPoint.TIMEOUT_DEFAULT_2_S).click(); | ||
return getParent(); | ||
} | ||
|
||
public T cancel() { | ||
$(Schrodinger.byDataId("cancelButton")).waitUntil(Condition.visible, MidPoint.TIMEOUT_DEFAULT_2_S).click(); | ||
return getParent(); | ||
} | ||
|
||
} |