Authored by 孟顺

埋点测试

... ... @@ -4,6 +4,20 @@ 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" } },
... ...
... ... @@ -3,18 +3,18 @@ const {describe} = require('../../libs/driver');
const {iOS_TAB_HOME} = require('../../scene-types/scene-types');
describe(iOS_TAB_HOME,'首页', async(driver) => {
let touchTab = await driver.waitForElementByAccessibilityId('home drawer entrance',10000);
await touchTab.click();
await new Promise(r => {
setTimeout(() => {
r()
}, 2000);
})
await (new wd.TouchAction(driver))
.press({x: 300, y: 158})
.moveTo({x: 191, y: 162})
.release()
.perform()
// let touchTab = await driver.waitForElementByAccessibilityId('home drawer entrance',10000);
// await touchTab.click();
// await new Promise(r => {
// setTimeout(() => {
// r()
// }, 2000);
// })
// await (new wd.TouchAction(driver))
// .press({x: 300, y: 158})
// .moveTo({x: 191, y: 162})
// .release()
// .perform()
// touchTab = await driver.waitForElementByAccessibilityId('homeSearch',5000);
// await touchTab.click();
... ... @@ -25,7 +25,10 @@ describe(iOS_TAB_HOME,'首页', async(driver) => {
// touchTab = await driver.waitForElementByAccessibilityId('qr home',10000);
// await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('球鞋',5000);
let touchTab = await driver.waitForElementByAccessibilityId('球鞋',5000);
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('男装', 5000);
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('女装',5000);
... ... @@ -34,17 +37,16 @@ describe(iOS_TAB_HOME,'首页', async(driver) => {
touchTab = await driver.waitForElementByAccessibilityId('生活方式',5000);
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('潮童',5000);
touchTab = await driver.waitForElementByAccessibilityId('高街BLK', 1000);
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('高街BLK',1000);
touchTab = await driver.waitForElementByAccessibilityId('潮童',5000);
await touchTab.click();
touchTab = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[1]',5000);
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('男装',5000);
await touchTab.click();
await new Promise(r => {
setTimeout(() => {
... ...