Authored by 孟顺

Merge commit '80e2dee4' into develop

# Conflicts:
#	scene-types/scene-types.js
@@ -7,6 +7,7 @@ module.exports.iOS_TAB_CATEGORY = 'iOS_TAB_CATEGORY'; @@ -7,6 +7,7 @@ module.exports.iOS_TAB_CATEGORY = 'iOS_TAB_CATEGORY';
7 module.exports.iOS_TAB_GUANG = 'iOS_TAB_GUANG'; 7 module.exports.iOS_TAB_GUANG = 'iOS_TAB_GUANG';
8 module.exports.IOS_PRODUCT_DETAIL_GROUP = 'IOS_PRODUCT_DETAIL_GROUP'; 8 module.exports.IOS_PRODUCT_DETAIL_GROUP = 'IOS_PRODUCT_DETAIL_GROUP';
9 module.exports.iOS_TAB_UFOHOME = "iOS_TAB_UFOHOME"; 9 module.exports.iOS_TAB_UFOHOME = "iOS_TAB_UFOHOME";
  10 +module.exports.iOS_TAB_MINE = 'iOS_TAB_MINE';
10 11
11 module.exports.ANDROID_TAB_HOME = 'ANDROID_TAB_HOME'; 12 module.exports.ANDROID_TAB_HOME = 'ANDROID_TAB_HOME';
12 module.exports.ANDROID_TAB_CATEGORY = 'ANDROID_TAB_CATEGORY'; 13 module.exports.ANDROID_TAB_CATEGORY = 'ANDROID_TAB_CATEGORY';
@@ -6,11 +6,15 @@ module.exports = { @@ -6,11 +6,15 @@ module.exports = {
6 [iOS_BUSINESS_SHOPPING]:[ 6 [iOS_BUSINESS_SHOPPING]:[
7 { op: 'YB_SHOW_GLOBAL_SHOPCART', name: '全球购购物车', types: {GOODS_LIST: Array, SOLD_OUT_GOODS_LIST: Array}}, 7 { op: 'YB_SHOW_GLOBAL_SHOPCART', name: '全球购购物车', types: {GOODS_LIST: Array, SOLD_OUT_GOODS_LIST: Array}},
8 { op: 'YB_CHOOSE_FOR_YOU', name: "看了此商品的人还买了", equals: { CART_TYPE: "1", REC_POSE: '100041'}}, 8 { op: 'YB_CHOOSE_FOR_YOU', name: "看了此商品的人还买了", equals: { CART_TYPE: "1", REC_POSE: '100041'}},
9 - { op: 'YB_CHOOSE_FOR_YOU', name: "*[预售]看了此商品的人还买了", equals: { CART_TYPE: "2", REC_POSE: '100041' }}, 9 + //预售商品
  10 + // { op: 'YB_CHOOSE_FOR_YOU', name: "*[预售]看了此商品的人还买了", equals: { CART_TYPE: "2", REC_POSE: '100041' }},
10 { op: 'YB_CHOOSE_FOR_YOU', name: "购物车猜你喜欢", equals: { REC_POSE: '100003'}}, 11 { op: 'YB_CHOOSE_FOR_YOU', name: "购物车猜你喜欢", equals: { REC_POSE: '100003'}},
11 { op: 'YB_SC_MOD_ADD', name: "增加商品数量"}, 12 { op: 'YB_SC_MOD_ADD', name: "增加商品数量"},
12 { op: 'YB_SC_MOD_SUB', name: "减少商品数量"}, 13 { op: 'YB_SC_MOD_SUB', name: "减少商品数量"},
13 { op: 'YB_SC_EDIT', name: "编辑"}, 14 { op: 'YB_SC_EDIT', name: "编辑"},
14 // { op: 'YB_GDS_DT_SEL', name: "购物车内直接购买"}, 15 // { op: 'YB_GDS_DT_SEL', name: "购物车内直接购买"},
  16 + { op: 'YB_SHOW_EVENT', name: "商品列表曝光"},
  17 + { op: 'YB_SC_TOPAY', name:'购物车结算'},
  18 + { op: 'YB_SC_ORD', name:'购物车提交订单成功'},
15 ] 19 ]
16 }; 20 };
@@ -7,15 +7,13 @@ describe(iOS_BUSINESS_SHOPPING,'购物车', async(driver) => { @@ -7,15 +7,13 @@ describe(iOS_BUSINESS_SHOPPING,'购物车', async(driver) => {
7 let touchTab = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther[4]',5000); 7 let touchTab = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther[4]',5000);
8 await touchTab.click(); 8 await touchTab.click();
9 9
  10 + // driver.execute('mobile: scroll', {direction: 'down', element: element.value.'BF000000-0000-0000-922D-000000000000'});
  11 + // await driver.sleep(3000);
  12 +
10 touchTab = await driver.waitForElementByAccessibilityId('select',3000);//单选 13 touchTab = await driver.waitForElementByAccessibilityId('select',3000);//单选
11 await touchTab.click(); 14 await touchTab.click();
12 15
13 - // touchTab = await driver.waitForElementByAccessibilityId('selectAll',3000);//全选  
14 - // await touchTab.click();  
15 -  
16 - // touchTab = await driver.waitForElementByAccessibilityId('mealSelect',3000);//套餐  
17 - // await touchTab.click();  
18 - 16 + //'selectAll' 全选 'mealSelect' 套餐
19 touchTab = await driver.waitForElementByAccessibilityId('editCart',5000);//编辑 17 touchTab = await driver.waitForElementByAccessibilityId('editCart',5000);//编辑
20 await touchTab.click(); 18 await touchTab.click();
21 19
@@ -34,16 +32,24 @@ describe(iOS_BUSINESS_SHOPPING,'购物车', async(driver) => { @@ -34,16 +32,24 @@ describe(iOS_BUSINESS_SHOPPING,'购物车', async(driver) => {
34 touchTab = await driver.waitForElementByAccessibilityId('确定', 2000);//下单 32 touchTab = await driver.waitForElementByAccessibilityId('确定', 2000);//下单
35 await touchTab.click(); 33 await touchTab.click();
36 34
37 - ////XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeTable/XCUIElementTypeCell[3]  
38 - touchTab = await driver.waitForElementByAccessibilityId('yh_paymentcenter_checked', 2000);//下单 35 + touchTab = await driver.waitForElementByAccessibilityId('shared back icon', 2000);//返回
39 await touchTab.click(); 36 await touchTab.click();
40 37
41 - touchTab = await driver.waitForElementByAccessibilityId('支 付', 2000);//下单 38 + touchTab = await driver.waitForElementByAccessibilityId('确认离开', 2000);//返回
42 await touchTab.click(); 39 await touchTab.click();
43 40
  41 + touchTab = await driver.waitForElementByAccessibilityId('shared back icon', 2000);//返回
  42 + await touchTab.click();
  43 + ////XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeTable/XCUIElementTypeCell[3]
  44 + // touchTab = await driver.waitForElementByAccessibilityId('yh_paymentcenter_checked', 2000);//下单
  45 + // await touchTab.click();
  46 +
  47 + // touchTab = await driver.waitForElementByAccessibilityId('支 付', 2000);//拉起支付
  48 + // await touchTab.click();
  49 +
44 await new Promise(r => { 50 await new Promise(r => {
45 setTimeout(() => { 51 setTimeout(() => {
46 r() 52 r()
47 - }, 2000); 53 + }, 3000);
48 }) 54 })
49 }); 55 });
@@ -3,9 +3,35 @@ const {describe} = require('../../libs/driver'); @@ -3,9 +3,35 @@ const {describe} = require('../../libs/driver');
3 const {iOS_TAB_MINE} = require('../../scene-types/scene-types'); 3 const {iOS_TAB_MINE} = require('../../scene-types/scene-types');
4 4
5 describe(iOS_TAB_MINE,'我的', async(driver) => { 5 describe(iOS_TAB_MINE,'我的', async(driver) => {
6 - let touchTab = await driver.waitForElementByAccessibilityId('ufoBannerBg',10000); 6 +
  7 + let touchTab = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[5]',6000);
  8 + await touchTab.click();
  9 +
  10 + 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);
  11 + await touchTab.click();
  12 +
  13 + touchTab = await driver.waitForElementByAccessibilityId('shared back icon', 2000);
  14 + await touchTab.click();
  15 +
  16 + 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);
  17 + await touchTab.click();
  18 +
  19 + touchTab = await driver.waitForElementByAccessibilityId('我的收入', 2000);
  20 + await touchTab.click();
  21 +
  22 + touchTab = await driver.waitForElementByAccessibilityId('market back', 2000);
  23 + await touchTab.click();
  24 +
  25 + touchTab = await driver.waitForElementByAccessibilityId('商家入驻', 2000);
  26 + await touchTab.click();
  27 +
  28 + let element = await driver.elementsByAccessibilityId("完善信息");
  29 + if (await element.isDisplayed()){
  30 + touchTab = await driver.waitForElementByAccessibilityId('完善信息');
7 await touchTab.click(); 31 await touchTab.click();
  32 + }
8 33
9 - touchTab = await driver.waitForElementByAccessibilityId('cpsBannerBg',5000); 34 + touchTab = await driver.waitForElementByAccessibilityId('market back', 2000);
10 await touchTab.click(); 35 await touchTab.click();
  36 +
11 }); 37 });