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
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:
TestBench 23.5.15, Vaadin 23.5.15