Package com.vaadin.flow.component.card
Class CardLocator
- All Implemented Interfaces:
Clickable<Card>,HasAriaLabelFilter<Card,,CardLocator> HasThemeFilter<Card,CardLocator>
@Generated("com.vaadin.browserless.locator.processor.LocatorProcessor")
public class CardLocator
extends Locator<Card,CardLocator>
implements Clickable<Card>, HasAriaLabelFilter<Card,CardLocator>, HasThemeFilter<Card,CardLocator>
Generated locator for
Card, derived from
CardTester. 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEnsures the component is in a usable state before interaction.Gets the component being tested.Gets the components shown in the card's footer, in the order they were added.Gets the component used as the card's header.Gets the component shown before the card's header content.Gets the component shown after the card's header content.getMedia()Gets the component shown as the card's media.Gets the component used as the card's subtitle.Gets the subtitle text shown on the card.getTitle()Gets the component used as the card's title.Gets the title text shown on the card.Methods inherited from class com.vaadin.browserless.locator.Locator
atIndex, component, components, exists, inside, inside, invalidate, self, with, withAttribute, withAttribute, withClassName, withCondition, withId, withinSlot, withoutAttribute, withoutAttribute, withoutClassName, withTestIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.browserless.Clickable
click, click, click, middleClick, middleClick, rightClick, rightClickMethods inherited from interface com.vaadin.browserless.locator.HasAriaLabelFilter
withAriaLabel, withAriaLabelContainingMethods inherited from interface com.vaadin.browserless.locator.HasThemeFilter
withoutTheme, withoutTheme, withTheme, withTheme
-
Constructor Details
-
CardLocator
public CardLocator() -
CardLocator
-
-
Method Details
-
getComponent
Description copied from interface:ClickableGets the component being tested.- Specified by:
getComponentin interfaceClickable<Card>- Returns:
- the component under test
-
ensureComponentIsUsable
public void ensureComponentIsUsable()Description copied from interface:ClickableEnsures the component is in a usable state before interaction.- Specified by:
ensureComponentIsUsablein interfaceClickable<Card>
-
getTitleAsText
Gets the title text shown on the card. Javadoc copied fromCardTester.getTitleAsText().- Returns:
- the title text, or an empty string if no textual title is set
- Throws:
IllegalStateException- if the card is not visible to the user, or if a header component is set so the title is not shown
-
getTitle
Gets the component used as the card's title. Javadoc copied fromCardTester.getTitle().- Returns:
- the title component, or
nullif the title is not a component - Throws:
IllegalStateException- if the card is not visible to the user, or if a header component is set so the title is not shown
-
getSubtitle
Gets the component used as the card's subtitle. Javadoc copied fromCardTester.getSubtitle().- Returns:
- the subtitle component, or
nullif no subtitle is set - Throws:
IllegalStateException- if the card is not visible to the user, or if a header component is set so the subtitle is not shown
-
getSubtitleAsText
Gets the subtitle text shown on the card.Card.setSubtitle(String)wraps the text in a, so a subtitle set as text is reported here, and so is the text of ainvalid reference
Spanset withinvalid reference
SpanCard.setSubtitle(Component)? the card stores the two the same way and cannot tell them apart. A subtitle set as any other component is not text and reportsnull; usegetSubtitle()to get the component itself.Note that this differs from
getTitleAsText(), which reports an empty string rather thannullwhen the card shows no textual title, because a card keeps its title text in a property of its own instead of in a component. Javadoc copied fromCardTester.getSubtitleAsText().- Returns:
- the subtitle text, or
nullif no subtitle is set or the subtitle is not a text subtitle - Throws:
IllegalStateException- if the card is not visible to the user, or if a header component is set so the subtitle is not shown
-
getHeader
Gets the component used as the card's header. When set, the header is shown instead of the title and subtitle. Javadoc copied fromCardTester.getHeader().- Returns:
- the header component, or
nullif no header is set - Throws:
IllegalStateException- if the card is not visible to the user
-
getHeaderPrefix
Gets the component shown before the card's header content. Javadoc copied fromCardTester.getHeaderPrefix().- Returns:
- the header prefix component, or
nullif none is set - Throws:
IllegalStateException- if the card is not visible to the user
-
getHeaderSuffix
Gets the component shown after the card's header content. Javadoc copied fromCardTester.getHeaderSuffix().- Returns:
- the header suffix component, or
nullif none is set - Throws:
IllegalStateException- if the card is not visible to the user
-
getMedia
Gets the component shown as the card's media. Javadoc copied fromCardTester.getMedia().- Returns:
- the media component, or
nullif none is set - Throws:
IllegalStateException- if the card is not visible to the user
-