Authored by 朱小军

Merge branch 'develop' into 'master'

Develop



See merge request !4
... ... @@ -41,12 +41,24 @@
]
}
],
"android": [{
"name": "商品详情页",
"scenes": ["ANDROID_UFO_PRODUCT_DETAIL"]
}, {
"name": "购物车",
"scenes": ["ANDROID_PRODUCT_DETAIL", "ANDROID_PRODUCT_CART"]
}]
"android": [
{
"name":"有货Android自动化埋点测试-Yoho!Buy",
"scenes": [
"ANDROID_TAB_HOME",
"ANDROID_MAINTAB_SWITCH",
"ANDROID_TAB_MINE",
"ANDROID_PRODUCT_DETAIL",
"ANDROID_ORDER_CONFIRM"
]
},
{
"name":"有货Android自动化埋点测试-UFO",
"scenes": [
"ANDROID_CASE_UFO_BROWSE",
"ANDROID_CASE_UFO_SELL"
]
}
]
}
}
\ No newline at end of file
... ...
... ... @@ -5,38 +5,31 @@ 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_FUNC_SC_DRIFT', name: '进入购物车'},
{
op: 'YB_GDS_DT_BUY', name: '商品加入购物车', validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
{op: 'YB_CHOOSE_FOR_YOU', name: '购物车猜你喜欢'},
{ op: 'YB_SHOW_SHOPCART', name: '普通购物车数量'},
{ op: 'YB_SHOW_GLOBAL_SHOPCART', name: '全球购购物车数量'},
{
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;
}
},
{ op: 'YB_SC_TOPAY', name: '订单生成'},
{ op: 'YB_PAGE_ENTER', name: '进入确认订单页', equals: { PAGE_ID: 'qrdd' } },
{ op: 'YB_SC_ORD', name: '订单确认', validate: (log) => {
return log.param.ORD_NUM.length > 0;
}},
{ op: 'YB_PAGE_EXIT', name: '离开订单页', equals: { PAGE_ID: 'qrdd' } },
{ op: 'YB_PAGE_ENTER', name: '进入支付选择页', equals: { PAGE_ID: 'zfzx' } },
{ op: 'YB_PAGE_FINISH', name: '关闭确认订单页', equals: { PAGE_ID: 'qrdd' } },
{ op: 'YB_SC_PAY', name: '支付', validate: (log) => {
return log.param.ORD_NUM.length > 0;
}},
{ op: 'YB_PAGE_EXIT', name: '离开支付页', equals: { PAGE_ID: 'zfzx' } },
]
};
... ...
... ... @@ -11,16 +11,11 @@ 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;
... ... @@ -47,9 +42,7 @@ module.exports = {
// },
//店铺推荐的商品列表
{
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: '店铺推荐的商品列表'
},
// //点击店铺推荐的商品列表
// {
... ... @@ -58,12 +51,6 @@ module.exports = {
// }
// },
//点击商品详情
{
op: 'YB_GDS_DT_BUY', name: '点击商品详情', validate: (log) => {
return log.param.PRD_ID.length > 0;
}
},
// //点击在线客服
// { op: 'YB_MY_OLCS', name: '点击在线客服', equals: { TYPE: '1' } },
// //立即购买
... ...
... ... @@ -17,8 +17,6 @@ module.exports = {
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{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'}},
... ... @@ -26,17 +24,19 @@ module.exports = {
{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_AUTO_TRACK',},
{op: 'YB_AUTO_TRACK',},
{op: 'YB_AUTO_TRACK',},
{op: 'YB_SHOW_EVENT',},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1469', equals: { SUB_C_ID:'1469'}},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2073', equals: { SUB_C_ID:'2073'}},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1951', equals: { SUB_C_ID:'1951'}},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1', equals: { SUB_C_ID:'1'}},
{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_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2073', equals: { SUB_C_ID:'2073'}},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1951', equals: { SUB_C_ID:'1951'}},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1469', equals: { SUB_C_ID:'1469'}},
{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_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'}},
... ...
... ... @@ -4,41 +4,18 @@ const {
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'));
}},
{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: '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: '首页载入', equals: { PAGE_ID: 'sy' }},
{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_EVENT',},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1469', equals: { SUB_C_ID:'1469'}},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2073', equals: { SUB_C_ID:'2073'}},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1951', equals: { SUB_C_ID:'1951'}},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1', equals: { SUB_C_ID:'1'}},
{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_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_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_PAGE_ENTER', name: '我的收入载入'},
{op: 'YB_PAGE_EXIT', name: '我的收入载出'},
{op: 'YB_CPS_MAIN_PRO_TAB_C', name: '有货有赚推荐'},
{op: 'YB_PAGE_ENTER', name: 'UFO载入'},
{op: 'YB_PAGE_ENTER', name: 'UFO载出'},
// {op: 'YB_H5_PAGE_OPEN_', name: '新的好物url'},
]
};
\ No newline at end of file
... ...
... ... @@ -4,41 +4,32 @@ const {
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'));
}},
{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_CATEGORY', name: 'TAB BAR 点击品类'},
{op: 'YB_PAGE_ENTER', name: '品类进入', equals: { PAGE_ID: 'pl' }},
{ op: 'YB_PAGE_EXIT', name: "离开首页", equals: { PAGE_ID: "sy" } },
{ op: 'YB_AUTO_TRACK', name: '自动点击TAB品类上报'},
{ op: 'YB_PAGE_ENTER', name: "进入品类", equals: { PAGE_ID: "pl" } },
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1', equals: { CHANNEL_ID: '1', SUB_C_ID:'1'}},
{ op: 'YB_STROLL', name: 'TAB BAR 点击逛'},
{ op: 'YB_AUTO_TRACK', name: '自动点击TAB逛上报'},
{ op: 'YB_PAGE_EXIT', name: "离开品类", equals: { PAGE_ID: "pl" } },
{op: 'YB_PAGE_ENTER', name: '逛进入', equals: { PAGE_ID: 'guangsy' }},
{op: 'YB_STROLL_MAIN_TAB_C', name: '逛推荐tab', single: true, validate: (log) => {
return log.param.TAB_ID === "1001";
}},
/*{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_MY', name: 'TAB BAR 点击个人中心'},
{ op: 'YB_AUTO_TRACK', name: '自动点击TAB个人中心上报'},
{ op: 'YB_PAGE_EXIT', name: "离开逛", equals: { PAGE_ID: "guangsy" } },
{op: 'YB_PAGE_ENTER', name: '个人中心进入', equals: { PAGE_ID: 'wd' }},
{op: 'YB_CHOOSE_FOR_YOU', name: '个人中心猜你喜欢'},
{op: 'YB_SHOW_EVENT',},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1469', equals: { SUB_C_ID:'1469'}},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2073', equals: { SUB_C_ID:'2073'}},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1951', equals: { SUB_C_ID:'1951'}},
{op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1', equals: { SUB_C_ID:'1'}},
{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_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_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_UFO', name: 'TAB BAR 点击UFO'},
{ op: 'YB_AUTO_TRACK', name: '自动点击TAB UFO上报'},
{ op: 'YB_PAGE_EXIT', name: "离开个人中心", equals: { PAGE_ID: "wd" } },
{op: 'YB_PAGE_ENTER', name: 'UFO进入', equals: { PAGE_ID: 'ufo' }},
{ op: 'UFO_BROWSE_HOME', name: 'UFO浏览'},
{ op: 'UFO_MAIN_START', name: 'UFO主页展示'},
]
};
\ No newline at end of file
... ...
... ... @@ -26,14 +26,9 @@ module.exports = {
{ op: 'YB_PAGE_ENTER', name: "进入商品列表页面", equals: {"TYPE_ID":"ufo_productList"} },
{ op: 'UFO_PRD_LIST_L', name: "商品列表第一页商品ID曝光", types: { PRD_LIST: String } },
{ op: 'YB_PAGE_EXIT', name: "退出商品列表页面", equals: {"TYPE_ID":"ufo_productList"} },
{ op: 'UFO_MAIN_EVENT', name: "商品点击", types: { PRD_ID: String } },
{ op: 'UFO_PRD_LIST_C', name: "商品列表页面点击商品", types: { PRD_ID: String } },
{ op: 'YB_PAGE_ENTER', name: "进入商品详情页面", equals: {"TYPE_ID":"ufo_productDetail"} },
{ op: 'UFO_PRD_DT_INFO', name: "商品详情页面上报", equals: {"FP_NAME":"aFP_UFOHome"}, types: {PRD_ID: String} },
{ op: 'YB_PAGE_EXIT', name: "退出商品详情页面", equals: {"TYPE_ID":"ufo_productDetail"} },
{ op: 'UFO_PRD_DT_INFO', name: "商品详情页面上报", equals: {"FP_NAME":"aFP_UFOSeriesList"}, types: {PRD_ID: String} },
]
};
\ No newline at end of file
... ...
... ... @@ -9,18 +9,6 @@ const {
module.exports = {
[ANDROID_CASE_UFO_SELL]:[
{ op: 'YB_LAUNCH_APP', name: '启动app', single: true},
{ op: 'YB_ENTER_CHOICE', name: '性别男女入口', single: true},
{ op: 'YB_UFO', name: 'TAB BAR 点击UFO'},
{ op: 'UFO_BROWSE_HOME', name: 'UFO首页浏览上报'},
{ op: 'UFO_MAIN_START', name: "UFO频道打开", single: true},
{ op: 'YB_SHOW_EVENT', name: "曝光事件", types: { DATA: Array } },
{ op: 'UFO_MAIN_EVENT', name: "商品点击", types: { PRD_ID: String } },
{ op: 'YB_PAGE_ENTER', name: "进入商品详情页面", equals: {"TYPE_ID":"ufo_productDetail"} },
{ op: 'UFO_PRD_DT_INFO', name: "商品详情页面上报", equals: {"FP_NAME":"aFP_UFOHome"}, types: {PRD_ID: String} },
{ op: 'UFO_PRD_DT_SALE_C', name: "商品详情点击购买按钮", types: {PRD_ID: String} },
{ op: 'YB_PAGE_EXIT', name: "退出商品详情页面", equals: {"TYPE_ID":"ufo_productDetail"} },
... ... @@ -28,6 +16,10 @@ module.exports = {
{ op: 'UFO_SALE_ORD', name: "UFO出售结果", types: { PRD_ID: String, PRD_SKU: String} },
{ op: 'YB_PAGE_FINISH', name: "关闭出售页面", equals: {"TYPE_ID":"ufo_sellVC"} },
{ op: 'YB_PAGE_EXIT', name: "关闭出售页面", equals: {"TYPE_ID":"ufo_sellVC"} },
{ op: 'YB_PAGE_ENTER', name: "进入商品详情页面", equals: {"TYPE_ID":"ufo_productDetail"} },
]
};
\ No newline at end of file
... ...
... ... @@ -5,6 +5,7 @@ const {FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME} = require('../../config/constant'
describe(ANDROID_ORDER_CONFIRM, '下单', async(driver) => {
/* 结算单独测试用例
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
... ... @@ -51,11 +52,14 @@ describe(ANDROID_ORDER_CONFIRM, '下单', async(driver) => {
//进入购物车
let goToShopCart = await driver.waitForElementById('com.yoho:id/activity_product_detail_sv', FIND_VIEW_OVER_TIME);
await goToShopCart.click();
await goToShopCart.click();*/
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
//进入购物车
let goToShopCart = await driver.waitForElementById('com.yoho:id/activity_product_detail_sv', FIND_VIEW_OVER_TIME);
await goToShopCart.click();
// 去结算
let orderCreate = await driver.waitForElementById('com.yoho:id/common_shoppingcart_btn', FIND_VIEW_OVER_TIME);
await orderCreate.click();
... ... @@ -70,4 +74,11 @@ describe(ANDROID_ORDER_CONFIRM, '下单', async(driver) => {
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
// 支付
let orderPay = await driver.waitForElementById('com.yoho:id/pay_button', FIND_VIEW_OVER_TIME);
await orderPay.click();
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
});
... ...
... ... @@ -21,7 +21,7 @@ describe(ANDROID_PRODUCT_DETAIL, 'Android 商品详情进入用例', async(drive
//点击分类中的 其中一个品类
let category = await driver.waitForElementByXPath("/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup[1]/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.view.ViewGroup/android.support.v7.widget.RecyclerView/android.widget.LinearLayout[1]/android.widget.GridView/android.widget.RelativeLayout[1]/android.widget.ImageView", FIND_VIEW_OVER_TIME);
let category = await driver.waitForElementByXPath("/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup[1]/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.view.ViewGroup/android.support.v7.widget.RecyclerView/android.widget.LinearLayout[2]/android.widget.GridView/android.widget.RelativeLayout[1]", FIND_VIEW_OVER_TIME);
await category.click();
// 暂停
... ... @@ -56,12 +56,6 @@ describe(ANDROID_PRODUCT_DETAIL, 'Android 商品详情进入用例', async(drive
//点击加入购物车
let add = await driver.waitForElementById('com.yoho:id/btn_pro_info_submit', FIND_VIEW_OVER_TIME);
await add.click();
//进入购物车
let goToShopCart = await driver.waitForElementById('com.yoho:id/activity_product_detail_sv', FIND_VIEW_OVER_TIME);
await goToShopCart.click();
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
//返回商品详情
let backPrdDetail = await driver.waitForElementById('com.yoho:id/back_imgbtn', FIND_VIEW_OVER_TIME);
await backPrdDetail.click();
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
});
... ...
... ... @@ -31,8 +31,18 @@ describe(ANDROID_TAB_HOME,'安卓首页', async(driver) => {
touchTab = await driver.waitForElementByXPath('/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup[1]/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.view.ViewGroup/android.widget.LinearLayout/android.widget.HorizontalScrollView/android.widget.LinearLayout/android.view.ViewGroup[5]',5000);
await touchTab.click();
//潮童
touchTab = await driver.waitForElementByXPath('/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup[1]/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.view.ViewGroup/android.widget.LinearLayout/android.widget.HorizontalScrollView/android.widget.LinearLayout/android.view.ViewGroup[6]',5000);
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
await (new wd.TouchAction(driver))
.press({x: 382, y: 271})
.moveTo({x: 640, y: 274})
.release()
.perform()
//返回男装
touchTab = await driver.waitForElementByXPath('/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup[1]/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.view.ViewGroup/android.widget.LinearLayout/android.widget.HorizontalScrollView/android.widget.LinearLayout/android.view.ViewGroup[1]',5000);
await touchTab.click();
await new Promise(r => {
... ...
... ... @@ -37,6 +37,6 @@ describe(ANDROID_MAINTAB_SWITCH,'安卓首页TAB切换', async(driver) => {
await touchTab.click();
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
await driver.sleep(10000);
});
\ No newline at end of file
... ...
... ... @@ -36,27 +36,24 @@ describe(ANDROID_CASE_UFO_BROWSE, 'Android UFO首页测试用例', async(driver)
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
//退出系列列表
let quitSearialView = await driver.waitForElementByXPath('/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[2]/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.widget.ImageView', FIND_VIEW_OVER_TIME);
await quitSearialView.click();
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
// //退出系列列表
// let quitSearialView = await driver.waitForElementByXPath('/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[2]/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.widget.ImageView', FIND_VIEW_OVER_TIME);
// await quitSearialView.click();
//进入商品详情
let goodsView = await driver.waitForElementByXPath('/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup[1]/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[2]/android.view.ViewGroup/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[6]/android.view.ViewGroup', FIND_VIEW_OVER_TIME);
let goodsView = await driver.waitForElementByXPath('/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[1]/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[1]', FIND_VIEW_OVER_TIME);
await goodsView.click();
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
//退出商品详情
/*//退出商品详情
let quitGoodsView = await driver.waitForElementById('com.yoho:id/back_btn', FIND_VIEW_OVER_TIME);
await quitGoodsView.click();
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
*/
// await new Promise(r => {
// setTimeout(() => {
... ...
... ... @@ -11,7 +11,7 @@ const {FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME} = require('../../config/constant'
describe(ANDROID_CASE_UFO_SELL, 'Android UFO商品出售', async(driver) => {
//点击UFO tab,进入UFO首页
/*//点击UFO tab,进入UFO首页
let ufoTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_ufo_rl', FIND_VIEW_OVER_TIME);
await ufoTab.click();
... ... @@ -23,7 +23,7 @@ describe(ANDROID_CASE_UFO_SELL, 'Android UFO商品出售', async(driver) => {
await goodsView.click();
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
await driver.sleep(ACTION_PAUSE_TIME);*/
//商品详情出售按钮
let sellView = await driver.waitForElementByXPath('/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.RelativeLayout[2]/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[1]/android.widget.TextView', FIND_VIEW_OVER_TIME);
... ...
const {describe} = require('../../libs/driver');
const {ANDROID_PRODUCT_CART} = require('../../scene-types/scene-types');
describe(ANDROID_PRODUCT_CART, '添加购物车', async(driver) => {
let size = await driver.waitForElementByXPath('/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.ScrollView/android.widget.LinearLayout/android.widget.LinearLayout[2]/android.view.ViewGroup/android.widget.LinearLayout[1]/android.widget.TextView', 10000);
await size.click();
let addToCart = await driver.waitForElementById('com.yoho:id/btn_pro_info_submit', 10000);
await addToCart.click();
});
const {describe} = require('../../libs/driver');
const {ANDROID_PRODUCT_DETAIL} = require('../../scene-types/scene-types');
describe(ANDROID_PRODUCT_DETAIL, '商品详情页埋点测试', async(driver) => {
let categoryTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_sort', 10000);
await categoryTab.click();
let category = await driver.waitForElementByXPath('/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup[1]/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.view.ViewGroup/android.support.v7.widget.RecyclerView/android.widget.LinearLayout[1]/android.widget.GridView/android.widget.RelativeLayout[1]', 10000);
await category.click();
let firstProduct = await driver.waitForElementByXPath('/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup[1]/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.ScrollView/android.widget.LinearLayout/android.support.v4.view.ViewPager/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v7.widget.RecyclerView/android.widget.RelativeLayout[1]/android.widget.LinearLayout/android.widget.RelativeLayout', 10000);
await firstProduct.click();
let addToCart = await driver.waitForElementByXPath('/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.RelativeLayout[2]/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.TextView', 10000);
await addToCart.click();
});
... ... @@ -3,23 +3,28 @@ 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 分类按钮
let categoryTab = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[2]', FIND_VIEW_OVER_TIME);
await categoryTab.click();
//点击分类中的 其中一个分类
let category = await driver.waitForElementByAccessibilityId('yh_categoryCell_0', FIND_VIEW_OVER_TIME);
await category.click();
console.log("点击分类完成");
await driver.sleep(ACTION_PAUSE_TIME);
//点击其中的一个商品
let firstProduct = await driver.waitForElementByAccessibilityId('yh_prd_cell_0_3', FIND_VIEW_OVER_TIME);
await firstProduct.click();
console.log("点击其中一个商品完成");
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(ACTION_PAUSE_TIME);
console.log("点击首页顶部搜索框");
tapView = await driver.waitForElementByAccessibilityId('homeSearch', FIND_VIEW_OVER_TIME);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
console.log("输入指定的搜索词");
tapView = await driver.waitForElementByAccessibilityId('yh_search_vc_search', FIND_VIEW_OVER_TIME);
tapView.sendKeys("52090140");
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);
//进入购物车
let goToShopCart = await driver.waitForElementByAccessibilityId('yh_prd_detail_shopcart_btn', FIND_VIEW_OVER_TIME);
await goToShopCart.click();
... ... @@ -90,7 +95,7 @@ describe(IOS_PRODUCT_DETAIL, '商品详情页埋点测试', async(driver) => {
let backBtn = await driver.waitForElementByAccessibilityId('backActionBtn', FIND_VIEW_OVER_TIME);
await backBtn.click();
await driver.sleep(ACTION_PAUSE_TIME);
console.log("点击返回品类页");
console.log("返回首页");
backBtn = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
await backBtn.click();
await driver.sleep(ACTION_PAUSE_TIME);
... ...
... ... @@ -35,6 +35,14 @@ describe(iOS_TAB_HOME,'首页', async(driver) => {
await touchTab.click();
await driver.sleep(ACTION_PAUSE_TIME);
// 模拟scrollView的滚动
await (new wd.TouchAction(driver))
.longPress({ x: 200, y: 500 })
.moveTo({ x: 200, y: 200 })
.release()
.perform()
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('女装',5000);
await touchTab.click();
... ...