Authored by 孟顺

Merge commit '34f4e117' into develop

... ... @@ -3,5 +3,18 @@ const {
} = require('../../scene-types/scene-types');
module.exports = {
[iOS_TAB_MINE]:[]
[iOS_TAB_MINE]:[
{op: 'UFO_MY_ITEM_C', name: '我的收入'},
{op: 'UFO_MY_ITEM_C', name: '商家入驻'},
{op: 'UFO_MY_ITEM_C', name: '新的好物'},
{op: 'YB_PAGE_ENTER', name: '新的好物载入'},
{op: 'YB_PAGE_EXIT', name: '新的好物载出'},
{op: 'YB_PAGE_ENTER', name: '商家入驻载入'},
{op: 'YB_PAGE_EXIT', name: '商家入驻载出'},
{op: 'YB_PAGE_ENTER', name: '我的收入载入'},
{op: 'YB_PAGE_EXIT', name: '我的收入载出'},
{op: 'YB_PAGE_ENTER', name: 'UFO载入'},
{op: 'YB_PAGE_ENTER', name: 'UFO载出'},
{op: 'YB_H5_PAGE_OPEN_', name: '新的好物url'},
]
};
\ No newline at end of file
... ...
const wd = require('wd');
const {describe} = require('../../libs/driver');
const { FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME } = require('../../config/constant');
const {iOS_TAB_MINE} = require('../../scene-types/scene-types');
describe(iOS_TAB_MINE,'我的', async(driver) => {
let touchTab = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[5]',6000);
let touchTab = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[5]',FIND_VIEW_OVER_TIME);
await touchTab.click();
touchTab = await driver.waitForElementByXPath('/XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeCollectionView/XCUIElementTypeCell[7]/XCUIElementTypeOther/XCUIElementTypeOther[1]',2000);
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByXPath('/XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeCollectionView/XCUIElementTypeCell[7]/XCUIElementTypeOther/XCUIElementTypeOther[1]',FIND_VIEW_OVER_TIME);
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', 2000);
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
await touchTab.click();
touchTab = await driver.waitForElementByXPath('/XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeCollectionView/XCUIElementTypeCell[7]/XCUIElementTypeOther/XCUIElementTypeOther[2]',2000);
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByXPath('/XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeCollectionView/XCUIElementTypeCell[7]/XCUIElementTypeOther/XCUIElementTypeOther[2]',FIND_VIEW_OVER_TIME);
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('我的收入', 2000);
touchTab = await driver.waitForElementByAccessibilityId('我的收入', FIND_VIEW_OVER_TIME);
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', 2000);
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
await touchTab.click();
touchTab = await driver.waitForElementByAccessibilityId('商家入驻', 2000);
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('商家入驻', FIND_VIEW_OVER_TIME);
await touchTab.click();
await driver.sleep(ACTION_PAUSE_TIME);
let element = await driver.elementsByAccessibilityId("完善信息");
if (await element.isDisplayed()){
// let isDisplayed = await element.isDisplayed();
// if (isDisplayed){
touchTab = await driver.waitForElementByAccessibilityId('完善信息');
await touchTab.click();
}
// }
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', 2000);
touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
await touchTab.click();
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('新的好物 没有你的好物?申请上架', FIND_VIEW_OVER_TIME);
await touchTab.click();
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
await touchTab.click();
await driver.sleep(ACTION_PAUSE_TIME);
touchTab = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
await touchTab.click();
await driver.sleep(ACTION_PAUSE_TIME);
});
\ No newline at end of file
... ...