Class CreatePagePage

  • Direct Known Subclasses:
    CreateSpacePage

    public class CreatePagePage
    extends ViewPage
    Represents the actions possible on the Create Page template page.
    Since:
    3.2M3
    Version:
    $Id: 430d3b24acaf6ba5eaa7c814a85ef9648f4d7449 $
    • Constructor Detail

      • CreatePagePage

        public CreatePagePage()
    • Method Detail

      • getDocumentPicker

        public DocumentPicker getDocumentPicker()
        Returns:
        the document picker used to select the target document
      • getAvailableTemplateSize

        public int getAvailableTemplateSize()
        Since:
        3.2M3
      • getAvailableTemplates

        public List<String> getAvailableTemplates()
      • setTemplate

        public void setTemplate​(String template)
      • setType

        public void setType​(String type)
      • clickCreate

        public void clickCreate()
      • clickCreate

        public void clickCreate​(boolean waitForSubmit)
        Click on the create page button.
        Parameters:
        waitForSubmit - whether to wait for the form to be submitted or not
        Since:
        14.8RC1
      • createPage

        public EditPage createPage​(String spaceValue,
                                   String pageValue,
                                   boolean isTerminalPage)
      • createPage

        public EditPage createPage​(String title,
                                   String spaceValue,
                                   String pageValue,
                                   boolean isTerminalPage)
        Since:
        7.2M3
      • createPageFromTemplate

        public EditPage createPageFromTemplate​(String spaceValue,
                                               String pageValue,
                                               String templateValue)
      • createPageFromTemplate

        public EditPage createPageFromTemplate​(String spaceValue,
                                               String pageValue,
                                               String templateValue,
                                               boolean isTerminalPage)
        Since:
        7.2M1
      • createPageFromTemplate

        public EditPage createPageFromTemplate​(String title,
                                               String spaceValue,
                                               String pageValue,
                                               String templateValue,
                                               boolean isTerminalPage)
        Since:
        7.2M3
      • fillForm

        public void fillForm​(String title,
                             String spaceReference,
                             String pageName,
                             boolean isTerminalPage)
        Parameters:
        title - document title, ignored if null
        spaceReference - document's space reference (parent nested document), ignored if null
        pageName - document's name (space name or page name, depending if terminal or not), ignored if null
        isTerminalPage - true if the new document is terminal, false for non-terminal
        Since:
        public since 7.4M2
      • waitForErrorMessage

        public void waitForErrorMessage()
        Waits for a global error message in the page.
        Since:
        3.2M3
      • getErrorMessage

        public String getErrorMessage()
        Returns:
        the content of the error message.
        Since:
        11.4RC1
      • waitForFieldErrorMessage

        public void waitForFieldErrorMessage()
        Waits for a validation error in a field.
        Since:
        3.2M3
      • isTerminalPage

        public boolean isTerminalPage()
        Returns:
        true if the page to create should be a terminal page, false otherwise
        Since:
        7.2M1
      • setTerminalPage

        public void setTerminalPage​(boolean isTerminalPage)
        Parameters:
        isTerminalPage - true if the page to create is terminal, false otherwise
        Since:
        7.2M1
      • isTerminalOptionDisplayed

        public boolean isTerminalOptionDisplayed()
        Returns:
        true if the choice between terminal or non-terminal document is displayed, false otherwise.
        Since:
        7.2M3
      • waitForLocationPreviewContent

        public void waitForLocationPreviewContent​(String expectedPathString)
        Wait for the location preview to display the passed path string and throw an exception if the timeout is reached. Note that we need to wait since the Breadcrumb is updated live and asserting its content without waiting would lead to false positives.

        Note: This method can not be implemented inside BreadcrumbElement because a change of parent replaces completely the BreadcrumbElement's container and thus it becomes stale. To avoid that, at each wait iteration, we lookup the current breadcrumb element and not a cached one.

        TODO: Reuse DocumentPicker inside this PO instead of duplicating this method.

        Parameters:
        expectedPathString - the path string to wait for
        Since:
        7.2RC1