Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oto
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
龚小红
oto
Commits
7527281c
Commit
7527281c
authored
Sep 01, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加签到领红包的接口,删除设置中心-顶部名片配置
parent
d3b81c67
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
270 additions
and
182 deletions
+270
-182
SignRed.java
src/test/java/com/kjj/cases/assistant/homePage/SignRed.java
+101
-0
PersonalCenter.java
...est/java/com/kjj/cases/assistant/menu/PersonalCenter.java
+5
-18
liveTestNG.xml
src/test/liveTestNG.xml
+164
-164
No files found.
src/test/java/com/kjj/cases/assistant/homePage/SignRed.java
0 → 100644
View file @
7527281c
//package com.kjj.cases.assistant.homePage;
//
//import com.kjj.cases.admin.Authorization;
//import io.restassured.response.Response;
//import org.testng.Assert;
//import org.testng.annotations.BeforeClass;
//import org.testng.annotations.Test;
//
//import java.util.HashMap;
//import java.util.Map;
//
//import static com.kjj.config.BasicConfig.*;
//
//public class SignRed implements Authorization {
// private int attendAmount;
// private int totalPromotionEarnings;
// @BeforeClass
// public void setUp() {
// agentTku();
// }
//
// @Test(description = "指定用户展示入口", priority = 1)
// public void 指定用户展示入口() {
// Response response = network.getResponse(ATTEND_entrance);
// System.out.println(response.body().asString());
// Boolean showFlag = response.jsonPath().getBoolean("data.showFlag");
// Boolean vipExpireFlag = response.jsonPath().getBoolean("data.vipExpireFlag");
// Assert.assertTrue(showFlag, network.message(ATTEND_entrance, "指定用户不展示入口", response.body().asString()));
// Assert.assertFalse(vipExpireFlag, network.message(ATTEND_entrance, "指定用户会员已到期", response.body().asString()));
// }
//
// @Test(description = "非指定用户展示入口", priority = 2)
// public void 非指定用户展示入口() {
// visitor2Tku();
// Response response = network.getResponse(ATTEND_entrance);
// System.out.println(response.body().asString());
// Boolean showFlag = response.jsonPath().getBoolean("data.showFlag");
// Boolean vipExpireFlag = response.jsonPath().getBoolean("data.vipExpireFlag");
// Assert.assertFalse(showFlag, network.message(ATTEND_entrance, "非指定用户展示入口", response.body().asString()));
// Assert.assertFalse(vipExpireFlag, network.message(ATTEND_entrance, "指定用户会员已到期", response.body().asString()));
// }
//
// @Test(description = "签到详情", priority = 3)
// public void 签到详情() {
// agentTku();
// Response response = network.getResponse(ATTEND_detail);
// System.out.println(response.body().asString());
// int roundNum = response.jsonPath().getInt("data.roundNum");
// Boolean todayAttendFlag = response.jsonPath().getBoolean("data.todayAttendFlag");
// Assert.assertEquals(roundNum, 7, network.message(ATTEND_detail, "签到周期错误", response.body().asString()));
// Assert.assertFalse(todayAttendFlag, network.message(ATTEND_detail, "用户今日已签到", response.body().asString()));
// }
//
// @Test(description = "获取累计收益", priority = 4)
// public void 获取累计收益() {
// Response response = network.getResponse(ATTEND_income);
// System.out.println(response.body().asString());
// totalPromotionEarnings = response.jsonPath().getInt("data.totalPromotionEarnings");
// int balance = response.jsonPath().getInt("data.balance");
// Assert.assertTrue(totalPromotionEarnings > 0, network.message(ATTEND_income, "签到周期错误", response.body().asString()));
// Assert.assertTrue(balance > 0, network.message(ATTEND_income, "签到周期错误", response.body().asString()));
//
// }
//
// @Test(description = "签到", priority = 5)
// public void 签到() {
// Response response = network.getResponse(ATTEND_open);
// System.out.println(response.body().asString());
// attendAmount = response.jsonPath().getInt("data.attendAmount");
// String attendDate = response.jsonPath().getString("data.attendDate");
// Assert.assertTrue(attendAmount > 0, network.message(ATTEND_open, "签到失败", response.body().asString()));
//
// }
//
// @Test(description = "签到金额验证", priority = 6)
// public void 签到金额验证() {
// Response response = network.getResponse(ATTEND_income);
// System.out.println(response.body().asString());
// int total = response.jsonPath().getInt("data.totalPromotionEarnings");
// Assert.assertEquals(total , attendAmount + totalPromotionEarnings,network.message(ATTEND_income, "签到周期错误", response.body().asString()));
// }
//
// @Test(description = "代理人账户明细",priority = 7)
// public void 代理人账户明细() {
// agentTku();
// Map<String, Object> Params = new HashMap<String, Object>();
// Params.put("type", 2);
// Params.put("pageNo", 1);
// Params.put("pageSize", 20);
// Response response = network.getResponse(Params, PAY_accDetail);
// System.out.println(response.body().asString());
// int changeType1 = response.jsonPath().getInt("data[0].changeType");
// String nickname = response.jsonPath().getString("data[0].nickname");
// String bizType = response.jsonPath().getString("data[0].bizType");
// int changeMoney = response.jsonPath().getInt("data[0].changeMoney");
// Assert.assertEquals(changeType1 ,2, network.message(PAY_accDetail, "收益明细为null", response.body().asString()));
// Assert.assertEquals(nickname, "吉吉",network.message(PAY_accDetail, "收益明细为null", response.body().asString()));
// Assert.assertEquals(bizType, "吉吉",network.message(PAY_accDetail, "收益明细为null", response.body().asString()));
// Assert.assertEquals(changeMoney, "吉吉",network.message(PAY_accDetail, "收益明细为null", response.body().asString()));
// }
//}
src/test/java/com/kjj/cases/assistant/menu/PersonalCenter.java
View file @
7527281c
...
...
@@ -256,20 +256,13 @@ public class PersonalCenter implements Authorization{
public
void
关闭向客户展示底部和顶部名片
(){
//关闭向客户展示底部和顶部名片
HashMap
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"configKey"
,
"card_show_on_
top
"
);
params
.
put
(
"configKey"
,
"card_show_on_
bottom
"
);
params
.
put
(
"configValue"
,
false
);
Response
response
=
network
.
postResponse
(
params
,
SELLERCONFIG_EDITCONFIG
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
SELLERCONFIG_EDITCONFIG
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
SELLERCONFIG_EDITCONFIG
,
"返回数据为空"
,
response
.
body
().
asString
()));
params
.
put
(
"configKey"
,
"card_show_on_bottom"
);
response
=
network
.
postResponse
(
params
,
SELLERCONFIG_EDITCONFIG
);
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
SELLERCONFIG_EDITCONFIG
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
SELLERCONFIG_EDITCONFIG
,
"返回数据为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
SELLERCONFIG_EDITCONFIG
,
"关闭底部名片"
,
response
.
body
().
asString
()));
//娇艳是否关闭成功
response
=
network
.
getResponse
(
SELLERCARD_GETSELLERCARDCONFIG
);
...
...
@@ -280,20 +273,14 @@ public class PersonalCenter implements Authorization{
int
size
=
response
.
jsonPath
().
getInt
(
"data.findAll{it.val == false}.size()"
);
System
.
out
.
println
(
"size:"
+
size
);
Assert
.
assertTrue
(
size
==
2
,
network
.
message
(
USINGSTRATAGY_index
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
==
1
,
network
.
message
(
SELLERCARD_GETSELLERCARDCONFIG
,
"接口返回失败"
,
response
.
body
().
asString
()));
//开启向客户展示底部和顶部名片
params
.
clear
();
params
.
put
(
"configKey"
,
"card_show_on_top"
);
params
.
put
(
"configValue"
,
true
);
response
=
network
.
postResponse
(
params
,
SELLERCONFIG_EDITCONFIG
);
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
SELLERCONFIG_EDITCONFIG
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
SELLERCONFIG_EDITCONFIG
,
"返回数据为空"
,
response
.
body
().
asString
()));
params
.
put
(
"configKey"
,
"card_show_on_bottom"
);
response
=
network
.
postResponse
(
params
,
SELLERCONFIG_EDITCONFIG
);
System
.
out
.
println
(
response
.
body
().
asString
());
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
SELLERCONFIG_EDITCONFIG
,
"接口返回失败"
,
response
.
body
().
asString
()));
...
...
@@ -306,7 +293,7 @@ public class PersonalCenter implements Authorization{
Assert
.
assertNotNull
(
result
,
network
.
message
(
params
,
SELLERCARD_GETSELLERCARDCONFIG
,
"配置列表为空"
,
response
.
body
().
asString
()));
size
=
response
.
jsonPath
().
getInt
(
"data.findAll{it.val == true}.size()"
);
Assert
.
assertTrue
(
size
==
2
,
network
.
message
(
USINGSTRATAGY_index
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
==
1
,
network
.
message
(
USINGSTRATAGY_index
,
"接口返回失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"关闭理财类互动区展示设置"
,
priority
=
10
)
...
...
src/test/liveTestNG.xml
View file @
7527281c
This diff is collapsed.
Click to expand it.
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