Here are the examples of the java api com.vaadin.ui.Button.click() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
6 Examples
17
Source : WizardEventsTest.java
with Apache License 2.0
from mariodavid
with Apache License 2.0
from mariodavid
@Test
void when_nextStepIsPermitted_then_stepChangedEventHasNotBeenReceived() {
// given:
final Button nextBtn = wizardBtn("next");
wizard.addWizardTabPreChangeListener(event -> event.preventTabChange());
// when:
nextBtn.click();
// then:
replacedertThat(event(WizardTabChangeEvent.clreplaced)).isNull();
}
17
Source : WizardEventsTest.java
with Apache License 2.0
from mariodavid
with Apache License 2.0
from mariodavid
@Test
void when_nextStepIsPerformed_then_stepChangedEventHasBeenReceived() {
// given:
final Button nextBtn = wizardBtn("next");
// when:
nextBtn.click();
// then:
replacedertThat(event(WizardTabChangeEvent.clreplaced)).isNotNull();
}
17
Source : WizardEventsTest.java
with Apache License 2.0
from mariodavid
with Apache License 2.0
from mariodavid
@Test
void when_nextStepIsPerformed_then_stepChangedEventsAreReceived() {
// given:
final Button nextBtn = wizardBtn("next");
// when:
nextBtn.click();
// then:
replacedertThat(event(WizardTabPreChangeEvent.clreplaced)).isNotNull();
replacedertThat(event(WizardTabChangeEvent.clreplaced)).isNotNull();
}
17
Source : WizardEventsTest.java
with Apache License 2.0
from mariodavid
with Apache License 2.0
from mariodavid
@Test
void when_cancelIsPerformed_then_cancelEventHasBeenReceived() {
// given:
final Button cancelBtn = wizardBtn("cancel");
// when:
cancelBtn.click();
// then:
replacedertThat(event(WizardCancelClickEvent.clreplaced)).isNotNull();
}
16
Source : WizardEventsTest.java
with Apache License 2.0
from mariodavid
with Apache License 2.0
from mariodavid
@Test
void when_finishIsPerformed_then_wizardFinishEventHasBeenReceived() {
// given:
wizard.nextTab();
// and:
final Button finishBtn = wizardBtn("finish");
// when:
finishBtn.click();
// then:
replacedertThat(event(WizardFinishClickEvent.clreplaced)).isNotNull();
}
16
Source : WizardEventsTest.java
with Apache License 2.0
from mariodavid
with Apache License 2.0
from mariodavid
@Test
void when_nextStepIsPerformed_then_eventsContainCorrectDirection() {
// given:
final Button nextBtn = wizardBtn("next");
// when:
nextBtn.click();
// then:
replacedertThat(event(WizardTabPreChangeEvent.clreplaced).getDirection()).isEqualTo(Direction.NEXT);
replacedertThat(event(WizardTabChangeEvent.clreplaced).getDirection()).isEqualTo(Direction.NEXT);
}