Authored by 朱小军

Merge branch 'develop' into 'master'

Develop



See merge request !4
@@ -41,12 +41,24 @@ @@ -41,12 +41,24 @@
41 ] 41 ]
42 } 42 }
43 ], 43 ],
44 - "android": [{  
45 - "name": "商品详情页",  
46 - "scenes": ["ANDROID_UFO_PRODUCT_DETAIL"]  
47 - }, {  
48 - "name": "购物车",  
49 - "scenes": ["ANDROID_PRODUCT_DETAIL", "ANDROID_PRODUCT_CART"]  
50 - }] 44 + "android": [
  45 + {
  46 + "name":"有货Android自动化埋点测试-Yoho!Buy",
  47 + "scenes": [
  48 + "ANDROID_TAB_HOME",
  49 + "ANDROID_MAINTAB_SWITCH",
  50 + "ANDROID_TAB_MINE",
  51 + "ANDROID_PRODUCT_DETAIL",
  52 + "ANDROID_ORDER_CONFIRM"
  53 + ]
  54 + },
  55 + {
  56 + "name":"有货Android自动化埋点测试-UFO",
  57 + "scenes": [
  58 + "ANDROID_CASE_UFO_BROWSE",
  59 + "ANDROID_CASE_UFO_SELL"
  60 + ]
  61 + }
  62 + ]
