Interface HasThemeFilter<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasTheme,SELF extends Locator<C,SELF>>

Type Parameters:
C - the component type, bound to HasTheme
SELF - the concrete locator subtype, used for fluent chaining
All Known Implementing Classes:
AvatarGroupLocator, BigDecimalFieldLocator, BreadcrumbsLocator, ButtonLocator, CardLocator, ChartLocator, CheckboxGroupLocator, CheckboxLocator, ComboBoxLocator, DashboardLocator, DatePickerLocator, DateTimePickerLocator, DecimalRangeSliderLocator, DecimalSliderLocator, DetailsLocator, DialogLocator, EmailFieldLocator, GridLocator, GridProLocator, IntegerFieldLocator, IntegerRangeSliderLocator, IntegerSliderLocator, MenuBarLocator, MessageInputLocator, MessageListLocator, MultiSelectComboBoxLocator, NotificationLocator, NumberFieldLocator, PasswordFieldLocator, PopoverLocator, RadioButtonGroupLocator, SelectLocator, SideNavLocator, SplitLayoutLocator, SwitchLocator, TabSheetLocator, TabsLocator, TextAreaLocator, TextFieldLocator, TimePickerLocator, TreeGridLocator, UploadButtonLocator, UploadFileListLocator, UploadLocator, VirtualListLocator

public interface HasThemeFilter<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasTheme,SELF extends Locator<C,SELF>>
Mixin for Locators whose target component implements HasTheme. Exposes theme-based filter methods that would be meaningless on components without theme support, turning an inapplicable call into a compile error rather than a silent no-op.
Since:
1.1
  • Method Summary

    Modifier and Type
    Method
    Description
    default SELF
    withoutTheme(com.vaadin.flow.component.shared.ThemeVariant variant)
    Requires the matched component to not have the given theme variant set.
    default SELF
    Deprecated.
    use withoutTheme(ThemeVariant) with the component's typed variant enum where possible.
    default SELF
    withTheme(com.vaadin.flow.component.shared.ThemeVariant variant)
    Requires the matched component to have the given theme variant set.
    default SELF
    Deprecated.
    use withTheme(ThemeVariant) with the component's typed variant enum where possible.
  • Method Details

    • withTheme

      default SELF withTheme(com.vaadin.flow.component.shared.ThemeVariant variant)
      Requires the matched component to have the given theme variant set. Prefer this over the raw-string withTheme(String) so the IDE can autocomplete the variant and a typo becomes a compile error.
      
       ui.findButton().withTheme(ButtonVariant.LUMO_PRIMARY).click();
       
      Parameters:
      variant - the theme variant
      Returns:
      this locator, for chaining
    • withTheme

      @Deprecated default SELF withTheme(String theme)
      Deprecated.
      use withTheme(ThemeVariant) with the component's typed variant enum where possible. This raw-string overload remains for themes not surfaced through a ThemeVariant enum.
      Requires the matched component to have the given theme set.
      Parameters:
      theme - the theme name
      Returns:
      this locator, for chaining
    • withoutTheme

      default SELF withoutTheme(com.vaadin.flow.component.shared.ThemeVariant variant)
      Requires the matched component to not have the given theme variant set. Prefer this over the raw-string withoutTheme(String) for the same reasons as withTheme(ThemeVariant).
      Parameters:
      variant - the theme variant
      Returns:
      this locator, for chaining
    • withoutTheme

      @Deprecated default SELF withoutTheme(String theme)
      Deprecated.
      use withoutTheme(ThemeVariant) with the component's typed variant enum where possible.
      Requires the matched component to not have the given theme set.
      Parameters:
      theme - the theme name
      Returns:
      this locator, for chaining