generated from eliona-smart-building-assistant/device-app-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinegration_test.go
37 lines (29 loc) · 873 Bytes
/
inegration_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package main
import (
"github.com/eliona-smart-building-assistant/app-integration-tests/app"
"github.com/eliona-smart-building-assistant/app-integration-tests/assert"
"github.com/eliona-smart-building-assistant/app-integration-tests/test"
"testing"
)
func TestApp(t *testing.T) {
app.StartApp()
test.AppWorks(t)
t.Run("TestAssetTypes", assetTypes)
t.Run("TestWidgetTypes", widgetTypes)
t.Run("TestSchema", schema)
app.StopApp()
}
func schema(t *testing.T) {
t.Parallel()
assert.SchemaExists(t, "mystrom", []string{"configuration", "asset"})
}
func assetTypes(t *testing.T) {
t.Parallel()
assert.AssetTypeExists(t, "mystrom_room", []string{})
assert.AssetTypeExists(t, "mystrom_root", []string{})
assert.AssetTypeExists(t, "mystrom_switch", []string{})
}
func widgetTypes(t *testing.T) {
t.Parallel()
assert.WidgetTypeExists(t, "myStrom Switch")
}