Authored by 孟顺

埋点测试

@@ -4,6 +4,20 @@ const { @@ -4,6 +4,20 @@ const {
4 4
5 module.exports = { 5 module.exports = {
6 [iOS_TAB_CATEGORY]:[ 6 [iOS_TAB_CATEGORY]:[
  7 + { op: 'YB_LAUNCH_APP', name: '启动APP' },
  8 + { op: 'YB_PAGE_ENTER', name: '进入APP', equals: { PAGE_ID: "start" } },
  9 + { op: 'YB_PAGE_ENTER', name: '进入广告启动页', equals: { PAGE_ID: "xbxzy" } },
  10 + { op: 'YB_HOME_CHANNEL_TAB_C', name: '首页默认选中了某个tab选项' },
  11 + { op: 'YB_PAGE_ENTER', name: '进入首页', equals: { PAGE_ID: "sy" } },
  12 + { op: 'YB_PAGE_EXIT', name: '离开启动页', equals: { PAGE_ID: "start" } },
  13 + { op: 'YB_PAGE_EXIT', name: '离开广告启动页', equals: { PAGE_ID: "xbxzy" } },
  14 + { op: 'YB_ENTER_CHOICE', name: '选择了默认的频道选项' },
  15 + { op: 'YB_CHOOSE_FOR_YOU', name: '猜你喜欢展现上报', types: { PRD_ID: String } },
  16 + { op: 'YB_SHOW_MAIN_RECOMMEND', name: '首页推荐商品数据曝光', types: { DATA: Array } },
  17 + { op: 'YB_CATEGORY_CLS_TAB', name: '主界面-分类-品类TAB'},
  18 +
  19 +
  20 +
7 { op: 'YB_CATEGORY', name: 'TAB BAR 点击品类'}, 21 { op: 'YB_CATEGORY', name: 'TAB BAR 点击品类'},
8 { op: 'YB_AUTO_TRACK', name: '自动点击TAB品类上报', equals: { VIEW_PATH: "YH_TabBarViewController[0]\/UITabBar[0]\/Index[1]" } }, 22 { op: 'YB_AUTO_TRACK', name: '自动点击TAB品类上报', equals: { VIEW_PATH: "YH_TabBarViewController[0]\/UITabBar[0]\/Index[1]" } },
9 { op: 'YB_PAGE_EXIT', name: "离开首页", equals: { PAGE_ID: "sy" } }, 23 { op: 'YB_PAGE_EXIT', name: "离开首页", equals: { PAGE_ID: "sy" } },
@@ -3,18 +3,18 @@ const {describe} = require('../../libs/driver'); @@ -3,18 +3,18 @@ const {describe} = require('../../libs/driver');
3 const {iOS_TAB_HOME} = require('../../scene-types/scene-types'); 3 const {iOS_TAB_HOME} = require('../../scene-types/scene-types');
4 4
5 describe(iOS_TAB_HOME,'首页', async(driver) => { 5 describe(iOS_TAB_HOME,'首页', async(driver) => {
6 - let touchTab = await driver.waitForElementByAccessibilityId('home drawer entrance',10000);  
7 - await touchTab.click();  
8 - await new Promise(r => {  
9 - setTimeout(() => {  
10 - r()  
11 - }, 2000);  
12 - })  
13 - await (new wd.TouchAction(driver))  
14 - .press({x: 300, y: 158})  
15 - .moveTo({x: 191, y: 162})  
16 - .release()  
17 - .perform() 6 + // let touchTab = await driver.waitForElementByAccessibilityId('home drawer entrance',10000);
  7 + // await touchTab.click();
  8 + // await new Promise(r => {
  9 + // setTimeout(() => {
  10 + // r()
  11 + // }, 2000);
  12 + // })
  13 + // await (new wd.TouchAction(driver))
  14 + // .press({x: 300, y: 158})
  15 + // .moveTo({x: 191, y: 162})
  16 + // .release()
  17 + // .perform()
18 18
19 // touchTab = await driver.waitForElementByAccessibilityId('homeSearch',5000); 19 // touchTab = await driver.waitForElementByAccessibilityId('homeSearch',5000);
20 // await touchTab.click(); 20 // await touchTab.click();
@@ -25,7 +25,10 @@ describe(iOS_TAB_HOME,'首页', async(driver) => { @@ -25,7 +25,10 @@ describe(iOS_TAB_HOME,'首页', async(driver) => {
25 // touchTab = await driver.waitForElementByAccessibilityId('qr home',10000); 25 // touchTab = await driver.waitForElementByAccessibilityId('qr home',10000);
26 // await touchTab.click(); 26 // await touchTab.click();
27 27
28 - touchTab = await driver.waitForElementByAccessibilityId('球鞋',5000); 28 + let touchTab = await driver.waitForElementByAccessibilityId('球鞋',5000);
  29 + await touchTab.click();
  30 +
  31 + touchTab = await driver.waitForElementByAccessibilityId('男装', 5000);
29 await touchTab.click(); 32 await touchTab.click();
30 33
31 touchTab = await driver.waitForElementByAccessibilityId('女装',5000); 34 touchTab = await driver.waitForElementByAccessibilityId('女装',5000);
@@ -34,17 +37,16 @@ describe(iOS_TAB_HOME,'首页', async(driver) => { @@ -34,17 +37,16 @@ describe(iOS_TAB_HOME,'首页', async(driver) => {
34 touchTab = await driver.waitForElementByAccessibilityId('生活方式',5000); 37 touchTab = await driver.waitForElementByAccessibilityId('生活方式',5000);
35 await touchTab.click(); 38 await touchTab.click();
36 39
37 - touchTab = await driver.waitForElementByAccessibilityId('潮童',5000); 40 + touchTab = await driver.waitForElementByAccessibilityId('高街BLK', 1000);
38 await touchTab.click(); 41 await touchTab.click();
39 42
40 - touchTab = await driver.waitForElementByAccessibilityId('高街BLK',1000); 43 + touchTab = await driver.waitForElementByAccessibilityId('潮童',5000);
41 await touchTab.click(); 44 await touchTab.click();
42 45
43 touchTab = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[1]',5000); 46 touchTab = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[1]',5000);
44 await touchTab.click(); 47 await touchTab.click();
45 48
46 - touchTab = await driver.waitForElementByAccessibilityId('男装',5000);  
47 - await touchTab.click(); 49 +
48 50
49 await new Promise(r => { 51 await new Promise(r => {
50 setTimeout(() => { 52 setTimeout(() => {