From 1dfbae59457b1a2dbeaa7f9cc9885e295d12e75d Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Mon, 14 Oct 2019 14:58:09 +0200 Subject: Some fixes of the testutils module. --- .../kotlin/pl/treksoft/kvision/test/TestUtil.kt | 23 +++------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'kvision-modules/kvision-testutils/src') diff --git a/kvision-modules/kvision-testutils/src/test/kotlin/pl/treksoft/kvision/test/TestUtil.kt b/kvision-modules/kvision-testutils/src/test/kotlin/pl/treksoft/kvision/test/TestUtil.kt index c32faa70..ca522469 100644 --- a/kvision-modules/kvision-testutils/src/test/kotlin/pl/treksoft/kvision/test/TestUtil.kt +++ b/kvision-modules/kvision-testutils/src/test/kotlin/pl/treksoft/kvision/test/TestUtil.kt @@ -21,9 +21,7 @@ */ package pl.treksoft.kvision.test -import org.w3c.dom.Element import pl.treksoft.jquery.jQuery -import pl.treksoft.kvision.core.Widget import pl.treksoft.kvision.panel.Root import kotlin.browser.document import kotlin.test.assertEquals @@ -53,9 +51,11 @@ interface SimpleSpec : TestSpec { interface DomSpec : TestSpec { + fun getId() = "test" + override fun beforeTest() { val fixture = "
" + - "
" + "
" document.body?.insertAdjacentHTML("afterbegin", fixture) } @@ -81,20 +81,3 @@ interface DomSpec : TestSpec { } } } - -interface WSpec : DomSpec { - - fun runW(code: (widget: Widget, element: Element?) -> Unit) { - run { - val root = Root("test", fixed = true) - val widget = Widget() - widget.id = "test_id" - root.add(widget) - val element = document.getElementById("test_id") - code(widget, element) - } - } - -} - -external fun require(name: String): dynamic -- cgit