

import React from 'react';
import { mount } from 'enzyme';
import renderer from 'react-test-renderer';
import { DoubleSelect } from '../DoubleSelect'

const originOptions = [{"id":1,"parentIndustryId":"0","industryId":"01","industryName":"电商平台"},{"id":2,"parentIndustryId":"0","industryId":"02","industryName":"招商加盟"},{"id":3,"parentIndustryId":"0","industryId":"03","industryName":"婚恋"},{"id":4,"parentIndustryId":"0","industryId":"04","industryName":"教育"},{"id":5,"parentIndustryId":"0","industryId":"05","industryName":"金融"},{"id":6,"parentIndustryId":"0","industryId":"06","industryName":"旅游"},{"id":7,"parentIndustryId":"0","industryId":"07","industryName":"护肤彩妆"},{"id":11,"parentIndustryId":"0","industryId":"11","industryName":"食品"},{"id":15,"parentIndustryId":"0","industryId":"15","industryName":"箱包"},{"id":16,"parentIndustryId":"0","industryId":"16","industryName":"运动户外"},{"id":17,"parentIndustryId":"0","industryId":"17","industryName":"珠宝钟表"},{"id":20,"parentIndustryId":"0","industryId":"20","industryName":"医疗健康"},{"id":22,"parentIndustryId":"0","industryId":"21","industryName":"商务服务"},{"id":24,"parentIndustryId":"0","industryId":"23","industryName":"亲子"},{"id":26,"parentIndustryId":"0","industryId":"25","industryName":"生活服务"},{"id":27,"parentIndustryId":"0","industryId":"26","industryName":"法律服务"},{"id":28,"parentIndustryId":"0","industryId":"27","industryName":"房地产"},{"id":29,"parentIndustryId":"0","industryId":"28","industryName":"交通运输"},{"id":31,"parentIndustryId":"0","industryId":"30","industryName":"节能环保"},{"id":32,"parentIndustryId":"0","industryId":"31","industryName":"安全安保"},{"id":35,"parentIndustryId":"0","industryId":"34","industryName":"家居装修建材"},{"id":36,"parentIndustryId":"0","industryId":"35","industryName":"通讯虚拟"},{"id":37,"parentIndustryId":"0","industryId":"36","industryName":"日用百货"},{"id":38,"parentIndustryId":"0","industryId":"37","industryName":"彩票"},{"id":39,"parentIndustryId":"0","industryId":"38","industryName":"机构协会"},{"id":40,"parentIndustryId":"0","industryId":"39","industryName":"汽车"},{"id":41,"parentIndustryId":"0","industryId":"40","industryName":"网站门户"},{"id":42,"parentIndustryId":"0","industryId":"41","industryName":"软件应用"},{"id":43,"parentIndustryId":"0","industryId":"42","industryName":"游戏"},{"id":87,"parentIndustryId":"01","industryId":"01001","industryName":"综合电商"},{"id":88,"parentIndustryId":"01","industryId":"01002","industryName":"返利平台"},{"id":89,"parentIndustryId":"02","industryId":"02001","industryName":"美容减肥"},{"id":90,"parentIndustryId":"02","industryId":"02002","industryName":"餐饮服务"},{"id":91,"parentIndustryId":"02","industryId":"02003","industryName":"教育培训"},{"id":92,"parentIndustryId":"02","industryId":"02004","industryName":"成人用品"},{"id":93,"parentIndustryId":"02","industryId":"02005","industryName":"医药保健"},{"id":94,"parentIndustryId":"02","industryId":"02006","industryName":"汽车产品"},{"id":95,"parentIndustryId":"02","industryId":"02007","industryName":"招商加盟平台"},{"id":96,"parentIndustryId":"03","industryId":"03001","industryName":"婚恋交友"},{"id":97,"parentIndustryId":"03","industryId":"03002","industryName":"婚庆服务"},{"id":98,"parentIndustryId":"04","industryId":"04001","industryName":"学历教育机构"},{"id":99,"parentIndustryId":"04","industryId":"04002","industryName":"学历教育平台"},{"id":101,"parentIndustryId":"04","industryId":"04004","industryName":"非学历教育平台"},{"id":103,"parentIndustryId":"05","industryId":"05002","industryName":"基金"},{"id":104,"parentIndustryId":"05","industryId":"05003","industryName":"证券"},{"id":106,"parentIndustryId":"05","industryId":"05005","industryName":"银行服务"},{"id":107,"parentIndustryId":"05","industryId":"05006","industryName":"保险"},{"id":108,"parentIndustryId":"05","industryId":"05007","industryName":"贵金属"},{"id":109,"parentIndustryId":"05","industryId":"05008","industryName":"典当"},{"id":110,"parentIndustryId":"05","industryId":"05009","industryName":"担保"},{"id":111,"parentIndustryId":"05","industryId":"05010","industryName":"p2p网贷平台"},{"id":112,"parentIndustryId":"05","industryId":"05011","industryName":"投资咨询"},{"id":113,"parentIndustryId":"05","industryId":"05012","industryName":"信托"},{"id":114,"parentIndustryId":"05","industryId":"05013","industryName":"资产管理"},{"id":115,"parentIndustryId":"05","industryId":"05014","industryName":"标准金融"},{"id":116,"parentIndustryId":"05","industryId":"05015","industryName":"大宗商品交易/现货"},{"id":117,"parentIndustryId":"05","industryId":"05016","industryName":"金融综合线上平台"},{"id":118,"parentIndustryId":"05","industryId":"05017","industryName":"第三方支付"},{"id":119,"parentIndustryId":"06","industryId":"06001","industryName":"酒店住宿"},{"id":122,"parentIndustryId":"06","industryId":"06004","industryName":"旅行社"},{"id":123,"parentIndustryId":"06","industryId":"06005","industryName":"景点/景区门票"},{"id":124,"parentIndustryId":"06","industryId":"06006","industryName":"OTA线上平台"},{"id":125,"parentIndustryId":"07","industryId":"07001","industryName":"非特殊用户化妆品-保养护肤"},{"id":126,"parentIndustryId":"07","industryId":"07002","industryName":"非特殊用户化妆品-美发护发"},{"id":127,"parentIndustryId":"07","industryId":"07003","industryName":"非特殊用户化妆品-香水"},{"id":128,"parentIndustryId":"07","industryId":"07004","industryName":"非特殊用户化妆品-彩妆"},{"id":129,"parentIndustryId":"07","industryId":"07005","industryName":"特殊用途化妆品"},{"id":147,"parentIndustryId":"11","industryId":"11001","industryName":"休闲食品"},{"id":149,"parentIndustryId":"11","industryId":"11003","industryName":"粮油调味速食"},{"id":153,"parentIndustryId":"11","industryId":"11007","industryName":"饮品"},{"id":154,"parentIndustryId":"11","industryId":"11008","industryName":"生鲜"},{"id":155,"parentIndustryId":"11","industryId":"11009","industryName":"酒水"},{"id":173,"parentIndustryId":"15","industryId":"15001","industryName":"女包"},{"id":174,"parentIndustryId":"15","industryId":"15002","industryName":"男包"},{"id":175,"parentIndustryId":"15","industryId":"15003","industryName":"功能箱包"},{"id":178,"parentIndustryId":"16","industryId":"16003","industryName":"户外装备"},{"id":180,"parentIndustryId":"16","industryId":"16005","industryName":"健身器械"},{"id":182,"parentIndustryId":"17","industryId":"17001","industryName":"珠宝"},{"id":183,"parentIndustryId":"17","industryId":"17002","industryName":"钟表"},{"id":193,"parentIndustryId":"20","industryId":"20004","industryName":"保健用品"},{"id":194,"parentIndustryId":"20","industryId":"20005","industryName":"保健食品"},{"id":195,"parentIndustryId":"20","industryId":"20006","industryName":"美容减肥保健用品"},{"id":196,"parentIndustryId":"20","industryId":"20007","industryName":"美容减肥保健食品"},{"id":197,"parentIndustryId":"21","industryId":"21001","industryName":"策划咨询"},{"id":198,"parentIndustryId":"21","industryId":"21002","industryName":"对公代理服务"},{"id":199,"parentIndustryId":"21","industryId":"21003","industryName":"财务税务"},{"id":201,"parentIndustryId":"21","industryId":"21005","industryName":"出国服务"},{"id":202,"parentIndustryId":"21","industryId":"21006","industryName":"调查"},{"id":203,"parentIndustryId":"21","industryId":"21007","industryName":"拍卖"},{"id":204,"parentIndustryId":"21","industryId":"21008","industryName":"公关"},{"id":205,"parentIndustryId":"21","industryId":"21009","industryName":"配音"},{"id":206,"parentIndustryId":"21","industryId":"21010","industryName":"翻译"},{"id":207,"parentIndustryId":"21","industryId":"21011","industryName":"布景会展"},{"id":212,"parentIndustryId":"23","industryId":"23001","industryName":"育儿社区（孕期/胎教/优生）"},{"id":213,"parentIndustryId":"23","industryId":"23002","industryName":"童装童鞋"},{"id":214,"parentIndustryId":"23","industryId":"23003","industryName":"母婴用品"},{"id":216,"parentIndustryId":"23","industryId":"23005","industryName":"婴幼儿食品"},{"id":228,"parentIndustryId":"25","industryId":"25001","industryName":"家政服务"},{"id":229,"parentIndustryId":"25","industryId":"25002","industryName":"餐饮美食"},{"id":230,"parentIndustryId":"25","industryId":"25003","industryName":"美容美发"},{"id":231,"parentIndustryId":"25","industryId":"25004","industryName":"运动健身"},{"id":232,"parentIndustryId":"25","industryId":"25005","industryName":"休闲娱乐"},{"id":235,"parentIndustryId":"25","industryId":"25008","industryName":"演出票务"},{"id":236,"parentIndustryId":"25","industryId":"25009","industryName":"卡券消费"},{"id":237,"parentIndustryId":"25","industryId":"25010","industryName":"百货商店"},{"id":239,"parentIndustryId":"25","industryId":"25012","industryName":"开锁"},{"id":240,"parentIndustryId":"25","industryId":"25013","industryName":"物流服务"},{"id":242,"parentIndustryId":"25","industryId":"25015","industryName":"物业服务"},{"id":243,"parentIndustryId":"26","industryId":"26001","industryName":"司法鉴定"},{"id":244,"parentIndustryId":"26","industryId":"26002","industryName":"律师事务所"},{"id":245,"parentIndustryId":"26","industryId":"26003","industryName":"公证"},{"id":246,"parentIndustryId":"27","industryId":"27001","industryName":"房地产开发商"},{"id":247,"parentIndustryId":"27","industryId":"27002","industryName":"房地产个人交易租赁"},{"id":248,"parentIndustryId":"27","industryId":"27003","industryName":"房地产中介"},{"id":253,"parentIndustryId":"28","industryId":"28005","industryName":"航空服务"},{"id":254,"parentIndustryId":"28","industryId":"28006","industryName":"铁路服务"},{"id":255,"parentIndustryId":"28","industryId":"28007","industryName":"公路服务"},{"id":260,"parentIndustryId":"30","industryId":"30001","industryName":"污染处理"},{"id":261,"parentIndustryId":"30","industryId":"30002","industryName":"废旧回收"},{"id":262,"parentIndustryId":"30","industryId":"30003","industryName":"节能设备"},{"id":263,"parentIndustryId":"30","industryId":"30004","industryName":"环保设备"},{"id":264,"parentIndustryId":"30","industryId":"30005","industryName":"环境评测"},{"id":265,"parentIndustryId":"31","industryId":"31001","industryName":"防盗报警"},{"id":266,"parentIndustryId":"31","industryId":"31002","industryName":"保安安保"},{"id":267,"parentIndustryId":"31","industryId":"31003","industryName":"警用装备"},{"id":268,"parentIndustryId":"31","industryId":"31004","industryName":"门禁考勤"},{"id":269,"parentIndustryId":"31","industryId":"31005","industryName":"交通消防"},{"id":272,"parentIndustryId":"34","industryId":"34001","industryName":"家装建材"},{"id":273,"parentIndustryId":"34","industryId":"34002","industryName":"家具"},{"id":274,"parentIndustryId":"34","industryId":"34003","industryName":"家居饰品"},{"id":275,"parentIndustryId":"34","industryId":"34004","industryName":"家纺布艺"},{"id":277,"parentIndustryId":"34","industryId":"34006","industryName":"装修与设计"},{"id":278,"parentIndustryId":"35","industryId":"35001","industryName":"通信运营商"},{"id":279,"parentIndustryId":"35","industryId":"35002","industryName":"游戏充值"},{"id":280,"parentIndustryId":"35","industryId":"35003","industryName":"增值服务"},{"id":282,"parentIndustryId":"36","industryId":"36002","industryName":"家居日用"},{"id":283,"parentIndustryId":"36","industryId":"36003","industryName":"厨具"},{"id":284,"parentIndustryId":"36","industryId":"36004","industryName":"洗护用具"},{"id":285,"parentIndustryId":"37","industryId":"37001","industryName":"彩票"},{"id":286,"parentIndustryId":"38","industryId":"38001","industryName":"境内政府机关"},{"id":288,"parentIndustryId":"40","industryId":"40001","industryName":"新闻门户资讯社区"},{"id":289,"parentIndustryId":"41","industryId":"41001","industryName":"办公软件"},{"id":290,"parentIndustryId":"41","industryId":"41002","industryName":"系统软件"},{"id":292,"parentIndustryId":"41","industryId":"41004","industryName":"影音娱乐阅读"},{"id":293,"parentIndustryId":"41","industryId":"41005","industryName":"摄影摄像"},{"id":294,"parentIndustryId":"41","industryId":"41006","industryName":"天气日历"},{"id":295,"parentIndustryId":"41","industryId":"41007","industryName":"社交"},{"id":296,"parentIndustryId":"41","industryId":"41008","industryName":"网络电话"},{"id":297,"parentIndustryId":"41","industryId":"41009","industryName":"网络直播"},{"id":299,"parentIndustryId":"42","industryId":"42001","industryName":"角色扮演"},{"id":300,"parentIndustryId":"42","industryId":"42002","industryName":"策略"},{"id":301,"parentIndustryId":"42","industryId":"42003","industryName":"体育"},{"id":302,"parentIndustryId":"42","industryId":"42004","industryName":"棋牌"},{"id":303,"parentIndustryId":"42","industryId":"42005","industryName":"音乐"},{"id":304,"parentIndustryId":"42","industryId":"42006","industryName":"模拟经营"},{"id":305,"parentIndustryId":"42","industryId":"42007","industryName":"休闲"},{"id":306,"parentIndustryId":"42","industryId":"42008","industryName":"益智"},{"id":307,"parentIndustryId":"42","industryId":"42009","industryName":"射击"},{"id":308,"parentIndustryId":"42","industryId":"42010","industryName":"养成"},{"id":309,"parentIndustryId":"42","industryId":"42011","industryName":"格斗"},{"id":310,"parentIndustryId":"42","industryId":"42012","industryName":"冒险"},{"id":311,"parentIndustryId":"42","industryId":"42013","industryName":"卡牌"},{"id":312,"parentIndustryId":"42","industryId":"42014","industryName":"竞速"},{"id":313,"parentIndustryId":"42","industryId":"42015","industryName":"综合游戏平台"},{"id":2397,"parentIndustryId":"01","industryId":"01003","industryName":"电商导购"},{"id":2398,"parentIndustryId":"02","industryId":"02008","industryName":"生活服务"},{"id":2399,"parentIndustryId":"02","industryId":"02009","industryName":"养殖加盟"},{"id":2400,"parentIndustryId":"02","industryId":"02010","industryName":"服饰礼品"},{"id":2401,"parentIndustryId":"03","industryId":"03003","industryName":"婚纱摄影"},{"id":2402,"parentIndustryId":"03","industryId":"03004","industryName":"婚纱礼服"},{"id":2403,"parentIndustryId":"04","industryId":"04005","industryName":"基础教育（非学历机构）"},{"id":2404,"parentIndustryId":"04","industryId":"04006","industryName":"职业教育（非学历机构）"},{"id":2405,"parentIndustryId":"04","industryId":"04007","industryName":"语言培训（非学历机构）"},{"id":2406,"parentIndustryId":"04","industryId":"04008","industryName":"学历培训（非学历机构）"},{"id":2407,"parentIndustryId":"04","industryId":"04009","industryName":"才艺培训"},{"id":2408,"parentIndustryId":"04","industryId":"04010","industryName":"教学辅助工具"},{"id":2409,"parentIndustryId":"04","industryId":"04011","industryName":"留学出国"},{"id":2410,"parentIndustryId":"04","industryId":"04012","industryName":"早期教育"},{"id":2411,"parentIndustryId":"05","industryId":"05018","industryName":"信用卡"},{"id":2412,"parentIndustryId":"05","industryId":"05019","industryName":"小额贷款"},{"id":2413,"parentIndustryId":"05","industryId":"05020","industryName":"汽车金融"},{"id":2414,"parentIndustryId":"05","industryId":"05021","industryName":"期货期权"},{"id":2415,"parentIndustryId":"05","industryId":"05022","industryName":"外汇"},{"id":2416,"parentIndustryId":"05","industryId":"05023","industryName":"征信机构"},{"id":2417,"parentIndustryId":"05","industryId":"05024","industryName":"商业保理"},{"id":2418,"parentIndustryId":"05","industryId":"05025","industryName":"金融辅助工具"},{"id":2419,"parentIndustryId":"06","industryId":"06007","industryName":"旅游局"},{"id":2420,"parentIndustryId":"07","industryId":"07006","industryName":"美容工具"},{"id":2421,"parentIndustryId":"07","industryId":"07007","industryName":"护肤彩妆线上平台"},{"id":2422,"parentIndustryId":"11","industryId":"11014","industryName":"食品线上平台"},{"id":2423,"parentIndustryId":"15","industryId":"15004","industryName":"箱包线上平台"},{"id":2424,"parentIndustryId":"16","industryId":"16007","industryName":"体育用品"},{"id":2425,"parentIndustryId":"16","industryId":"16008","industryName":"运动户外线上平台"},{"id":2426,"parentIndustryId":"17","industryId":"17004","industryName":"珠宝钟表线上平台"},{"id":2427,"parentIndustryId":"20","industryId":"20008","industryName":"特殊保健品"},{"id":2428,"parentIndustryId":"20","industryId":"20009","industryName":"医疗线上平台"},{"id":2429,"parentIndustryId":"20","industryId":"20010","industryName":"健康资讯平台"},{"id":2430,"parentIndustryId":"20","industryId":"20011","industryName":"医疗科室"},{"id":2431,"parentIndustryId":"20","industryId":"20012","industryName":"心理健康"},{"id":2432,"parentIndustryId":"20","industryId":"20013","industryName":"药品交易"},{"id":2433,"parentIndustryId":"20","industryId":"20014","industryName":"药品生产研发"},{"id":2434,"parentIndustryId":"20","industryId":"20015","industryName":"药品信息"},{"id":2435,"parentIndustryId":"20","industryId":"20016","industryName":"医疗器械生产"},{"id":2436,"parentIndustryId":"20","industryId":"20017","industryName":"医疗器械销售"},{"id":2437,"parentIndustryId":"20","industryId":"20018","industryName":"假肢生产装配"},{"id":2438,"parentIndustryId":"20","industryId":"20019","industryName":"美容整形机构"},{"id":2439,"parentIndustryId":"20","industryId":"20020","industryName":"体检机构"},{"id":2440,"parentIndustryId":"21","industryId":"21012","industryName":"招聘猎头"},{"id":2441,"parentIndustryId":"21","industryId":"21013","industryName":"营销机构"},{"id":2442,"parentIndustryId":"21","industryId":"21014","industryName":"印刷"},{"id":2443,"parentIndustryId":"21","industryId":"21015","industryName":"广告包装"},{"id":2444,"parentIndustryId":"21","industryId":"21016","industryName":"建站服务"},{"id":2445,"parentIndustryId":"23","industryId":"23007","industryName":"孕期护理"},{"id":2446,"parentIndustryId":"23","industryId":"23008","industryName":"亲子线上平台"},{"id":2447,"parentIndustryId":"23","industryId":"23009","industryName":"儿童用品"},{"id":2448,"parentIndustryId":"25","industryId":"25016","industryName":"生活服务线上平台"},{"id":2449,"parentIndustryId":"25","industryId":"25017","industryName":"爱好收藏"},{"id":2450,"parentIndustryId":"25","industryId":"25018","industryName":"乐器"},{"id":2451,"parentIndustryId":"25","industryId":"25019","industryName":"鲜花植物"},{"id":2452,"parentIndustryId":"25","industryId":"25020","industryName":"宠物/宠物周边"},{"id":2453,"parentIndustryId":"25","industryId":"25021","industryName":"摄影写真"},{"id":2454,"parentIndustryId":"25","industryId":"25022","industryName":"出行服务"},{"id":2455,"parentIndustryId":"25","industryId":"25023","industryName":"出行票务预订"},{"id":2456,"parentIndustryId":"25","industryId":"25024","industryName":"搬家"},{"id":2457,"parentIndustryId":"25","industryId":"25025","industryName":"占卜起名"},{"id":2458,"parentIndustryId":"25","industryId":"25026","industryName":"非汽车交易"},{"id":2459,"parentIndustryId":"27","industryId":"27004","industryName":"房地产线上平台"},{"id":2460,"parentIndustryId":"28","industryId":"28008","industryName":"水路服务"},{"id":2461,"parentIndustryId":"34","industryId":"34007","industryName":"家具建材线上平台"},{"id":2462,"parentIndustryId":"35","industryId":"35004","industryName":"通信设备"},{"id":2463,"parentIndustryId":"36","industryId":"36005","industryName":"女性护理"},{"id":2464,"parentIndustryId":"36","industryId":"36006","industryName":"日用百货线上平台"},{"id":2465,"parentIndustryId":"36","industryId":"36007","industryName":"休闲玩具"},{"id":2466,"parentIndustryId":"36","industryId":"36008","industryName":"成人用品"},{"id":2467,"parentIndustryId":"38","industryId":"38002","industryName":"协会团体"},{"id":2468,"parentIndustryId":"38","industryId":"38003","industryName":"公益"},{"id":2469,"parentIndustryId":"38","industryId":"38004","industryName":"境外政府组织"},{"id":2470,"parentIndustryId":"39","industryId":"39002","industryName":"汽车线上平台"},{"id":2471,"parentIndustryId":"39","industryId":"39003","industryName":"车辆养护"},{"id":2472,"parentIndustryId":"39","industryId":"39004","industryName":"汽车用品"},{"id":2473,"parentIndustryId":"39","industryId":"39005","industryName":"汽车厂商"},{"id":2474,"parentIndustryId":"39","industryId":"39006","industryName":"二手车经营"},{"id":2475,"parentIndustryId":"39","industryId":"39007","industryName":"驾校"},{"id":2476,"parentIndustryId":"39","industryId":"39008","industryName":"汽车-4S店/经销商"},{"id":2477,"parentIndustryId":"41","industryId":"41011","industryName":"地图导航"},{"id":2478,"parentIndustryId":"41","industryId":"41012","industryName":"体育健康"},{"id":2479,"parentIndustryId":"42","industryId":"42016","industryName":"MOBA"},{"id":2480,"parentIndustryId":"0","industryId":"43","industryName":"服饰鞋帽"},{"id":2481,"parentIndustryId":"0","industryId":"44","industryName":"工业工程"},{"id":2482,"parentIndustryId":"0","industryId":"45","industryName":"农林牧渔"},{"id":2483,"parentIndustryId":"0","industryId":"46","industryName":"出版传媒"},{"id":2484,"parentIndustryId":"0","industryId":"47","industryName":"数码家电"},{"id":2485,"parentIndustryId":"43","industryId":"43001","industryName":"女装"},{"id":2486,"parentIndustryId":"43","industryId":"43002","industryName":"男装"},{"id":2487,"parentIndustryId":"43","industryId":"43003","industryName":"贴身内衣"},{"id":2488,"parentIndustryId":"43","industryId":"43004","industryName":"家居服饰"},{"id":2489,"parentIndustryId":"43","industryId":"43005","industryName":"服装配饰"},{"id":2490,"parentIndustryId":"43","industryId":"43006","industryName":"鞋类"},{"id":2491,"parentIndustryId":"43","industryId":"43007","industryName":"袜类"},{"id":2492,"parentIndustryId":"43","industryId":"43008","industryName":"帽类"},{"id":2493,"parentIndustryId":"43","industryId":"43009","industryName":"服饰鞋帽原料"},{"id":2494,"parentIndustryId":"43","industryId":"43010","industryName":"服饰鞋帽线上平台"},{"id":2495,"parentIndustryId":"44","industryId":"44001","industryName":"能源化工"},{"id":2496,"parentIndustryId":"44","industryId":"44002","industryName":"机械设备"},{"id":2497,"parentIndustryId":"44","industryId":"44003","industryName":"电子电工"},{"id":2498,"parentIndustryId":"45","industryId":"45001","industryName":"兽医兽药"},{"id":2499,"parentIndustryId":"45","industryId":"45002","industryName":"农药化肥"},{"id":2500,"parentIndustryId":"45","industryId":"45003","industryName":"种植养殖"},{"id":2501,"parentIndustryId":"45","industryId":"45004","industryName":"园林景观"},{"id":2502,"parentIndustryId":"46","industryId":"46001","industryName":"书籍杂志"},{"id":2503,"parentIndustryId":"46","industryId":"46002","industryName":"音像影视"},{"id":2504,"parentIndustryId":"46","industryId":"46003","industryName":"电视电台"},{"id":2505,"parentIndustryId":"47","industryId":"47001","industryName":"电脑"},{"id":2506,"parentIndustryId":"47","industryId":"47002","industryName":"手机"},{"id":2507,"parentIndustryId":"47","industryId":"47003","industryName":"摄影摄像设备"},{"id":2508,"parentIndustryId":"47","industryId":"47004","industryName":"数码配件"},{"id":2509,"parentIndustryId":"47","industryId":"47005","industryName":"影音设备"},{"id":2510,"parentIndustryId":"47","industryId":"47006","industryName":"办公设备"},{"id":2511,"parentIndustryId":"47","industryId":"47007","industryName":"电子教育"},{"id":2512,"parentIndustryId":"47","industryId":"47008","industryName":"智能设备"},{"id":2513,"parentIndustryId":"47","industryId":"47009","industryName":"大家电"},{"id":2514,"parentIndustryId":"47","industryId":"47010","industryName":"生活电器"},{"id":2515,"parentIndustryId":"47","industryId":"47011","industryName":"数码家电线上平台"},{"id":2516,"parentIndustryId":"47","industryId":"47012","industryName":"电子游戏设备"}]
const industryOptipns = originOptions.map(item=>{
    if(item.parentIndustryId !== '0'){
        return false;
    }
    return {
        ...item,
        value:item.id,
        name:item.industryName,
        children: originOptions.filter(i=>i.parentIndustryId === item.industryId).map( i=>{
            return {
                ...i,
                value: i.id,
                name: i.industryName,
                parent:item,
            }
        })
    }
}).filter(e=>e) as any


describe('DoubleSelect', () => {

    it('Snapshot',()=>{
        const component = renderer.create(<DoubleSelect
            initCheck
            options={industryOptipns}
        />)
        let snapshot = component.toJSON();
        expect(snapshot).toMatchSnapshot();
    })

    it('Select and onChange',()=>{
        const onChange = jest.fn();
        const wrapper = mount(
            <DoubleSelect onChange={onChange} options={industryOptipns}/>
        );
        //click parent
        wrapper.find('.ant-select-selection').at(0).simulate('click');
        const parent = wrapper.find('.ant-select-dropdown-menu li').at(4)
        expect(parent.text()).toBe('金融');
        parent.simulate('click');
        const parentTarget = industryOptipns.find(e=>e.name==='金融')
        const value = onChange.mock.calls[0][0]
        expect(value).toStrictEqual([parentTarget.value,parentTarget.children[0].value]);
    })

})
