[fix] tests
This commit is contained in:
parent
0a26776065
commit
647dbb2deb
5 changed files with 10 additions and 5 deletions
2
.github/workflows/release-linux.yml
vendored
2
.github/workflows/release-linux.yml
vendored
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
go: [1.19.2]
|
||||
runs-on: "ubuntu-latest"
|
||||
runs-on: "ubuntu-20.04"
|
||||
steps:
|
||||
- name: Arm Build
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import (
|
|||
"github.com/yaoapp/yao/i18n"
|
||||
"github.com/yaoapp/yao/runtime"
|
||||
"github.com/yaoapp/yao/script"
|
||||
_ "github.com/yaoapp/yao/utils"
|
||||
"github.com/yaoapp/yao/widgets/login"
|
||||
)
|
||||
|
||||
|
|
@ -224,7 +225,10 @@ func TestProcessMenu(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
assert.Len(t, res, 3)
|
||||
|
||||
data := any.Of(res).MapStr()
|
||||
assert.True(t, data.Has("items"))
|
||||
assert.True(t, data.Has("setting"))
|
||||
}
|
||||
|
||||
func TestProcessIcons(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ func TestLoad(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
assert.Equal(t, 9, len(Forms))
|
||||
assert.Equal(t, 10, len(Forms))
|
||||
}
|
||||
|
||||
func prepare(t *testing.T, language ...string) {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ func TestAPISearch(t *testing.T) {
|
|||
}
|
||||
|
||||
data := any.Of(resp).MapStr().Dot()
|
||||
assert.Equal(t, "20", fmt.Sprintf("%v", data.Get("pagesize")))
|
||||
assert.Equal(t, "1", fmt.Sprintf("%v", data.Get("pagesize")))
|
||||
assert.Equal(t, "3", fmt.Sprintf("%v", data.Get("total")))
|
||||
assert.Equal(t, "checked", data.Get("data.0.status"))
|
||||
assert.Equal(t, "enabled", data.Get("data.0.mode"))
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import (
|
|||
"github.com/yaoapp/yao/model"
|
||||
"github.com/yaoapp/yao/runtime"
|
||||
"github.com/yaoapp/yao/script"
|
||||
_ "github.com/yaoapp/yao/utils"
|
||||
"github.com/yaoapp/yao/widgets/app"
|
||||
"github.com/yaoapp/yao/widgets/component"
|
||||
"github.com/yaoapp/yao/widgets/expression"
|
||||
|
|
@ -24,7 +25,7 @@ func TestLoad(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
assert.Equal(t, 11, len(Tables))
|
||||
assert.Equal(t, 12, len(Tables))
|
||||
}
|
||||
|
||||
func TestLoadID(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue