diff --git a/.github/workflows/release-linux.yml b/.github/workflows/release-linux.yml index 76f15b8f..71b2bfe7 100644 --- a/.github/workflows/release-linux.yml +++ b/.github/workflows/release-linux.yml @@ -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: | diff --git a/widgets/app/app_test.go b/widgets/app/app_test.go index bc27280d..0fe5825e 100644 --- a/widgets/app/app_test.go +++ b/widgets/app/app_test.go @@ -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) { diff --git a/widgets/form/form_test.go b/widgets/form/form_test.go index 5a1d25c9..fa65d06f 100644 --- a/widgets/form/form_test.go +++ b/widgets/form/form_test.go @@ -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) { diff --git a/widgets/table/api_test.go b/widgets/table/api_test.go index 06b34d34..364e66fe 100644 --- a/widgets/table/api_test.go +++ b/widgets/table/api_test.go @@ -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")) diff --git a/widgets/table/table_test.go b/widgets/table/table_test.go index fb2e30cc..ed8108d8 100644 --- a/widgets/table/table_test.go +++ b/widgets/table/table_test.go @@ -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) {