51 } 63 }
52 } 64 }
@@ -5,38 +5,31 @@ const { @@ -5,38 +5,31 @@ const {
5 module.exports = { 5 module.exports = {
6 [ANDROID_ORDER_CONFIRM]: [ 6 [ANDROID_ORDER_CONFIRM]: [
7 7
8 - { op: 'YB_PAGE_ENTER', name: '进入商品详情页', equals: { PAGE_ID: 'spxqy' } }, 8 + { op: 'YB_FUNC_SC_DRIFT', name: '进入购物车'},
9 { 9 {
10 - op: 'YB_GDS_DT_INFO', name: '请求商品数据成功', validate: (log) => {  
11 - return log.param.PRD_SKN.length > 0;  
12 - }  
13 - },  
14 - {  
15 - op: 'YB_GDS_COLOR_C', name: '点击颜色(可以没有 如果只有一个颜色是不可点击的)', validate: (log) => {  
16 - return log.param.PRD_ID.length > 0 && log.param.COLOR.length > 0;  
17 - }  
18 - },  
19 - {  
20 - op: 'YB_GDS_SIZE_C', name: '点击尺码(可以没有 如果只有一个尺码是不可点击的)', validate: (log) => {  
21 - return log.param.PRD_ID.length > 0 && log.param.SIZE.length > 0;  
22 - }  
23 - },  
24 - {  
25 - op: 'YB_GDS_DT_SEL', name: '加入购物车', validate: (log) => {  
26 - return log.param.PRD_SKU > 0;  
27 - }  
28 - },  
29 -  
30 - {  
31 - op: 'YB_CHOOSE_FOR_YOU', name: '店铺推荐的商品列表', equals: { REC_POSE: '100029', ACTION_ID: '0' }, validate: (log) => {  
32 - return log.param.PRD_ID.length > 0;  
33 - }  
34 - },  
35 - {  
36 - op: 'YB_GDS_DT_BUY', name: '点击商品详情', validate: (log) => { 10 + op: 'YB_GDS_DT_BUY', name: '商品加入购物车', validate: (log) => {
37 return log.param.PRD_ID.length > 0; 11 return log.param.PRD_ID.length > 0;
38 } 12 }
39 }, 13 },
  14 + {op: 'YB_CHOOSE_FOR_YOU', name: '购物车猜你喜欢'},
  15 + { op: 'YB_SHOW_SHOPCART', name: '普通购物车数量'},
  16 + { op: 'YB_SHOW_GLOBAL_SHOPCART', name: '全球购购物车数量'},
  17 +
  18 + { op: 'YB_SC_TOPAY', name: '订单生成'},
  19 + { op: 'YB_PAGE_ENTER', name: '进入确认订单页', equals: { PAGE_ID: 'qrdd' } },
  20 +
  21 + { op: 'YB_SC_ORD', name: '订单确认', validate: (log) => {
  22 + return log.param.ORD_NUM.length > 0;
  23 + }},
  24 + { op: 'YB_PAGE_EXIT', name: '离开订单页', equals: { PAGE_ID: 'qrdd' } },
  25 +
  26 + { op: 'YB_PAGE_ENTER', name: '进入支付选择页', equals: { PAGE_ID: 'zfzx' } },
  27 + { op: 'YB_PAGE_FINISH', name: '关闭确认订单页', equals: { PAGE_ID: 'qrdd' } },
  28 +
  29 + { op: 'YB_SC_PAY', name: '支付', validate: (log) => {
  30 + return log.param.ORD_NUM.length > 0;
  31 + }},
  32 + { op: 'YB_PAGE_EXIT', name: '离开支付页', equals: { PAGE_ID: 'zfzx' } },
40 ] 33 ]
41 }; 34 };
42 35
@@ -11,16 +11,11 @@ module.exports = { @@ -11,16 +11,11 @@ module.exports = {
11 return log.param.PRD_SKN.length > 0; 11 return log.param.PRD_SKN.length > 0;
12 } 12 }
13 }, 13 },
14 - {  
15 - op: 'YB_GDS_COLOR_C', name: '点击颜色(可以没有 如果只有一个颜色是不可点击的)', validate: (log) => {  
16 - return log.param.PRD_ID.length > 0 && log.param.COLOR.length > 0;  
17 - }  
18 - },  
19 - { 14 + /*{
20 op: 'YB_GDS_SIZE_C', name: '点击尺码(可以没有 如果只有一个尺码是不可点击的)', validate: (log) => { 15 op: 'YB_GDS_SIZE_C', name: '点击尺码(可以没有 如果只有一个尺码是不可点击的)', validate: (log) => {
21 return log.param.PRD_ID.length > 0 && log.param.SIZE.length > 0; 16 return log.param.PRD_ID.length > 0 && log.param.SIZE.length > 0;
22 } 17 }
23 - }, 18 + },*/
24 { 19 {
25 op: 'YB_GDS_DT_SEL', name: '加入购物车', validate: (log) => { 20 op: 'YB_GDS_DT_SEL', name: '加入购物车', validate: (log) => {
26 return log.param.PRD_SKU > 0; 21 return log.param.PRD_SKU > 0;
@@ -47,9 +42,7 @@ module.exports = { @@ -47,9 +42,7 @@ module.exports = {
47 // }, 42 // },
48 //店铺推荐的商品列表 43 //店铺推荐的商品列表
49 { 44 {
50 - op: 'YB_CHOOSE_FOR_YOU', name: '店铺推荐的商品列表', equals: { REC_POSE: '100029', ACTION_ID: '0' }, validate: (log) => {  
51 - return log.param.PRD_ID.length > 0;  
52 - } 45 + op: 'YB_CHOOSE_FOR_YOU', name: '店铺推荐的商品列表'
53 }, 46 },
54 // //点击店铺推荐的商品列表 47 // //点击店铺推荐的商品列表
55 // { 48 // {
@@ -58,12 +51,6 @@ module.exports = { @@ -58,12 +51,6 @@ module.exports = {
58 // } 51 // }
59 // }, 52 // },
60 53
61 - //点击商品详情  
62 - {  
63 - op: 'YB_GDS_DT_BUY', name: '点击商品详情', validate: (log) => {  
64 - return log.param.PRD_ID.length > 0;  
65 - }  
66 - },  
67 // //点击在线客服 54 // //点击在线客服
68 // { op: 'YB_MY_OLCS', name: '点击在线客服', equals: { TYPE: '1' } }, 55 // { op: 'YB_MY_OLCS', name: '点击在线客服', equals: { TYPE: '1' } },
69 // //立即购买 56 // //立即购买
@@ -17,8 +17,6 @@ module.exports = { @@ -17,8 +17,6 @@ module.exports = {
17 17
18 {op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }}, 18 {op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
19 19
20 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1', equals: { CHANNEL_ID: '1', SUB_C_ID:'1'}},  
21 -  
22 /*{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1469', types:{DATA: Array}, equals: { SUB_C_ID:'1469'}}, 20 /*{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1469', types:{DATA: Array}, equals: { SUB_C_ID:'1469'}},
23 {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光2073', types:{DATA: Array}, equals: { SUB_C_ID:'2073'}}, 21 {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光2073', types:{DATA: Array}, equals: { SUB_C_ID:'2073'}},
24 {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1951', types:{DATA: Array}, equals: { SUB_C_ID:'1951'}}, 22 {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1951', types:{DATA: Array}, equals: { SUB_C_ID:'1951'}},
@@ -26,17 +24,19 @@ module.exports = { @@ -26,17 +24,19 @@ module.exports = {
26 {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光2', types:{DATA: Array}, equals: { SUB_C_ID:'2'}}, 24 {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光2', types:{DATA: Array}, equals: { SUB_C_ID:'2'}},
27 {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光3', types:{DATA: Array}, equals: { SUB_C_ID:'3'}},*/ 25 {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光3', types:{DATA: Array}, equals: { SUB_C_ID:'3'}},*/
28 26
  27 + {op: 'YB_AUTO_TRACK',},
  28 + {op: 'YB_AUTO_TRACK',},
  29 + {op: 'YB_AUTO_TRACK',},
29 {op: 'YB_SHOW_EVENT',}, 30 {op: 'YB_SHOW_EVENT',},
30 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1469', equals: { SUB_C_ID:'1469'}},  
31 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2073', equals: { SUB_C_ID:'2073'}},  
32 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1951', equals: { SUB_C_ID:'1951'}}, 31 +
33 {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1', equals: { SUB_C_ID:'1'}}, 32 {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1', equals: { SUB_C_ID:'1'}},
34 {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2', equals: { SUB_C_ID:'2'}}, 33 {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2', equals: { SUB_C_ID:'2'}},
35 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光3', equals: { SUB_C_ID:'3'}}, 34 + {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2073', equals: { SUB_C_ID:'2073'}},
  35 + {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1951', equals: { SUB_C_ID:'1951'}},
  36 + {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1469', equals: { SUB_C_ID:'1469'}},
36 37
37 {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1', equals: { CHANNEL_ID: '1', SUB_C_ID:'1'}}, 38 {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1', equals: { CHANNEL_ID: '1', SUB_C_ID:'1'}},
38 {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel2', equals: { CHANNEL_ID: '2', SUB_C_ID:'2'}}, 39 {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel2', equals: { CHANNEL_ID: '2', SUB_C_ID:'2'}},
39 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel3', equals: { CHANNEL_ID: '3', SUB_C_ID:'3'}},  
40 {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel2073', equals: { CHANNEL_ID: '2073', SUB_C_ID:'2073'}}, 40 {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel2073', equals: { CHANNEL_ID: '2073', SUB_C_ID:'2073'}},
41 {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1951', equals: { CHANNEL_ID: '1951', SUB_C_ID:'1951'}}, 41 {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1951', equals: { CHANNEL_ID: '1951', SUB_C_ID:'1951'}},
42 {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1469', equals: { CHANNEL_ID: '1469', SUB_C_ID:'1469'}}, 42 {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1469', equals: { CHANNEL_ID: '1469', SUB_C_ID:'1469'}},
@@ -4,41 +4,18 @@ const { @@ -4,41 +4,18 @@ const {
4 4
5 module.exports = { 5 module.exports = {
6 [ANDROID_TAB_MINE]:[ 6 [ANDROID_TAB_MINE]:[
7 - {op: 'YB_LAUNCH_APP', name: '启动app', single: true},  
8 - {op: 'YB_ENTER_CHOICE', name: '性别男女入口', single: true, validate: (log) => {  
9 - return ((log.param.ENT_TYP === 1 && log.param.SUB_C_ID === '1' && log.param.C_ID === '1')  
10 - || (log.param.ENT_TYP === 0 && log.param.SUB_C_ID === '2' && log.param.C_ID === '2'));  
11 - }},  
12 - {op: 'YB_PAGE_ENTER', name: '欢迎页载入', equals: { PAGE_ID: 'start' }},  
13 - {op: 'YB_PAGE_EXIT', name: '欢迎页载出', equals: { PAGE_ID: 'start' }},  
14 - {op: 'YB_PAGE_FINISH', name: '欢迎页关闭', equals: { PAGE_ID: 'start' }},  
15 - {op: 'YB_PAGE_ENTER', name: '频道选择页载入', equals: { PAGE_ID: 'xbxzy' }},  
16 - {op: 'YB_PAGE_EXIT', name: '频道选择页载出', equals: { PAGE_ID: 'xbxzy' }}, 7 + // {op: 'UFO_MY_ITEM_C', name: '商家入驻'},
  8 + // {op: 'UFO_MY_ITEM_C', name: '新的好物'},
  9 + // {op: 'YB_PAGE_ENTER', name: '新的好物载入'},
  10 + // {op: 'YB_PAGE_EXIT', name: '新的好物载出'},
  11 + // {op: 'YB_PAGE_ENTER', name: '商家入驻载入'},
  12 + // {op: 'YB_PAGE_EXIT', name: '商家入驻载出'},
17 13
18 - {op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},  
19 -  
20 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1', equals: { CHANNEL_ID: '1', SUB_C_ID:'1'}},  
21 -  
22 - /*{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1469', types:{DATA: Array}, equals: { SUB_C_ID:'1469'}},  
23 - {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光2073', types:{DATA: Array}, equals: { SUB_C_ID:'2073'}},  
24 - {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1951', types:{DATA: Array}, equals: { SUB_C_ID:'1951'}},  
25 - {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1', types:{DATA: Array}, equals: { SUB_C_ID:'1'}},  
26 - {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光2', types:{DATA: Array}, equals: { SUB_C_ID:'2'}},  
27 - {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光3', types:{DATA: Array}, equals: { SUB_C_ID:'3'}},*/  
28 -  
29 - {op: 'YB_SHOW_EVENT',},  
30 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1469', equals: { SUB_C_ID:'1469'}},  
31 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2073', equals: { SUB_C_ID:'2073'}},  
32 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1951', equals: { SUB_C_ID:'1951'}},  
33 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1', equals: { SUB_C_ID:'1'}},  
34 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2', equals: { SUB_C_ID:'2'}},  
35 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光3', equals: { SUB_C_ID:'3'}},  
36 -  
37 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1', equals: { CHANNEL_ID: '1', SUB_C_ID:'1'}},  
38 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel2', equals: { CHANNEL_ID: '2', SUB_C_ID:'2'}},  
39 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel3', equals: { CHANNEL_ID: '3', SUB_C_ID:'3'}},  
40 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel2073', equals: { CHANNEL_ID: '2073', SUB_C_ID:'2073'}},  
41 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1951', equals: { CHANNEL_ID: '1951', SUB_C_ID:'1951'}},  
42 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1469', equals: { CHANNEL_ID: '1469', SUB_C_ID:'1469'}}, 14 + {op: 'YB_PAGE_ENTER', name: '我的收入载入'},
  15 + {op: 'YB_PAGE_EXIT', name: '我的收入载出'},
  16 + {op: 'YB_CPS_MAIN_PRO_TAB_C', name: '有货有赚推荐'},
  17 + {op: 'YB_PAGE_ENTER', name: 'UFO载入'},
  18 + {op: 'YB_PAGE_ENTER', name: 'UFO载出'},
  19 + // {op: 'YB_H5_PAGE_OPEN_', name: '新的好物url'},
43 ] 20 ]
44 }; 21 };
@@ -4,41 +4,32 @@ const { @@ -4,41 +4,32 @@ const {
4 4
5 module.exports = { 5 module.exports = {
6 [ANDROID_MAINTAB_SWITCH]:[ 6 [ANDROID_MAINTAB_SWITCH]:[
7 - {op: 'YB_LAUNCH_APP', name: '启动app', single: true},  
8 - {op: 'YB_ENTER_CHOICE', name: '性别男女入口', single: true, validate: (log) => {  
9 - return ((log.param.ENT_TYP === 1 && log.param.SUB_C_ID === '1' && log.param.C_ID === '1')  
10 - || (log.param.ENT_TYP === 0 && log.param.SUB_C_ID === '2' && log.param.C_ID === '2'));  
11 - }},  
12 - {op: 'YB_PAGE_ENTER', name: '欢迎页载入', equals: { PAGE_ID: 'start' }},  
13 - {op: 'YB_PAGE_EXIT', name: '欢迎页载出', equals: { PAGE_ID: 'start' }},  
14 - {op: 'YB_PAGE_FINISH', name: '欢迎页关闭', equals: { PAGE_ID: 'start' }},  
15 - {op: 'YB_PAGE_ENTER', name: '频道选择页载入', equals: { PAGE_ID: 'xbxzy' }},  
16 - {op: 'YB_PAGE_EXIT', name: '频道选择页载出', equals: { PAGE_ID: 'xbxzy' }},  
17 -  
18 - {op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }}, 7 + { op: 'YB_CATEGORY', name: 'TAB BAR 点击品类'},
  8 + {op: 'YB_PAGE_ENTER', name: '品类进入', equals: { PAGE_ID: 'pl' }},
  9 + { op: 'YB_PAGE_EXIT', name: "离开首页", equals: { PAGE_ID: "sy" } },
  10 + { op: 'YB_AUTO_TRACK', name: '自动点击TAB品类上报'},
  11 + { op: 'YB_PAGE_ENTER', name: "进入品类", equals: { PAGE_ID: "pl" } },
19 12
20 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1', equals: { CHANNEL_ID: '1', SUB_C_ID:'1'}},  
21 13
22 - /*{op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1469', types:{DATA: Array}, equals: { SUB_C_ID:'1469'}},  
23 - {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光2073', types:{DATA: Array}, equals: { SUB_C_ID:'2073'}},  
24 - {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1951', types:{DATA: Array}, equals: { SUB_C_ID:'1951'}},  
25 - {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光1', types:{DATA: Array}, equals: { SUB_C_ID:'1'}},  
26 - {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光2', types:{DATA: Array}, equals: { SUB_C_ID:'2'}},  
27 - {op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页猜你喜欢接口曝光3', types:{DATA: Array}, equals: { SUB_C_ID:'3'}},*/ 14 + { op: 'YB_STROLL', name: 'TAB BAR 点击逛'},
  15 + { op: 'YB_AUTO_TRACK', name: '自动点击TAB逛上报'},
  16 + { op: 'YB_PAGE_EXIT', name: "离开品类", equals: { PAGE_ID: "pl" } },
  17 + {op: 'YB_PAGE_ENTER', name: '逛进入', equals: { PAGE_ID: 'guangsy' }},
  18 + {op: 'YB_STROLL_MAIN_TAB_C', name: '逛推荐tab', single: true, validate: (log) => {
  19 + return log.param.TAB_ID === "1001";
  20 + }},
28 21
29 - {op: 'YB_SHOW_EVENT',},  
30 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1469', equals: { SUB_C_ID:'1469'}},  
31 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2073', equals: { SUB_C_ID:'2073'}},  
32 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1951', equals: { SUB_C_ID:'1951'}},  
33 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光1', equals: { SUB_C_ID:'1'}},  
34 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光2', equals: { SUB_C_ID:'2'}},  
35 - {op: 'YB_CHOOSE_FOR_YOU', name: '首页猜你喜欢接口曝光3', equals: { SUB_C_ID:'3'}}, 22 + { op: 'YB_MY', name: 'TAB BAR 点击个人中心'},
  23 + { op: 'YB_AUTO_TRACK', name: '自动点击TAB个人中心上报'},
  24 + { op: 'YB_PAGE_EXIT', name: "离开逛", equals: { PAGE_ID: "guangsy" } },
  25 + {op: 'YB_PAGE_ENTER', name: '个人中心进入', equals: { PAGE_ID: 'wd' }},
  26 + {op: 'YB_CHOOSE_FOR_YOU', name: '个人中心猜你喜欢'},
36 27
37 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1', equals: { CHANNEL_ID: '1', SUB_C_ID:'1'}},  
38 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel2', equals: { CHANNEL_ID: '2', SUB_C_ID:'2'}},  
39 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel3', equals: { CHANNEL_ID: '3', SUB_C_ID:'3'}},  
40 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel2073', equals: { CHANNEL_ID: '2073', SUB_C_ID:'2073'}},  
41 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1951', equals: { CHANNEL_ID: '1951', SUB_C_ID:'1951'}},  
42 - {op: 'YB_HOME_CHANNEL_TAB_C', name: '首页内tab_channel1469', equals: { CHANNEL_ID: '1469', SUB_C_ID:'1469'}}, 28 + { op: 'YB_UFO', name: 'TAB BAR 点击UFO'},
  29 + { op: 'YB_AUTO_TRACK', name: '自动点击TAB UFO上报'},
  30 + { op: 'YB_PAGE_EXIT', name: "离开个人中心", equals: { PAGE_ID: "wd" } },
  31 + {op: 'YB_PAGE_ENTER', name: 'UFO进入', equals: { PAGE_ID: 'ufo' }},
  32 + { op: 'UFO_BROWSE_HOME', name: 'UFO浏览'},
  33 + { op: 'UFO_MAIN_START', name: 'UFO主页展示'},
43 ] 34 ]
44 }; 35 };
@@ -26,14 +26,9 @@ module.exports = { @@ -26,14 +26,9 @@ module.exports = {
26 { op: 'YB_PAGE_ENTER', name: "进入商品列表页面", equals: {"TYPE_ID":"ufo_productList"} }, 26 { op: 'YB_PAGE_ENTER', name: "进入商品列表页面", equals: {"TYPE_ID":"ufo_productList"} },
27 { op: 'UFO_PRD_LIST_L', name: "商品列表第一页商品ID曝光", types: { PRD_LIST: String } }, 27 { op: 'UFO_PRD_LIST_L', name: "商品列表第一页商品ID曝光", types: { PRD_LIST: String } },
28 28
29 - { op: 'YB_PAGE_EXIT', name: "退出商品列表页面", equals: {"TYPE_ID":"ufo_productList"} },  
30 -  
31 - { op: 'UFO_MAIN_EVENT', name: "商品点击", types: { PRD_ID: String } }, 29 + { op: 'UFO_PRD_LIST_C', name: "商品列表页面点击商品", types: { PRD_ID: String } },
32 { op: 'YB_PAGE_ENTER', name: "进入商品详情页面", equals: {"TYPE_ID":"ufo_productDetail"} }, 30 { op: 'YB_PAGE_ENTER', name: "进入商品详情页面", equals: {"TYPE_ID":"ufo_productDetail"} },
33 - { op: 'UFO_PRD_DT_INFO', name: "商品详情页面上报", equals: {"FP_NAME":"aFP_UFOHome"}, types: {PRD_ID: String} },  
34 -  
35 - { op: 'YB_PAGE_EXIT', name: "退出商品详情页面", equals: {"TYPE_ID":"ufo_productDetail"} },  
36 - 31 + { op: 'UFO_PRD_DT_INFO', name: "商品详情页面上报", equals: {"FP_NAME":"aFP_UFOSeriesList"}, types: {PRD_ID: String} },
37 32
38 ] 33 ]
39 }; 34 };
@@ -9,18 +9,6 @@ const { @@ -9,18 +9,6 @@ const {
9 9
10 module.exports = { 10 module.exports = {
11 [ANDROID_CASE_UFO_SELL]:[ 11 [ANDROID_CASE_UFO_SELL]:[
12 - { op: 'YB_LAUNCH_APP', name: '启动app', single: true},  
13 - { op: 'YB_ENTER_CHOICE', name: '性别男女入口', single: true},  
14 -  
15 - { op: 'YB_UFO', name: 'TAB BAR 点击UFO'},  
16 - { op: 'UFO_BROWSE_HOME', name: 'UFO首页浏览上报'},  
17 - { op: 'UFO_MAIN_START', name: "UFO频道打开", single: true},  
18 - { op: 'YB_SHOW_EVENT', name: "曝光事件", types: { DATA: Array } },  
19 -  
20 - { op: 'UFO_MAIN_EVENT', name: "商品点击", types: { PRD_ID: String } },  
21 - { op: 'YB_PAGE_ENTER', name: "进入商品详情页面", equals: {"TYPE_ID":"ufo_productDetail"} },  
22 - { op: 'UFO_PRD_DT_INFO', name: "商品详情页面上报", equals: {"FP_NAME":"aFP_UFOHome"}, types: {PRD_ID: String} },  
23 -  
24 { op: 'UFO_PRD_DT_SALE_C', name: "商品详情点击购买按钮", types: {PRD_ID: String} }, 12 { op: 'UFO_PRD_DT_SALE_C', name: "商品详情点击购买按钮", types: {PRD_ID: String} },
25 13
26 { op: 'YB_PAGE_EXIT', name: "退出商品详情页面", equals: {"TYPE_ID":"ufo_productDetail"} }, 14 { op: 'YB_PAGE_EXIT', name: "退出商品详情页面", equals: {"TYPE_ID":"ufo_productDetail"} },
@@ -28,6 +16,10 @@ module.exports = { @@ -28,6 +16,10 @@ module.exports = {
28 16
29 { op: 'UFO_SALE_ORD', name: "UFO出售结果", types: { PRD_ID: String, PRD_SKU: String} }, 17 { op: 'UFO_SALE_ORD', name: "UFO出售结果", types: { PRD_ID: String, PRD_SKU: String} },
30 18
  19 + { op: 'YB_PAGE_FINISH', name: "关闭出售页面", equals: {"TYPE_ID":"ufo_sellVC"} },
  20 + { op: 'YB_PAGE_EXIT', name: "关闭出售页面", equals: {"TYPE_ID":"ufo_sellVC"} },
  21 + { op: 'YB_PAGE_ENTER', name: "进入商品详情页面", equals: {"TYPE_ID":"ufo_productDetail"} },
  22 +
31 23
32 ] 24 ]
33 }; 25 };
@@ -5,6 +5,7 @@ const {FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME} = require('../../config/constant' @@ -5,6 +5,7 @@ const {FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME} = require('../../config/constant'
5 5
6 describe(ANDROID_ORDER_CONFIRM, '下单', async(driver) => { 6 describe(ANDROID_ORDER_CONFIRM, '下单', async(driver) => {
7 7
  8 + /* 结算单独测试用例
8 // 暂停 9 // 暂停
9 await driver.sleep(ACTION_PAUSE_TIME); 10 await driver.sleep(ACTION_PAUSE_TIME);
10 11
@@ -51,11 +52,14 @@ describe(ANDROID_ORDER_CONFIRM, '下单', async(driver) => { @@ -51,11 +52,14 @@ describe(ANDROID_ORDER_CONFIRM, '下单', async(driver) => {
51 52
52 //进入购物车 53 //进入购物车
53 let goToShopCart = await driver.waitForElementById('com.yoho:id/activity_product_detail_sv', FIND_VIEW_OVER_TIME); 54 let goToShopCart = await driver.waitForElementById('com.yoho:id/activity_product_detail_sv', FIND_VIEW_OVER_TIME);
54 - await goToShopCart.click(); 55 + await goToShopCart.click();*/
55 56
56 // 暂停 57 // 暂停
57 await driver.sleep(ACTION_PAUSE_TIME); 58 await driver.sleep(ACTION_PAUSE_TIME);
58 59
  60 + //进入购物车
  61 + let goToShopCart = await driver.waitForElementById('com.yoho:id/activity_product_detail_sv', FIND_VIEW_OVER_TIME);
  62 + await goToShopCart.click();
59 // 去结算 63 // 去结算
60 let orderCreate = await driver.waitForElementById('com.yoho:id/common_shoppingcart_btn', FIND_VIEW_OVER_TIME); 64 let orderCreate = await driver.waitForElementById('com.yoho:id/common_shoppingcart_btn', FIND_VIEW_OVER_TIME);
61 await orderCreate.click(); 65 await orderCreate.click();
@@ -70,4 +74,11 @@ describe(ANDROID_ORDER_CONFIRM, '下单', async(driver) => { @@ -70,4 +74,11 @@ describe(ANDROID_ORDER_CONFIRM, '下单', async(driver) => {
70 // 暂停 74 // 暂停
71 await driver.sleep(ACTION_PAUSE_TIME); 75 await driver.sleep(ACTION_PAUSE_TIME);
72 76
  77 + // 支付
  78 + let orderPay = await driver.waitForElementById('com.yoho:id/pay_button', FIND_VIEW_OVER_TIME);
  79 + await orderPay.click();
  80 +
  81 + // 暂停
  82 + await driver.sleep(ACTION_PAUSE_TIME);
  83 +
73 }); 84 });
@@ -21,7 +21,7 @@ describe(ANDROID_PRODUCT_DETAIL, 'Android 商品详情进入用例', async(drive @@ -21,7 +21,7 @@ describe(ANDROID_PRODUCT_DETAIL, 'Android 商品详情进入用例', async(drive
21 21
22 22
23 //点击分类中的 其中一个品类 23 //点击分类中的 其中一个品类
24 - 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); 24 + 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);
25 await category.click(); 25 await category.click();
26 26
27 // 暂停 27 // 暂停
@@ -56,12 +56,6 @@ describe(ANDROID_PRODUCT_DETAIL, 'Android 商品详情进入用例', async(drive @@ -56,12 +56,6 @@ describe(ANDROID_PRODUCT_DETAIL, 'Android 商品详情进入用例', async(drive
56 //点击加入购物车 56 //点击加入购物车
57 let add = await driver.waitForElementById('com.yoho:id/btn_pro_info_submit', FIND_VIEW_OVER_TIME); 57 let add = await driver.waitForElementById('com.yoho:id/btn_pro_info_submit', FIND_VIEW_OVER_TIME);
58 await add.click(); 58 await add.click();
59 - //进入购物车  
60 - let goToShopCart = await driver.waitForElementById('com.yoho:id/activity_product_detail_sv', FIND_VIEW_OVER_TIME);  
61 - await goToShopCart.click();  
62 // 暂停 59 // 暂停
63 await driver.sleep(ACTION_PAUSE_TIME); 60 await driver.sleep(ACTION_PAUSE_TIME);
64 - //返回商品详情  
65 - let backPrdDetail = await driver.waitForElementById('com.yoho:id/back_imgbtn', FIND_VIEW_OVER_TIME);  
66 - await backPrdDetail.click();  
67 }); 61 });
@@ -31,8 +31,18 @@ describe(ANDROID_TAB_HOME,'安卓首页', async(driver) => { @@ -31,8 +31,18 @@ describe(ANDROID_TAB_HOME,'安卓首页', async(driver) => {
31 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); 31 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);
32 await touchTab.click(); 32 await touchTab.click();
33 33
34 - //潮童  
35 - 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); 34 + // 暂停
  35 + await driver.sleep(ACTION_PAUSE_TIME);
  36 +
  37 +await (new wd.TouchAction(driver))
  38 + .press({x: 382, y: 271})
  39 + .moveTo({x: 640, y: 274})
  40 + .release()
  41 + .perform()
  42 +
  43 +
  44 + //返回男装
  45 + 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);
36 await touchTab.click(); 46 await touchTab.click();
37 47
38 await new Promise(r => { 48 await new Promise(r => {
@@ -37,6 +37,6 @@ describe(ANDROID_MAINTAB_SWITCH,'安卓首页TAB切换', async(driver) => { @@ -37,6 +37,6 @@ describe(ANDROID_MAINTAB_SWITCH,'安卓首页TAB切换', async(driver) => {
37 await touchTab.click(); 37 await touchTab.click();
38 38
39 // 暂停 39 // 暂停
40 - await driver.sleep(ACTION_PAUSE_TIME); 40 + await driver.sleep(10000);
41 41
42 }); 42 });
@@ -36,27 +36,24 @@ describe(ANDROID_CASE_UFO_BROWSE, 'Android UFO首页测试用例', async(driver) @@ -36,27 +36,24 @@ describe(ANDROID_CASE_UFO_BROWSE, 'Android UFO首页测试用例', async(driver)
36 // 暂停 36 // 暂停
37 await driver.sleep(ACTION_PAUSE_TIME); 37 await driver.sleep(ACTION_PAUSE_TIME);
38 38
39 - //退出系列列表  
40 - 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);  
41 - await quitSearialView.click();  
42 -  
43 - // 暂停  
44 - await driver.sleep(ACTION_PAUSE_TIME); 39 + // //退出系列列表
  40 + // 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);
  41 + // await quitSearialView.click();
45 42
46 //进入商品详情 43 //进入商品详情
47 - 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); 44 + 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);
48 await goodsView.click(); 45 await goodsView.click();
49 46
50 // 暂停 47 // 暂停
51 await driver.sleep(ACTION_PAUSE_TIME); 48 await driver.sleep(ACTION_PAUSE_TIME);
52 49
53 - //退出商品详情 50 + /*//退出商品详情
54 let quitGoodsView = await driver.waitForElementById('com.yoho:id/back_btn', FIND_VIEW_OVER_TIME); 51 let quitGoodsView = await driver.waitForElementById('com.yoho:id/back_btn', FIND_VIEW_OVER_TIME);
55 await quitGoodsView.click(); 52 await quitGoodsView.click();
56 53
57 // 暂停 54 // 暂停
58 await driver.sleep(ACTION_PAUSE_TIME); 55 await driver.sleep(ACTION_PAUSE_TIME);
59 - 56 +*/
60 57
61 // await new Promise(r => { 58 // await new Promise(r => {
62 // setTimeout(() => { 59 // setTimeout(() => {
@@ -11,7 +11,7 @@ const {FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME} = require('../../config/constant' @@ -11,7 +11,7 @@ const {FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME} = require('../../config/constant'
11 11
12 describe(ANDROID_CASE_UFO_SELL, 'Android UFO商品出售', async(driver) => { 12 describe(ANDROID_CASE_UFO_SELL, 'Android UFO商品出售', async(driver) => {
13 13
14 - //点击UFO tab,进入UFO首页 14 + /*//点击UFO tab,进入UFO首页
15 let ufoTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_ufo_rl', FIND_VIEW_OVER_TIME); 15 let ufoTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_ufo_rl', FIND_VIEW_OVER_TIME);
16 await ufoTab.click(); 16 await ufoTab.click();
17 17
@@ -23,7 +23,7 @@ describe(ANDROID_CASE_UFO_SELL, 'Android UFO商品出售', async(driver) => { @@ -23,7 +23,7 @@ describe(ANDROID_CASE_UFO_SELL, 'Android UFO商品出售', async(driver) => {
23 await goodsView.click(); 23 await goodsView.click();
24 24
25 // 暂停 25 // 暂停
26 - await driver.sleep(ACTION_PAUSE_TIME); 26 + await driver.sleep(ACTION_PAUSE_TIME);*/
27 27
28 //商品详情出售按钮 28 //商品详情出售按钮
29 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); 29 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);
1 -const {describe} = require('../../libs/driver');  
2 -const {ANDROID_PRODUCT_CART} = require('../../scene-types/scene-types');  
3 -  
4 -describe(ANDROID_PRODUCT_CART, '添加购物车', async(driver) => {  
5 -  
6 - 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);  
7 -  
8 - await size.click();  
9 -  
10 - let addToCart = await driver.waitForElementById('com.yoho:id/btn_pro_info_submit', 10000);  
11 -  
12 - await addToCart.click();  
13 -});  
1 -const {describe} = require('../../libs/driver');  
2 -const {ANDROID_PRODUCT_DETAIL} = require('../../scene-types/scene-types');  
3 -  
4 -describe(ANDROID_PRODUCT_DETAIL, '商品详情页埋点测试', async(driver) => {  
5 - let categoryTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_sort', 10000);  
6 -  
7 - await categoryTab.click();  
8 -  
9 - 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);  
10 -  
11 - await category.click();  
12 -  
13 - 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);  
14 -  
15 - await firstProduct.click();  
16 -  
17 - 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);  
18 -  
19 - await addToCart.click();  
20 -});  
@@ -3,23 +3,28 @@ const {IOS_PRODUCT_DETAIL} = require('../../scene-types/scene-types'); @@ -3,23 +3,28 @@ const {IOS_PRODUCT_DETAIL} = require('../../scene-types/scene-types');
3 const { FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME } = require('../../config/constant'); 3 const { FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME } = require('../../config/constant');
4 4
5 describe(IOS_PRODUCT_DETAIL, '商品详情页埋点测试', async(driver) => { 5 describe(IOS_PRODUCT_DETAIL, '商品详情页埋点测试', async(driver) => {
6 - //点击首页的tab bar 分类按钮  
7 - let categoryTab = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[2]', FIND_VIEW_OVER_TIME);  
8 - await categoryTab.click();  
9 - //点击分类中的 其中一个分类  
10 - let category = await driver.waitForElementByAccessibilityId('yh_categoryCell_0', FIND_VIEW_OVER_TIME);  
11 - await category.click();  
12 - console.log("点击分类完成");  
13 -  
14 await driver.sleep(ACTION_PAUSE_TIME); 6 await driver.sleep(ACTION_PAUSE_TIME);
15 -  
16 - //点击其中的一个商品  
17 - let firstProduct = await driver.waitForElementByAccessibilityId('yh_prd_cell_0_3', FIND_VIEW_OVER_TIME);  
18 - await firstProduct.click();  
19 - console.log("点击其中一个商品完成");  
20 - 7 + console.log("点击首页TAB");
  8 + tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[1]', 10000);
  9 + tapView.click();
  10 + await driver.sleep(ACTION_PAUSE_TIME);
  11 + console.log("点击首页顶部搜索框");
  12 + tapView = await driver.waitForElementByAccessibilityId('homeSearch', FIND_VIEW_OVER_TIME);
  13 + tapView.click();
21 await driver.sleep(ACTION_PAUSE_TIME); 14 await driver.sleep(ACTION_PAUSE_TIME);
  15 + console.log("输入指定的搜索词");
  16 + tapView = await driver.waitForElementByAccessibilityId('yh_search_vc_search', FIND_VIEW_OVER_TIME);
  17 + tapView.sendKeys("52090140");
  18 + await driver.sleep(ACTION_PAUSE_TIME);
  19 + console.log("点击搜索");
  20 + tapView = await driver.waitForElementByAccessibilityId('Search', FIND_VIEW_OVER_TIME);
  21 + tapView.click();
  22 + await driver.sleep(ACTION_PAUSE_TIME);
  23 + console.log("点击指定的商品");
  24 + tapView = await driver.waitForElementByAccessibilityId('yh_prd_cell_0_1', FIND_VIEW_OVER_TIME);
  25 + tapView.click();
22 26
  27 + await driver.sleep(ACTION_PAUSE_TIME);
23 //进入购物车 28 //进入购物车
24 let goToShopCart = await driver.waitForElementByAccessibilityId('yh_prd_detail_shopcart_btn', FIND_VIEW_OVER_TIME); 29 let goToShopCart = await driver.waitForElementByAccessibilityId('yh_prd_detail_shopcart_btn', FIND_VIEW_OVER_TIME);
25 await goToShopCart.click(); 30 await goToShopCart.click();
@@ -90,7 +95,7 @@ describe(IOS_PRODUCT_DETAIL, '商品详情页埋点测试', async(driver) => { @@ -90,7 +95,7 @@ describe(IOS_PRODUCT_DETAIL, '商品详情页埋点测试', async(driver) => {
90 let backBtn = await driver.waitForElementByAccessibilityId('backActionBtn', FIND_VIEW_OVER_TIME); 95 let backBtn = await driver.waitForElementByAccessibilityId('backActionBtn', FIND_VIEW_OVER_TIME);
91 await backBtn.click(); 96 await backBtn.click();
92 await driver.sleep(ACTION_PAUSE_TIME); 97 await driver.sleep(ACTION_PAUSE_TIME);
93 - console.log("点击返回品类页"); 98 + console.log("返回首页");
94 backBtn = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME); 99 backBtn = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
95 await backBtn.click(); 100 await backBtn.click();
96 await driver.sleep(ACTION_PAUSE_TIME); 101 await driver.sleep(ACTION_PAUSE_TIME);
@@ -35,6 +35,14 @@ describe(iOS_TAB_HOME,'首页', async(driver) => { @@ -35,6 +35,14 @@ describe(iOS_TAB_HOME,'首页', async(driver) => {
35 await touchTab.click(); 35 await touchTab.click();
36 36
37 await driver.sleep(ACTION_PAUSE_TIME); 37 await driver.sleep(ACTION_PAUSE_TIME);
  38 + // 模拟scrollView的滚动
  39 + await (new wd.TouchAction(driver))
  40 + .longPress({ x: 200, y: 500 })
  41 + .moveTo({ x: 200, y: 200 })
  42 + .release()
  43 + .perform()
  44 +
  45 + await driver.sleep(ACTION_PAUSE_TIME);
38 46
39 touchTab = await driver.waitForElementByAccessibilityId('女装',5000); 47 touchTab = await driver.waitForElementByAccessibilityId('女装',5000);
40 await touchTab.click(); 48 await touchTab.click();