Authored by 朱小军

Merge branch 'develop' into 'master'

Develop



See merge request !2
... ... @@ -27,13 +27,21 @@
"port": 4723
},
"cases": {
"ios": [{
"name": "商品详情页",
"scenes": ["IOS_UFO_PRODUCT_DETAIL"]
}, {
"name": "购物车",
"scenes": ["IOS_PRODUCT_DETAIL", "IOS_PRODUCT_CART"]
}],
"ios": [
{
"name": "有货iOS自动自测用例",
"scenes": [
"iOS_TAB_HOME",
"iOS_TAB_CATEGORY",
"iOS_TAB_UFOHOME",
"iOS_TAB_MINE",
"IOS_PRODUCT_DETAIL",
"IOS_PRODUCT_DETAIL_GROUP",
"iOS_TAB_GUANG",
"iOS_BUSINESS_SHOPPING"
]
}
],
"android": [{
"name": "商品详情页",
"scenes": ["ANDROID_UFO_PRODUCT_DETAIL"]
... ...
... ... @@ -2,4 +2,4 @@
module.exports.FIND_VIEW_OVER_TIME = 5000;
//操作暂停时间
module.exports.ACTION_PAUSE_TIME = 3000;
module.exports.ACTION_PAUSE_TIME = 2000;
... ...
... ... @@ -4,7 +4,7 @@ module.exports.IOS_PRODUCT_DETAIL = 'IOS_PRODUCT_DETAIL';
module.exports.IOS_UFO_PRODUCT_DETAIL = 'IOS_UFO_PRODUCT_DETAIL';
module.exports.IOS_PRODUCT_CART = 'IOS_PRODUCT_CART';
module.exports.iOS_TAB_CATEGORY = 'iOS_TAB_CATEGORY';
module.exports.iOS_TAB_GUANG = 'iOS_TAB_GUANG';
// module.exports.iOS_TAB_GUANG = 'iOS_TAB_GUANG';
module.exports.IOS_PRODUCT_DETAIL_GROUP = 'IOS_PRODUCT_DETAIL_GROUP';
module.exports.iOS_TAB_UFOHOME = "iOS_TAB_UFOHOME";
module.exports.iOS_TAB_MINE = 'iOS_TAB_MINE';
... ...
... ... @@ -5,83 +5,38 @@ const {
module.exports = {
[ANDROID_ORDER_CONFIRM]: [
{ op: 'YB_PAGE_ENTER', name: '进入商品详情页', equals: { PAGE_ID: 'spxqy' } },
{
op: 'YB_GDS_DT_INFO', name: '请求商品数据成功', validate: (log) => {
return log.param.PRD_SKN.length > 0;
}
},
{
op: 'YB_GDS_COLOR_C', name: '点击颜色(可以没有 如果只有一个颜色是不可点击的)', validate: (log) => {
return log.param.PRD_ID.length > 0 && log.param.COLOR.length > 0;
}
},
{
op: 'YB_GDS_SIZE_C', name: '点击尺码(可以没有 如果只有一个尺码是不可点击的)', validate: (log) => {
return log.param.PRD_ID.length > 0 && log.param.SIZE.length > 0;
}
},
{
op: 'YB_GDS_DT_SEL', name: '加入购物车', validate: (log) => {
return log.param.PRD_SKU > 0;
}
},
{ op: 'YB_PAGE_ENTER', name: '进入商品详情页', equals: { PAGE_ID: 'spxqy' } },
{
op: 'YB_GDS_DT_INFO', name: '请求商品数据成功', validate: (log) => {
return log.param.PRD_SKN.length > 0;
}
},
{
op: 'YB_GDS_COLOR_C', name: '点击颜色(可以没有 如果只有一个颜色是不可点击的)', validate: (log) => {
return log.param.PRD_ID.length > 0 && log.param.COLOR.length > 0;
}
},
{
op: 'YB_GDS_SIZE_C', name: '点击尺码(可以没有 如果只有一个尺码是不可点击的)', validate: (log) => {
return log.param.PRD_ID.length > 0 && log.param.SIZE.length > 0;
}
},
{
op: 'YB_GDS_DT_SEL', name: '加入购物车', validate: (log) => {
return log.param.PRD_SKU > 0;
}
},
//套餐商品接口上报
{
op: 'YB_GDS_PACKAGE_L', name: '套餐商品接口上报', types: { LIST: Array }, validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
//售罄商品 推荐商品列表上报
{
op: 'YB_CHOOSE_FOR_YOU', name: '售罄商品 推荐商品列表上报', equals: { REC_POSE: '100025', ACTION_ID:'0'}, validate: (log) => {
return log.param.PRD_ID.length > 0 && log.param.MAIN_SKN.length > 0;
}
},
//点击售罄商品 推荐商品列表展开按钮
{
op: 'YB_GDS_DT_SHOW_RES_C', name: '点击售罄商品 推荐商品列表展开按钮', validate: (log) => {
return log.param.STATUS.length > 0 && log.param.MAIN_SKN.length > 0;
}
},
//店铺推荐的商品列表
{
op: 'YB_CHOOSE_FOR_YOU', name: '店铺推荐的商品列表', equals: { REC_POSE: '100029', ACTION_ID: '0' }, validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
//点击店铺推荐的商品列表
{
op: 'YB_CHOOSE_FOR_YOU', name: '点击店铺推荐的商品列表', equals: { REC_POSE: '100029', ACTION_ID: '1' }, validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
//点击商品详情
{
op: 'YB_GDS_DT_BUY', name: '点击商品详情', validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
//点击在线客服
{ op: 'YB_MY_OLCS', name: '点击在线客服', equals: { TYPE: '1' } },
//立即购买
{
op: 'YB_GDS_DT_BILL', name: '立即购买', validate: (log) => {
return log.param.PRD_SKN.length > 0 && log.param.PRD_SKU.length > 0 && log.param.PRD_TYPE.length > 0;
}
},
//点击提问问题按钮
{ op: 'YB_GDS_DT_ASK', name: '点击提问问题按钮', types: { PRD_ID: String, TOURL: String } },
//点击店铺按钮
{ op: 'YB_BRAND_SHOP_C', name:'点击店铺按钮', types:{SHOP_ID:String, POS_ID:String}},
//点击套餐
{ op: 'YB_GDS_PACKAGE_C', name: '点击套餐', types: { PRD_ID: String } },
//点击分享
{ op: 'YB_GDS_DT_SHARE', name: '点击分享', types: { PRD_ID: String, BR_ID: String, TOURL: String } },
//分享商品
{ op: 'YB_SHARE_PRODUCT', name: '分享商品', equals: { FROM: 'pt' }, types: { PRD_ID: String, BR_ID: String, TOURL: String } },
{
op: 'YB_CHOOSE_FOR_YOU', name: '店铺推荐的商品列表', equals: { REC_POSE: '100029', ACTION_ID: '0' }, validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
{
op: 'YB_GDS_DT_BUY', name: '点击商品详情', validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
]
};
... ...
... ... @@ -5,83 +5,83 @@ const {
module.exports = {
[ANDROID_PRODUCT_DETAIL]: [
{ op: 'YB_PAGE_ENTER', name: '进入商品详情页', equals: { PAGE_ID: 'spxqy' } },
{
op: 'YB_GDS_DT_INFO', name: '请求商品数据成功', validate: (log) => {
return log.param.PRD_SKN.length > 0;
}
},
{
op: 'YB_GDS_COLOR_C', name: '点击颜色(可以没有 如果只有一个颜色是不可点击的)', validate: (log) => {
return log.param.PRD_ID.length > 0 && log.param.COLOR.length > 0;
}
},
{
op: 'YB_GDS_SIZE_C', name: '点击尺码(可以没有 如果只有一个尺码是不可点击的)', validate: (log) => {
return log.param.PRD_ID.length > 0 && log.param.SIZE.length > 0;
}
},
{
op: 'YB_GDS_DT_SEL', name: '加入购物车', validate: (log) => {
return log.param.PRD_SKU > 0;
}
},
{ op: 'YB_PAGE_ENTER', name: '进入商品详情页', equals: { PAGE_ID: 'spxqy' } },
{
op: 'YB_GDS_DT_INFO', name: '请求商品数据成功', validate: (log) => {
return log.param.PRD_SKN.length > 0;
}
},
{
op: 'YB_GDS_COLOR_C', name: '点击颜色(可以没有 如果只有一个颜色是不可点击的)', validate: (log) => {
return log.param.PRD_ID.length > 0 && log.param.COLOR.length > 0;
}
},
{
op: 'YB_GDS_SIZE_C', name: '点击尺码(可以没有 如果只有一个尺码是不可点击的)', validate: (log) => {
return log.param.PRD_ID.length > 0 && log.param.SIZE.length > 0;
}
},
{
op: 'YB_GDS_DT_SEL', name: '加入购物车', validate: (log) => {
return log.param.PRD_SKU > 0;
}
},
//套餐商品接口上报
{
op: 'YB_GDS_PACKAGE_L', name: '套餐商品接口上报', types: { LIST: Array }, validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
//售罄商品 推荐商品列表上报
{
op: 'YB_CHOOSE_FOR_YOU', name: '售罄商品 推荐商品列表上报', equals: { REC_POSE: '100025', ACTION_ID:'0'}, validate: (log) => {
return log.param.PRD_ID.length > 0 && log.param.MAIN_SKN.length > 0;
}
},
//点击售罄商品 推荐商品列表展开按钮
{
op: 'YB_GDS_DT_SHOW_RES_C', name: '点击售罄商品 推荐商品列表展开按钮', validate: (log) => {
return log.param.STATUS.length > 0 && log.param.MAIN_SKN.length > 0;
}
},
//店铺推荐的商品列表
{
op: 'YB_CHOOSE_FOR_YOU', name: '店铺推荐的商品列表', equals: { REC_POSE: '100029', ACTION_ID: '0' }, validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
//点击店铺推荐的商品列表
{
op: 'YB_CHOOSE_FOR_YOU', name: '点击店铺推荐的商品列表', equals: { REC_POSE: '100029', ACTION_ID: '1' }, validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
// //套餐商品接口上报
// {
// op: 'YB_GDS_PACKAGE_L', name: '套餐商品接口上报', types: { LIST: Array }, validate: (log) => {
// return log.param.PRD_ID.length > 0;
// }
// },
// //售罄商品 推荐商品列表上报
// {
// op: 'YB_CHOOSE_FOR_YOU', name: '售罄商品 推荐商品列表上报', equals: { REC_POSE: '100025', ACTION_ID:'0'}, validate: (log) => {
// return log.param.PRD_ID.length > 0 && log.param.MAIN_SKN.length > 0;
// }
// },
// //点击售罄商品 推荐商品列表展开按钮
// {
// op: 'YB_GDS_DT_SHOW_RES_C', name: '点击售罄商品 推荐商品列表展开按钮', validate: (log) => {
// return log.param.STATUS.length > 0 && log.param.MAIN_SKN.length > 0;
// }
// },
//店铺推荐的商品列表
{
op: 'YB_CHOOSE_FOR_YOU', name: '店铺推荐的商品列表', equals: { REC_POSE: '100029', ACTION_ID: '0' }, validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
// //点击店铺推荐的商品列表
// {
// op: 'YB_CHOOSE_FOR_YOU', name: '点击店铺推荐的商品列表', equals: { REC_POSE: '100029', ACTION_ID: '1' }, validate: (log) => {
// return log.param.PRD_ID.length > 0;
// }
// },
//点击商品详情
{
op: 'YB_GDS_DT_BUY', name: '点击商品详情', validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
//点击在线客服
{ op: 'YB_MY_OLCS', name: '点击在线客服', equals: { TYPE: '1' } },
//立即购买
{
op: 'YB_GDS_DT_BILL', name: '立即购买', validate: (log) => {
return log.param.PRD_SKN.length > 0 && log.param.PRD_SKU.length > 0 && log.param.PRD_TYPE.length > 0;
}
},
//点击提问问题按钮
{ op: 'YB_GDS_DT_ASK', name: '点击提问问题按钮', types: { PRD_ID: String, TOURL: String } },
//点击店铺按钮
{ op: 'YB_BRAND_SHOP_C', name:'点击店铺按钮', types:{SHOP_ID:String, POS_ID:String}},
//点击套餐
{ op: 'YB_GDS_PACKAGE_C', name: '点击套餐', types: { PRD_ID: String } },
//点击分享
{ op: 'YB_GDS_DT_SHARE', name: '点击分享', types: { PRD_ID: String, BR_ID: String, TOURL: String } },
//分享商品
{ op: 'YB_SHARE_PRODUCT', name: '分享商品', equals: { FROM: 'pt' }, types: { PRD_ID: String, BR_ID: String, TOURL: String } },
//点击商品详情
{
op: 'YB_GDS_DT_BUY', name: '点击商品详情', validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
// //点击在线客服
// { op: 'YB_MY_OLCS', name: '点击在线客服', equals: { TYPE: '1' } },
// //立即购买
// {
// op: 'YB_GDS_DT_BILL', name: '立即购买', validate: (log) => {
// return log.param.PRD_SKN.length > 0 && log.param.PRD_SKU.length > 0 && log.param.PRD_TYPE.length > 0;
// }
// },
// //点击提问问题按钮
// { op: 'YB_GDS_DT_ASK', name: '点击提问问题按钮', types: { PRD_ID: String, TOURL: String } },
// //点击店铺按钮
// { op: 'YB_BRAND_SHOP_C', name:'点击店铺按钮', types:{SHOP_ID:String, POS_ID:String}},
// //点击套餐
// { op: 'YB_GDS_PACKAGE_C', name: '点击套餐', types: { PRD_ID: String } },
//点击分享
{ op: 'YB_GDS_DT_SHARE', name: '点击分享', types: { PRD_ID: String, BR_ID: String, TOURL: String } },
//分享商品
{ op: 'YB_SHARE_PRODUCT', name: '分享商品', equals: { FROM: 'pt' }, types: { PRD_ID: String, BR_ID: String, TOURL: String } },
]
};
... ...
... ... @@ -6,33 +6,25 @@ module.exports = {
[ANDROID_TAB_HOME]:[
{op: 'YB_LAUNCH_APP', name: '启动app', single: true},
{op: 'YB_ENTER_CHOICE', name: '性别男女入口', single: true, validate: (log) => {
return ((log.param.ENT_TYP === '1' && log.param.SUB_C_ID === '1' && log.param.C_ID === '1')
|| (log.param.ENT_TYP === '0' && log.param.SUB_C_ID === '2' && log.param.C_ID === '2'));
return ((log.param.ENT_TYP === 1 && log.param.SUB_C_ID === '1' && log.param.C_ID === '1')
|| (log.param.ENT_TYP === 0 && log.param.SUB_C_ID === '2' && log.param.C_ID === '2'));
}},
{op: 'YB_MAIN_SHOW', name: '底部首页点击'},
{op: 'YB_PAGE_ENTER', name: '欢迎页载入', equals: { PAGE_ID: 'start' }},
{op: 'YB_PAGE_EXIT', name: '欢迎页载出', equals: { PAGE_ID: 'start' }},
{op: 'YB_PAGE_FINISH', name: '欢迎页关闭', equals: { PAGE_ID: 'start' }},
{op: 'YB_PAGE_ENTER', name: '频道选择页载入', equals: { PAGE_ID: 'xbxzy' }},
{op: 'YB_PAGE_EXIT', name: '频道选择页载出', equals: { PAGE_ID: 'xbxzy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1469', types:{DATA: Array}, equals: { SUB_C_ID:'1469'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1', equals: { CHANNEL_ID: '1', SUB_C_ID:'1'}},
/*{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1469', types:{DATA: Array}, equals: { SUB_C_ID:'1469'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光2073', types:{DATA: Array}, equals: { SUB_C_ID:'2073'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1951', types:{DATA: Array}, equals: { SUB_C_ID:'1951'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1', types:{DATA: Array}, equals: { SUB_C_ID:'1'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光2', types:{DATA: Array}, equals: { SUB_C_ID:'2'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光3', types:{DATA: Array}, equals: { SUB_C_ID:'3'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光3', types:{DATA: Array}, equals: { SUB_C_ID:'3'}},*/
{op: 'YB_SHOW_EVENT',},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1469', equals: { SUB_C_ID:'1469'}},
... ... @@ -42,12 +34,11 @@ module.exports = {
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2', equals: { SUB_C_ID:'2'}},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光3', equals: { SUB_C_ID:'3'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首次启动默认tab上报'},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1', equals: { CHANNEL_ID: '1', SUB_C_ID:'1'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel2', equals: { CHANNEL_ID: '2', SUB_C_ID:'2'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel3', equals: { CHANNEL_ID: '3', SUB_C_ID:'3'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel3', equals: { CHANNEL_ID: '3', SUB_C_ID:'3'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel2073', equals: { CHANNEL_ID: '2073', SUB_C_ID:'2073'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1951', equals: { CHANNEL_ID: '1951', SUB_C_ID:'1951'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1469', equals: { CHANNEL_ID: '1469', SUB_C_ID:'1469'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1469', equals: { CHANNEL_ID: '1469', SUB_C_ID:'1469'}},
]
};
\ No newline at end of file
... ...
... ... @@ -6,33 +6,25 @@ module.exports = {
[ANDROID_TAB_MINE]:[
{op: 'YB_LAUNCH_APP', name: '启动app', single: true},
{op: 'YB_ENTER_CHOICE', name: '性别男女入口', single: true, validate: (log) => {
return ((log.param.ENT_TYP === '1' && log.param.SUB_C_ID === '1' && log.param.C_ID === '1')
|| (log.param.ENT_TYP === '0' && log.param.SUB_C_ID === '2' && log.param.C_ID === '2'));
return ((log.param.ENT_TYP === 1 && log.param.SUB_C_ID === '1' && log.param.C_ID === '1')
|| (log.param.ENT_TYP === 0 && log.param.SUB_C_ID === '2' && log.param.C_ID === '2'));
}},
{op: 'YB_MAIN_SHOW', name: '底部首页点击'},
{op: 'YB_PAGE_ENTER', name: '欢迎页载入', equals: { PAGE_ID: 'start' }},
{op: 'YB_PAGE_EXIT', name: '欢迎页载出', equals: { PAGE_ID: 'start' }},
{op: 'YB_PAGE_FINISH', name: '欢迎页关闭', equals: { PAGE_ID: 'start' }},
{op: 'YB_PAGE_ENTER', name: '频道选择页载入', equals: { PAGE_ID: 'xbxzy' }},
{op: 'YB_PAGE_EXIT', name: '频道选择页载出', equals: { PAGE_ID: 'xbxzy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1469', types:{DATA: Array}, equals: { SUB_C_ID:'1469'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1', equals: { CHANNEL_ID: '1', SUB_C_ID:'1'}},
/*{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1469', types:{DATA: Array}, equals: { SUB_C_ID:'1469'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光2073', types:{DATA: Array}, equals: { SUB_C_ID:'2073'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1951', types:{DATA: Array}, equals: { SUB_C_ID:'1951'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1', types:{DATA: Array}, equals: { SUB_C_ID:'1'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光2', types:{DATA: Array}, equals: { SUB_C_ID:'2'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光3', types:{DATA: Array}, equals: { SUB_C_ID:'3'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光3', types:{DATA: Array}, equals: { SUB_C_ID:'3'}},*/
{op: 'YB_SHOW_EVENT',},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1469', equals: { SUB_C_ID:'1469'}},
... ... @@ -42,12 +34,11 @@ module.exports = {
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2', equals: { SUB_C_ID:'2'}},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光3', equals: { SUB_C_ID:'3'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首次启动默认tab上报'},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1', equals: { CHANNEL_ID: '1', SUB_C_ID:'1'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel2', equals: { CHANNEL_ID: '2', SUB_C_ID:'2'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel3', equals: { CHANNEL_ID: '3', SUB_C_ID:'3'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel3', equals: { CHANNEL_ID: '3', SUB_C_ID:'3'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel2073', equals: { CHANNEL_ID: '2073', SUB_C_ID:'2073'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1951', equals: { CHANNEL_ID: '1951', SUB_C_ID:'1951'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1469', equals: { CHANNEL_ID: '1469', SUB_C_ID:'1469'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1469', equals: { CHANNEL_ID: '1469', SUB_C_ID:'1469'}},
]
};
\ No newline at end of file
... ...
... ... @@ -6,33 +6,25 @@ module.exports = {
[ANDROID_MAINTAB_SWITCH]:[
{op: 'YB_LAUNCH_APP', name: '启动app', single: true},
{op: 'YB_ENTER_CHOICE', name: '性别男女入口', single: true, validate: (log) => {
return ((log.param.ENT_TYP === '1' && log.param.SUB_C_ID === '1' && log.param.C_ID === '1')
|| (log.param.ENT_TYP === '0' && log.param.SUB_C_ID === '2' && log.param.C_ID === '2'));
return ((log.param.ENT_TYP === 1 && log.param.SUB_C_ID === '1' && log.param.C_ID === '1')
|| (log.param.ENT_TYP === 0 && log.param.SUB_C_ID === '2' && log.param.C_ID === '2'));
}},
{op: 'YB_MAIN_SHOW', name: '底部首页点击'},
{op: 'YB_PAGE_ENTER', name: '欢迎页载入', equals: { PAGE_ID: 'start' }},
{op: 'YB_PAGE_EXIT', name: '欢迎页载出', equals: { PAGE_ID: 'start' }},
{op: 'YB_PAGE_FINISH', name: '欢迎页关闭', equals: { PAGE_ID: 'start' }},
{op: 'YB_PAGE_ENTER', name: '频道选择页载入', equals: { PAGE_ID: 'xbxzy' }},
{op: 'YB_PAGE_EXIT', name: '频道选择页载出', equals: { PAGE_ID: 'xbxzy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1469', types:{DATA: Array}, equals: { SUB_C_ID:'1469'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1', equals: { CHANNEL_ID: '1', SUB_C_ID:'1'}},
/*{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1469', types:{DATA: Array}, equals: { SUB_C_ID:'1469'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光2073', types:{DATA: Array}, equals: { SUB_C_ID:'2073'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1951', types:{DATA: Array}, equals: { SUB_C_ID:'1951'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1', types:{DATA: Array}, equals: { SUB_C_ID:'1'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光2', types:{DATA: Array}, equals: { SUB_C_ID:'2'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光3', types:{DATA: Array}, equals: { SUB_C_ID:'3'}},
{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光3', types:{DATA: Array}, equals: { SUB_C_ID:'3'}},*/
{op: 'YB_SHOW_EVENT',},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1469', equals: { SUB_C_ID:'1469'}},
... ... @@ -42,12 +34,11 @@ module.exports = {
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2', equals: { SUB_C_ID:'2'}},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光3', equals: { SUB_C_ID:'3'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首次启动默认tab上报'},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1', equals: { CHANNEL_ID: '1', SUB_C_ID:'1'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel2', equals: { CHANNEL_ID: '2', SUB_C_ID:'2'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel3', equals: { CHANNEL_ID: '3', SUB_C_ID:'3'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel3', equals: { CHANNEL_ID: '3', SUB_C_ID:'3'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel2073', equals: { CHANNEL_ID: '2073', SUB_C_ID:'2073'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1951', equals: { CHANNEL_ID: '1951', SUB_C_ID:'1951'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1469', equals: { CHANNEL_ID: '1469', SUB_C_ID:'1469'}},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1469', equals: { CHANNEL_ID: '1469', SUB_C_ID:'1469'}},
]
};
\ No newline at end of file
... ...
... ... @@ -11,52 +11,52 @@ module.exports = {
return log.param.PRD_SKN.length > 0;
}
},
{
op: 'YB_GDS_COLOR_C', name: '点击颜色(可以没有 如果只有一个颜色是不可点击的)', validate: (log) => {
return log.param.PRD_ID.length > 0 && log.param.COLOR.length > 0;
}
},
{
op: 'YB_GDS_SIZE_C', name: '点击尺码(可以没有 如果只有一个尺码是不可点击的)', validate: (log) => {
return log.param.PRD_ID.length > 0 && log.param.SIZE.length > 0;
}
},
{
op: 'YB_GDS_DT_SEL', name: '加入购物车', validate: (log) => {
return log.param.PRD_SKU > 0;
}
},
// {
// op: 'YB_GDS_COLOR_C', name: '点击颜色(可以没有 如果只有一个颜色是不可点击的)', validate: (log) => {
// return log.param.PRD_ID.length > 0 && log.param.COLOR.length > 0;
// }
// },
// {
// op: 'YB_GDS_SIZE_C', name: '点击尺码(可以没有 如果只有一个尺码是不可点击的)', validate: (log) => {
// return log.param.PRD_ID.length > 0 && log.param.SIZE.length > 0;
// }
// },
// {
// op: 'YB_GDS_DT_SEL', name: '加入购物车', validate: (log) => {
// return log.param.PRD_SKU > 0;
// }
// },
//套餐商品接口上报
{
op: 'YB_GDS_PACKAGE_L', name: '套餐商品接口上报', types: { LIST: Array }, validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
//售罄商品 推荐商品列表上报
{
op: 'YB_CHOOSE_FOR_YOU', name: '售罄商品 推荐商品列表上报', equals: { REC_POSE: '100025', ACTION_ID:'0'}, validate: (log) => {
return log.param.PRD_ID.length > 0 && log.param.MAIN_SKN.length > 0;
}
},
//点击售罄商品 推荐商品列表展开按钮
{
op: 'YB_GDS_DT_SHOW_RES_C', name: '点击售罄商品 推荐商品列表展开按钮', validate: (log) => {
return log.param.STATUS.length > 0 && log.param.MAIN_SKN.length > 0;
}
},
// //套餐商品接口上报
// {
// op: 'YB_GDS_PACKAGE_L', name: '套餐商品接口上报', types: { LIST: Array }, validate: (log) => {
// return log.param.PRD_ID.length > 0;
// }
// },
// //售罄商品 推荐商品列表上报
// {
// op: 'YB_CHOOSE_FOR_YOU', name: '售罄商品 推荐商品列表上报', equals: { REC_POSE: '100025', ACTION_ID:'0'}, validate: (log) => {
// return log.param.PRD_ID.length > 0 && log.param.MAIN_SKN.length > 0;
// }
// },
// //点击售罄商品 推荐商品列表展开按钮
// {
// op: 'YB_GDS_DT_SHOW_RES_C', name: '点击售罄商品 推荐商品列表展开按钮', validate: (log) => {
// return log.param.STATUS.length > 0 && log.param.MAIN_SKN.length > 0;
// }
// },
//店铺推荐的商品列表
{
op: 'YB_CHOOSE_FOR_YOU', name: '店铺推荐的商品列表', equals: { REC_POSE: '100029', ACTION_ID: '0' }, validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
//点击店铺推荐的商品列表
{
op: 'YB_CHOOSE_FOR_YOU', name: '点击店铺推荐的商品列表', equals: { REC_POSE: '100029', ACTION_ID: '1' }, validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
// //点击店铺推荐的商品列表
// {
// op: 'YB_CHOOSE_FOR_YOU', name: '点击店铺推荐的商品列表', equals: { REC_POSE: '100029', ACTION_ID: '1' }, validate: (log) => {
// return log.param.PRD_ID.length > 0;
// }
// },
//点击商品详情
{
... ... @@ -64,20 +64,20 @@ module.exports = {
return log.param.PRD_ID.length > 0;
}
},
//点击在线客服
{ op: 'YB_MY_OLCS', name: '点击在线客服', equals: { TYPE: '1' } },
//立即购买
{
op: 'YB_GDS_DT_BILL', name: '立即购买', validate: (log) => {
return log.param.PRD_SKN.length > 0 && log.param.PRD_SKU.length > 0 && log.param.PRD_TYPE.length > 0;
}
},
//点击提问问题按钮
{ op: 'YB_GDS_DT_ASK', name: '点击提问问题按钮', types: { PRD_ID: String, TOURL: String } },
//点击店铺按钮
{ op: 'YB_BRAND_SHOP_C', name:'点击店铺按钮', types:{SHOP_ID:String, POS_ID:String}},
//点击套餐
{ op: 'YB_GDS_PACKAGE_C', name: '点击套餐', types: { PRD_ID: String } },
// //点击在线客服
// { op: 'YB_MY_OLCS', name: '点击在线客服', equals: { TYPE: '1' } },
// //立即购买
// {
// op: 'YB_GDS_DT_BILL', name: '立即购买', validate: (log) => {
// return log.param.PRD_SKN.length > 0 && log.param.PRD_SKU.length > 0 && log.param.PRD_TYPE.length > 0;
// }
// },
// //点击提问问题按钮
// { op: 'YB_GDS_DT_ASK', name: '点击提问问题按钮', types: { PRD_ID: String, TOURL: String } },
// //点击店铺按钮
// { op: 'YB_BRAND_SHOP_C', name:'点击店铺按钮', types:{SHOP_ID:String, POS_ID:String}},
// //点击套餐
// { op: 'YB_GDS_PACKAGE_C', name: '点击套餐', types: { PRD_ID: String } },
//点击分享
{ op: 'YB_GDS_DT_SHARE', name: '点击分享', types: { PRD_ID: String, BR_ID: String, TOURL: String } },
//分享商品
... ...
... ... @@ -4,20 +4,6 @@ const {
module.exports = {
[iOS_TAB_CATEGORY]:[
{ op: 'YB_LAUNCH_APP', name: '启动APP' },
{ op: 'YB_PAGE_ENTER', name: '进入APP', equals: { PAGE_ID: "start" } },
{ op: 'YB_PAGE_ENTER', name: '进入广告启动页', equals: { PAGE_ID: "xbxzy" } },
{ op: 'YB_HOME_CHANNEL_TAB_C', name: '首页默认选中了某个tab选项' },
{ op: 'YB_PAGE_ENTER', name: '进入首页', equals: { PAGE_ID: "sy" } },
{ op: 'YB_PAGE_EXIT', name: '离开启动页', equals: { PAGE_ID: "start" } },
{ op: 'YB_PAGE_EXIT', name: '离开广告启动页', equals: { PAGE_ID: "xbxzy" } },
{ op: 'YB_ENTER_CHOICE', name: '选择了默认的频道选项' },
{ op: 'YB_CHOOSE_FOR_YOU', name: '猜你喜欢展现上报', types: { PRD_ID: String } },
{ op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页推荐商品数据曝光', types: { DATA: Array } },
{ op: 'YB_CATEGORY_CLS_TAB', name: '主界面-分类-品类TAB'},
{ op: 'YB_CATEGORY', name: 'TAB BAR 点击品类'},
{ op: 'YB_AUTO_TRACK', name: '自动点击TAB品类上报', equals: { VIEW_PATH: "YH_TabBarViewController[0]\/UITabBar[0]\/Index[1]" } },
{ op: 'YB_PAGE_EXIT', name: "离开首页", equals: { PAGE_ID: "sy" } },
... ...
... ... @@ -5,16 +5,16 @@ const {
module.exports = {
[iOS_TAB_MINE]:[
{op: 'UFO_MY_ITEM_C', name: '我的收入'},
{op: 'UFO_MY_ITEM_C', name: '商家入驻'},
{op: 'UFO_MY_ITEM_C', name: '新的好物'},
{op: 'YB_PAGE_ENTER', name: '新的好物载入'},
{op: 'YB_PAGE_EXIT', name: '新的好物载出'},
{op: 'YB_PAGE_ENTER', name: '商家入驻载入'},
{op: 'YB_PAGE_EXIT', name: '商家入驻载出'},
// {op: 'UFO_MY_ITEM_C', name: '商家入驻'},
// {op: 'UFO_MY_ITEM_C', name: '新的好物'},
// {op: 'YB_PAGE_ENTER', name: '新的好物载入'},
// {op: 'YB_PAGE_EXIT', name: '新的好物载出'},
// {op: 'YB_PAGE_ENTER', name: '商家入驻载入'},
// {op: 'YB_PAGE_EXIT', name: '商家入驻载出'},
{op: 'YB_PAGE_ENTER', name: '我的收入载入'},
{op: 'YB_PAGE_EXIT', name: '我的收入载出'},
{op: 'YB_PAGE_ENTER', name: 'UFO载入'},
{op: 'YB_PAGE_ENTER', name: 'UFO载出'},
{op: 'YB_H5_PAGE_OPEN_', name: '新的好物url'},
// {op: 'YB_H5_PAGE_OPEN_', name: '新的好物url'},
]
};
\ No newline at end of file
... ...
... ... @@ -5,8 +5,8 @@ const {FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME} = require('../../config/constant'
describe(ANDROID_TAB_HOME,'安卓首页', async(driver) => {
// 首页tab
let touchTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_home_rl',10000);
await touchTab.click();
//let touchTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_home_rl',10000);
//await touchTab.click();
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
... ...
const wd = require('wd');
const {describe} = require('../../libs/driver');
const {iOS_BUSINESS_SHOPPING} = require('../../scene-types/scene-types');
const { FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME } = require('../../config/constant');
describe(iOS_BUSINESS_SHOPPING,'购物车', async(driver) => {
await driver.sleep(ACTION_PAUSE_TIME);
console.log("点击首页");
let touchTab = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[1]', FIND_VIEW_OVER_TIME);
await touchTab.click();
await driver.sleep(ACTION_PAUSE_TIME);
// let touchTab = await driver.waitForElementByAccessibilityId('indicator_shoppingbag',10000);
let touchTab = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther[4]',5000);
touchTab = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther[4]',FIND_VIEW_OVER_TIME);
await touchTab.click();
// driver.execute('mobile: scroll', {direction: 'down', element: element.value.'BF000000-0000-0000-922D-000000000000'});
// await driver.sleep(3000);
touchTab = await driver.waitForElementByAccessibilityId('select',3000);//单选
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('select', FIND_VIEW_OVER_TIME);//单选
await touchTab.click();
//'selectAll' 全选 'mealSelect' 套餐
touchTab = await driver.waitForElementByAccessibilityId('editCart',5000);//编辑
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('editCart', FIND_VIEW_OVER_TIME);//编辑
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('shopcart_add',3000);//增加
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('shopcart_add', FIND_VIEW_OVER_TIME);//增加
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('shopcart_sub',3000);//减少
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('shopcart_sub', FIND_VIEW_OVER_TIME);//减少
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('editCart',1000);//完成
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('editCart', FIND_VIEW_OVER_TIME);//完成
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('submitAndPay', 2000);
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('submitAndPay', FIND_VIEW_OVER_TIME);
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('确定', 2000);//下单
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('确定', FIND_VIEW_OVER_TIME);//下单
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', 2000);//返回
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);//返回
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('确认离开', 2000);//返回
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('确认离开', FIND_VIEW_OVER_TIME);//返回
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', 2000);//返回
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);//返回
await touchTab.click();
////XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeTable/XCUIElementTypeCell[3]
// touchTab = await driver.waitForElementByAccessibilityId('yh_paymentcenter_checked', 2000);//下单
... ... @@ -47,9 +64,5 @@ describe(iOS_BUSINESS_SHOPPING,'购物车', async(driver) => {
// touchTab = await driver.waitForElementByAccessibilityId('支 付', 2000);//拉起支付
// await touchTab.click();
await new Promise(r => {
setTimeout(() => {
r()
}, 3000);
})
await driver.sleep(ACTION_PAUSE_TIME);
});
\ No newline at end of file
... ...
const {describe} = require('../../libs/driver');
const {IOS_PRODUCT_DETAIL} = require('../../scene-types/scene-types');
const { FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME } = require('../../config/constant');
describe(IOS_PRODUCT_DETAIL, '商品详情页埋点测试', async(driver) => {
//点击首页的tab bar 分类按钮
... ... @@ -11,7 +12,7 @@ describe(IOS_PRODUCT_DETAIL, '商品详情页埋点测试', async(driver) => {
console.log("点击分类完成");
//点击其中的一个商品
let firstProduct = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeCollectionView/XCUIElementTypeCell[4]', 3000);
let firstProduct = await driver.waitForElementByAccessibilityId('yh_prd_cell_0_3', 3000);
await firstProduct.click();
console.log("点击其中一个商品完成");
//进入购物车
... ... @@ -60,10 +61,13 @@ describe(IOS_PRODUCT_DETAIL, '商品详情页埋点测试', async(driver) => {
let add = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeButton[2]', 3000);
await add.click();
console.log("点加购物车");
await new Promise(r => {
setTimeout(() => {
r()
}, 2000);
});
await driver.sleep(3000);
console.log("点击返回列表");
let backBtn = await driver.waitForElementByAccessibilityId('backActionBtn', 3000);
await backBtn.click();
await driver.sleep(3000);
console.log("点击返回品类页");
backBtn = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', 3000);
await backBtn.click();
await driver.sleep(3000);
});
\ No newline at end of file
... ...
const wd = require('wd');
const { describe } = require('../../libs/driver');
const { IOS_PRODUCT_DETAIL_GROUP } = require('../../scene-types/scene-types');
const IOS_SLEEP_WAIT_TIME = 3000;
const { FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME } = require('../../config/constant');
describe(IOS_PRODUCT_DETAIL_GROUP, '拼团商品详情页埋点测试', async (driver) => {
//点击我的 tab
describe(IOS_PRODUCT_DETAIL_GROUP, '拼团商品详情页埋点测试(未登录)', async (driver) => {
console.log("点击TAB 我的");
let tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[5]', 10000);
tapView.click();
//暂停
await driver.sleep(IOS_SLEEP_WAIT_TIME);
// //模拟向上滚动
// driver.execute('mobile: scroll', { direction: 'down'});
// await new Promise(r => {
// setTimeout(() => {
// r()
// }, 2000);
// });
//点击5折拼团
await driver.sleep(ACTION_PAUSE_TIME);
console.log("点击5折 拼团");
tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeCollectionView/XCUIElementTypeCell[16]', 3000);
tapView.click();
//暂停
await driver.sleep(IOS_SLEEP_WAIT_TIME);
//点击19元专区
tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeWebView/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther[3]', 3000);
await driver.sleep(ACTION_PAUSE_TIME);
console.log("点击返回");
tapView = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
tapView.click();
//暂停
await driver.sleep(IOS_SLEEP_WAIT_TIME);
//点击列表第一个
tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeScrollView/XCUIElementTypeOther/XCUIElementTypeOther[1]', 3000);
await driver.sleep(ACTION_PAUSE_TIME);
console.log("点击首页TAB");
tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[1]', 10000);
tapView.click();
//暂停
await driver.sleep(IOS_SLEEP_WAIT_TIME);
// driver.execute('mobile: scroll', { direction: 'down' });
await driver.sleep(ACTION_PAUSE_TIME);
console.log("点击首页顶部搜索框");
tapView = await driver.waitForElementByAccessibilityId('homeSearch', FIND_VIEW_OVER_TIME);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
console.log("输入指定的拼团SKN");
tapView = await driver.waitForElementByAccessibilityId('yh_search_vc_search', FIND_VIEW_OVER_TIME);
tapView.sendKeys("51905716");
await driver.sleep(ACTION_PAUSE_TIME);
console.log("点击搜索");
tapView = await driver.waitForElementByAccessibilityId('Search', FIND_VIEW_OVER_TIME);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
console.log("点击指定的拼团商品");
tapView = await driver.waitForElementByAccessibilityId('yh_prd_cell_0_1', FIND_VIEW_OVER_TIME);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
console.log("点击分享");
tapView = await driver.waitForElementByAccessibilityId('shareActionBtn', 3000);
await tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
console.log("取消分享");
tapView = await driver.waitForElementByAccessibilityId('取消', 3000);
await tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
console.log("点击更多");
tapView = await driver.waitForElementByAccessibilityId('moreActionBtn', 3000);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
console.log("回到首页");
tapView = await driver.waitForElementByAccessibilityId('yh_quick_jump_menu_1', FIND_VIEW_OVER_TIME);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
});
\ No newline at end of file
... ...
const wd = require('wd');
const {describe} = require('../../libs/driver');
const {iOS_TAB_CATEGORY} = require('../../scene-types/scene-types');
const { FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME } = require('../../config/constant');
describe(iOS_TAB_CATEGORY,'分类(品类&品牌)', async(driver) => {
//点击首页的tab bar 分类按钮
... ... @@ -31,16 +32,11 @@ describe(iOS_TAB_CATEGORY,'分类(品类&品牌)', async(driver) => {
tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeCollectionView/XCUIElementTypeCell[1]', 3000);
await tapView.click();
//点击分类中的 其中一个分类
tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[3]/XCUIElementTypeCollectionView/XCUIElementTypeCell[4]/XCUIElementTypeOther', 3000);
await tapView.click();
await new Promise(r => {
setTimeout(() => {
r()
}, 2000);
});
console.log("回到品类首页");
tapView = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
});
\ No newline at end of file
... ...
... ... @@ -33,32 +33,32 @@ describe(iOS_TAB_MINE,'我的', async(driver) => {
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('商家入驻', FIND_VIEW_OVER_TIME);
await touchTab.click();
// touchTab = await driver.waitForElementByAccessibilityId('商家入驻', FIND_VIEW_OVER_TIME);
// await touchTab.click();
await driver.sleep(ACTION_PAUSE_TIME);
// await driver.sleep(ACTION_PAUSE_TIME);
let element = await driver.elementsByAccessibilityId("完善信息");
// let isDisplayed = await element.isDisplayed();
// if (isDisplayed){
touchTab = await driver.waitForElementByAccessibilityId('完善信息');
await touchTab.click();
// }
// let element = await driver.elementsByAccessibilityId("完善信息");
// // let isDisplayed = await element.isDisplayed();
// // if (isDisplayed){
// touchTab = await driver.waitForElementByAccessibilityId('完善信息');
// await touchTab.click();
// // }
await driver.sleep(ACTION_PAUSE_TIME);
// await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
await touchTab.click();
// touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
// await touchTab.click();
await driver.sleep(ACTION_PAUSE_TIME);
// await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('新的好物 没有你的好物?申请上架', FIND_VIEW_OVER_TIME);
await touchTab.click();
// touchTab = await driver.waitForElementByAccessibilityId('新的好物 没有你的好物?申请上架', FIND_VIEW_OVER_TIME);
// await touchTab.click();
await driver.sleep(ACTION_PAUSE_TIME);
// await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
await touchTab.click();
// touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
// await touchTab.click();
await driver.sleep(ACTION_PAUSE_TIME);
... ...