

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



const originOptions = [{"level":1,"cityLevel":-1,"name":"华北地区","parentId":"0","priority":1,"nodeId":"404"},{"level":1,"cityLevel":-1,"name":"东北地区","parentId":"0","priority":1,"nodeId":"405"},{"level":1,"cityLevel":-1,"name":"华东地区","parentId":"0","priority":1,"nodeId":"406"},{"level":1,"cityLevel":-1,"name":"华中地区","parentId":"0","priority":1,"nodeId":"407"},{"level":1,"cityLevel":-1,"name":"华南地区","parentId":"0","priority":1,"nodeId":"408"},{"level":1,"cityLevel":-1,"name":"西南地区","parentId":"0","priority":1,"nodeId":"409"},{"level":1,"cityLevel":-1,"name":"西北地区","parentId":"0","priority":1,"nodeId":"410"},{"level":1,"cityLevel":-1,"name":"港澳台","parentId":"0","priority":1,"nodeId":"411"},{"level":2,"cityLevel":-1,"name":"安徽省","parentId":"406","priority":1,"nodeId":"1"},{"level":2,"cityLevel":-1,"name":"澳门特别行政区","parentId":"411","priority":1,"nodeId":"19"},{"level":2,"cityLevel":-1,"name":"福建省","parentId":"406","priority":1,"nodeId":"22"},{"level":2,"cityLevel":-1,"name":"甘肃省","parentId":"410","priority":1,"nodeId":"32"},{"level":2,"cityLevel":-1,"name":"广东省","parentId":"408","priority":1,"nodeId":"47"},{"level":2,"cityLevel":-1,"name":"广西壮族自治区","parentId":"408","priority":1,"nodeId":"69"},{"level":2,"cityLevel":-1,"name":"贵州省","parentId":"409","priority":1,"nodeId":"84"},{"level":2,"cityLevel":-1,"name":"海南省","parentId":"408","priority":1,"nodeId":"94"},{"level":2,"cityLevel":-1,"name":"河北省","parentId":"404","priority":1,"nodeId":"114"},{"level":2,"cityLevel":-1,"name":"河南省","parentId":"407","priority":1,"nodeId":"126"},{"level":2,"cityLevel":-1,"name":"黑龙江省","parentId":"405","priority":1,"nodeId":"145"},{"level":2,"cityLevel":-1,"name":"湖北省","parentId":"407","priority":1,"nodeId":"159"},{"level":2,"cityLevel":-1,"name":"湖南省","parentId":"407","priority":1,"nodeId":"177"},{"level":2,"cityLevel":-1,"name":"吉林省","parentId":"405","priority":1,"nodeId":"192"},{"level":2,"cityLevel":-1,"name":"江苏省","parentId":"406","priority":1,"nodeId":"202"},{"level":2,"cityLevel":-1,"name":"江西省","parentId":"406","priority":1,"nodeId":"216"},{"level":2,"cityLevel":-1,"name":"辽宁省","parentId":"405","priority":1,"nodeId":"228"},{"level":2,"cityLevel":-1,"name":"内蒙古自治区","parentId":"404","priority":1,"nodeId":"243"},{"level":2,"cityLevel":-1,"name":"宁夏回族自治区","parentId":"410","priority":1,"nodeId":"256"},{"level":2,"cityLevel":-1,"name":"青海省","parentId":"410","priority":1,"nodeId":"262"},{"level":2,"cityLevel":-1,"name":"山东省","parentId":"406","priority":1,"nodeId":"271"},{"level":2,"cityLevel":-1,"name":"山西省","parentId":"404","priority":1,"nodeId":"290"},{"level":2,"cityLevel":-1,"name":"陕西省","parentId":"410","priority":1,"nodeId":"302"},{"level":2,"cityLevel":-1,"name":"四川省","parentId":"409","priority":1,"nodeId":"315"},{"level":2,"cityLevel":-1,"name":"西藏自治区","parentId":"409","priority":1,"nodeId":"339"},{"level":2,"cityLevel":-1,"name":"香港特别行政区","parentId":"411","priority":1,"nodeId":"348"},{"level":2,"cityLevel":-1,"name":"新疆维吾尔自治区","parentId":"410","priority":1,"nodeId":"349"},{"level":2,"cityLevel":-1,"name":"云南省","parentId":"409","priority":1,"nodeId":"372"},{"level":2,"cityLevel":-1,"name":"浙江省","parentId":"406","priority":1,"nodeId":"389"},{"level":2,"cityLevel":-1,"name":"台湾省","parentId":"411","priority":1,"nodeId":"403"},{"level":3,"cityLevel":-1,"name":"石家庄市","parentId":"114","priority":1,"nodeId":"121"},{"level":3,"cityLevel":-1,"name":"达州市","parentId":"315","priority":1,"nodeId":"333"},{"level":2,"cityLevel":0,"name":"北京市","parentId":"404","priority":1,"nodeId":"21"},{"level":2,"cityLevel":0,"name":"上海市","parentId":"406","priority":1,"nodeId":"314"},{"level":3,"cityLevel":0,"name":"深圳市","parentId":"47","priority":1,"nodeId":"57"},{"level":3,"cityLevel":0,"name":"广州市","parentId":"47","priority":1,"nodeId":"58"},{"level":2,"cityLevel":10,"name":"天津市","parentId":"404","priority":1,"nodeId":"338"},{"level":2,"cityLevel":10,"name":"重庆市","parentId":"409","priority":1,"nodeId":"402"},{"level":3,"cityLevel":10,"name":"东莞市","parentId":"47","priority":1,"nodeId":"60"},{"level":3,"cityLevel":10,"name":"郑州市","parentId":"126","priority":1,"nodeId":"131"},{"level":3,"cityLevel":10,"name":"武汉市","parentId":"159","priority":1,"nodeId":"175"},{"level":3,"cityLevel":10,"name":"长沙市","parentId":"177","priority":1,"nodeId":"188"},{"level":3,"cityLevel":10,"name":"南京市","parentId":"202","priority":1,"nodeId":"206"},{"level":3,"cityLevel":10,"name":"苏州市","parentId":"202","priority":1,"nodeId":"212"},{"level":3,"cityLevel":10,"name":"沈阳市","parentId":"228","priority":1,"nodeId":"239"},{"level":3,"cityLevel":10,"name":"青岛市","parentId":"271","priority":1,"nodeId":"280"},{"level":3,"cityLevel":10,"name":"西安市","parentId":"302","priority":1,"nodeId":"312"},{"level":3,"cityLevel":10,"name":"成都市","parentId":"315","priority":1,"nodeId":"336"},{"level":3,"cityLevel":10,"name":"昆明市","parentId":"372","priority":1,"nodeId":"375"},{"level":3,"cityLevel":10,"name":"杭州市","parentId":"389","priority":1,"nodeId":"393"},{"level":3,"cityLevel":10,"name":"宁波市","parentId":"389","priority":1,"nodeId":"394"},{"level":3,"cityLevel":20,"name":"合肥市","parentId":"1","priority":1,"nodeId":"16"},{"level":3,"cityLevel":20,"name":"厦门市","parentId":"22","priority":1,"nodeId":"23"},{"level":3,"cityLevel":20,"name":"泉州市","parentId":"22","priority":1,"nodeId":"29"},{"level":3,"cityLevel":20,"name":"福州市","parentId":"22","priority":1,"nodeId":"30"},{"level":3,"cityLevel":20,"name":"兰州市","parentId":"32","priority":1,"nodeId":"34"},{"level":3,"cityLevel":20,"name":"惠州市","parentId":"47","priority":1,"nodeId":"48"},{"level":3,"cityLevel":20,"name":"中山市","parentId":"47","priority":1,"nodeId":"51"},{"level":3,"cityLevel":20,"name":"佛山市","parentId":"47","priority":1,"nodeId":"55"},{"level":3,"cityLevel":20,"name":"珠海市","parentId":"47","priority":1,"nodeId":"67"},{"level":3,"cityLevel":20,"name":"南宁市","parentId":"69","priority":1,"nodeId":"82"},{"level":3,"cityLevel":20,"name":"贵阳市","parentId":"84","priority":1,"nodeId":"92"},{"level":3,"cityLevel":20,"name":"海口市","parentId":"94","priority":1,"nodeId":"96"},{"level":3,"cityLevel":20,"name":"哈尔滨市","parentId":"145","priority":1,"nodeId":"154"},{"level":3,"cityLevel":20,"name":"长春市","parentId":"192","priority":1,"nodeId":"197"},{"level":3,"cityLevel":20,"name":"常州市","parentId":"202","priority":1,"nodeId":"204"},{"level":3,"cityLevel":20,"name":"扬州市","parentId":"202","priority":1,"nodeId":"209"},{"level":3,"cityLevel":20,"name":"无锡市","parentId":"202","priority":1,"nodeId":"211"},{"level":3,"cityLevel":20,"name":"南通市","parentId":"202","priority":1,"nodeId":"213"},{"level":3,"cityLevel":20,"name":"徐州市","parentId":"202","priority":1,"nodeId":"214"},{"level":3,"cityLevel":20,"name":"南昌市","parentId":"216","priority":1,"nodeId":"226"},{"level":3,"cityLevel":20,"name":"大连市","parentId":"228","priority":1,"nodeId":"236"},{"level":3,"cityLevel":20,"name":"烟台市","parentId":"271","priority":1,"nodeId":"284"},{"level":3,"cityLevel":20,"name":"济南市","parentId":"271","priority":1,"nodeId":"288"},{"level":3,"cityLevel":20,"name":"太原市","parentId":"290","priority":1,"nodeId":"298"},{"level":3,"cityLevel":20,"name":"嘉兴市","parentId":"389","priority":1,"nodeId":"390"},{"level":3,"cityLevel":20,"name":"绍兴市","parentId":"389","priority":1,"nodeId":"391"},{"level":3,"cityLevel":20,"name":"金华市","parentId":"389","priority":1,"nodeId":"395"},{"level":3,"cityLevel":20,"name":"温州市","parentId":"389","priority":1,"nodeId":"398"},{"level":3,"cityLevel":20,"name":"台州市","parentId":"389","priority":1,"nodeId":"399"},{"level":3,"cityLevel":30,"name":"蚌埠市","parentId":"1","priority":1,"nodeId":"4"},{"level":3,"cityLevel":30,"name":"安庆市","parentId":"1","priority":1,"nodeId":"6"},{"level":3,"cityLevel":30,"name":"阜阳市","parentId":"1","priority":1,"nodeId":"7"},{"level":3,"cityLevel":30,"name":"马鞍山市","parentId":"1","priority":1,"nodeId":"8"},{"level":3,"cityLevel":30,"name":"滁州市","parentId":"1","priority":1,"nodeId":"12"},{"level":3,"cityLevel":30,"name":"芜湖市","parentId":"1","priority":1,"nodeId":"15"},{"level":3,"cityLevel":30,"name":"南平市","parentId":"22","priority":1,"nodeId":"24"},{"level":3,"cityLevel":30,"name":"漳州市","parentId":"22","priority":1,"nodeId":"25"},{"level":3,"cityLevel":30,"name":"莆田市","parentId":"22","priority":1,"nodeId":"26"},{"level":3,"cityLevel":30,"name":"龙岩市","parentId":"22","priority":1,"nodeId":"27"},{"level":3,"cityLevel":30,"name":"宁德市","parentId":"22","priority":1,"nodeId":"28"},{"level":3,"cityLevel":30,"name":"三明市","parentId":"22","priority":1,"nodeId":"31"},{"level":3,"cityLevel":30,"name":"肇庆市","parentId":"47","priority":1,"nodeId":"49"},{"level":3,"cityLevel":30,"name":"潮州市","parentId":"47","priority":1,"nodeId":"50"},{"level":3,"cityLevel":30,"name":"揭阳市","parentId":"47","priority":1,"nodeId":"54"},{"level":3,"cityLevel":30,"name":"湛江市","parentId":"47","priority":1,"nodeId":"56"},{"level":3,"cityLevel":30,"name":"汕头市","parentId":"47","priority":1,"nodeId":"59"},{"level":3,"cityLevel":30,"name":"清远市","parentId":"47","priority":1,"nodeId":"63"},{"level":3,"cityLevel":30,"name":"江门市","parentId":"47","priority":1,"nodeId":"64"},{"level":3,"cityLevel":30,"name":"梅州市","parentId":"47","priority":1,"nodeId":"66"},{"level":3,"cityLevel":30,"name":"桂林市","parentId":"69","priority":1,"nodeId":"70"},{"level":3,"cityLevel":30,"name":"柳州市","parentId":"69","priority":1,"nodeId":"78"},{"level":3,"cityLevel":30,"name":"遵义市","parentId":"84","priority":1,"nodeId":"89"},{"level":3,"cityLevel":30,"name":"三亚市","parentId":"94","priority":1,"nodeId":"97"},{"level":3,"cityLevel":30,"name":"廊坊市","parentId":"114","priority":1,"nodeId":"115"},{"level":3,"cityLevel":30,"name":"邯郸市","parentId":"114","priority":1,"nodeId":"117"},{"level":3,"cityLevel":30,"name":"唐山市","parentId":"114","priority":1,"nodeId":"119"},{"level":3,"cityLevel":30,"name":"保定市","parentId":"114","priority":1,"nodeId":"120"},{"level":3,"cityLevel":30,"name":"秦皇岛市","parentId":"114","priority":1,"nodeId":"122"},{"level":3,"cityLevel":30,"name":"沧州市","parentId":"114","priority":1,"nodeId":"123"},{"level":3,"cityLevel":30,"name":"新乡市","parentId":"126","priority":1,"nodeId":"133"},{"level":3,"cityLevel":30,"name":"南阳市","parentId":"126","priority":1,"nodeId":"136"},{"level":3,"cityLevel":30,"name":"信阳市","parentId":"126","priority":1,"nodeId":"140"},{"level":3,"cityLevel":30,"name":"商丘市","parentId":"126","priority":1,"nodeId":"143"},{"level":3,"cityLevel":30,"name":"襄阳市","parentId":"159","priority":1,"nodeId":"167"},{"level":3,"cityLevel":30,"name":"荆州市","parentId":"159","priority":1,"nodeId":"172"},{"level":3,"cityLevel":30,"name":"宜昌市","parentId":"159","priority":1,"nodeId":"174"},{"level":3,"cityLevel":30,"name":"岳阳市","parentId":"177","priority":1,"nodeId":"180"},{"level":3,"cityLevel":30,"name":"衡阳市","parentId":"177","priority":1,"nodeId":"183"},{"level":3,"cityLevel":30,"name":"湘潭市","parentId":"177","priority":1,"nodeId":"184"},{"level":3,"cityLevel":30,"name":"株洲市","parentId":"177","priority":1,"nodeId":"185"},{"level":3,"cityLevel":30,"name":"郴州市","parentId":"177","priority":1,"nodeId":"191"},{"level":3,"cityLevel":30,"name":"吉林市","parentId":"192","priority":1,"nodeId":"200"},{"level":3,"cityLevel":30,"name":"泰州市","parentId":"202","priority":1,"nodeId":"203"},{"level":3,"cityLevel":30,"name":"连云港市","parentId":"202","priority":1,"nodeId":"205"},{"level":3,"cityLevel":30,"name":"淮安市","parentId":"202","priority":1,"nodeId":"207"},{"level":3,"cityLevel":30,"name":"盐城市","parentId":"202","priority":1,"nodeId":"208"},{"level":3,"cityLevel":30,"name":"镇江市","parentId":"202","priority":1,"nodeId":"210"},{"level":3,"cityLevel":30,"name":"宿迁市","parentId":"202","priority":1,"nodeId":"215"},{"level":3,"cityLevel":30,"name":"九江市","parentId":"216","priority":1,"nodeId":"219"},{"level":3,"cityLevel":30,"name":"上饶市","parentId":"216","priority":1,"nodeId":"220"},{"level":3,"cityLevel":30,"name":"赣州市","parentId":"216","priority":1,"nodeId":"227"},{"level":3,"cityLevel":30,"name":"鞍山市","parentId":"228","priority":1,"nodeId":"232"},{"level":3,"cityLevel":30,"name":"呼和浩特市","parentId":"243","priority":1,"nodeId":"244"},{"level":3,"cityLevel":30,"name":"包头市","parentId":"243","priority":1,"nodeId":"246"},{"level":3,"cityLevel":30,"name":"银川市","parentId":"256","priority":1,"nodeId":"260"},{"level":3,"cityLevel":30,"name":"潍坊市","parentId":"271","priority":1,"nodeId":"273"},{"level":3,"cityLevel":30,"name":"临沂市","parentId":"271","priority":1,"nodeId":"274"},{"level":3,"cityLevel":30,"name":"济宁市","parentId":"271","priority":1,"nodeId":"275"},{"level":3,"cityLevel":30,"name":"淄博市","parentId":"271","priority":1,"nodeId":"277"},{"level":3,"cityLevel":30,"name":"威海市","parentId":"271","priority":1,"nodeId":"286"},{"level":3,"cityLevel":30,"name":"泰安市","parentId":"271","priority":1,"nodeId":"287"},{"level":3,"cityLevel":30,"name":"咸阳市","parentId":"302","priority":1,"nodeId":"304"},{"level":3,"cityLevel":30,"name":"绵阳市","parentId":"315","priority":1,"nodeId":"335"},{"level":3,"cityLevel":30,"name":"乌鲁木齐市","parentId":"349","priority":1,"nodeId":"368"},{"level":3,"cityLevel":30,"name":"丽水市","parentId":"389","priority":1,"nodeId":"392"},{"level":3,"cityLevel":30,"name":"湖州市","parentId":"389","priority":1,"nodeId":"396"},{"level":3,"cityLevel":30,"name":"舟山市","parentId":"389","priority":1,"nodeId":"397"},{"level":3,"cityLevel":40,"name":"宣城市","parentId":"1","priority":1,"nodeId":"2"},{"level":3,"cityLevel":40,"name":"亳州市","parentId":"1","priority":1,"nodeId":"3"},{"level":3,"cityLevel":40,"name":"宿州市","parentId":"1","priority":1,"nodeId":"5"},{"level":3,"cityLevel":40,"name":"铜陵市","parentId":"1","priority":1,"nodeId":"10"},{"level":3,"cityLevel":40,"name":"六安市","parentId":"1","priority":1,"nodeId":"11"},{"level":3,"cityLevel":40,"name":"淮南市","parentId":"1","priority":1,"nodeId":"14"},{"level":3,"cityLevel":40,"name":"黄山市","parentId":"1","priority":1,"nodeId":"17"},{"level":3,"cityLevel":40,"name":"韶关市","parentId":"47","priority":1,"nodeId":"52"},{"level":3,"cityLevel":40,"name":"茂名市","parentId":"47","priority":1,"nodeId":"61"},{"level":3,"cityLevel":40,"name":"阳江市","parentId":"47","priority":1,"nodeId":"62"},{"level":3,"cityLevel":40,"name":"汕尾市","parentId":"47","priority":1,"nodeId":"65"},{"level":3,"cityLevel":40,"name":"河源市","parentId":"47","priority":1,"nodeId":"68"},{"level":3,"cityLevel":40,"name":"玉林市","parentId":"69","priority":1,"nodeId":"72"},{"level":3,"cityLevel":40,"name":"梧州市","parentId":"69","priority":1,"nodeId":"76"},{"level":3,"cityLevel":40,"name":"北海市","parentId":"69","priority":1,"nodeId":"79"},{"level":3,"cityLevel":40,"name":"百色市","parentId":"69","priority":1,"nodeId":"80"},{"level":3,"cityLevel":40,"name":"黔东南苗族侗族自治州","parentId":"84","priority":1,"nodeId":"85"},{"level":3,"cityLevel":40,"name":"黔南布依族苗族自治州","parentId":"84","priority":1,"nodeId":"86"},{"level":3,"cityLevel":40,"name":"铜仁市","parentId":"84","priority":1,"nodeId":"87"},{"level":3,"cityLevel":40,"name":"毕节市","parentId":"84","priority":1,"nodeId":"88"},{"level":3,"cityLevel":40,"name":"六盘水市","parentId":"84","priority":1,"nodeId":"93"},{"level":3,"cityLevel":40,"name":"张家口市","parentId":"114","priority":1,"nodeId":"116"},{"level":3,"cityLevel":40,"name":"承德市","parentId":"114","priority":1,"nodeId":"118"},{"level":3,"cityLevel":40,"name":"邢台市","parentId":"114","priority":1,"nodeId":"124"},{"level":3,"cityLevel":40,"name":"安阳市","parentId":"126","priority":1,"nodeId":"128"},{"level":3,"cityLevel":40,"name":"许昌市","parentId":"126","priority":1,"nodeId":"129"},{"level":3,"cityLevel":40,"name":"开封市","parentId":"126","priority":1,"nodeId":"135"},{"level":3,"cityLevel":40,"name":"焦作市","parentId":"126","priority":1,"nodeId":"137"},{"level":3,"cityLevel":40,"name":"周口市","parentId":"126","priority":1,"nodeId":"139"},{"level":3,"cityLevel":40,"name":"平顶山市","parentId":"126","priority":1,"nodeId":"141"},{"level":3,"cityLevel":40,"name":"驻马店市","parentId":"126","priority":1,"nodeId":"142"},{"level":3,"cityLevel":40,"name":"绥化市","parentId":"145","priority":1,"nodeId":"148"},{"level":3,"cityLevel":40,"name":"齐齐哈尔市","parentId":"145","priority":1,"nodeId":"149"},{"level":3,"cityLevel":40,"name":"佳木斯市","parentId":"145","priority":1,"nodeId":"152"},{"level":3,"cityLevel":40,"name":"牡丹江市","parentId":"145","priority":1,"nodeId":"157"},{"level":3,"cityLevel":40,"name":"十堰市","parentId":"159","priority":1,"nodeId":"160"},{"level":3,"cityLevel":40,"name":"黄石市","parentId":"159","priority":1,"nodeId":"161"},{"level":3,"cityLevel":40,"name":"恩施土家族苗族自治州","parentId":"159","priority":1,"nodeId":"165"},{"level":3,"cityLevel":40,"name":"咸宁市","parentId":"159","priority":1,"nodeId":"166"},{"level":3,"cityLevel":40,"name":"孝感市","parentId":"159","priority":1,"nodeId":"169"},{"level":3,"cityLevel":40,"name":"黄冈市","parentId":"159","priority":1,"nodeId":"170"},{"level":3,"cityLevel":40,"name":"常德市","parentId":"177","priority":1,"nodeId":"178"},{"level":3,"cityLevel":40,"name":"永州市","parentId":"177","priority":1,"nodeId":"181"},{"level":3,"cityLevel":40,"name":"邵阳市","parentId":"177","priority":1,"nodeId":"182"},{"level":3,"cityLevel":40,"name":"娄底市","parentId":"177","priority":1,"nodeId":"186"},{"level":3,"cityLevel":40,"name":"怀化市","parentId":"177","priority":1,"nodeId":"187"},{"level":3,"cityLevel":40,"name":"延边朝鲜族自治州","parentId":"192","priority":1,"nodeId":"198"},{"level":3,"cityLevel":40,"name":"吉安市","parentId":"216","priority":1,"nodeId":"217"},{"level":3,"cityLevel":40,"name":"景德镇市","parentId":"216","priority":1,"nodeId":"218"},{"level":3,"cityLevel":40,"name":"鹰潭市","parentId":"216","priority":1,"nodeId":"222"},{"level":3,"cityLevel":40,"name":"抚州市","parentId":"216","priority":1,"nodeId":"224"},{"level":3,"cityLevel":40,"name":"宜春市","parentId":"216","priority":1,"nodeId":"225"},{"level":3,"cityLevel":40,"name":"营口市","parentId":"228","priority":1,"nodeId":"234"},{"level":3,"cityLevel":40,"name":"丹东市","parentId":"228","priority":1,"nodeId":"235"},{"level":3,"cityLevel":40,"name":"锦州市","parentId":"228","priority":1,"nodeId":"238"},{"level":3,"cityLevel":40,"name":"盘锦市","parentId":"228","priority":1,"nodeId":"242"},{"level":3,"cityLevel":40,"name":"鄂尔多斯市","parentId":"243","priority":1,"nodeId":"254"},{"level":3,"cityLevel":40,"name":"赤峰市","parentId":"243","priority":1,"nodeId":"255"},{"level":3,"cityLevel":40,"name":"西宁市","parentId":"262","priority":1,"nodeId":"264"},{"level":3,"cityLevel":40,"name":"聊城市","parentId":"271","priority":1,"nodeId":"272"},{"level":3,"cityLevel":40,"name":"德州市","parentId":"271","priority":1,"nodeId":"276"},{"level":3,"cityLevel":40,"name":"滨州市","parentId":"271","priority":1,"nodeId":"278"},{"level":3,"cityLevel":40,"name":"日照市","parentId":"271","priority":1,"nodeId":"279"},{"level":3,"cityLevel":40,"name":"东营市","parentId":"271","priority":1,"nodeId":"282"},{"level":3,"cityLevel":40,"name":"枣庄市","parentId":"271","priority":1,"nodeId":"283"},{"level":3,"cityLevel":40,"name":"菏泽市","parentId":"271","priority":1,"nodeId":"285"},{"level":3,"cityLevel":40,"name":"大同市","parentId":"290","priority":1,"nodeId":"292"},{"level":3,"cityLevel":40,"name":"晋中市","parentId":"290","priority":1,"nodeId":"293"},{"level":3,"cityLevel":40,"name":"临汾市","parentId":"290","priority":1,"nodeId":"295"},{"level":3,"cityLevel":40,"name":"运城市","parentId":"290","priority":1,"nodeId":"301"},{"level":3,"cityLevel":40,"name":"宝鸡市","parentId":"302","priority":1,"nodeId":"303"},{"level":3,"cityLevel":40,"name":"榆林市","parentId":"302","priority":1,"nodeId":"310"},{"level":3,"cityLevel":40,"name":"渭南市","parentId":"302","priority":1,"nodeId":"311"},{"level":3,"cityLevel":40,"name":"德阳市","parentId":"315","priority":1,"nodeId":"317"},{"level":3,"cityLevel":40,"name":"泸州市","parentId":"315","priority":1,"nodeId":"318"},{"level":3,"cityLevel":40,"name":"宜宾市","parentId":"315","priority":1,"nodeId":"322"},{"level":3,"cityLevel":40,"name":"南充市","parentId":"315","priority":1,"nodeId":"329"},{"level":3,"cityLevel":40,"name":"乐山市","parentId":"315","priority":1,"nodeId":"330"},{"level":3,"cityLevel":40,"name":"眉山市","parentId":"315","priority":1,"nodeId":"331"},{"level":3,"cityLevel":40,"name":"拉萨市","parentId":"339","priority":1,"nodeId":"345"},{"level":3,"cityLevel":40,"name":"保山市","parentId":"372","priority":1,"nodeId":"373"},{"level":3,"cityLevel":40,"name":"德宏傣族景颇族自治州","parentId":"372","priority":1,"nodeId":"374"},{"level":3,"cityLevel":40,"name":"西双版纳傣族自治州","parentId":"372","priority":1,"nodeId":"377"},{"level":3,"cityLevel":40,"name":"丽江市","parentId":"372","priority":1,"nodeId":"380"},{"level":3,"cityLevel":40,"name":"曲靖市","parentId":"372","priority":1,"nodeId":"383"},{"level":3,"cityLevel":40,"name":"红河哈尼族彝族自治州","parentId":"372","priority":1,"nodeId":"387"},{"level":3,"cityLevel":40,"name":"衢州市","parentId":"389","priority":1,"nodeId":"400"},{"level":3,"cityLevel":50,"name":"淮北市","parentId":"1","priority":1,"nodeId":"9"},{"level":3,"cityLevel":50,"name":"池州市","parentId":"1","priority":1,"nodeId":"13"},{"level":3,"cityLevel":50,"name":"张掖市","parentId":"32","priority":1,"nodeId":"33"},{"level":3,"cityLevel":50,"name":"酒泉市","parentId":"32","priority":1,"nodeId":"35"},{"level":3,"cityLevel":50,"name":"白银市","parentId":"32","priority":1,"nodeId":"36"},{"level":3,"cityLevel":50,"name":"甘南藏族自治州","parentId":"32","priority":1,"nodeId":"37"},{"level":3,"cityLevel":50,"name":"陇南市","parentId":"32","priority":1,"nodeId":"38"},{"level":3,"cityLevel":50,"name":"武威市","parentId":"32","priority":1,"nodeId":"39"},{"level":3,"cityLevel":50,"name":"金昌市","parentId":"32","priority":1,"nodeId":"40"},{"level":3,"cityLevel":50,"name":"天水市","parentId":"32","priority":1,"nodeId":"41"},{"level":3,"cityLevel":50,"name":"平凉市","parentId":"32","priority":1,"nodeId":"42"},{"level":3,"cityLevel":50,"name":"庆阳市","parentId":"32","priority":1,"nodeId":"43"},{"level":3,"cityLevel":50,"name":"定西市","parentId":"32","priority":1,"nodeId":"44"},{"level":3,"cityLevel":50,"name":"嘉峪关市","parentId":"32","priority":1,"nodeId":"45"},{"level":3,"cityLevel":50,"name":"临夏回族自治州","parentId":"32","priority":1,"nodeId":"46"},{"level":3,"cityLevel":50,"name":"云浮市","parentId":"47","priority":1,"nodeId":"53"},{"level":3,"cityLevel":50,"name":"贵港市","parentId":"69","priority":1,"nodeId":"71"},{"level":3,"cityLevel":50,"name":"来宾市","parentId":"69","priority":1,"nodeId":"73"},{"level":3,"cityLevel":50,"name":"钦州市","parentId":"69","priority":1,"nodeId":"74"},{"level":3,"cityLevel":50,"name":"崇左市","parentId":"69","priority":1,"nodeId":"75"},{"level":3,"cityLevel":50,"name":"防城港市","parentId":"69","priority":1,"nodeId":"77"},{"level":3,"cityLevel":50,"name":"贺州市","parentId":"69","priority":1,"nodeId":"81"},{"level":3,"cityLevel":50,"name":"河池市","parentId":"69","priority":1,"nodeId":"83"},{"level":3,"cityLevel":50,"name":"安顺市","parentId":"84","priority":1,"nodeId":"90"},{"level":3,"cityLevel":50,"name":"黔西南布依族苗族自治州","parentId":"84","priority":1,"nodeId":"91"},{"level":3,"cityLevel":50,"name":"五指山市","parentId":"94","priority":1,"nodeId":"95"},{"level":3,"cityLevel":50,"name":"万宁市","parentId":"94","priority":1,"nodeId":"98"},{"level":3,"cityLevel":50,"name":"白沙黎族自治县","parentId":"94","priority":1,"nodeId":"99"},{"level":3,"cityLevel":50,"name":"保亭黎族苗族自治县","parentId":"94","priority":1,"nodeId":"100"},{"level":3,"cityLevel":50,"name":"儋州市","parentId":"94","priority":1,"nodeId":"101"},{"level":3,"cityLevel":50,"name":"文昌市","parentId":"94","priority":1,"nodeId":"102"},{"level":3,"cityLevel":50,"name":"琼海市","parentId":"94","priority":1,"nodeId":"103"},{"level":3,"cityLevel":50,"name":"临高县","parentId":"94","priority":1,"nodeId":"104"},{"level":3,"cityLevel":50,"name":"屯昌县","parentId":"94","priority":1,"nodeId":"105"},{"level":3,"cityLevel":50,"name":"陵水黎族自治县","parentId":"94","priority":1,"nodeId":"106"},{"level":3,"cityLevel":50,"name":"琼中黎族苗族自治县","parentId":"94","priority":1,"nodeId":"107"},{"level":3,"cityLevel":50,"name":"三沙市","parentId":"94","priority":1,"nodeId":"108"},{"level":3,"cityLevel":50,"name":"东方市","parentId":"94","priority":1,"nodeId":"109"},{"level":3,"cityLevel":50,"name":"乐东黎族自治县","parentId":"94","priority":1,"nodeId":"110"},{"level":3,"cityLevel":50,"name":"澄迈县","parentId":"94","priority":1,"nodeId":"111"},{"level":3,"cityLevel":50,"name":"定安县","parentId":"94","priority":1,"nodeId":"112"},{"level":3,"cityLevel":50,"name":"昌江黎族自治县","parentId":"94","priority":1,"nodeId":"113"},{"level":3,"cityLevel":50,"name":"衡水市","parentId":"114","priority":1,"nodeId":"125"},{"level":3,"cityLevel":50,"name":"濮阳市","parentId":"126","priority":1,"nodeId":"127"},{"level":3,"cityLevel":50,"name":"洛阳市","parentId":"126","priority":1,"nodeId":"130"},{"level":3,"cityLevel":50,"name":"三门峡市","parentId":"126","priority":1,"nodeId":"132"},{"level":3,"cityLevel":50,"name":"鹤壁市","parentId":"126","priority":1,"nodeId":"134"},{"level":3,"cityLevel":50,"name":"漯河市","parentId":"126","priority":1,"nodeId":"138"},{"level":3,"cityLevel":50,"name":"济源市","parentId":"126","priority":1,"nodeId":"144"},{"level":3,"cityLevel":50,"name":"伊春市","parentId":"145","priority":1,"nodeId":"146"},{"level":3,"cityLevel":50,"name":"大兴安岭地区","parentId":"145","priority":1,"nodeId":"147"},{"level":3,"cityLevel":50,"name":"大庆市","parentId":"145","priority":1,"nodeId":"150"},{"level":3,"cityLevel":50,"name":"黑河市","parentId":"145","priority":1,"nodeId":"151"},{"level":3,"cityLevel":50,"name":"双鸭山市","parentId":"145","priority":1,"nodeId":"153"},{"level":3,"cityLevel":50,"name":"鸡西市","parentId":"145","priority":1,"nodeId":"155"},{"level":3,"cityLevel":50,"name":"鹤岗市","parentId":"145","priority":1,"nodeId":"156"},{"level":3,"cityLevel":50,"name":"七台河市","parentId":"145","priority":1,"nodeId":"158"},{"level":3,"cityLevel":50,"name":"随州市","parentId":"159","priority":1,"nodeId":"162"},{"level":3,"cityLevel":50,"name":"仙桃市","parentId":"159","priority":1,"nodeId":"163"},{"level":3,"cityLevel":50,"name":"神农架林区","parentId":"159","priority":1,"nodeId":"164"},{"level":3,"cityLevel":50,"name":"荆门市","parentId":"159","priority":1,"nodeId":"168"},{"level":3,"cityLevel":50,"name":"鄂州市","parentId":"159","priority":1,"nodeId":"171"},{"level":3,"cityLevel":50,"name":"天门市","parentId":"159","priority":1,"nodeId":"173"},{"level":3,"cityLevel":50,"name":"潜江市","parentId":"159","priority":1,"nodeId":"176"},{"level":3,"cityLevel":50,"name":"张家界市","parentId":"177","priority":1,"nodeId":"179"},{"level":3,"cityLevel":50,"name":"湘西土家族苗族自治州","parentId":"177","priority":1,"nodeId":"189"},{"level":3,"cityLevel":50,"name":"益阳市","parentId":"177","priority":1,"nodeId":"190"},{"level":3,"cityLevel":50,"name":"白山市","parentId":"192","priority":1,"nodeId":"193"},{"level":3,"cityLevel":50,"name":"松原市","parentId":"192","priority":1,"nodeId":"194"},{"level":3,"cityLevel":50,"name":"通化市","parentId":"192","priority":1,"nodeId":"195"},{"level":3,"cityLevel":50,"name":"四平市","parentId":"192","priority":1,"nodeId":"196"},{"level":3,"cityLevel":50,"name":"辽源市","parentId":"192","priority":1,"nodeId":"199"},{"level":3,"cityLevel":50,"name":"白城市","parentId":"192","priority":1,"nodeId":"201"},{"level":3,"cityLevel":50,"name":"萍乡市","parentId":"216","priority":1,"nodeId":"221"},{"level":3,"cityLevel":50,"name":"新余市","parentId":"216","priority":1,"nodeId":"223"},{"level":3,"cityLevel":50,"name":"朝阳市","parentId":"228","priority":1,"nodeId":"229"},{"level":3,"cityLevel":50,"name":"阜新市","parentId":"228","priority":1,"nodeId":"230"},{"level":3,"cityLevel":50,"name":"铁岭市","parentId":"228","priority":1,"nodeId":"231"},{"level":3,"cityLevel":50,"name":"抚顺市","parentId":"228","priority":1,"nodeId":"233"},{"level":3,"cityLevel":50,"name":"辽阳市","parentId":"228","priority":1,"nodeId":"237"},{"level":3,"cityLevel":50,"name":"本溪市","parentId":"228","priority":1,"nodeId":"240"},{"level":3,"cityLevel":50,"name":"葫芦岛市","parentId":"228","priority":1,"nodeId":"241"},{"level":3,"cityLevel":50,"name":"兴安盟","parentId":"243","priority":1,"nodeId":"245"},{"level":3,"cityLevel":50,"name":"通辽市","parentId":"243","priority":1,"nodeId":"247"},{"level":3,"cityLevel":50,"name":"乌兰察布市","parentId":"243","priority":1,"nodeId":"248"},{"level":3,"cityLevel":50,"name":"呼伦贝尔市","parentId":"243","priority":1,"nodeId":"249"},{"level":3,"cityLevel":50,"name":"乌海市","parentId":"243","priority":1,"nodeId":"250"},{"level":3,"cityLevel":50,"name":"巴彦淖尔市","parentId":"243","priority":1,"nodeId":"251"},{"level":3,"cityLevel":50,"name":"阿拉善盟","parentId":"243","priority":1,"nodeId":"252"},{"level":3,"cityLevel":50,"name":"锡林郭勒盟","parentId":"243","priority":1,"nodeId":"253"},{"level":3,"cityLevel":50,"name":"吴忠市","parentId":"256","priority":1,"nodeId":"257"},{"level":3,"cityLevel":50,"name":"石嘴山市","parentId":"256","priority":1,"nodeId":"258"},{"level":3,"cityLevel":50,"name":"中卫市","parentId":"256","priority":1,"nodeId":"259"},{"level":3,"cityLevel":50,"name":"固原市","parentId":"256","priority":1,"nodeId":"261"},{"level":3,"cityLevel":50,"name":"海北藏族自治州","parentId":"262","priority":1,"nodeId":"263"},{"level":3,"cityLevel":50,"name":"海东市","parentId":"262","priority":1,"nodeId":"265"},{"level":3,"cityLevel":50,"name":"玉树藏族自治州","parentId":"262","priority":1,"nodeId":"266"},{"level":3,"cityLevel":50,"name":"果洛藏族自治州","parentId":"262","priority":1,"nodeId":"267"},{"level":3,"cityLevel":50,"name":"海西蒙古族藏族自治州","parentId":"262","priority":1,"nodeId":"268"},{"level":3,"cityLevel":50,"name":"海南藏族自治州","parentId":"262","priority":1,"nodeId":"269"},{"level":3,"cityLevel":50,"name":"黄南藏族自治州","parentId":"262","priority":1,"nodeId":"270"},{"level":3,"cityLevel":50,"name":"莱芜市","parentId":"271","priority":1,"nodeId":"281"},{"level":3,"cityLevel":50,"name":"吕梁市","parentId":"290","priority":1,"nodeId":"291"},{"level":3,"cityLevel":50,"name":"长治市","parentId":"290","priority":1,"nodeId":"294"},{"level":3,"cityLevel":50,"name":"忻州市","parentId":"290","priority":1,"nodeId":"296"},{"level":3,"cityLevel":50,"name":"朔州市","parentId":"290","priority":1,"nodeId":"297"},{"level":3,"cityLevel":50,"name":"阳泉市","parentId":"290","priority":1,"nodeId":"299"},{"level":3,"cityLevel":50,"name":"晋城市","parentId":"290","priority":1,"nodeId":"300"},{"level":3,"cityLevel":50,"name":"安康市","parentId":"302","priority":1,"nodeId":"305"},{"level":3,"cityLevel":50,"name":"商洛市","parentId":"302","priority":1,"nodeId":"306"},{"level":3,"cityLevel":50,"name":"延安市","parentId":"302","priority":1,"nodeId":"307"},{"level":3,"cityLevel":50,"name":"汉中市","parentId":"302","priority":1,"nodeId":"308"},{"level":3,"cityLevel":50,"name":"铜川市","parentId":"302","priority":1,"nodeId":"309"},{"level":3,"cityLevel":50,"name":"巴中市","parentId":"315","priority":1,"nodeId":"316"},{"level":3,"cityLevel":50,"name":"广元市","parentId":"315","priority":1,"nodeId":"319"},{"level":3,"cityLevel":50,"name":"雅安市","parentId":"315","priority":1,"nodeId":"320"},{"level":3,"cityLevel":50,"name":"阿坝藏族羌族自治州","parentId":"315","priority":1,"nodeId":"321"},{"level":3,"cityLevel":50,"name":"资阳市","parentId":"315","priority":1,"nodeId":"323"},{"level":3,"cityLevel":50,"name":"内江市","parentId":"315","priority":1,"nodeId":"324"},{"level":3,"cityLevel":50,"name":"遂宁市","parentId":"315","priority":1,"nodeId":"325"},{"level":3,"cityLevel":50,"name":"广安市","parentId":"315","priority":1,"nodeId":"326"},{"level":3,"cityLevel":50,"name":"凉山彝族自治州","parentId":"315","priority":1,"nodeId":"327"},{"level":3,"cityLevel":50,"name":"自贡市","parentId":"315","priority":1,"nodeId":"328"},{"level":3,"cityLevel":50,"name":"甘孜藏族自治州","parentId":"315","priority":1,"nodeId":"332"},{"level":3,"cityLevel":50,"name":"攀枝花市","parentId":"315","priority":1,"nodeId":"334"},{"level":3,"cityLevel":50,"name":"那曲地区","parentId":"339","priority":1,"nodeId":"340"},{"level":3,"cityLevel":50,"name":"阿里地区","parentId":"339","priority":1,"nodeId":"341"},{"level":3,"cityLevel":50,"name":"昌都市","parentId":"339","priority":1,"nodeId":"342"},{"level":3,"cityLevel":50,"name":"日喀则市","parentId":"339","priority":1,"nodeId":"343"},{"level":3,"cityLevel":50,"name":"山南地区","parentId":"339","priority":1,"nodeId":"344"},{"level":3,"cityLevel":50,"name":"林芝市","parentId":"339","priority":1,"nodeId":"346"},{"level":3,"cityLevel":50,"name":"五家渠市","parentId":"349","priority":1,"nodeId":"350"},{"level":3,"cityLevel":50,"name":"双河市","parentId":"349","priority":1,"nodeId":"351"},{"level":3,"cityLevel":50,"name":"昌吉回族自治州","parentId":"349","priority":1,"nodeId":"352"},{"level":3,"cityLevel":50,"name":"图木舒克市","parentId":"349","priority":1,"nodeId":"353"},{"level":3,"cityLevel":50,"name":"博尔塔拉蒙古自治州","parentId":"349","priority":1,"nodeId":"354"},{"level":3,"cityLevel":50,"name":"塔城地区","parentId":"349","priority":1,"nodeId":"355"},{"level":3,"cityLevel":50,"name":"巴音郭楞蒙古自治州","parentId":"349","priority":1,"nodeId":"356"},{"level":3,"cityLevel":50,"name":"铁门关市","parentId":"349","priority":1,"nodeId":"357"},{"level":3,"cityLevel":50,"name":"可克达拉市","parentId":"349","priority":1,"nodeId":"358"},{"level":3,"cityLevel":50,"name":"石河子市","parentId":"349","priority":1,"nodeId":"359"},{"level":3,"cityLevel":50,"name":"北屯市","parentId":"349","priority":1,"nodeId":"360"},{"level":3,"cityLevel":50,"name":"和田地区","parentId":"349","priority":1,"nodeId":"361"},{"level":3,"cityLevel":50,"name":"阿勒泰地区","parentId":"349","priority":1,"nodeId":"362"},{"level":3,"cityLevel":50,"name":"阿拉尔市","parentId":"349","priority":1,"nodeId":"363"},{"level":3,"cityLevel":50,"name":"伊犁哈萨克自治州","parentId":"349","priority":1,"nodeId":"364"},{"level":3,"cityLevel":50,"name":"阿克苏地区","parentId":"349","priority":1,"nodeId":"365"},{"level":3,"cityLevel":50,"name":"喀什地区","parentId":"349","priority":1,"nodeId":"366"},{"level":3,"cityLevel":50,"name":"哈密地区","parentId":"349","priority":1,"nodeId":"367"},{"level":3,"cityLevel":50,"name":"克孜勒苏柯尔克孜自治州","parentId":"349","priority":1,"nodeId":"369"},{"level":3,"cityLevel":50,"name":"吐鲁番市","parentId":"349","priority":1,"nodeId":"370"},{"level":3,"cityLevel":50,"name":"克拉玛依市","parentId":"349","priority":1,"nodeId":"371"},{"level":3,"cityLevel":50,"name":"怒江傈僳族自治州","parentId":"372","priority":1,"nodeId":"376"},{"level":3,"cityLevel":50,"name":"临沧市","parentId":"372","priority":1,"nodeId":"378"},{"level":3,"cityLevel":50,"name":"普洱市","parentId":"372","priority":1,"nodeId":"379"},{"level":3,"cityLevel":50,"name":"迪庆藏族自治州","parentId":"372","priority":1,"nodeId":"381"},{"level":3,"cityLevel":50,"name":"玉溪市","parentId":"372","priority":1,"nodeId":"382"},{"level":3,"cityLevel":50,"name":"昭通市","parentId":"372","priority":1,"nodeId":"384"},{"level":3,"cityLevel":50,"name":"楚雄彝族自治州","parentId":"372","priority":1,"nodeId":"385"},{"level":3,"cityLevel":50,"name":"大理白族自治州","parentId":"372","priority":1,"nodeId":"386"},{"level":3,"cityLevel":50,"name":"文山壮族苗族自治州","parentId":"372","priority":1,"nodeId":"388"}]
const provinceOptions = originOptions.map(e=>{return{
    ...e,
    value: e.nodeId,
    id: e.nodeId,
    pid: e.level === 1? '' :e.parentId
}})



