Package org.xwiki.flamingo.skin.test.po
Class EditConflictModal
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.test.ui.po.BaseModal
-
- org.xwiki.flamingo.skin.test.po.EditConflictModal
-
public class EditConflictModal extends BaseModal
Represent the modal displayed in case of edit conflict.- Since:
- 11.4RC1
- Version:
- $Id: d13e1a0d6b0dc78402bca6226817c84967070e5a $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EditConflictModal.AvailableDiffVersions
The available versions for performing a diff.static class
EditConflictModal.ConflictChoice
The different choices available to resolve the conflict.
-
Constructor Summary
Constructors Constructor Description EditConflictModal()
Default constructor, wait for the modal to be visible.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelModal()
Cancel the modal and wait for it to be closed.EditConflictModal
changeDiff(EditConflictModal.AvailableDiffVersions previous, EditConflictModal.AvailableDiffVersions next)
Perform a diff between two custom versions.void
close()
EditConflictModal.ConflictChoice
getCurrentChoice()
EntityDiff
getDiff()
EditConflictModal.AvailableDiffVersions
getOriginalDiffVersion()
EditConflictModal.AvailableDiffVersions
getRevisedDiffVersion()
boolean
isPreviewDiffOptionsAvailable()
EditConflictModal
makeChoice(EditConflictModal.ConflictChoice choice)
Chose an option among the conflict resolution options.void
makeChoiceAndSubmit(EditConflictModal.ConflictChoice choice, boolean waitSuccess)
Chose an option to solve the conflict and submit it immediately.void
submitCurrentChoice(boolean waitSuccess)
Submit the current choice.-
Methods inherited from class org.xwiki.test.ui.po.BaseModal
getTitle, isDisplayed, waitForClosed
-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
Method Detail
-
cancelModal
public void cancelModal()
Cancel the modal and wait for it to be closed.
-
makeChoice
public EditConflictModal makeChoice(EditConflictModal.ConflictChoice choice)
Chose an option among the conflict resolution options.- Parameters:
choice
- the choice to make.- Returns:
- a new EditConflictModal since it reloads the diff.
-
makeChoiceAndSubmit
public void makeChoiceAndSubmit(EditConflictModal.ConflictChoice choice, boolean waitSuccess)
Chose an option to solve the conflict and submit it immediately.- Parameters:
choice
- the choice to makewaitSuccess
- if true, wait for the saved notification. Note that this option cannot be used with reload choice.
-
getDiff
public EntityDiff getDiff()
- Returns:
- the
EntityDiff
corresponding to the diff contained in the modal.
-
getOriginalDiffVersion
public EditConflictModal.AvailableDiffVersions getOriginalDiffVersion()
- Returns:
- the previous version used for displaying the diff.
-
getRevisedDiffVersion
public EditConflictModal.AvailableDiffVersions getRevisedDiffVersion()
- Returns:
- the next version used for displaying the diff.
-
changeDiff
public EditConflictModal changeDiff(EditConflictModal.AvailableDiffVersions previous, EditConflictModal.AvailableDiffVersions next)
Perform a diff between two custom versions.- Parameters:
previous
- the previous version to compare with.next
- the next version to compare with.- Returns:
- a new EditConflictModal with the appropriate diff.
-
getCurrentChoice
public EditConflictModal.ConflictChoice getCurrentChoice()
- Returns:
- the currently selected option.
-
submitCurrentChoice
public void submitCurrentChoice(boolean waitSuccess)
Submit the current choice.- Parameters:
waitSuccess
- if true wait for the success notification. Note that this option doesn't have any effect when choice is reload.
-
isPreviewDiffOptionsAvailable
public boolean isPreviewDiffOptionsAvailable()
- Returns:
true
if the options to change the diff is available.
-
-