Search in sources :

Example 11 with Option

use of org.jboss.errai.common.client.dom.Option in project kie-wb-common by kiegroup.

the class LibraryToolbarViewTest method makeSureTextAndValueAreBeingSetWhenCreatingNewOption.

/*
     * https://issues.jboss.org/browse/RHDM-255
     * [IE11] An error occurs when creating new space in the business central
     * The value attribute must be set in order that option.getValue() returns the correct value.
     * Only calling option.setText() is enough for modern browsers only.
     */
@Test
public void makeSureTextAndValueAreBeingSetWhenCreatingNewOption() {
    final Option option = mock(Option.class);
    doReturn(option).when(document).createElement("option");
    final Option createdOption = view.createOption("alias");
    assertEquals(option, createdOption);
    verify(option).setValue("alias");
    verify(option).setText("alias");
}
Also used : Option(org.jboss.errai.common.client.dom.Option) Test(org.junit.Test)

Aggregations

Option (org.jboss.errai.common.client.dom.Option)11 Test (org.junit.Test)1 DataSourceDefMainPanelViewImpl_emptyOption (org.kie.workbench.common.screens.datasource.management.client.resources.i18n.DataSourceManagementConstants.DataSourceDefMainPanelViewImpl_emptyOption)1