Authored by 李犇

个人中心:有货有赚、球鞋交易——review by 陈林

const {
ANDROID_TAB_MINE
} = require('../../scene-types/scene-types');
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_MAIN_SHOW', name: '底部首页点击'},
{op: 'YB_PAGE_ENTER', name: '欢迎页载入', equals: { PAGE_ID: 'start' }},
{op: 'YB_PAGE_EXIT', 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_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_ENTER', name: '首页载入', equals: { PAGE_ID: 'sy' }},
{op: 'YB_PAGE_EXIT', name: '首页载出', equals: { PAGE_ID: 'sy' }},
{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上报'},
{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'}},
]
};
\ No newline at end of file
... ...
const wd = require('wd');
const {describe} = require('../../libs/driver');
const {ANDROID_TAB_MINE} = require('../../scene-types/scene-types');
const {FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME} = require('../../config/constant');
describe(ANDROID_TAB_MINE,'安卓个人中心', async(driver) => {
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
// 个人中心tab
touchTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_my_rl',10000);
await touchTab.click();
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
// 有货有赚
touchTab = await driver.waitForElementById('com.yoho:id/mine_center_ufo_union_first_layout',10000);
await touchTab.click();
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
// 返回个人中心
touchTab = await driver.waitForElementById('com.yoho:id/back_btn',10000);
await touchTab.click();
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
// 球鞋交易
touchTab = await driver.waitForElementById('com.yoho:id/mine_center_ufo_union_second_layout',10000);
await touchTab.click();
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
// 返回个人中心
touchTab = await driver.waitForElementById('com.yoho:id/back_btn',10000);
await touchTab.click();
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
});
\ No newline at end of file
... ...
... ... @@ -32,6 +32,7 @@ describe(ANDROID_MAINTAB_SWITCH,'安卓首页TAB切换', async(driver) => {
// 暂停
await driver.sleep(ACTION_PAUSE_TIME);
// UFO
touchTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_ufo_rl',10000);
await touchTab.click();
... ...