Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ protected void initVaadinEnvironment() {
*
* @return the set of services implementation classes, never
* {@literal null}.
* @since 25.3
*/
protected final Set<Class<?>> allLookupServices() {
return allLookupServices(testConfiguration());
Expand All @@ -117,6 +118,7 @@ protected final Set<Class<?>> allLookupServices() {
* {@literal null}
* @return the set of services implementation classes, never
* {@literal null}.
* @since 25.3
*/
@SuppressWarnings("deprecation")
protected final Set<Class<?>> allLookupServices(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ Set<Class<?>> getLookupServices() {
* @throws IllegalArgumentException
* if the name is blank or reserved by the browserless
* environment
* @since 25.3
*/
public Builder withApplicationProperty(String name, String value) {
configuration.withApplicationProperty(name, value);
Expand All @@ -570,6 +571,7 @@ public Builder withApplicationProperty(String name, String value) {
* @throws IllegalArgumentException
* if a name is blank or reserved by the browserless
* environment
* @since 25.3
*/
public Builder withApplicationProperties(
Map<String, String> properties) {
Expand All @@ -587,6 +589,7 @@ public Builder withApplicationProperties(
* the identifiers of the features to enable; must not be
* {@code null}
* @return this builder
* @since 25.3
*/
public Builder withFeatureFlags(String... featureIds) {
configuration.withFeatureFlags(featureIds);
Expand All @@ -602,6 +605,7 @@ public Builder withFeatureFlags(String... featureIds) {
* @param features
* the features to enable; must not be {@code null}
* @return this builder
* @since 25.3
*/
public Builder withFeatureFlags(Feature... features) {
configuration.withFeatureFlags(features);
Expand All @@ -620,6 +624,7 @@ public Builder withFeatureFlags(Feature... features) {
* {@code true} to enable the feature, {@code false} to
* disable it
* @return this builder
* @since 25.3
*/
public Builder withFeatureFlag(String featureId, boolean enabled) {
configuration.withFeatureFlag(featureId, enabled);
Expand All @@ -638,6 +643,7 @@ public Builder withFeatureFlag(String featureId, boolean enabled) {
* {@code true} to enable the feature, {@code false} to
* disable it
* @return this builder
* @since 25.3
*/
public Builder withFeatureFlag(Feature feature, boolean enabled) {
configuration.withFeatureFlag(feature, enabled);
Expand All @@ -659,6 +665,7 @@ public Builder withFeatureFlag(Feature feature, boolean enabled) {
* @param testConfiguration
* the configuration to apply; must not be {@code null}
* @return this builder
* @since 25.3
*/
public Builder withConfiguration(
BrowserlessConfiguration testConfiguration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public interface CommercialTesterWrappers {
* @param grid
* the GridPro instance to be tested
* @return a GridProTester instance wrapping the given GridPro
* @since 25.3
*/
default <V> GridProTester<GridPro<V>, V> test(GridPro<V> grid) {
return BaseBrowserlessTest.internalWrap(GridProTester.class, grid);
Expand All @@ -49,6 +50,7 @@ default <V> GridProTester<GridPro<V>, V> test(GridPro<V> grid) {
* @param itemType
* the type of the items in the GridPro
* @return a GridProTester instance wrapping the given GridPro
* @since 25.3
*/
default <V> GridProTester<GridPro<V>, V> test(GridPro grid,
Class<V> itemType) {
Expand All @@ -72,7 +74,7 @@ default ChartTester<Chart> test(Chart chart) {
* @param dashboard
* the dashboard instance to be tested
* @return a DashboardTester instance wrapping the given dashboard
* @since 1.1
* @since 1.1.2
*/
default DashboardTester<Dashboard> test(Dashboard dashboard) {
return BaseBrowserlessTest.internalWrap(DashboardTester.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ public ComponentQuery<T> withoutAttribute(String attribute, String value) {
* @return this element query instance for chaining
* @throws IllegalArgumentException
* if {@code slot} is {@literal null} or blank
* @since 25.3
*/
public ComponentQuery<T> withinSlot(String slot) {
if (slot == null || slot.isBlank()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public boolean isUsable() {
* change its value, so it is considered not usable.
*
* @return {@code true} if the component is read-only
* @since 25.3
*/
protected boolean isComponentReadOnly() {
return getComponent() instanceof HasValue<?, ?> hasValue
Expand Down Expand Up @@ -199,6 +200,7 @@ public final void ensureComponentIsUsable() {
* @throws IllegalStateException
* if the component is not usable, with details on its current
* state.
* @since 25.3
*/
protected void ensureComponentIsUsableOrDetach() {
try {
Expand Down Expand Up @@ -538,6 +540,7 @@ private <V> AbstractFieldSupport<?, V> getFieldSupport(Object target) {
* if the component is not usable
* @throws IllegalArgumentException
* if the component does not hold a value
* @since 25.3
*/
protected void clearAsUser() {
ensureComponentIsUsable();
Expand All @@ -563,6 +566,7 @@ protected void clearAsUser() {
* visible
* @throws IllegalArgumentException
* if the component does not hold a value
* @since 25.3
*/
protected void clickClearButtonAsUser() {
ensureComponentIsUsable();
Expand Down Expand Up @@ -614,6 +618,7 @@ protected <V> void setValueAsUser(V value) {
* the field to set the value to, not {@literal null}.
* @param value
* the new value, may be null.
* @since 25.3
*/
protected <V> void setValueAsUser(HasValue<?, V> field, V value) {
final AbstractFieldSupport<?, V> fs = getFieldSupport(field);
Expand Down Expand Up @@ -643,6 +648,7 @@ protected <V> void setValueAsUser(HasValue<?, V> field, V value) {
* @param field
* the field to check, not {@literal null}.
* @return {@literal true} if the value can be set as a user
* @since 25.3
*/
protected boolean canSetValueAsUser(HasValue<?, ?> field) {
return field instanceof AbstractField
Expand All @@ -664,6 +670,7 @@ protected boolean canSetValueAsUser(HasValue<?, ?> field) {
* the value as the client would send it, may be null.
* @throws IllegalStateException
* if the property does not accept updates from the client
* @since 25.3
*/
protected void setPropertyAsUser(String property, Serializable value) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ public Builder<C> withCloseHook(Runnable hook) {

/**
* @see BrowserlessApplicationContext.Builder#withApplicationProperty
* @since 25.3
*/
public Builder<C> withApplicationProperty(String name, String value) {
base.withApplicationProperty(name, value);
Expand All @@ -225,6 +226,7 @@ public Builder<C> withApplicationProperty(String name, String value) {

/**
* @see BrowserlessApplicationContext.Builder#withApplicationProperties
* @since 25.3
*/
public Builder<C> withApplicationProperties(
Map<String, String> properties) {
Expand All @@ -234,6 +236,7 @@ public Builder<C> withApplicationProperties(

/**
* @see BrowserlessApplicationContext.Builder#withFeatureFlags(String...)
* @since 25.3
*/
public Builder<C> withFeatureFlags(String... featureIds) {
base.withFeatureFlags(featureIds);
Expand All @@ -242,6 +245,7 @@ public Builder<C> withFeatureFlags(String... featureIds) {

/**
* @see BrowserlessApplicationContext.Builder#withFeatureFlags(Feature...)
* @since 25.3
*/
public Builder<C> withFeatureFlags(Feature... features) {
base.withFeatureFlags(features);
Expand All @@ -251,6 +255,7 @@ public Builder<C> withFeatureFlags(Feature... features) {
/**
* @see BrowserlessApplicationContext.Builder#withFeatureFlag(String,
* boolean)
* @since 25.3
*/
public Builder<C> withFeatureFlag(String featureId, boolean enabled) {
base.withFeatureFlag(featureId, enabled);
Expand All @@ -260,6 +265,7 @@ public Builder<C> withFeatureFlag(String featureId, boolean enabled) {
/**
* @see BrowserlessApplicationContext.Builder#withFeatureFlag(Feature,
* boolean)
* @since 25.3
*/
public Builder<C> withFeatureFlag(Feature feature, boolean enabled) {
base.withFeatureFlag(feature, enabled);
Expand All @@ -268,6 +274,7 @@ public Builder<C> withFeatureFlag(Feature feature, boolean enabled) {

/**
* @see BrowserlessApplicationContext.Builder#withConfiguration
* @since 25.3
*/
public Builder<C> withConfiguration(
BrowserlessConfiguration configuration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ default AccordionTester<Accordion> test(Accordion accordion) {
* @param avatarGroup
* the component to wrap
* @return a tester for the given component
* @since 25.3
*/
default AvatarGroupTester<AvatarGroup> test(AvatarGroup avatarGroup) {
return BaseBrowserlessTest.internalWrap(AvatarGroupTester.class,
Expand All @@ -201,6 +202,7 @@ default ButtonTester<Button> test(Button button) {
* @param card
* the component to wrap
* @return a tester for the given component
* @since 25.3
*/
default CardTester<Card> test(Card card) {
return BaseBrowserlessTest.internalWrap(CardTester.class, card);
Expand Down Expand Up @@ -293,6 +295,7 @@ default <V> GridTester<Grid<V>, V> test(Grid grid, Class<V> itemType) {
* the type of the items in the grid the menu is attached to
* @return a GridContextMenuTester instance wrapping the given
* GridContextMenu
* @since 25.3
*/
default <V> GridContextMenuTester<GridContextMenu<V>, V> test(
GridContextMenu<V> gridContextMenu) {
Expand Down Expand Up @@ -457,6 +460,7 @@ default IntegerSliderTester<IntegerSlider> test(
* @param splitLayout
* the component to wrap
* @return a tester for the given component
* @since 25.3
*/
default SplitLayoutTester<SplitLayout> test(SplitLayout splitLayout) {
return BaseBrowserlessTest.internalWrap(SplitLayoutTester.class,
Expand Down Expand Up @@ -532,6 +536,7 @@ default TimePickerTester<TimePicker> test(TimePicker timePicker) {
* @param <V>
* the type of the items in the TreeGrid
* @return a TreeGridTester instance wrapping the given TreeGrid
* @since 25.3
*/
default <V> TreeGridTester<TreeGrid<V>, V> test(TreeGrid<V> treeGrid) {
return BaseBrowserlessTest.internalWrap(TreeGridTester.class, treeGrid);
Expand All @@ -553,6 +558,7 @@ default <V> TreeGridTester<TreeGrid<V>, V> test(TreeGrid<V> treeGrid) {
* @param <V>
* the type of the items in the TreeGrid
* @return a TreeGridTester instance wrapping the given TreeGrid
* @since 25.3
*/
default <V> TreeGridTester<TreeGrid<V>, V> test(TreeGrid treeGrid,
Class<V> itemType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
* connector does.
* <p>
* For internal use only.
*
* @since 25.3
*/
public final class GridContextMenuSupport {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
* since a user cannot click anything else.
* <p>
* For internal use only.
*
* @since 25.3
*/
public final class MenuItemNavigation {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
* the client has asked for.
* <p>
* For internal use only.
*
* @since 25.3
*/
public final class RenderedComponentSupport {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public SELF withoutAttribute(String attribute, String value) {
* {@link ComponentQuery#withinSlot(String)} for annotated component trees.
*
* @see ComponentQuery#withinSlot(String)
* @since 25.3
*/
public SELF withinSlot(String slot) {
resetCache();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
*
* @param <T>
* component type
* @since 1.1.2
*/
@Tests(Text.class)
public class TextTester<T extends Text> extends ComponentTester<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public void openDetails(String summary) {
*
* @throws IllegalStateException
* if the component is not usable or if no panel is open
* @since 25.3
*/
public void closeDetails() {
ensureComponentIsUsable();
Expand All @@ -76,6 +77,7 @@ public void closeDetails() {
* if no dropdown panel found for summary
* @throws IllegalStateException
* if the component is not usable or if the panel is not open
* @since 25.3
*/
public void closeDetails(String summary) {
ensureComponentIsUsable();
Expand All @@ -99,6 +101,7 @@ public void closeDetails(String summary) {
* if no dropdown panel found for summary
* @throws IllegalStateException
* if the component is not usable
* @since 25.3
*/
public void toggleDetails(String summary) {
ensureComponentIsUsable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
*
* @param <T>
* component type
* @since 25.3
*/
@Tests(AvatarGroup.class)
public class AvatarGroupTester<T extends AvatarGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public List<String> getItemTexts() {
* from an empty string, which is the path of the application root.
*
* @return the item paths, with {@code null} for items that have no path
* @since 1.1.2
*/
public List<String> getItemPaths() {
ensureComponentIsUsable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
*
* @param <T>
* component type
* @since 25.3
*/
@Tests(Card.class)
public class CardTester<T extends Card> extends ComponentTester<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public CheckboxTester(T component) {
* Checks whether the checkbox is currently checked.
*
* @return {@code true} if the checkbox is checked, {@code false} otherwise
* @since 25.3
*/
public boolean isChecked() {
return getComponent().getValue();
Expand All @@ -55,6 +56,8 @@ public boolean isChecked() {
* <p>
* Does nothing if the checkbox is already checked, since a user would not
* click it in that case. The checkbox must be usable either way.
*
* @since 25.3
*/
public void check() {
clickIfNot(true);
Expand All @@ -65,6 +68,8 @@ public void check() {
* <p>
* Does nothing if the checkbox is already unchecked, since a user would not
* click it in that case. The checkbox must be usable either way.
*
* @since 25.3
*/
public void uncheck() {
clickIfNot(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*
* @param <T>
* component type
* @since 25.3
*/
@Tests(Switch.class)
public class SwitchTester<T extends Switch> extends ComponentTester<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public void selectItem(String selection) {
* @throws IllegalStateException
* if the component is not usable, or its clear button is not
* visible
* @since 25.3
*/
public void clickClearButton() {
clickClearButtonAsUser();
Expand Down
Loading
Loading