diff --git a/Jenkinsfile b/Jenkinsfile index 08d46f2cb2f24d160a62d466a494708fca62fa3e..7227cafe404fed4e3e0205daaa42b26803954668 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -74,7 +74,6 @@ pipeline { container('node') { sh 'yarn config set registry https://registry.npm.taobao.org --global' sh 'cd ui && yarn && nohup yarn serve &' - sh 'while ! nc -z 127.0.0.1 8000; do sleep 1;done' } container('playwright') { diff --git a/test/ui/helper/action.go b/test/ui/helper/action.go index 800f0528aa69cfb16eddc2fad6b1a671ad1d407f..8cfc8988bb58e5fdfe0a5b00c22b85bac9ddf2ef 100644 --- a/test/ui/helper/action.go +++ b/test/ui/helper/action.go @@ -14,7 +14,6 @@ import ( func OpenUrl(url string, t provider.T) (ret Webpage, err error) { pw, err := playwright.Run() - fmt.Println(url, err) utils.PrintErrOrNot(err, t) headless := conf.Headless diff --git a/test/ui/helper/operation.go b/test/ui/helper/operation.go index f47a16fe7a5effda2d13333ac895109424ab4d17..1bec90d70aa504d218615121abd87f5cb1c33d57 100644 --- a/test/ui/helper/operation.go +++ b/test/ui/helper/operation.go @@ -25,6 +25,7 @@ func (l MyLocator) Click() (err error) { } func (l MyLocator) ClickWithOption(option playwright.PageClickOptions) (err error) { + option.Timeout = &conf.Timeout err = l.PlwLocator.Click(option) t := l.T if err != nil { diff --git a/test/ui/utils/print.go b/test/ui/utils/print.go index 9ec4e5bd1bb5dcc9fce8b506f94b455d4a3d2e61..fd8a342134194ea9f55367070aa9e58fa1ab4ca2 100644 --- a/test/ui/utils/print.go +++ b/test/ui/utils/print.go @@ -1,6 +1,7 @@ package utils import ( + "fmt" "log" "github.com/easysoft/zentaoatf/test/ui/conf" @@ -9,6 +10,7 @@ import ( func PrintErrOrNot(err error, t provider.T) { if err != nil && t != nil { + fmt.Println(err) if conf.ExitAllOnError { t.Error(err) t.FailNow()