提交 dd22ac91 编写于 作者: 雨爱无痕

Fix issue

上级 0cada29d
......@@ -2,6 +2,8 @@ package service
import (
"errors"
"strings"
configHelper "github.com/easysoft/zentaoatf/internal/pkg/helper/config"
zentaoHelper "github.com/easysoft/zentaoatf/internal/pkg/helper/zentao"
serverDomain "github.com/easysoft/zentaoatf/internal/server/modules/v1/domain"
......@@ -9,7 +11,6 @@ import (
"github.com/easysoft/zentaoatf/internal/server/modules/v1/repo"
"github.com/easysoft/zentaoatf/pkg/domain"
fileUtils "github.com/easysoft/zentaoatf/pkg/lib/file"
"strings"
)
type SiteService struct {
......@@ -54,7 +55,12 @@ func (s *SiteService) Create(site model.Site) (id uint, isDuplicate bool, err er
config := configHelper.LoadBySite(site)
err = zentaoHelper.Login(config)
if err != nil {
return
config.Url += "zentao/"
site.Url += "zentao/"
err = zentaoHelper.Login(config)
if err != nil {
return
}
}
id, isDuplicate, err = s.SiteRepo.Create(&site)
......
......@@ -155,7 +155,8 @@ func DeleteWorkspace(webpage plwHelper.Webpage, workspaceName string) {
return
}
locator.Hover()
webpage.Click(`[title="删除"]`)
locator = locator.Locator(`[title="删除"]`)
locator.Click()
webpage.Click(".modal-action>>span:has-text(\"确定\")")
webpage.WaitForTimeout(1000)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册