Authored by 孟顺

品类埋点修改

... ... @@ -12,10 +12,10 @@ module.exports = {
{ op: 'YB_SHOW_CATEGORY', name: '展示品类列表', types: { DATA: Array } },
{ op: 'YB_PAGE_ENTER', name: '进入品类商品列表页', equals: { PAGE_ID: 'plsplb' } },
{
op: 'YB_GDS_LIST', name: '品类列表页', validate: (log) => {
return log.param.ENT_ID.length > 0 && log.param.ENT_TYP == 4;
}
},
// {
// op: 'YB_GDS_LIST', name: '品类列表页', validate: (log) => {
// return log.param.ENT_ID.length > 0 && log.param.ENT_TYP == 4;
// }
// },
]
};
\ No newline at end of file
... ...
... ... @@ -5,38 +5,71 @@ const { FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME } = require('../../config/constan
describe(iOS_TAB_CATEGORY,'分类(品类&品牌)', async(driver) => {
//点击首页的tab bar 分类按钮
let tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[2]', 10000);
let tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[2]', FIND_VIEW_OVER_TIME);
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[2]/XCUIElementTypeTable/XCUIElementTypeCell[2]', 3000);
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('YH_LeftCategoryView_1', FIND_VIEW_OVER_TIME);
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[2]/XCUIElementTypeTable/XCUIElementTypeCell[3]', 3000);
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('YH_LeftCategoryView_2', FIND_VIEW_OVER_TIME);
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[2]/XCUIElementTypeTable/XCUIElementTypeCell[4]', 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[1]/XCUIElementTypeCollectionView/XCUIElementTypeCell[2]', 3000);
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('YH_LeftCategoryView_3', FIND_VIEW_OVER_TIME);
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[1]/XCUIElementTypeCollectionView/XCUIElementTypeCell[3]', 3000);
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_2', FIND_VIEW_OVER_TIME);
await tapView.click();
//选择 女装点击
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_1', FIND_VIEW_OVER_TIME);
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[1]/XCUIElementTypeCollectionView/XCUIElementTypeCell[4]', 3000);
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_3', FIND_VIEW_OVER_TIME);
await tapView.click();
//选择 高街BLK点击
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[5]', 3000);
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_4', FIND_VIEW_OVER_TIME);
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[1]/XCUIElementTypeCollectionView/XCUIElementTypeCell[1]', 3000);
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_0', FIND_VIEW_OVER_TIME);
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 driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('yh_categoryCell_1', FIND_VIEW_OVER_TIME);
await tapView.click();
console.log("回到品类首页");
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
tapView.click();
console.log("点击品牌");
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('yh_brand_nav_btn', FIND_VIEW_OVER_TIME);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_2', FIND_VIEW_OVER_TIME);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_4', FIND_VIEW_OVER_TIME);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_3', FIND_VIEW_OVER_TIME);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_1', FIND_VIEW_OVER_TIME);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_0', FIND_VIEW_OVER_TIME);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
tapView = await driver.waitForElementByAccessibilityId('yh_category_nav_btn', FIND_VIEW_OVER_TIME);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
});
\ No newline at end of file
... ...
... ... @@ -20,8 +20,8 @@ describe(iOS_TAB_UFOHOME, "球鞋市集", async (driver) => {
tapView = await driver.waitForElementByAccessibilityId('yh_search_vc_search', FIND_VIEW_OVER_TIME);
tapView.sendKeys('ufo');
await driver.sleep(ACTION_PAUSE_TIME);
console.log("点击UFO");
tapView = await driver.waitForElementByXPath('//XCUIElementTypeStaticText[@name="ufo"]', FIND_VIEW_OVER_TIME);
console.log("点击搜索");
tapView = await driver.waitForElementByAccessibilityId('Search', FIND_VIEW_OVER_TIME);
tapView.click();
// await driver.sleep(ACTION_PAUSE_TIME);
// console.log("点击UFO店铺");
... ... @@ -39,7 +39,7 @@ describe(iOS_TAB_UFOHOME, "球鞋市集", async (driver) => {
console.log("点击收藏");
tapView = await driver.waitForElementByAccessibilityId('yh_ufo_prd_detail_collect_btn', FIND_VIEW_OVER_TIME);
tapView.click();
await driver.sleep(ACTION_PAUSE_TIME);
await driver.sleep(4000);
console.log("取消收藏");
tapView = await driver.waitForElementByAccessibilityId('yh_ufo_prd_detail_collect_btn', FIND_VIEW_OVER_TIME);
tapView.click();
... ...