Commit 3bb30736 authored by 马博's avatar 马博

update

parent c507d36b
......@@ -273,7 +273,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
//获取按钮状态
Response detailResponse = mobileService.detail(authorization.dafuwengLogin(uid),"29180");
detailResponse.prettyPrint();
// detailResponse.prettyPrint();
String exchangeText = MatcherString.getString(detailResponse.asString(), "\"exchangeText\":\"(.*?)\",", 1);
Assert.assertEquals(response.jsonPath().getString("message"),"今日已兑完,明天再来哦(14)","校验message失败");
......
......@@ -7,6 +7,7 @@ import io.restassured.http.ContentType;
import io.restassured.response.Response;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.testng.Assert;
import utils.SecurityUtils;
import java.net.MalformedURLException;
......@@ -62,7 +63,7 @@ public class Authorization {
private Map<String,String> ssoCookies =null;
//大富翁登录
public Map dafuwengLogin(int uid){
public Map dafuwengLogin(int uid) {
int i=10;
Map<String,String> dafuwengCookies = null;
while((dafuwengCookiesMap.get(uid)==null||dafuwengCookiesMap.get(uid).size()==0)&&i>0) {
......@@ -95,6 +96,8 @@ public class Authorization {
}
if((dafuwengCookiesMap.get(uid)==null||dafuwengCookiesMap.get(uid).size()==0)){
logger.info("dafuweng登陆app失败,cookies为null");
Assert.assertTrue(false,"dafuweng登陆失败,请检查dafuweng是否启动");
}
return dafuwengCookiesMap.get(uid);
}
......
......@@ -39,11 +39,11 @@ public class 双列图_Cms_ui extends DuibaBaseUi{
sleep(2);
clickByTextEqual("添加图片",0);
clickByTextEqual("1.png");
clickByTextEqual("保存");
clickByTextEqual("保存",1);
System.out.println("ok");
clickByTextEqual("添加图片",1);
clickByTextEqual("1.png");
clickByTextEqual("保存");
clickByTextEqual("保存",1);
System.out.println("ok");
clickByTextEqual("添加跳转链接",0);
......@@ -58,13 +58,13 @@ public class 双列图_Cms_ui extends DuibaBaseUi{
sleep(1);
inputByXpath("//*[@placeholder=\"请输入文本,20字以内\"]","test1",0);
inputByXpath("//*[@placeholder=\"请输入文本,20字以内\"]","test2",1);
clickByTextEqual("保存",1);
clickByTextEqual("保存",2);
sleep(4);
scrollToTop();
clickByTextEqual("发布");
sleep(10);
}
@Test(description = "手机端")
@Test(description = "手机端",dependsOnMethods = "A")
public void B() throws Exception {
String url = "http://wechat.duiba.com.cn/dbredirect/dafuweng?dbredirect=%2F%2Factivity.m.duibatest.com.cn%2Fchw%2Fvisual-editor%2Fskins%3Fid%3D134";
......@@ -91,7 +91,7 @@ public class 双列图_Cms_ui extends DuibaBaseUi{
}
@Test(description = "删除楼层")
@Test(description = "删除楼层",dependsOnMethods = "B")
public void C() throws Exception {
cmsLoginPage.init("15968831723",this);
......
......@@ -41,7 +41,8 @@ public class 商品分组_Cms_ui extends DuibaBaseUi{
inputByXpath("//*[@class=\"el-input el-input--medium\"]//input","test2",1);
clickByTextEqual("保存",1);
scrollToTop();
clickByTextEqual("保存",0);
sleep(5);
......@@ -50,7 +51,7 @@ public class 商品分组_Cms_ui extends DuibaBaseUi{
clickByTextEqual("发布");
sleep(10);
}
@Test
@Test(dependsOnMethods = "A")
public void B() throws Exception {
......@@ -79,7 +80,7 @@ public class 商品分组_Cms_ui extends DuibaBaseUi{
}
@Test(description = "删除楼层")
@Test(description = "删除楼层",dependsOnMethods = "B")
public void C() throws Exception {
cmsLoginPage.init("15968831723",this);
......
......@@ -44,13 +44,13 @@ public class 活动分组_Cms_ui extends DuibaBaseUi{
inputByXpath("//*[@class=\"el-input__inner\"]","test1",1);
inputByXpath("//*[@class=\"el-input__inner\"]","test2",3);
clickByTextEqual("保存",1);
clickByTextEqual("保存",0);
sleep(5);
scrollToTop();
clickByTextEqual("发布");
sleep(10);
}
@Test(description = "手机端")
@Test(description = "手机端",dependsOnMethods = "A")
public void B() throws Exception {
String url = "http://wechat.duiba.com.cn/dbredirect/dafuweng?dbredirect=%2F%2Factivity.m.duibatest.com.cn%2Fchw%2Fvisual-editor%2Fskins%3Fid%3D134";
......@@ -75,7 +75,7 @@ public class 活动分组_Cms_ui extends DuibaBaseUi{
Assert.assertEquals(title,"活动组测试2");
}
@Test(description = "删除楼层")
@Test(description = "删除楼层",dependsOnMethods = "B")
public void C() throws Exception {
cmsLoginPage.init("15968831723",this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment