Class MessageListLocator

java.lang.Object
com.vaadin.browserless.locator.Locator<com.vaadin.flow.component.messages.MessageList,MessageListLocator>
com.vaadin.flow.component.messages.MessageListLocator
All Implemented Interfaces:
Clickable<com.vaadin.flow.component.messages.MessageList>, HasThemeFilter<com.vaadin.flow.component.messages.MessageList,MessageListLocator>

@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor") public class MessageListLocator extends Locator<com.vaadin.flow.component.messages.MessageList,MessageListLocator> implements Clickable<com.vaadin.flow.component.messages.MessageList>, HasThemeFilter<com.vaadin.flow.component.messages.MessageList,MessageListLocator>
Generated locator for MessageList, derived from MessageListTester. Filter steps are inherited from Locator; action methods delegate to a fresh tester around the resolved component, so behavioral changes belong on the tester, not here.
  • Constructor Details

    • MessageListLocator

      public MessageListLocator()
      Creates a locator that searches for a MessageList.
    • MessageListLocator

      public MessageListLocator(com.vaadin.flow.component.messages.MessageList component)
      Creates a locator already bound to the given component, so that the action methods run against it instead of against a lookup.
      Parameters:
      component - the component the locator resolves to
  • Method Details

    • getComponent

      public com.vaadin.flow.component.messages.MessageList getComponent()
      Description copied from interface: Clickable
      Gets the component being tested.
      Specified by:
      getComponent in interface Clickable<com.vaadin.flow.component.messages.MessageList>
      Returns:
      the component under test
    • ensureComponentIsUsable

      public void ensureComponentIsUsable()
      Description copied from interface: Clickable
      Ensures the component is in a usable state before interaction.
      Specified by:
      ensureComponentIsUsable in interface Clickable<com.vaadin.flow.component.messages.MessageList>
    • size

      public int size()
      Get amount of messages in the messageList. Javadoc copied from MessageListTester.size().
      Returns:
      message count
    • getMessage

      public com.vaadin.flow.component.messages.MessageListItem getMessage(int index)
      Get message in given index. index is 0 based. Javadoc copied from MessageListTester.getMessage(int).
      Parameters:
      index - item index
      Returns:
      message in index
      Throws:
      IndexOutOfBoundsException - – if the index is out of range (index < 0 || index >= size())
    • getMessages

      public List<com.vaadin.flow.component.messages.MessageListItem> getMessages()
      Get all messages in list. Javadoc copied from MessageListTester.getMessages().
      Returns:
      all available messages
    • getMessages

      public List<com.vaadin.flow.component.messages.MessageListItem> getMessages(Instant start, Instant end)
      Get messages between given Instant (excluding). Javadoc copied from MessageListTester.getMessages(java.time.Instant,java.time.Instant).
      Parameters:
      start - start time
      end - end time
      Returns:
      messages falling between start an end time
    • getMessagesAfter

      public List<com.vaadin.flow.component.messages.MessageListItem> getMessagesAfter(Instant start)
      Get messages after given Instant (excluding). Javadoc copied from MessageListTester.getMessagesAfter(java.time.Instant).
      Parameters:
      start - start time
      Returns:
      messages after start time
    • getMessagesBefore

      public List<com.vaadin.flow.component.messages.MessageListItem> getMessagesBefore(Instant end)
      Get messages before given Instant (excluding). Javadoc copied from MessageListTester.getMessagesBefore(java.time.Instant).
      Parameters:
      end - end time
      Returns:
      messages before end time
    • getAttachments

      public List<com.vaadin.flow.component.messages.MessageListItem.Attachment> getAttachments(int index)
      Get the attachments of the message in given index. index is 0 based. Javadoc copied from MessageListTester.getAttachments(int).
      Parameters:
      index - item index
      Returns:
      attachments of the message in index, empty list if the message has no attachments
      Throws:
      IndexOutOfBoundsException - – if the index is out of range (index < 0 || index >= size())
      Since:
      1.1
    • getAttachmentByName

      public com.vaadin.flow.component.messages.MessageListItem.Attachment getAttachmentByName(int index, String name)
      Get the attachment with the given name from the message in given index. index is 0 based. Javadoc copied from MessageListTester.getAttachmentByName(int,java.lang.String).
      Parameters:
      index - item index
      name - attachment name to look for, not null
      Returns:
      attachment with the given name, or null if the message has no attachment with the given name
      Throws:
      IndexOutOfBoundsException - – if the index is out of range (index < 0 || index >= size())
      Since:
      1.1
    • getMessages

      public List<com.vaadin.flow.component.messages.MessageListItem> getMessages(String userName)
      Get all messages for a given userName. Javadoc copied from MessageListTester.getMessages(java.lang.String).
      Parameters:
      userName - user to get messages for (nullable)
      Returns:
      messages for user, for null messages without defined userName