Search in sources :

Example 1 with DOMTokenList

use of elemental2.dom.DOMTokenList in project kie-wb-common by kiegroup.

the class DecisionNavigatorViewTest method testHideDecisionComponentsContainer.

@Test
public void testHideDecisionComponentsContainer() {
    final DOMTokenList classList = mock(DOMTokenList.class);
    decisionComponentsContainer.classList = classList;
    view.hideDecisionComponentsContainer();
    verify(classList).add(HIDDEN_CSS_CLASS);
}
Also used : DOMTokenList(elemental2.dom.DOMTokenList) Test(org.junit.Test)

Example 2 with DOMTokenList

use of elemental2.dom.DOMTokenList in project kie-wb-common by kiegroup.

the class DecisionNavigatorViewTest method testShowDecisionComponentsContainer.

@Test
public void testShowDecisionComponentsContainer() {
    final DOMTokenList classList = mock(DOMTokenList.class);
    decisionComponentsContainer.classList = classList;
    view.showDecisionComponentsContainer();
    verify(classList).remove(HIDDEN_CSS_CLASS);
}
Also used : DOMTokenList(elemental2.dom.DOMTokenList) Test(org.junit.Test)

Example 3 with DOMTokenList

use of elemental2.dom.DOMTokenList in project kie-wb-common by kiegroup.

the class ListItemViewCssHelperTest method testAsNonFocusedDataType.

@Test
public void testAsNonFocusedDataType() {
    final Element element = mock(Element.class);
    final DOMTokenList classList = mock(DOMTokenList.class);
    element.classList = classList;
    ListItemViewCssHelper.asNonFocusedDataType(element);
    verify(classList).remove(FOCUSED_CSS_CLASS);
}
Also used : DOMTokenList(elemental2.dom.DOMTokenList) Element(elemental2.dom.Element) Test(org.junit.Test)

Example 4 with DOMTokenList

use of elemental2.dom.DOMTokenList in project kie-wb-common by kiegroup.

the class ListItemViewCssHelperTest method testIsFocusedDataTypeWhenItIsFocused.

@Test
public void testIsFocusedDataTypeWhenItIsFocused() {
    final Element element = mock(Element.class);
    final DOMTokenList classList = mock(DOMTokenList.class);
    element.classList = classList;
    when(classList.contains(FOCUSED_CSS_CLASS)).thenReturn(true);
    assertTrue(ListItemViewCssHelper.isFocusedDataType(element));
}
Also used : DOMTokenList(elemental2.dom.DOMTokenList) Element(elemental2.dom.Element) Test(org.junit.Test)

Example 5 with DOMTokenList

use of elemental2.dom.DOMTokenList in project kie-wb-common by kiegroup.

the class ListItemViewCssHelperTest method testIsRightArrowWhenItIsRightArrow.

@Test
public void testIsRightArrowWhenItIsRightArrow() {
    final Element element = mock(Element.class);
    final DOMTokenList classList = mock(DOMTokenList.class);
    element.classList = classList;
    when(classList.contains(RIGHT_ARROW_CSS_CLASS)).thenReturn(true);
    assertTrue(ListItemViewCssHelper.isRightArrow(element));
}
Also used : DOMTokenList(elemental2.dom.DOMTokenList) Element(elemental2.dom.Element) Test(org.junit.Test)

Aggregations

DOMTokenList (elemental2.dom.DOMTokenList)37 Test (org.junit.Test)36 Element (elemental2.dom.Element)21 HTMLElement (elemental2.dom.HTMLElement)12 HTMLDivElement (elemental2.dom.HTMLDivElement)9 DataType (org.kie.workbench.common.dmn.client.editors.types.common.DataType)8 HTMLButtonElement (elemental2.dom.HTMLButtonElement)7 HTMLAnchorElement (elemental2.dom.HTMLAnchorElement)5 HTMLInputElement (elemental2.dom.HTMLInputElement)4 HTMLUListElement (elemental2.dom.HTMLUListElement)2 NodeList (elemental2.dom.NodeList)2 HTMLElement (org.jboss.errai.common.client.dom.HTMLElement)2 HTMLBodyElement (elemental2.dom.HTMLBodyElement)1 HTMLDocument (elemental2.dom.HTMLDocument)1