Class CustomNotificationFilterModal
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.test.ui.po.BaseModal
-
- org.xwiki.platform.notifications.test.po.preferences.filters.CustomNotificationFilterModal
-
public class CustomNotificationFilterModal extends BaseModal
Represents the Add filter modal.- Since:
- 13.3RC1
- Version:
- $Id: 072d92dd5032ad2b01f6a1262edbeb393d9ee94c $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CustomNotificationFilterModal.NotificationFormat
Available notification formats.
-
Constructor Summary
Constructors Constructor Description CustomNotificationFilterModal()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clickCancel()
Close the modal by cancelling it and wait until the modal is not displayed anymore.void
clickSubmit()
Click on the submit button to add the new filter and wait until the modal is closed and the livetable of custom filter preferences has been refreshed.org.openqa.selenium.support.ui.Select
getEventsSelector()
Get the select element for the event types: note that we don't rely onSelect
since it's hitting Escape key when performing select which closes the modal.DocumentTreeElement
getLocations()
CustomNotificationFilterPreference.FilterAction
getSelectedAction()
Set<CustomNotificationFilterModal.NotificationFormat>
getSelectedFormats()
boolean
isSubmitEnabled()
void
selectAction(CustomNotificationFilterPreference.FilterAction action)
Select the given action for the new filter.void
selectFormats(Set<CustomNotificationFilterModal.NotificationFormat> formats)
Allow to select the formats for the notification.-
Methods inherited from class org.xwiki.test.ui.po.BaseModal
close, getTitle, isDisplayed, waitForClosed
-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
Method Detail
-
getLocations
public DocumentTreeElement getLocations()
- Returns:
- the tree allowing to select the locations.
-
getSelectedAction
public CustomNotificationFilterPreference.FilterAction getSelectedAction()
- Returns:
- the selected action for the new filter.
-
selectAction
public void selectAction(CustomNotificationFilterPreference.FilterAction action)
Select the given action for the new filter.- Parameters:
action
- the action to select.
-
getEventsSelector
public org.openqa.selenium.support.ui.Select getEventsSelector()
Get the select element for the event types: note that we don't rely onSelect
since it's hitting Escape key when performing select which closes the modal.- Returns:
- the select element for the event types of the filter.
-
getSelectedFormats
public Set<CustomNotificationFilterModal.NotificationFormat> getSelectedFormats()
- Returns:
- the selected formats for the filter.
-
selectFormats
public void selectFormats(Set<CustomNotificationFilterModal.NotificationFormat> formats)
Allow to select the formats for the notification.- Parameters:
formats
- the formats to select.
-
clickCancel
public void clickCancel()
Close the modal by cancelling it and wait until the modal is not displayed anymore.
-
isSubmitEnabled
public boolean isSubmitEnabled()
- Returns:
true
if the submit button is enabled.
-
clickSubmit
public void clickSubmit()
Click on the submit button to add the new filter and wait until the modal is closed and the livetable of custom filter preferences has been refreshed. Be careful to callisSubmitEnabled()
before to ensure the submit button can be clicked.
-
-