summaryrefslogtreecommitdiff
path: root/gui/backend.go
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-06-18 20:42:29 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-06-26 12:17:30 +0200
commitcdb42f0d6b47a60ceb647e3ac6a6ce66352dbae4 (patch)
tree40f76de30181eb1036d44516e5dd05488c8c31dc /gui/backend.go
parent4de5748e25678dce9c5a344afc5fd40508c0860f (diff)
[test] minimal qml tests
just a minimal boilerplate. the idea is to import the qml files and assert that the states/widgets change accordingly if we mock the backend status. - Closes: #300
Diffstat (limited to 'gui/backend.go')
-rw-r--r--gui/backend.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/gui/backend.go b/gui/backend.go
index f7816ee..4a73cc2 100644
--- a/gui/backend.go
+++ b/gui/backend.go
@@ -44,7 +44,16 @@ func SubscribeToEvent(event string, f unsafe.Pointer) {
//export InitializeBitmaskContext
func InitializeBitmaskContext() {
- backend.InitializeBitmaskContext()
+ opts := &backend.InitOpts{}
+ backend.InitializeBitmaskContext(opts)
+}
+
+//export InitializeTestBitmaskContext
+func InitializeTestBitmaskContext() {
+ opts := &backend.InitOpts{}
+ opts.SkipLaunch = true
+ backend.InitializeBitmaskContext(opts)
+ backend.EnableMockBackend()
}
//export RefreshContext