Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
test-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
马博
test-platform
Commits
abaa7988
Commit
abaa7988
authored
Nov 26, 2018
by
钱雯君
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into qwj_181029
parents
ec4bfb9d
1ba44b2e
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
1 deletion
+63
-1
创建自有活动_DuibaTest.java
src/test/java/http/cases/DeveloperTest/创建自有活动_DuibaTest.java
+0
-1
新建活动测试_DuibaTest.java
src/test/java/http/cases/DeveloperTest/新建活动测试_DuibaTest.java
+0
-0
DeveloperService.java
src/test/java/http/service/hd/DeveloperService.java
+63
-0
No files found.
src/test/java/http/cases/DeveloperTest/创建自有活动_DuibaTest.java
View file @
abaa7988
...
...
@@ -267,7 +267,6 @@ public class 创建自有活动_DuibaTest extends DuibaTestBase {
}
//删除自有活动
public
void
删除自有活动
(
String
title
)
throws
Exception
{
//开发者删除自有活动
...
...
src/test/java/http/cases/DeveloperTest/新建活动测试_DuibaTest.java
0 → 100644
View file @
abaa7988
This diff is collapsed.
Click to expand it.
src/test/java/http/service/hd/DeveloperService.java
View file @
abaa7988
...
...
@@ -912,4 +912,67 @@ public class DeveloperService {
return
response
;
}
//创建自有活动工具-所有字段
public
Response
saveHdAll
(
String
id
,
String
creditsType
,
String
title
,
String
limitCount
,
String
limitScope
,
String
freeLimit
,
String
freeScope
,
String
awards
,
String
bannerImgNew
)
throws
Exception
{
String
url
=
hdHost
+
"/launch/save"
;
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
id
);
map
.
put
(
"subType"
,
"turntable_circle"
);
map
.
put
(
"creditsType"
,
creditsType
);
map
.
put
(
"title"
,
title
);
map
.
put
(
"credits"
,
"10"
);
map
.
put
(
"limitCount"
,
limitCount
);
map
.
put
(
"limitScope"
,
limitScope
);
map
.
put
(
"freeLimit"
,
freeLimit
);
map
.
put
(
"freeScope"
,
freeScope
);
map
.
put
(
"optionNum"
,
""
);
map
.
put
(
"anticheatExchangeLimit"
,
"true"
);
map
.
put
(
"autoOffDate"
,
"2030-12-01 00:00"
);
map
.
put
(
"banner"
,
"//yun.duiba.com.cn/upload/r1u3O1460639179556.png"
);
map
.
put
(
"thumbnail"
,
"//yun.duiba.com.cn/upload/R8Hac1467009242903.png"
);
map
.
put
(
"questionRecord"
,
"[]"
);
map
.
put
(
"awards"
,
awards
);
map
.
put
(
"appId"
,
"2239"
);
map
.
put
(
"bannerImgNew"
,
bannerImgNew
);
logger
.
info
(
"请求创建自有活动工具url:"
+
url
);
Response
response
=
given
().
contentType
(
"application/x-www-form-urlencoded;charset=UTF-8"
).
cookies
(
authorization
.
hdLogin
()).
params
(
map
).
post
(
"http://"
+
url
);
response
.
prettyPrint
();
try
{
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"desc"
),
"成功"
);
}
catch
(
Exception
e
){
throw
new
Exception
(
"创建自有活动接口失败,返回信息:"
+
response
.
asString
());
}
catch
(
Error
er
){
throw
new
Exception
(
"创建自有活动接口失败,返回信息:"
+
response
.
asString
());
}
return
response
;
}
//开发者后台编辑自有活动
public
Response
editData
(
String
actId
,
String
type
,
String
appId
)
throws
Exception
{
String
url
=
hdHost
+
"/launch/editData"
;
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"actId"
,
actId
);
map
.
put
(
"type"
,
type
);
map
.
put
(
"appId"
,
appId
);
logger
.
info
(
"请求编辑自有活动url:"
+
url
);
Response
response
=
given
().
contentType
(
"application/x-www-form-urlencoded;charset=UTF-8"
).
cookies
(
authorization
.
hdLogin
()).
params
(
map
).
post
(
"http://"
+
url
);
response
.
prettyPrint
();
try
{
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"desc"
),
"成功"
);
}
catch
(
Exception
e
){
throw
new
Exception
(
"编辑自有活动接口失败,返回信息:"
+
response
.
asString
());
}
catch
(
Error
er
){
throw
new
Exception
(
"编辑自有活动接口失败,返回信息:"
+
response
.
asString
());
}
return
response
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment