Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
3dd55e88
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
大约 1 年 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3dd55e88
编写于
7月 12, 2022
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix unit test issues
上级
d3e9bc8e
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
45 addition
and
37 deletion
+45
-37
.gitignore
.gitignore
+1
-0
cmd/command/main.go
cmd/command/main.go
+1
-1
internal/command/action/case.go
internal/command/action/case.go
+26
-1
internal/command/action/checkout.go
internal/command/action/checkout.go
+0
-32
internal/pkg/helper/script/parser.go
internal/pkg/helper/script/parser.go
+4
-0
internal/server/modules/v1/domain/zentao.go
internal/server/modules/v1/domain/zentao.go
+1
-0
ui/src/locales/en-US.ts
ui/src/locales/en-US.ts
+2
-0
ui/src/locales/zh-CN.ts
ui/src/locales/zh-CN.ts
+3
-0
ui/src/views/result/FormResult.vue
ui/src/views/result/FormResult.vue
+7
-3
未找到文件。
.gitignore
浏览文件 @
3dd55e88
...
...
@@ -33,3 +33,4 @@ logs/
/.scannerwork/
/bin/
/log/
/product1/
cmd/command/main.go
浏览文件 @
3dd55e88
...
...
@@ -102,7 +102,7 @@ func main() {
case
"ci"
:
files
:=
fileUtils
.
GetFilesFromParams
(
os
.
Args
[
2
:
])
if
err
:=
flagSet
.
Parse
(
os
.
Args
[
len
(
files
)
+
2
:
]);
err
==
nil
{
action
.
C
ommitCases
(
files
)
action
.
C
heckIn
(
files
)
}
case
"cr"
:
...
...
internal/command/action/case.go
浏览文件 @
3dd55e88
...
...
@@ -2,15 +2,40 @@ package action
import
(
commConsts
"github.com/easysoft/zentaoatf/internal/pkg/consts"
commDomain
"github.com/easysoft/zentaoatf/internal/pkg/domain"
configHelper
"github.com/easysoft/zentaoatf/internal/pkg/helper/config"
scriptHelper
"github.com/easysoft/zentaoatf/internal/pkg/helper/script"
zentaoHelper
"github.com/easysoft/zentaoatf/internal/pkg/helper/zentao"
stdinUtils
"github.com/easysoft/zentaoatf/pkg/lib/stdin"
stringUtils
"github.com/easysoft/zentaoatf/pkg/lib/string"
)
func
C
ommitCases
(
files
[]
string
)
{
func
C
heckIn
(
files
[]
string
)
{
cases
:=
scriptHelper
.
GetCaseByDirAndFile
(
files
)
config
:=
configHelper
.
LoadByWorkspacePath
(
commConsts
.
ZtfDir
)
zentaoHelper
.
SyncToZentao
(
cases
,
config
)
}
func
Checkout
(
productId
,
moduleId
,
suiteId
,
taskId
string
,
independentFile
bool
,
scriptLang
string
)
{
if
(
productId
!=
""
||
moduleId
!=
""
||
suiteId
!=
""
||
taskId
!=
""
)
&&
scriptLang
!=
""
{
//isReady = true
}
else
{
stdinUtils
.
InputForCheckout
(
&
productId
,
&
moduleId
,
&
suiteId
,
&
taskId
,
&
independentFile
,
&
scriptLang
)
}
settings
:=
commDomain
.
SyncSettings
{
ProductId
:
stringUtils
.
ParseInt
(
productId
),
ModuleId
:
stringUtils
.
ParseInt
(
moduleId
),
SuiteId
:
stringUtils
.
ParseInt
(
suiteId
),
TaskId
:
stringUtils
.
ParseInt
(
taskId
),
IndependentFile
:
independentFile
,
Lang
:
scriptLang
,
}
config
:=
configHelper
.
LoadByWorkspacePath
(
commConsts
.
ZtfDir
)
zentaoHelper
.
SyncFromZentao
(
settings
,
config
,
commConsts
.
WorkDir
)
}
internal/command/action/checkout.go
已删除
100644 → 0
浏览文件 @
d3e9bc8e
package
action
import
(
commConsts
"github.com/easysoft/zentaoatf/internal/pkg/consts"
commDomain
"github.com/easysoft/zentaoatf/internal/pkg/domain"
configHelper
"github.com/easysoft/zentaoatf/internal/pkg/helper/config"
zentaoHelper
"github.com/easysoft/zentaoatf/internal/pkg/helper/zentao"
stdinUtils
"github.com/easysoft/zentaoatf/pkg/lib/stdin"
stringUtils
"github.com/easysoft/zentaoatf/pkg/lib/string"
)
func
Checkout
(
productId
,
moduleId
,
suiteId
,
taskId
string
,
independentFile
bool
,
scriptLang
string
)
{
if
(
productId
!=
""
||
moduleId
!=
""
||
suiteId
!=
""
||
taskId
!=
""
)
&&
scriptLang
!=
""
{
//isReady = true
}
else
{
stdinUtils
.
InputForCheckout
(
&
productId
,
&
moduleId
,
&
suiteId
,
&
taskId
,
&
independentFile
,
&
scriptLang
)
}
settings
:=
commDomain
.
SyncSettings
{
ProductId
:
stringUtils
.
ParseInt
(
productId
),
ModuleId
:
stringUtils
.
ParseInt
(
moduleId
),
SuiteId
:
stringUtils
.
ParseInt
(
suiteId
),
TaskId
:
stringUtils
.
ParseInt
(
taskId
),
IndependentFile
:
independentFile
,
Lang
:
scriptLang
,
}
config
:=
configHelper
.
LoadByWorkspacePath
(
commConsts
.
ZtfDir
)
zentaoHelper
.
SyncFromZentao
(
settings
,
config
,
commConsts
.
WorkDir
)
}
internal/pkg/helper/script/parser.go
浏览文件 @
3dd55e88
...
...
@@ -8,6 +8,7 @@ import (
"github.com/easysoft/zentaoatf/pkg/consts"
commonUtils
"github.com/easysoft/zentaoatf/pkg/lib/common"
fileUtils
"github.com/easysoft/zentaoatf/pkg/lib/file"
"html"
"io/ioutil"
"path"
"path/filepath"
...
...
@@ -616,6 +617,9 @@ func GetCaseContent(stepObj commDomain.ZtfStep, seq string, independentFile bool
expectContent
=
expectStr
stepContent
=
html
.
UnescapeString
(
stepContent
)
expectContent
=
html
.
UnescapeString
(
expectContent
)
return
}
...
...
internal/server/modules/v1/domain/zentao.go
浏览文件 @
3dd55e88
...
...
@@ -10,6 +10,7 @@ type ZentaoRespData struct {
}
type
ZentaoResultSubmitReq
struct
{
Title
string
`json:"title"`
Seq
string
`json:"seq"`
WorkspaceId
int
`json:"workspaceId"`
ProductId
int
`json:"productId"`
...
...
ui/src/locales/en-US.ts
浏览文件 @
3dd55e88
...
...
@@ -224,6 +224,8 @@ export default {
'
open-in-explore
'
:
'
Open In Explore
'
,
'
open-in-terminal
'
:
'
Open In Terminal
'
,
'
pls_select_task
'
:
'
Please select task
'
,
'
or_input_task_name
'
:
'
Or input new task name
'
,
'
pls_select_workspace
'
:
'
Please select workspace.
'
,
'
pls_add_zentao_site
'
:
'
Please add zentao site.
'
,
'
pls_create_workspace
'
:
'
Please create workspace to continue.
'
,
...
...
ui/src/locales/zh-CN.ts
浏览文件 @
3dd55e88
...
...
@@ -235,6 +235,9 @@ export default {
'
open-in-explore
'
:
'
在资源管理器中显示
'
,
'
open-in-terminal
'
:
'
从此位置打开命令行
'
,
'
pls_select_task
'
:
'
请选择任务
'
,
'
or_input_task_name
'
:
'
或输入新任务标题
'
,
'
pls_select_workspace
'
:
'
请选择导出到的工作目录。
'
,
'
pls_add_zentao_site
'
:
'
初次使用,请点击右上按钮新建禅道站点。
'
,
'
pls_create_workspace
'
:
'
请点击右上角链接新建工作目录
'
,
...
...
ui/src/views/result/FormResult.vue
浏览文件 @
3dd55e88
...
...
@@ -4,10 +4,10 @@
@
onCancel=
"close"
@
onOk=
"submit"
:title=
"t('submit_result_to_zentao')"
:contentStyle=
"
{width: '
3
00px'}"
:contentStyle=
"
{width: '
5
00px'}"
>
<Form
labelCol=
"6"
wrapperCol=
"16"
>
<FormItem
name=
"taskId"
:label=
"t('
task')
"
>
<Form>
<FormItem
name=
"taskId"
:label=
"t('
pls_select_task')"
labelWidth=
"120px
"
>
<div
class=
"select"
>
<select
name=
"taskId"
v-model=
"modelRef.taskId"
>
<option
value=
"0"
></option>
...
...
@@ -17,6 +17,10 @@
</select>
</div>
</FormItem>
<FormItem
v-if=
"!modelRef.taskId"
name=
"title"
:label=
"t('or_input_task_name')"
labelWidth=
"120px"
>
<input
type=
"text"
v-model=
"modelRef.title"
/>
</FormItem>
</Form>
</ZModal>
</
template
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录