提交 02fc9077 编写于 作者: Z zhaoke

Test in jenkiins

上级 5b17af82
......@@ -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') {
......
......@@ -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
......
......@@ -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 {
......
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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册