-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Calling TestBenchElement.click()
on a disabled button silently does nothing and simply continue the execution of a test. I'd expect the function to fail, giving a proper explanation that the element is disabled and can not be clicked.
The current behavior causes the test to continue, perhaps failing later on in a strange state. This violates the "fail eagerly" principle.
Steps to reproduce:
@Route
public class MainView extends VerticalLayout {
public MainView() {
final Button button = new Button("Im disabled", e -> Notification.show("Hello World!"));
button.setEnabled(false);
add(button);
}
}
public class MainViewIT extends AbstractViewTest {
@Test
public void bug() throws Exception {
$(ButtonElement.class).first().click();
}
}
TestBench 23.5.15, Vaadin 23.5.15
Metadata
Metadata
Assignees
Labels
No labels