describe('CascaderTree', () => {

    it('Snapshot',()=>{
        const component = renderer.create(<CascaderTree 
            onCreateQuickOptions={(options)=>{
                var quickOptions = [{
                    name:'一线城市',
                    options:[],
                },{
                    name:'新一线城市',
                    options:[],
                },{
                    name:'二线城市',
                    options:[],
                },{
                    name:'三线城市',
                    options:[],
                },{
                    name:'四线城市',
                    options:[],
                },{
                    name:'五线城市及以下',
                    options:[],
                }]
                options.forEach(el => {
                    const { cityLevel } =el
                    switch(cityLevel){
                        case 0:
                            return quickOptions[0].options.push(el)
                        case 10:
                            return quickOptions[1].options.push(el)
                        case 20:
                            return quickOptions[2].options.push(el)
                        case 30:
                            return quickOptions[3].options.push(el)
                        case 40:
                            return quickOptions[4].options.push(el)
                        case 50:
                            return quickOptions[5].options.push(el)
                    }
                });
                return quickOptions
            }}
            options={provinceOptions}
        />)
        let snapshot = component.toJSON();
        expect(snapshot).toMatchSnapshot();
    })


    it('select shenzhen city',()=>{
        const onChange = jest.fn();
        const wrapper = mount(
            <CascaderTree onChange={onChange} options={provinceOptions}/>
        );
        //华南
        wrapper.find('.jad-cascaderTree-container li').at(4).find('.icon-right-box').simulate('click');
        var huanan = wrapper.find('.jad-cascaderTree-container li').at(4).hasClass('active');
        expect(huanan).toEqual(true);
        expect(onChange.mock.calls.length).toBe(0);
        //广东
        var guangdong = wrapper.find('.jad-cascaderTree-container').at(1).find('li').at(0)
        expect(guangdong.text()).toBe('广东省');
        guangdong.find('.icon-right-box').simulate('click');
        guangdong = wrapper.find('.jad-cascaderTree-container').at(1).find('li').at(0)
        expect(guangdong.hasClass('active')).toEqual(true);
        //深圳
        const shenzhenOriginOptions = provinceOptions.find(e=>e.name === '深圳市')
        var shenzhen = wrapper.find('.jad-cascaderTree-container').at(2).find('li').at(0)
        expect(shenzhen.text()).toBe('深圳市');
        shenzhen.find('input[type="checkbox"]').simulate('click');
        expect(onChange.mock.calls.length).toBe(1);
        const value = onChange.mock.calls[0][0]
        expect(value).toStrictEqual([shenzhenOriginOptions.value]);
        var select = wrapper.find('.jad-cascaderTree-select-wrap span').at(0)
        expect(select.text()).toBe('深圳市');
        //广东点击
        const guangdonggOriginOptions = provinceOptions.find(e=>e.name === '广东省')
        guangdong.find('input[type="checkbox"]').simulate('click');
        expect(onChange.mock.calls.length).toBe(2);
        const newValue = onChange.mock.calls[1][0]
        expect(newValue).toStrictEqual([guangdonggOriginOptions.value]);
        var select = wrapper.find('.jad-cascaderTree-select-wrap span').at(0)
        expect(select.text()).toBe('广东省');
    })


    it('quick select ',()=>{
        const onChange = jest.fn();
        const wrapper = mount(
            <CascaderTree 
                onChange={onChange}
                onCreateQuickOptions={(options)=>{
                var quickOptions = [{
                    name:'一线城市',
                    options:[],
                },{
                    name:'新一线城市',
                    options:[],
                },{
                    name:'二线城市',
                    options:[],
                },{
                    name:'三线城市',
                    options:[],
                },{
                    name:'四线城市',
                    options:[],
                },{
                    name:'五线城市及以下',
                    options:[],
                }]
                options.forEach(el => {
                    const { cityLevel } =el
                    switch(cityLevel){
                        case 0:
                            return quickOptions[0].options.push(el)
                        case 10:
                            return quickOptions[1].options.push(el)
                        case 20:
                            return quickOptions[2].options.push(el)
                        case 30:
                            return quickOptions[3].options.push(el)
                        case 40:
                            return quickOptions[4].options.push(el)
                        case 50:
                            return quickOptions[5].options.push(el)
                    }
                });
                return quickOptions
                }} 
                options={provinceOptions}/>
        );
        const cityLevel_1 = wrapper.find('.ant-checkbox-wrapper').at(0)
        const cityLevel_new1 = wrapper.find('.ant-checkbox-wrapper').at(1)
        const cityLevel_2 = wrapper.find('.ant-checkbox-wrapper').at(2)
        const cityLevel_3 = wrapper.find('.ant-checkbox-wrapper').at(3)
        const cityLevel_4 = wrapper.find('.ant-checkbox-wrapper').at(4)
        const cityLevel_5 = wrapper.find('.ant-checkbox-wrapper').at(5)
        expect(cityLevel_1.text()).toBe('一线城市');
        expect(cityLevel_new1.text()).toBe('新一线城市');
        expect(cityLevel_2.text()).toBe('二线城市');
        expect(cityLevel_3.text()).toBe('三线城市');
        expect(cityLevel_4.text()).toBe('四线城市');
        expect(cityLevel_5.text()).toBe('五线城市及以下');
        //一线城市点击
        const beijin = provinceOptions.find(e=>e.name === '北京市')
        const shanghai = provinceOptions.find(e=>e.name === '上海市')
        const shenzhen = provinceOptions.find(e=>e.name === '深圳市')
        const guangzhou = provinceOptions.find(e=>e.name === '广州市')
        cityLevel_1.find('input[type="checkbox"]').simulate('click');
        var value = onChange.mock.calls[0][0]
        expect(value).toStrictEqual([beijin.value,shanghai.value,shenzhen.value,guangzhou.value]);
        expect(wrapper.find('.jad-cascaderTree-select-wrap span').at(0).text()).toBe('北京市');
        expect(wrapper.find('.jad-cascaderTree-select-wrap span').at(1).text()).toBe('上海市');
        expect(wrapper.find('.jad-cascaderTree-select-wrap span').at(2).text()).toBe('深圳市');
        expect(wrapper.find('.jad-cascaderTree-select-wrap span').at(3).text()).toBe('广州市');
    })

})
