How to use isNative method in Playwright Internal

Best JavaScript code snippet using playwright-internal

menuData.js

Source:menuData.js Github

copy

Full Screen

1/**2 * common config3 */4import common from './common.js'5export default {6 // 子菜单与父菜单匹配归类7 menuCataLog: [8 {9 modulName: '页头',10 iconClass: "iconfont icon-xiaoshouxiansuo",11 children: [],12 },13 {14 modulName: '系统设置',15 iconClass: "iconfont icon-jichushezhi",16 // 数据字典 账务账期 业务序号 菜单管理 系统任务调度 GP归属设置 SNP归属设置 角色管理 工作流管理17 children: ['000001', '000662', '000011', '000018', '000167', '000048', '000056', '000039', '000530']18 },19 {20 modulName: '行政管理',21 iconClass: "iconfont icon-xiaoshouhangzhengguanli",22 // 组织管理 岗位管理 员工管理 员工岗位23 children: ['000024', '000030', '000979', '001015']24 },25 {26 modulName: '门店管理',27 iconClass: "iconfont icon-xiaoshouhangzhengguanli",28 // 门店管理 销售车型管理 仓库信息 库区管理 库位管理 工位管理 摆放管理 店长折扣29 children: ['001069', '000183', '000402', '000442', '000448', '000970', '001425', '001390']30 },31 {32 modulName: '区域管理',33 iconClass: "iconfont icon-jichushezhi",34 // 行政区域 销售区域 采购区域 配送区域35 children: ['000071', '000091', '000085', '000079']36 },37 {38 modulName: '车型管理',39 iconClass: "iconfont icon-chexingguanli",40 // 厂家管理 品牌管理 车系管理 车型管理 排量管理 进气方式 销售车型 售后车型41 children: ['000111', '000118', '000125', '000132', '000139', '000146', '000153', '001050']42 },43 {44 modulName: '金融管理',45 iconClass: "iconfont icon-jinrongguanli",46 // 金融机构 金融产品 协作报价 贷款申请47 children: ['000186', '000201', '001186', '001187']48 },49 {50 modulName: '保险管理',51 iconClass: "iconfont icon-baoxianguanli",52 // 保险公司 保险方案 协作报价 保险出单53 children: ['000232', '000246', '001613', '001670']54 },55 {56 modulName: '市场活动',57 iconClass: "iconfont icon-shichanghuodongguanlicopy",58 // 活动管理59 children: ['000217']60 },61 {62 modulName: 'CRM管理',63 iconClass: "iconfont icon-CRMtiaoyan",64 // 问卷设置 调研任务65 children: ['000252', '000275']66 },67 {68 modulName: '商品中心',69 iconClass: "iconfont icon-shangpinguanli",70 children: [71 '000288', // 分类管理72 '000315', // 目录管理73 {74 childName: '整车信息',75 // 整车信息 整车锁定/解锁 76 textCode: ['000321', '000333',]77 }, {78 childName: '商品信息',79 // 商品管理 品牌管理 产地管理 包装管理 单位管理 商品定价 商品车型适配 商品适配概览 车型适配查询80 textCode: ['000323', '000282', '000302', '000337', '000343', '000294', '000308', '001093', '001091',]81 }, {82 childName: '组合信息',83 // 组合商品 组合分类 组合目录84 textCode: ['001032', '001161', '001155']85 }86 ],87 },88 {89 modulName: '服务管理',90 iconClass: "iconfont icon-xiaoshouhangzhengguanli",91 children: [92 '000786', // 分类管理 93 '000791', // 目录管理 94 {95 childName: '服务信息',96 // 服务管理 服务商品用量 97 textCode: ['000877', '000906',]98 }, {99 childName: '服务定价',100 // 车型工时管理 套餐售价设置101 textCode: ['000884', '000897',]102 },103 '001343' // 推荐服务104 ],105 },106 {107 modulName: '客户管理',108 iconClass: "iconfont icon-xiaoshouhangzhengguanli",109 // 客户档案110 children: ['000367']111 },112 {113 modulName: '供应商管理',114 iconClass: "iconfont icon-gongyinglianguanli",115 // 供应商信息 采购合同116 children: ['000393', '000670']117 },118 {119 modulName: '供应链管理',120 iconClass: "iconfont icon-jichushezhi",121 children: [122 {123 childName: '需求管理',124 // 日常补货计划 需求处理 125 textCode: ['001103', '001126',]126 }, {127 childName: '整车采购',128 // 采购订单 采购付款 采购开票 采购入库 129 textCode: ['000410', '000425', '000421', '000417',]130 }, {131 childName: '整车共享',132 // 车辆分享 车辆发布 调拨出库 调拨入库 133 textCode: ['000767', '000769', '000818', '000826',]134 }, {135 childName: '商品供应链',136 // 商品采购 采购入库 采购退货 调拨出库 调拨入库 内售出库 内售入库 自采管理 自采到货处理 商品库存调整 报损/报溢 137 textCode: ['000429', '000434', '001326', '000698', '000720', '000962', '000957', '001601', '001602', '001615', '000684',]138 }, {139 childName: '库存信息',140 // 商品库存 整车库存 入库批次查询 出入库查询 调拨在途查询 141 textCode: ['000454', '001340', '001319', '001322', '001564',]142 }, {143 childName: '盘点管理',144 // 盘点计划 盘点处理145 textCode: ['000622', '000610',]146 }, {147 childName: '对账/核销',148 // 对账单管理 核销单管理 149 textCode: ['001539', '001549',]150 }, 151 '001780' // 自采对账核销152 ]153 },154 {155 modulName: '整车交易',156 iconClass: "iconfont icon-jichushezhi",157 children: [158 {159 childName: '行政设置',160 // 销售目标 商务政策 历史客流导入161 textCode: ['000499', '000516', '001740',]162 }, {163 childName: '新车销售',164 // 前台接待 销售线索 整车订单 订单收款 订单开票 订单退款165 textCode: ['000463', '000481', '000551', '000601', '000607', '000608']166 }167 ],168 },169 {170 modulName: '售后交易',171 iconClass: "iconfont icon-jichushezhi",172 children: [173 {174 childName: '行政设置',175 // 员工排班 检查模板176 textCode: ['000836', '001351',]177 }, 178 '001742', // 快捷洗车179 {180 childName: '售后维修',181 // 预约单 预检单查询 工单查询 派工管理 打卡管理 维修领料 质检查询 工单收款 工单开票182 textCode: ['001913', '001697', '001672', '000929', '000951', '001741', '001724', '001371']183 }184 ],185 },186 {187 modulName: '卡券中心',188 iconClass: "iconfont icon-jichushezhi",189 children: [190 {191 childName: '卡中心',192 // 计次卡模版 储值卡模版 卡管理 卡销售 卡充值 卡退换193 textCode: ['001216', '001566', '001261', '001226', '001239', '001307']194 },195 {196 childName: '券中心',197 // // 券模板 券管理 券销售198 textCode: [ '001469', '001667', '001952']199 }200 ],201 },202 {203 modulName: '财务管理',204 iconClass: "iconfont icon-jichushezhi",205 children: [206 {207 childName: '发票管理',208 // 退票管理209 textCode: ['001376']210 }211 ],212 },213 {214 modulName: '数据报表',215 iconClass: "iconfont icon-jichushezhi",216 children: [217 {218 childName:'整车交易',219 // 展厅客流日志 CRM回访跟进表 跨部门策略表 DCC线索跟进转化表 SC线索跟进转化表 LPE展厅客流日志 销售管理报表 经销商财务报表 SC线索电话跟进清单220 textCode: ['000740', '000796', '001203', '001119', '001120', '001306', '001660', '001415', '001671']221 }222 ],223 },224 ],225 //菜单sidebar 渲染226 menuMap: {227 // ==========================================以下为基础模块228 //数据字典229 '000001': {230 url:common.isweb() + '/dataDictionary/dataDictionary.html',231 isNative:false232 },233 //业务序号234 '000011': {235 url: common.isweb() + '/ordinal-info/ordinal-info.html',236 isNative:false237 },238 //菜单管理239 '000018': {240 url: common.isweb() + '/menu/menu.html',241 isNative:false242 },243 //组织管理244 '000024': {245 url: common.isweb() + '/organization/organization.html',246 isNative:false 247 },248 //岗位管理249 '000030': {250 url: common.isweb() + '/position/position.html',251 isNative:false 252 },253 //角色管理254 '000039': {255 url: common.isweb() + '/role/role.html',256 isNative:false 257 },258 //行政区域管理259 '000071': {260 url: common.isweb() + '/china/china.html',261 isNative:false 262 },263 //配送区域管理264 '000079': {265 url: common.isweb() + '/distribution/distribution.html',266 isNative:false 267 },268 //采购区域管理269 '000085': {270 url: common.isweb() + '/purchase/purchase.html',271 isNative: false272 },273 //销售区域管理274 '000091': {275 url: common.isweb() + '/sale/sale.html',276 isNative: false 277 },278 //员工信息管理279 '000099': {280 url: common.isweb() + '/employee/employee.html',281 isNative: false 282 },283 //车型-厂家信息284 '000111': {285 url: common.isweb() + '/carType/factory/factory.html',286 isNative: false 287 },288 //车型-品牌信息289 '000118': {290 url: common.isweb() + '/carType/brand/brand.html',291 isNative: false 292 },293 //车型-车系信息294 '000125': {295 url: common.isweb() + '/carType/series/series.html',296 isNative: false 297 },298 //车型-车型信息299 '000132': {300 url: common.isweb() + '/carType/model/model.html',301 isNative: false 302 },303 //车型-排量信息304 '000139': {305 url: common.isweb() + '/carType/displacement/displacement.html',306 isNative: false 307 },308 //车型-进气方式309 '000146': {310 url: common.isweb() + '/carType/inlet/inlet.html',311 isNative: false 312 },313 //主车型信息314 '000153': {315 url: common.isweb() + '/carType/mainCarType/mainCarType.html',316 isNative: false 317 },318 //统一任务调度319 '000167': {320 url: common.isweb() + '/task/tasklist.html',321 isNative: false 322 },323 //门店管理324 // '000174': {325 // url: common.isweb() + '/store/storeInfo/storeInfo.html',326 // isNative: false 327 // },328 //门店可见车型设置329 '000183': {330 url: common.isweb() + '/store/storeVisibleCar/storeVisibleCar.html',331 isNative: false 332 },333 //主车型信息V2334 '001050': {335 url: common.isweb() + '/carType/saleMainCarType/saleMainCarType.html',336 isNative: false337 },338 // ==========================================以下为销售模块339 //商品关联车型设置340 '000308': {341 url: common.islivePro() + '/models/query',342 isNative: false 343 },344 //市场活动345 "000217": {346 url: common.islivePro() + '/market/query',347 isNative: false 348 },349 //金融机构350 "000186": {351 url: common.islivePro() + '/finance/mainFinance',352 isNative: false 353 },354 //金融产品355 "000201": {356 url: common.islivePro() + '/financePro/mainFinancePro',357 isNative: false 358 },359 //金融协作报价360 '001186': {361 url: common.islivePro() + '/financeWb/quote',362 isNative: false 363 },364 //金融贷款申请365 '001187': {366 url: common.islivePro() + '/financeWb/loan',367 isNative: false 368 }, 369 //保险协作报价370 "001613": {371 url: common.islivePro() + '/insuranceWorkbench/quote',372 isNative: false373 },374 //保险出单管理375 "001670": {376 url: common.islivePro() + '/insuranceWorkbench/out',377 isNative: false378 },379 //保险公司380 "000232": {381 url: common.islivePro() + '/insurance/query',382 isNative: false 383 },384 //保险方案385 "000246": {386 url:common.islivePro() + '/insurancepro/query',387 isNative: false 388 },389 //调查问卷设置390 "000252": {391 url:common.islivePro() + '/questionnaire/query',392 isNative: false393 },394 //调研任务工作台395 "000275": {396 url: common.islivePro() + '/research/query',397 isNative: false 398 },399 // 商品分类400 "000288": {401 url:common.islivePro() + '/classification',402 isNative: false 403 },404 // 商品目录405 "000315": {406 url:common.islivePro() + '/catalog',407 isNative: false 408 },409 //商品品牌410 '000282': {411 url:common.islivePro() + '/commoditybrand',412 isNative: false 413 },414 //商品价格415 '000294': {416 url:common.islivePro() + '/skuPrice/query',417 isNative: false 418 },419 //商品产地420 '000302': {421 url: common.islivePro() + '/birthplace',422 isNative: false 423 },424 //整车商品425 '000321': {426 url: common.islivePro() + '/archives/query',427 isNative: false 428 },429 //商品包装430 '000337': {431 url: common.islivePro() + '/pack',432 isNative: false 433 },434 //商品单位435 '000343': {436 url: common.islivePro() + '/commodityunit',437 isNative: false 438 },439 //供应商信息440 // '000393': {441 // url: common.islivePro() + '/supplier',442 // isNative: false 443 // },444 //仓库信息445 '000402': {446 url: common.islivePro() + '/warehouse/query',447 isNative: false 448 },449 //仓库库区450 '000442': {451 url: common.islivePro() + '/whArea',452 isNative: false 453 },454 //仓库库位455 '000448': {456 url: common.islivePro() + '/whLocation',457 isNative: false 458 },459 //DCC线索管理460 '000481': {461 url: common.islivePro() + '/dccthread/queryclientmain',462 isNative: false 463 },464 //前台接待465 '000463': {466 url: common.islivePro() + '/receptionist',467 isNative: false 468 },469 //订单收款470 '000601': {471 url: common.islivePro() + '/incollectmoney/query',472 isNative: false 473 },474 //订单退款475 '000608': {476 url: common.islivePro() + '/outcollectmoney/query',477 isNative: false 478 },479 //订单开票480 '000607': {481 url: common.islivePro() + '/billing/query',482 isNative: false 483 },484 //销售订单485 '000551': {486 url: common.islivePro() + '/order',487 isNative: false 488 },489 //精品库存查询490 '000454': {491 url: common.islivePro() + '/storeInfo/sku',492 isNative: false493 },494 //整车库存查询495 '001340':{496 url: common.islivePro() + '/storeInfo/car',497 isNative: false498 },499 //整车锁定管理500 '000333': {501 url: common.islivePro() + '/archiveslock',502 isNative: false 503 },504 //整车采购订单505 '000410': {506 url: common.islivePro() + '/procurement/orderForm',507 isNative: false 508 },509 //整车采购付款510 '000425': {511 url: common.islivePro() + '/pay/query',512 isNative: false 513 },514 //整车采购开票515 '000421': {516 url: common.islivePro() + '/ticket/query',517 isNative: false 518 },519 //整车采购入库520 '000417': {521 url: common.islivePro() + '/storage/query',522 isNative: false 523 },524 //车辆资源共享平台525 '000767': {526 url: common.islivePro() + '/vehicle/share',527 isNative: false528 },529 //车辆资源发布530 '000769': {531 url: common.islivePro() + '/vehicle/release/main',532 isNative: false533 },534 //GP归属设置535 '000048': {536 url: common.islivePro() + '/gpbelonging/gp',537 isNative: false 538 },539 //SNP归属设置540 '000056': {541 url: common.islivePro() + '/snpbelonging/snp',542 isNative: false 543 },544 //销售目标545 '000499': {546 url: common.islivePro() + '/salesTargetPlan/query',547 isNative: false 548 },549 //商务政策550 '000516': {551 url: common.islivePro() + '/businessaffairs',552 isNative: false 553 },554 //门店审批流设置555 '000530': {556 url: common.islivePro() + '/salesAdmin/query',557 isNative: false 558 },559 //展厅客流日志560 '000740': {561 url: common.islivePro() + '/dataReport/exHallPassengerLog',562 isNative: false 563 },564 //展厅历史客流导入565 '001740': {566 url: common.islivePro() + '/dataReport/exHallPassengerToChannel',567 isNative: false568 },569 //CRM跟进情况表570 '000796': {571 url: common.islivePro() + '/dataReport/crmFollowUp',572 isNative: false573 },574 //SC线索电话跟进清单575 '001671': {576 url: common.islivePro() + '/dataReport/phonecalllist',577 isNative: false578 },579 //SC线索跟进及转化表580 '001120': {581 url: common.islivePro() + '/dataReport/scThreadFollowUp',582 isNative: false583 },584 //DCC线索跟进及转化表585 '001119': {586 url: common.islivePro() + '/dataReport/dccThreadReport',587 isNative: false588 },589 //经销商财务报表590 '001415': {591 url: common.islivePro() + '/dataReport/financeReport',592 isNative: false593 },594 //销售管理报表595 '001660': {596 url: common.islivePro() + '/dataReport/salesManageOrder',597 isNative: false598 },599 //跨部门策略表600 '001203': {601 url: common.islivePro() + '/policyTable/list',602 isNative: false603 },604 //LPE展厅客流日志605 '001306': {606 url: common.islivePro() + '/lpe/index',607 isNative: false608 },609 //内采内销调出单610 '000818': {611 url: common.islivePro() + '/vehicle/callOut/main',612 isNative: false613 },614 //内采内销调入单615 '000826': {616 url: common.islivePro() + '/vehicle/callIn/main',617 isNative: false618 },619 //组合商品620 '001032':{621 url: common.islivePro() + '/skuComb/query',622 isNative: false 623 }, 624 //商品关联车型设置V1625 '001000':{626 url: common.islivePro() + '/models/query',627 isNative: false 628 }, 629 // ==========================================以下为售后模块630 //精品商品631 '000323': {632 url: common.isliveCs() + '/skuinfo/query',633 isNative: true 634 },635 //精品采购订单636 '000429': {637 url: common.isliveCs() + '/purchase-order/purchase-query',638 isNative: true 639 },640 //精品采购入库641 '000434': {642 url: common.isliveCs() + '/notarchives-put/notarchives-query',643 isNative: true 644 },645 //客户主档646 '000367': {647 url: common.isliveCs() + '/mancar/query',648 isNative: true 649 },650 //员工岗位651 '001015': {652 url: common.isliveCs() + '/staffjobs/query',653 isNative: true 654 },655 //员工打卡656 '000951': {657 url: common.isliveCs() + '/clock/clock',658 isNative: true 659 },660 //盘点单 661 '000610': {662 url: common.isliveCs() + '/blitem/blitemSearch',663 isNative: true 664 },665 //采购合同666 '000670': {667 url: common.isliveCs() + '/purchasecontract/search',668 isNative: true 669 },670 //员工管理671 '000979': {672 url: common.isliveCs() + '/staff/search',673 isNative: true 674 },675 //盘点计划676 '000622': {677 url: common.isliveCs() + '/checkplan/query',678 isNative: true 679 },680 //账务账期681 '000662': {682 url: common.isliveCs() + '/accounting/query',683 isNative: true 684 },685 //服务信息686 '000877': {687 url: common.isliveCs() + '/serviceitem/query',688 isNative: true 689 },690 //服务固定价格691 '000897': {692 url: common.isliveCs() + '/service-staticprice/query',693 isNative: true 694 },695 //服务工时车型适配696 '000884': {697 url: common.isliveCs() + '/service-manhour/query',698 isNative: true 699 },700 //非整车调拨入库单701 '000720': {702 url: common.isliveCs() + '/allotin/query',703 isNative: true 704 },705 //非整车调拨出库单706 '000698': {707 url: common.isliveCs() + '/allotout/query',708 isNative: true 709 },710 //报损报溢711 '000684': {712 url: common.isliveCs() + '/decrease-overflow/query',713 isNative: true 714 },715 //库存调整单716 '001615': {717 url: common.isliveCs() + '/stock-adjust/query',718 isNative: true 719 },720 //员工排班721 '000836': {722 url: common.isliveCs() + '/emp-scheduling',723 isNative: true 724 },725 //商品服务目录726 '000791': {727 url: common.isliveCs() + '/serviceCatalog/query',728 isNative: true 729 },730 //商品服务分类731 '000786': {732 url: common.isliveCs() + '/serviceClassify/query',733 isNative: true 734 },735 //商品服务-服务商品关系及数量信息736 '000906': {737 url: common.isliveCs() + '/servicesku',738 isNative: true 739 },740 //售后主业务(派工管理)741 '000929': {742 url: common.isliveCs() + '/resource-utilization/resource-utilization',743 isNative: true 744 },745 //门店管理746 // '001076': {747 // url: '/storemanage',748 // isNative: true 749 // },750 //供应商信息751 '000393': {752 url: common.isliveCs() + '/supplier/supplierSearch',753 isNative: true 754 }, 755 //车型查询适配SKU756 '001091':{757 url: common.isliveCs() + '/carSku',758 isNative: true 759 },760 //SKU车型适配全数据预览761 '001093':{762 url: common.isliveCs() + '/skuCarAll',763 isNative: true 764 },765 /*==========================================演示测试==============================================================*/766 //非整车采购订单767 '000955' :{768 url: common.isliveCs() + '/purchase-order',769 isNative: true770 },771 // 自采管理772 '001601' :{773 url: common.isliveCs() + '/store-ownpurchase/search',774 isNative: true775 },776 // 自采到货处理777 '001602' :{778 url: common.isliveCs() + '/arrive-handle/query',779 isNative: true780 },781 //日常补货计划782 '001103' :{783 url: common.isliveCs() + '/dailyfill/query',784 isNative: true785 },786 //商品摆放目录787 '001425' :{788 url: common.isliveCs() + '/sku-place/query',789 isNative: true790 },791 //非整车采购退货792 '001326' :{793 url: common.isliveCs() + '/purchase-return/purchase-return-search',794 isNative: true795 },796 //出入库清单明细797 '001322' :{798 url: common.isliveCs() + '/warehousing-list',799 isNative: true800 },801 //入库清单明细802 '001319' :{803 url: common.isliveCs() + '/inventory-list',804 isNative: true805 },806 //集团内调拨入库单807 '000957' :{808 url: common.isliveCs() + '/group-allotin/query',809 isNative: true810 },811 //集团调拨出库单812 '000962' :{813 url: common.isliveCs() + '/group-allotout/query',814 isNative: true815 },816 //需求单817 '001126' :{818 url: common.isliveCs() + '/demand-order/require-goods',819 isNative: true820 },821 //组合商品822 '000349': {823 url: common.isliveCs() + '/skuComb',824 isNative: true 825 },826 // 组合分类827 '001161' :{828 url: common.isliveCs() + '/groupClassify/query',829 isNative: true830 },831 // 组合目录832 '001155' :{833 url: common.isliveCs() + '/groupCatalog/query',834 isNative: true835 },836 // 门店管理837 '001069' :{838 url: common.isliveCs() + '/storemanage/query',839 isNative: true840 },841 //门店工位信息842 '000970' :{843 url: common.isliveCs() + '/store-station',844 isNative: true845 },846 //卡模板管理计次卡847 '001216' :{848 url: common.isliveCs() + '/card-template-counting/card-template-counting-query',849 isNative: true850 },851 //卡充值852 '001239' :{853 url: common.isliveCs() + '/card-pay/card-pay-search',854 isNative: true855 },856 //卡管理857 '001261' :{858 url: common.isliveCs() + '/card-manager/query',859 isNative: true860 },861 //卡销售单862 '001226' :{863 url: common.isliveCs() + '/card-sale-order/query',864 isNative: true865 },866 //退卡退款867 '001307' :{868 url: common.isliveCs() + '/back-card/back-card-query',869 isNative: true870 },871 // 券模板 872 '001469': {873 url: common.isliveCs() + '/ticket-template-counting/ticket-template-counting-query',874 isNative: true875 },876 // 券管理 877 '001667': {878 url: common.isliveCs() + '/ticket-manager/query',879 isNative: true880 },881 // 券销售882 '001952': {883 url: common.isliveCs() + '/coupons-sale-order/query',884 isNative: true885 },886 // 检查模板887 '001351' :{888 url: common.isliveCs() + '/check-template/check-template-search',889 isNative: true890 },891 // 对账单892 '001539' :{893 url: common.isliveCs() + '/statement-account/query',894 isNative: true895 },896 // 对账核销单897 '001549' : {898 url: common.isliveCs() + '/statement-account-cancel/query',899 isNative: true900 },901 // 自采对账核销902 '001780' : {903 url: common.isliveCs() + '/account-check/index',904 isNative: true905 },906 // 调拨相关清单907 '001564' :{908 url: common.isliveCs() + '/allot-relative/query',909 isNative: true910 },911 // 卡模版储值912 '001566' :{913 url: common.isliveCs() + '/card-template-storedvalue/card-template-storedvalue-query',914 isNative: true915 },916 // 退票917 '001376' :{918 url: common.isliveCs() + '/refund/refund-query',919 isNative: true920 },921 // 开票922 '001371' :{923 url: common.isliveCs() + '/workOrderInvoice/workOrderInvoice',924 isNative: true925 },926 // 洗车927 '001742': {928 url: common.isliveCs() + '/vehicle-cleaning/vehicle-cleaning-add',929 isNative: true930 },931 // 维修合同932 '001689': {933 url: common.isliveCs() + '/work-order/work-order-search',934 isNative: true935 },936 // 预约单937 '001913': {938 url: common.isliveCs() + '/appointment-new',939 isNative: true940 },941 // 预检单942 '001697': {943 url: common.isliveCs() + '/precheck-fix/precheck-fix-query',944 isNative: true945 },946 // 订单结算947 '001724': {948 url: common.isliveCs() + '/workOrderPay/workOrderPay',949 isNative: true950 },951 // 领料952 '001741': {953 url: common.isliveCs() + '/store-requisition/query',954 isNative: true955 },956 // 非整车工单基础包957 '001672': {958 url: common.isliveCs() + '/check-fix-list/query',959 isNative: true960 },961 // 促销折扣权限962 '001390' :{963 url: common.isliveCs() + '/sale-discount/sale-discount-search',964 isNative: true965 },966 //供应商967 '000636' :{968 url: common.isliveCs() + '/supplier/supplierSearch',969 isNative: true970 },971 // 服务推荐972 '001343' :{973 url: common.isliveCs() + '/service-recommend/query',974 isNative: true975 },976 // 人车-会员车辆信息977 '001437' :{978 url: common.isliveCs() + '/mancar/query',979 isNative: true980 },981 // 商品信息982 '000905' :{983 url: common.isliveCs() + '/skuinfo/query',984 isNative: true985 },986 // 服务信息987 '000803' :{988 url: common.isliveCs() + '/serviceitem/query',989 isNative: true990 },991 // 非整车商品采购992 '001506' :{993 url: common.isliveCs() + '/notarchives-put/notarchives-query',994 isNative: true995 }996 }...

Full Screen

Full Screen

JSBHelper.js

Source:JSBHelper.js Github

copy

Full Screen

1/**2 * Created by vivekfitkariwala on 07/08/15.3 */4helper.JSBHelper = helper.JSBHelper || {};5puremvc.define(6 //class info7 {8 name: "helper.JSBHelper"9 },10 //instance member11 {},12 //static member13 {14 NAME: "HELPER_JSB_HELPER",15 ASSET_DOWNLOADED: "HELPER_ASSET_DOWNLOADED",16 ZIP_DOWNLOADED: "HELPER_ZIP_DOWNLOADED",17 BOOK_BACK_PRESSED: "HELPER_BOOK_BACK_PRESSED",18 MUSIC_BACK_PRESSED: "HELPER_MUSIC_BACK_PRESSED",19 GAME_BACK_PRESSED: "HELPER_GAME_BACK_PRESSED",20 WEB_ACTIVITY_BACK_PRESSED: "HELPER_WEB_ACTIVITY_BACK_PRESSED",21 startAssetDownload: function (assetURL, folderName, assetName) {22 //call the jsb function for downloading image23 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {24 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "downloadAsset", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", assetURL, folderName, assetName);25 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {26 jsb.reflection.callStaticMethod("JSBHelper", "downloadAssetWithURL:folderName:assetName:", assetURL, folderName, assetName);27 }28 },29 assetDownloaded: function (message, assetURL) {30 //send callback when image is downloaded31 var object = {32 message: message,33 url: assetURL34 };35 //dispatch notification for receiving asset36 platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).sendNotification(helper.JSBHelper.ASSET_DOWNLOADED, object);37 },38 playVideo: function (stringData) {39 //starting the youtube video40 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {41 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "startYouTubeVideo", "(Ljava/lang/String;)V", stringData);42 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {43 jsb.reflection.callStaticMethod("JSBHelper", "LoadWebViewWithData:", stringData);44 }else if(!cc.sys.isNative) {45 var data = JSON.parse(stringData);46 window.open('https://www.youtube.com/embed/'+data.videoID+'?autoplay=1&controls=1&rel=0&showinfo=0&enablejsapi=1','_blank');47 }48 },49 playMusic: function (stringData) {50 //starting the music51 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {52 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "startMusicPlayer", "(Ljava/lang/String;)V", stringData);53 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {54 jsb.reflection.callStaticMethod("JSBHelper", "Log:", "playMusic");55 }56 },57 musicBackPressed: function (stringData) {58 var object = JSON.parse(stringData);59 //dispatch notification for receiving music60 platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).sendNotification(helper.JSBHelper.MUSIC_BACK_PRESSED, object);61 },62 videoBackPressed: function (stringData) {63 cc.log("Video Back Pressed");64 var object = JSON.parse(decodeURIComponent(stringData));65 //dispatch notification for receiving image66 platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).sendNotification(helper.JSBHelper.WEB_ACTIVITY_BACK_PRESSED, object);67 },68 bookBackPressed: function (stringData) {69 cc.log("Book back pressed");70 var object = JSON.parse(stringData);71 //dispatch notification for receiving image72 platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).sendNotification(helper.JSBHelper.WEB_ACTIVITY_BACK_PRESSED, object);73 },74 gameBackPressed: function (stringData) {75 cc.log("Game back pressed");76 var object = JSON.parse(stringData);77 //dispatch notification for receiving image78 platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).sendNotification(helper.JSBHelper.WEB_ACTIVITY_BACK_PRESSED, object);79 },80 startDownloadingAndExtractingZip: function (zipURL, folderName, zipName) {81 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {82 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "downloadZipAndExtract", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", zipURL, folderName, zipName);83 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {84 jsb.reflection.callStaticMethod("JSBHelper", "downloadZipWithURL:folderName:assetName:", zipURL, folderName, zipName);85 }86 },87 zipDownloadingAndExtractingComplete: function (message, zipURL) {88 var object = {89 message: message,90 url: zipURL91 };92 cc.log("Zip Download and Extract Complete");93 //dispatch notification for receiving image94 platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).sendNotification(helper.JSBHelper.ZIP_DOWNLOADED, object);95 },96 playWebGame: function (stringObject) {97 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {98 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "playGame", "(Ljava/lang/String;)V", stringObject);99 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {100 jsb.reflection.callStaticMethod("JSBHelper", "LoadWebViewWithData:", stringObject);101 }else if(!cc.sys.isNative) {102 var data = JSON.parse(stringObject);103 window.open('http://www.playpowerlabs.org/lwactivities/'+data.zipName,'_blank');104 }105 },106 playVideoOffline: function (stringData) {107 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {108 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "videoPlayer", "(Ljava/lang/String;)V", stringData);109 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {110 jsb.reflection.callStaticMethod("JSBHelper", "Log:", "playVideo");111 }else if(!cc.sys.isNative) {112 var data = JSON.parse(decodeURIComponent(stringData));113 if(data.videoID)114 window.open('https://www.youtube.com/embed/'+data.videoID+'?autoplay=1&controls=1&rel=0&showinfo=0&enablejsapi=1','_blank');115 }116 },117 startBook: function (stringObject) {118 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {119 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "openBook", "(Ljava/lang/String;)V", stringObject);120 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {121 jsb.reflection.callStaticMethod("JSBHelper", "LoadWebViewWithData:", stringObject);122 }else if(!cc.sys.isNative) {123 var data = JSON.parse(stringObject);124 window.open(data.URL,'_blank');125 }126 },127 viewSource: function (sourceUrl) {128 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {129 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "openUrl", "(Ljava/lang/String;)V", sourceUrl);130 }else if(cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS){131 jsb.reflection.callStaticMethod("JSBHelper", "LoadSourceWithURL:", sourceUrl);132 }133 },134 TTS: function (sentence) {135 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {136 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "TTS", "(Ljava/lang/String;)V", sentence);137 }else if(cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS){138 jsb.reflection.callStaticMethod("JSBHelper", "TTSWithString:", sentence);139 }140 },141 analyticsSetUserDetail: function () {142 //retriving the levelVO data143 var _progressProxy = platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).retrieveProxy(platform.model.ProgressProxy.NAME);144 var _progressVO = _progressProxy.getData();145 var userVO = _progressVO.userVOObject;146 var analyticUserID = _progressVO.currentUser;147 var analyticUserDetail = {};148 analyticUserDetail.childName = userVO[analyticUserID][platform.LocalStorageConstants.CHILD_NAME];149 analyticUserDetail.childAge = userVO[analyticUserID][platform.LocalStorageConstants.CHILD_AGE];150 analyticUserDetail.childGender = userVO[analyticUserID][platform.LocalStorageConstants.CHILD_GENDER];151 analyticUserDetail.profilePic = userVO[analyticUserID][platform.LocalStorageConstants.CHILD_PROFILE_PIC];152 analyticUserDetail.parentEmail = userVO[platform.LocalStorageConstants.PARENT_EMAIL];153 //convert analyticUserDetail to string154 var analyticStringUserDetail = JSON.stringify(analyticUserDetail);155 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {156 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppAnalytics", "setUserDetail", "(Ljava/lang/String;Ljava/lang/String;)V", analyticUserID, analyticStringUserDetail);157 } else if (cc.sys.isNative && cc.sys.os === cc.sys.OS_IOS) {158 //jsb.reflection.callStaticMethod("JSBHelper", "customUserId", "(Ljava/lang/String;)V", userId);159 }160 },161 analyticsSetScreen: function (screenCategory, screenName, properties) {162 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {163 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppAnalytics", "trackScreen", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", screenCategory, screenName, properties);164 } else if (cc.sys.isNative && cc.sys.os === cc.sys.OS_IOS) {165 //jsb.reflection.callStaticMethod("JSBHelper", "customUserId", "(Ljava/lang/String;)V", userId);166 }167 },168 analyticsLogEvent: function (eventName, eventProperties) {169 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {170 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppAnalytics", "trackAction", "(Ljava/lang/String;Ljava/lang/String;)V", eventName, eventProperties);171 } else if (cc.sys.isNative && cc.sys.os === cc.sys.OS_IOS) {172 //jsb.reflection.callStaticMethod("JSBHelper", "customUserId", "(Ljava/lang/String;)V", userId);173 }174 },175 getExternalStoragePath: function () {176 var storagePath = "";177 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {178 storagePath = jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "getExternalPath", "()Ljava/lang/String;");179 } else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {180 storagePath = jsb.reflection.callStaticMethod("JSBHelper", "getExternalPath");181 }182 return storagePath;183 },184 //For TV Version;185 getServerPath: function () {186 var serverPath = "";187 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {188 serverPath = jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "getServerPath", "()Ljava/lang/String;");189 }190 return serverPath;191 },192 checkDirectoryExists: function (directoryPath) {193 if (cc.sys.isNative) {194 if (jsb.fileUtils.isDirectoryExist(directoryPath) == true) {195 return true;196 } else {197 return false;198 }199 }200 },201 openWebLink: function (url) {202 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {203 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "openWebLink", "(Ljava/lang/String;)V",url);204 }205 },206 shareMessage: function (message) {207 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {208 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "shareMessage", "(Ljava/lang/String;)V",message);209 }210 },211 exitApp: function () {212 if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID) {213 jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "exitApp", "()V");214 }215 },216 saveLoaderUserData: function () {217 var currentScene = cc.director.getRunningScene();218 if(currentScene && currentScene.NAME == 'LoaderView'){219 var progressProxy = platform.ApplicationFacade.getInstance(platform.ApplicationFacade.NAME).retrieveProxy(platform.model.ProgressProxy.NAME);220 progressProxy.saveUserVOData();221 }222 },223 checkFileExists: function (filePath) {224 if (cc.sys.isNative) {225 if (jsb.fileUtils.isFileExist(filePath) == true) {226 return true;227 } else {228 return false;229 }230 }231 }232 }...

Full Screen

Full Screen

poly.js

Source:poly.js Github

copy

Full Screen

...61 unique = require('../src/unique')62 values = require('../src/values')63 some = require('../src/some')64 natives.restore()65 if (isNative(assign)) throw new Error('native assign loaded where polyfill was expected')66 if (isNative(bind)) throw new Error('native bind loaded where polyfill was expected')67 if (isNative(debounce)) throw new Error('native debounce loaded where polyfill was expected')68 if (isNative(each)) throw new Error('native each loaded where polyfill was expected')69 if (isNative(every)) throw new Error('native every loaded where polyfill was expected')70 if (isNative(filter)) throw new Error('native filter loaded where polyfill was expected')71 if (isNative(find)) throw new Error('native find loaded where polyfill was expected')72 if (isNative(get)) throw new Error('native get loaded where polyfill was expected')73 if (isNative(identity)) throw new Error('native identity loaded where polyfill was expected')74 if (isNative(indexOf)) throw new Error('native indexOf loaded where polyfill was expected')75 if (isNative(invoke)) throw new Error('native invoke loaded where polyfill was expected')76 if (isNative(isArray)) throw new Error('native isArray loaded where polyfill was expected')77 if (isNative(isObject)) throw new Error('native isObject loaded where polyfill was expected')78 if (isNative(isMatch)) throw new Error('native isMatch loaded where polyfill was expected')79 if (isNative(keys)) throw new Error('native keys loaded where polyfill was expected')80 if (isNative(map)) throw new Error('native map loaded where polyfill was expected')81 if (isNative(matches)) throw new Error('native matches loaded where polyfill was expected')82 if (isNative(not)) throw new Error('native not loaded where polyfill was expected')83 if (isNative(objectEach)) throw new Error('native objectEach loaded where polyfill was expected')84 if (isNative(objectMap)) throw new Error('native objectMap loaded where polyfill was expected')85 if (isNative(objectReduce)) throw new Error('native objectReduce loaded where polyfill was expected')86 if (isNative(pick)) throw new Error('native pick loaded where polyfill was expected')87 if (isNative(pluck)) throw new Error('native pluck loaded where polyfill was expected')88 if (isNative(reduce)) throw new Error('native reduce loaded where polyfill was expected')89 if (isNative(set)) throw new Error('native set loaded where polyfill was expected')90 if (isNative(slice)) throw new Error('native slice loaded where polyfill was expected')91 if (isNative(unique)) throw new Error('native unique loaded where polyfill was expected')92 if (isNative(values)) throw new Error('native values loaded where polyfill was expected')93 if (isNative(some)) throw new Error('native some loaded where polyfill was expected')94 require('./src/assign')(assign)95 require('./src/bind')(bind)96 require('./src/debounce')(debounce)97 require('./src/each')(each)98 require('./src/every')(every)99 require('./src/filter')(filter)100 require('./src/find')(find)101 require('./src/get')(get)102 require('./src/identity')(identity)103 require('./src/indexOf')(indexOf)104 require('./src/invoke')(invoke)105 require('./src/isArray')(isArray)106 require('./src/isObject')(isObject)107 require('./src/isMatch')(isMatch)108 require('./src/keys')(keys)109 require('./src/map')(map)110 require('./src/matches')(matches)111 require('./src/not')(not)112 require('./src/objectEach')(objectEach)113 require('./src/objectMap')(objectMap)114 require('./src/objectReduce')(objectReduce)115 require('./src/pick')(pick)116 require('./src/pluck')(pluck)117 require('./src/reduce')(reduce)118 require('./src/set')(set)119 require('./src/slice')(slice)120 require('./src/unique')(unique)121 require('./src/values')(values)122 require('./src/some')(some)123 })124 describe('from bundle', function () {125 natives.override()126 assign = require('../dist').assign127 bind = require('../dist').bind128 debounce = require('../dist').debounce129 each = require('../dist').each130 every = require('../dist').every131 filter = require('../dist').filter132 find = require('../dist').find133 get = require('../dist').get134 identity = require('../dist').identity135 indexOf = require('../dist').indexOf136 invoke = require('../dist').invoke137 isArray = require('../dist').isArray138 isObject = require('../dist').isObject139 isMatch = require('../dist').isMatch140 keys = require('../dist').keys141 map = require('../dist').map142 matches = require('../dist').matches143 not = require('../dist').not144 objectEach = require('../dist').objectEach145 objectMap = require('../dist').objectMap146 objectReduce = require('../dist').objectReduce147 pick = require('../dist').pick148 pluck = require('../dist').pluck149 reduce = require('../dist').reduce150 set = require('../dist').set151 slice = require('../dist').slice152 unique = require('../dist').unique153 values = require('../dist').values154 some = require('../dist').some155 natives.restore()156 if (isNative(assign)) throw new Error('native assign loaded where polyfill was expected')157 if (isNative(bind)) throw new Error('native bind loaded where polyfill was expected')158 if (isNative(debounce)) throw new Error('native debounce loaded where polyfill was expected')159 if (isNative(each)) throw new Error('native each loaded where polyfill was expected')160 if (isNative(every)) throw new Error('native every loaded where polyfill was expected')161 if (isNative(filter)) throw new Error('native filter loaded where polyfill was expected')162 if (isNative(find)) throw new Error('native find loaded where polyfill was expected')163 if (isNative(get)) throw new Error('native get loaded where polyfill was expected')164 if (isNative(identity)) throw new Error('native identity loaded where polyfill was expected')165 if (isNative(indexOf)) throw new Error('native indexOf loaded where polyfill was expected')166 if (isNative(invoke)) throw new Error('native invoke loaded where polyfill was expected')167 if (isNative(isArray)) throw new Error('native isArray loaded where polyfill was expected')168 if (isNative(isObject)) throw new Error('native isObject loaded where polyfill was expected')169 if (isNative(isMatch)) throw new Error('native isMatch loaded where polyfill was expected')170 if (isNative(keys)) throw new Error('native keys loaded where polyfill was expected')171 if (isNative(map)) throw new Error('native map loaded where polyfill was expected')172 if (isNative(matches)) throw new Error('native matches loaded where polyfill was expected')173 if (isNative(not)) throw new Error('native not loaded where polyfill was expected')174 if (isNative(objectEach)) throw new Error('native objectEach loaded where polyfill was expected')175 if (isNative(objectMap)) throw new Error('native objectMap loaded where polyfill was expected')176 if (isNative(objectReduce)) throw new Error('native objectReduce loaded where polyfill was expected')177 if (isNative(pick)) throw new Error('native pick loaded where polyfill was expected')178 if (isNative(pluck)) throw new Error('native pluck loaded where polyfill was expected')179 if (isNative(reduce)) throw new Error('native reduce loaded where polyfill was expected')180 if (isNative(set)) throw new Error('native set loaded where polyfill was expected')181 if (isNative(slice)) throw new Error('native slice loaded where polyfill was expected')182 if (isNative(unique)) throw new Error('native unique loaded where polyfill was expected')183 if (isNative(values)) throw new Error('native values loaded where polyfill was expected')184 if (isNative(some)) throw new Error('native some loaded where polyfill was expected')185 require('./src/assign')(assign)186 require('./src/bind')(bind)187 require('./src/debounce')(debounce)188 require('./src/each')(each)189 require('./src/every')(every)190 require('./src/filter')(filter)191 require('./src/find')(find)192 require('./src/get')(get)193 require('./src/identity')(identity)194 require('./src/indexOf')(indexOf)195 require('./src/invoke')(invoke)196 require('./src/isArray')(isArray)197 require('./src/isObject')(isObject)198 require('./src/isMatch')(isMatch)...

Full Screen

Full Screen

native.js

Source:native.js Github

copy

Full Screen

...25 reduce = require('../src/reduce')26 slice = require('../src/slice')27 some = require('../src/some')28 values = require('../src/values')29 if (!isNative(assign)) throw new Error('polyfill assign loaded where native was expected')30 if (!isNative(each)) throw new Error('polyfill each loaded where native was expected')31 if (!isNative(every)) throw new Error('polyfill every loaded where native was expected')32 if (!isNative(filter)) throw new Error('polyfill filter loaded where native was expected')33 if (!isNative(find)) throw new Error('polyfill find loaded where native was expected')34 if (!isNative(indexOf)) throw new Error('polyfill indexOf loaded where native was expected')35 if (!isNative(isArray)) throw new Error('polyfill isArray loaded where native was expected')36 if (!isNative(keys)) throw new Error('polyfill keys loaded where native was expected')37 if (!isNative(map)) throw new Error('polyfill map loaded where native was expected')38 if (!isNative(reduce)) throw new Error('polyfill reduce loaded where native was expected')39 if (!isNative(slice)) throw new Error('polyfill slice loaded where native was expected')40 if (!isNative(values)) throw new Error('polyfill values loaded where native was expected')41 if (!isNative(some)) throw new Error('polyfill some loaded where native was expected')42 require('./src/assign')(assign)43 require('./src/each')(each)44 require('./src/every')(every)45 require('./src/filter')(filter)46 require('./src/find')(find)47 require('./src/indexOf')(indexOf)48 require('./src/isArray')(isArray)49 require('./src/keys')(keys)50 require('./src/map')(map)51 require('./src/reduce')(reduce)52 require('./src/slice')(slice)53 require('./src/some')(some)54 require('./src/values')(values)55 })56 describe('from bundle', function () {57 assign = require('../dist').assign58 each = require('../dist').each59 every = require('../dist').every60 filter = require('../dist').filter61 find = require('../dist').find62 indexOf = require('../dist').indexOf63 isArray = require('../dist').isArray64 keys = require('../dist').keys65 map = require('../dist').map66 reduce = require('../dist').reduce67 slice = require('../dist').slice68 values = require('../dist').values69 some = require('../dist').some70 if (!isNative(assign)) throw new Error('polyfill assign loaded where native was expected')71 if (!isNative(each)) throw new Error('polyfill each loaded where native was expected')72 if (!isNative(every)) throw new Error('polyfill every loaded where native was expected')73 if (!isNative(filter)) throw new Error('polyfill filter loaded where native was expected')74 if (!isNative(find)) throw new Error('polyfill find loaded where native was expected')75 if (!isNative(indexOf)) throw new Error('polyfill indexOf loaded where native was expected')76 if (!isNative(isArray)) throw new Error('polyfill isArray loaded where native was expected')77 if (!isNative(keys)) throw new Error('polyfill keys loaded where native was expected')78 if (!isNative(map)) throw new Error('polyfill map loaded where native was expected')79 if (!isNative(reduce)) throw new Error('polyfill reduce loaded where native was expected')80 if (!isNative(slice)) throw new Error('polyfill slice loaded where native was expected')81 if (!isNative(values)) throw new Error('polyfill values loaded where native was expected')82 if (!isNative(some)) throw new Error('polyfill some loaded where native was expected')83 require('./src/assign')(assign)84 require('./src/each')(each)85 require('./src/every')(every)86 require('./src/filter')(filter)87 require('./src/find')(find)88 require('./src/indexOf')(indexOf)89 require('./src/isArray')(isArray)90 require('./src/keys')(keys)91 require('./src/map')(map)92 require('./src/reduce')(reduce)93 require('./src/slice')(slice)94 require('./src/values')(values)95 require('./src/some')(some)96 })...

Full Screen

Full Screen

isNative.js

Source:isNative.js Github

copy

Full Screen

...26 });27 it('should return `false` for non-native methods', function() {28 var expected = lodashStable.map(falsey, stubFalse);29 var actual = lodashStable.map(falsey, function(value, index) {30 return index ? isNative(value) : isNative();31 });32 assert.deepStrictEqual(actual, expected);33 assert.strictEqual(isNative(args), false);34 assert.strictEqual(isNative([1, 2, 3]), false);35 assert.strictEqual(isNative(true), false);36 assert.strictEqual(isNative(new Date), false);37 assert.strictEqual(isNative(new Error), false);38 assert.strictEqual(isNative(_), false);39 assert.strictEqual(isNative({ 'a': 1 }), false);40 assert.strictEqual(isNative(1), false);41 assert.strictEqual(isNative(/x/), false);42 assert.strictEqual(isNative('a'), false);43 assert.strictEqual(isNative(symbol), false);44 });45 it('should work with native functions from another realm', function() {46 if (realm.element) {47 assert.strictEqual(isNative(realm.element.cloneNode), true);48 }49 if (realm.object) {50 assert.strictEqual(isNative(realm.object.valueOf), true);51 }52 });53 it('should throw an error if core-js is detected', function() {54 var lodash = runInContext({55 '__core-js_shared__': {}56 });57 assert.raises(function() { lodash.isNative(noop); });58 });59 it('should detect methods masquerading as native (test in Node.js)', function() {60 if (!amd && _baseEach) {61 var path = require('path'),62 basePath = path.dirname(filePath),63 uid = 'e0gvgyrad1jor',64 coreKey = '__core-js_shared__',65 fakeSrcKey = 'Symbol(src)_1.' + uid;66 root[coreKey] = { 'keys': { 'IE_PROTO': 'Symbol(IE_PROTO)_3.' + uid } };67 emptyObject(require.cache);68 var baseIsNative = interopRequire(path.join(basePath, '_baseIsNative'));69 assert.strictEqual(baseIsNative(slice), true);70 slice[fakeSrcKey] = slice + '';71 assert.strictEqual(baseIsNative(slice), false);...

Full Screen

Full Screen

build-platforms.js

Source:build-platforms.js Github

copy

Full Screen

1module.exports = {2 android: {3 isNative: !0,4 pack: !0,5 useTemplate: !0,6 stripDefaultValues: !0,7 exportSimpleProject: !18 },9 "android-instant": {10 isNative: !0,11 pack: !1,12 useTemplate: !0,13 stripDefaultValues: !0,14 exportSimpleProject: !115 },16 ios: {17 isNative: !0,18 pack: !0,19 useTemplate: !0,20 stripDefaultValues: !0,21 exportSimpleProject: !122 },23 mac: {24 isNative: !0,25 pack: !0,26 useTemplate: !0,27 stripDefaultValues: !0,28 exportSimpleProject: !129 },30 win32: {31 isNative: !0,32 pack: !0,33 useTemplate: !0,34 stripDefaultValues: !0,35 exportSimpleProject: !136 },37 "web-mobile": {38 isNative: !1,39 pack: !0,40 useTemplate: !1,41 stripDefaultValues: !0,42 exportSimpleProject: !143 },44 "web-desktop": {45 isNative: !1,46 pack: !0,47 useTemplate: !1,48 stripDefaultValues: !0,49 exportSimpleProject: !150 },51 "fb-instant-games": {52 isNative: !1,53 pack: !0,54 useTemplate: !1,55 stripDefaultValues: !0,56 exportSimpleProject: !157 },58 wechatgame: {59 isNative: !1,60 pack: !0,61 useTemplate: !1,62 stripDefaultValues: !0,63 exportSimpleProject: !164 },65 "wechatgame-subcontext": {66 isNative: !1,67 pack: !0,68 useTemplate: !1,69 stripDefaultValues: !0,70 exportSimpleProject: !171 },72 qqplay: {73 isNative: !1,74 pack: !0,75 useTemplate: !1,76 stripDefaultValues: !0,77 exportSimpleProject: !178 },79 export: {80 isNative: !0,81 pack: !1,82 useTemplate: !1,83 stripDefaultValues: !1,84 exportSimpleProject: !085 },86 editor: {87 isNative: !188 }...

Full Screen

Full Screen

02-utils-isnative.js

Source:02-utils-isnative.js Github

copy

Full Screen

1/*eslint-env mocha*/2/*global chai*/3describe("BOOMR.utils.isNative()", function() {4 var assert = chai.assert;5 it("Should return false if input is not an function", function() {6 assert.isFalse(BOOMR.utils.isNative(null));7 assert.isFalse(BOOMR.utils.isNative(undefined));8 assert.isFalse(BOOMR.utils.isNative());9 assert.isFalse(BOOMR.utils.isNative(""));10 assert.isFalse(BOOMR.utils.isNative(1));11 assert.isFalse(BOOMR.utils.isNative(true));12 assert.isFalse(BOOMR.utils.isNative(false));13 assert.isFalse(BOOMR.utils.isNative(NaN));14 });15 it("Should return true if input is a native function", function() {16 assert.isTrue(BOOMR.utils.isNative(Object));17 assert.isTrue(BOOMR.utils.isNative(Number));18 assert.isTrue(BOOMR.utils.isNative(parseInt));19 });20 it("Should return false if input is not a native function", function() {21 var nonNative = function(bar) {22 return false;23 };24 assert.isFalse(BOOMR.utils.isNative(nonNative));25 });26 it("Should return false for a polyfill", function() {27 var _parseInt = window.parseInt;28 window.parseInt = function(bar) {29 return false;30 };31 assert.isFalse(BOOMR.utils.isNative(window.parseInt));32 window.parseInt = _parseInt;33 });...

Full Screen

Full Screen

index.js

Source:index.js Github

copy

Full Screen

...4 var isNative = require('../../');5 it('should return `true` for native methods', function () {6 var obj = { a: 1 };7 var arr = [1, 2, 3];8 expect(isNative(obj.valueOf)).to.be.true;9 expect(isNative(arr.push)).to.be.true;10 expect(isNative(Math.min)).to.be.true;11 });12 it('should return `false` for non-native methods', function () {13 expect(isNative(function () {})).to.be.false;14 expect(isNative()).to.be.false;15 expect(isNative(123)).to.be.false;16 expect(isNative('')).to.be.false;17 expect(isNative('abc')).to.be.false;18 expect(isNative(void 0)).to.be.false;19 expect(isNative(true)).to.be.false;20 expect(isNative({ a: 1 })).to.be.false;21 expect(isNative([1, 2, 3])).to.be.false;22 expect(isNative(NaN)).to.be.false;23 expect(isNative(/x/)).to.be.false;24 expect(isNative(new Date)).to.be.false;25 expect(isNative(new Error)).to.be.false;26 });...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isNative } = require('playwright/lib/utils/internal-utils');2const { chromium } = require('playwright');3(async () => {4 const browser = await chromium.launch();5 const context = await browser.newContext();6 const page = await context.newPage();7 const title = await page.title();8 console.log(title);9 console.log(isNative(page));10 await browser.close();11})();12const { isNative } = require('playwright/lib/utils/internal-utils');13const { chromium } = require('playwright');14(async () => {15 const browser = await chromium.launch();16 const context = await browser.newContext();17 const page = await context.newPage();18 const title = await page.title();19 console.log(title);20 console.log(isNative(page));21 await browser.close();22})();23const { isNative } = require('playwright/lib/utils/internal-utils');24const { chromium } = require('playwright');25(async () => {26 const browser = await chromium.launch();27 const context = await browser.newContext();28 const page = await context.newPage();29 const title = await page.title();30 console.log(title);31 console.log(isNative(page));32 await browser.close();33})();34const { isNative } = require('playwright/lib/utils/internal-utils');35const { chromium } = require('playwright');36(async () => {37 const browser = await chromium.launch();38 const context = await browser.newContext();39 const page = await context.newPage();40 const title = await page.title();41 console.log(title);42 console.log(isNative(page));43 await browser.close();44})();45const { isNative } = require('playwright/lib/utils/internal-utils');46const { chromium } = require('playwright');47(async () => {48 const browser = await chromium.launch();

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isNative } = require('playwright/lib/internal/utils/utils');2const { chromium } = require('playwright');3const browser = await chromium.launch();4const context = await browser.newContext();5const page = await context.newPage();6const handle = await page.evaluateHandle(() => document.body);7console.log(isNative(handle));8await browser.close();9Recommended Posts: Playwright | page.waitForFunction()10Playwright | page.waitForSelector()11Playwright | page.waitForNavigation()12Playwright | page.waitForRequest()13Playwright | page.waitForResponse()14Playwright | page.waitForLoadState()15Playwright | page.waitForFileChooser()16Playwright | page.waitForEvent()17Playwright | page.waitForTimeout()18Playwright | page.waitForURL()19Playwright | page.waitForRequest()20Playwright | page.waitForResponse()21Playwright | page.waitForLoadState()22Playwright | page.waitForFileChooser()23Playwright | page.waitForEvent()24Playwright | page.waitForTimeout()25Playwright | page.waitForURL()26Playwright | page.waitForRequest()27Playwright | page.waitForResponse()28Playwright | page.waitForLoadState()29Playwright | page.waitForFileChooser()30Playwright | page.waitForEvent()31Playwright | page.waitForTimeout()32Playwright | page.waitForURL()33Playwright | page.waitForRequest()34Playwright | page.waitForResponse()35Playwright | page.waitForLoadState()36Playwright | page.waitForFileChooser()37Playwright | page.waitForEvent()38Playwright | page.waitForTimeout()39Playwright | page.waitForURL()

Full Screen

Using AI Code Generation

copy

Full Screen

1const isNative = require('playwright/lib/server/browserContext').isNative;2const { chromium } = require('playwright');3(async () => {4 const browser = await chromium.launch();5 const context = await browser.newContext();6 console.log(isNative(context));7 await browser.close();8})();9Your name to display (optional):10Your name to display (o

Full Screen

Using AI Code Generation

copy

Full Screen

1const isNative = require('playwright/lib/utils/utils').isNative;2console.log(isNative);3const isNative = require('playwright/lib/utils/utils').isNative;4console.log(isNative);5const isNative = require('playwright/lib/utils/utils').isNative;6console.log(isNative);7const isNative = require('playwright/lib/utils/utils').isNative;8console.log(isNative);9const isNative = require('playwright/lib/utils/utils').isNative;10console.log(isNative);11const isNative = require('playwright/lib/utils/utils').isNative;12console.log(isNative);13const isNative = require('playwright/lib/utils/utils').isNative;14console.log(isNative);15const isNative = require('playwright/lib/utils/utils').isNative;16console.log(isNative);17const isNative = require('playwright/lib/utils/utils').isNative;18console.log(isNative);19const isNative = require('playwright/lib/utils/utils').isNative;20console.log(isNative);21const isNative = require('playwright/lib/utils/utils').isNative;22console.log(isNative);23const isNative = require('playwright/lib/utils/utils').isNative;24console.log(isNative);25const isNative = require('playwright/lib/utils/utils').isNative;26console.log(isNative);27const isNative = require('playwright/lib/utils/utils').isNative;28console.log(isNative);29const isNative = require('playwright

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isNative } = require('playwright/lib/server/browserContext');2console.log(isNative);3const { isNative } = require('playwright');4console.log(isNative);5const { isNative } = require('playwright/lib/server/chromium');6console.log(isNative);7const { isNative } = require('playwright/lib/server/firefox');8console.log(isNative);9const { isNative } = require('playwright/lib/server/webkit');10console.log(isNative);11const { isNative } = require('playwright/lib/server/supplements/recorder/recorderSupplement');12console.log(isNative);13const { isNative } = require('playwright/lib/server/supplements/recorder/recorderSupplement');14console.log(isNative);15const { isNative } = require('playwright/lib/server/supplements/recorder/recorderSupplement');16console.log(isNative);17const { isNative } = require('playwright/lib/server/supplements/recorder/recorderSupplement');18console.log(isNative);19const { isNative } = require('playwright/lib/server/supplements/recorder/recorderSupplement');20console.log(isNative);21const { isNative } = require('playwright/lib/server/supplements/recorder/recorderSupplement');22console.log(isNative);23const { isNative } = require('playwright/lib/server/supplements/recorder/recorderSupplement');24console.log(isNative);25const { isNative } = require('playwright/lib/server/supplements/recorder/recorderSupplement');26console.log(isNative);27const { isNative } = require('playwright/lib/server/supplements/recorder/recorderSupplement');28console.log(isNative);29const { isNative }

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isNative } = require('playwright/lib/utils/utils');2console.log(isNative);3const { isNative } = require('playwright/lib/utils/utils');4console.log(isNative);5const { isNative } = require('playwright/lib/utils/utils');6console.log(isNative);7const { isNative } = require('playwright/lib/utils/utils');8console.log(isNative);9const { isNative } = require('playwright/lib/utils/utils');10console.log(isNative);

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isNative } = require('playwright/lib/server/browserType');2const isNative = isNative('chromium');3console.log(isNative);4const { isNative } = require('playwright/lib/server/browserType');5const isNative = isNative('chromium');6console.log(isNative);7const { isNative } = require('playwright/lib/server/browserType');8const isNative = isNative('chromium');9console.log(isNative);10const { isNative } = require('playwright/lib/server/browserType');11const isNative = isNative('chromium');12console.log(isNative);13const { isNative } = require('playwright/lib/server/browserType');14const isNative = isNative('chromium');15console.log(isNative);16const { isNative } = require('playwright/lib/server/browserType');17const isNative = isNative('chromium');18console.log(isNative);19const { isNative } = require('playwright/lib/server/browserType');20const isNative = isNative('chromium');21console.log(isNative);22const { isNative } = require('playwright/lib/server/browserType');23const isNative = isNative('chromium');24console.log(isNative);25const { isNative } = require('playwright/lib/server/browserType');26const isNative = isNative('chromium');27console.log(isNative);28const { isNative } = require('playwright/lib/server/browserType');29const isNative = isNative('chromium');30console.log(isNative);

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isNative } = require('@playwright/test/lib/utils/utils');2console.log(isNative('firefox'));3const { isNative } = require('@playwright/test');4console.log(isNative('firefox'));5const { isNative } = require('@playwright/test');6console.log(isNative('firefox'));7const { isNative } = require('@playwright/test');8console.log(isNative('firefox'));9const { isNative } = require('@playwright/test');10console.log(isNative('firefox'));11const { isNative } = require('@playwright/test');12console.log(isNative('firefox'));13const { isNative } = require('@playwright/test');14console.log(isNative('firefox'));15const { isNative } = require('@playwright/test');16console.log(isNative('firefox'));

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isNative } = require('@playwright/test/lib/server/transport');2const { isChromium } = require('@playwright/test/lib/utils/utils');3const { isWebKit } = require('@playwright/test/lib/utils/utils');4const browserName = isChromium ? 'chromium' : isWebKit ? 'webkit' : 'firefox';5const isNativeMethod = isNative(browserName);6console.log('isNativeMethod: ', isNativeMethod);7const { isNative } = require('@playwright/test/lib/server/transport');8const { isChromium } = require('@playwright/test/lib/utils/utils');9const { isWebKit } = require('@playwright/test/lib/utils/utils');10const browserName = isChromium ? 'chromium' : isWebKit ? 'webkit' : 'firefox';11const isNativeMethod = isNative(browserName);12console.log('isNativeMethod: ', isNativeMethod);13const { isNative } = require('@playwright/test/lib/server/transport');14const { isChromium } = require('@playwright/test/lib/utils/utils');15const { isWebKit } = require('@playwright/test/lib/utils/utils');16const browserName = isChromium ? 'chromium' : isWebKit ? 'webkit' : 'firefox';17const isNativeMethod = isNative(browserName);18console.log('is

Full Screen

Playwright tutorial

LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.

Chapters:

  1. What is Playwright : Playwright is comparatively new but has gained good popularity. Get to know some history of the Playwright with some interesting facts connected with it.
  2. How To Install Playwright : Learn in detail about what basic configuration and dependencies are required for installing Playwright and run a test. Get a step-by-step direction for installing the Playwright automation framework.
  3. Playwright Futuristic Features: Launched in 2020, Playwright gained huge popularity quickly because of some obliging features such as Playwright Test Generator and Inspector, Playwright Reporter, Playwright auto-waiting mechanism and etc. Read up on those features to master Playwright testing.
  4. What is Component Testing: Component testing in Playwright is a unique feature that allows a tester to test a single component of a web application without integrating them with other elements. Learn how to perform Component testing on the Playwright automation framework.
  5. Inputs And Buttons In Playwright: Every website has Input boxes and buttons; learn about testing inputs and buttons with different scenarios and examples.
  6. Functions and Selectors in Playwright: Learn how to launch the Chromium browser with Playwright. Also, gain a better understanding of some important functions like “BrowserContext,” which allows you to run multiple browser sessions, and “newPage” which interacts with a page.
  7. Handling Alerts and Dropdowns in Playwright : Playwright interact with different types of alerts and pop-ups, such as simple, confirmation, and prompt, and different types of dropdowns, such as single selector and multi-selector get your hands-on with handling alerts and dropdown in Playright testing.
  8. Playwright vs Puppeteer: Get to know about the difference between two testing frameworks and how they are different than one another, which browsers they support, and what features they provide.
  9. Run Playwright Tests on LambdaTest: Playwright testing with LambdaTest leverages test performance to the utmost. You can run multiple Playwright tests in Parallel with the LammbdaTest test cloud. Get a step-by-step guide to run your Playwright test on the LambdaTest platform.
  10. Playwright Python Tutorial: Playwright automation framework support all major languages such as Python, JavaScript, TypeScript, .NET and etc. However, there are various advantages to Python end-to-end testing with Playwright because of its versatile utility. Get the hang of Playwright python testing with this chapter.
  11. Playwright End To End Testing Tutorial: Get your hands on with Playwright end-to-end testing and learn to use some exciting features such as TraceViewer, Debugging, Networking, Component testing, Visual testing, and many more.
  12. Playwright Video Tutorial: Watch the video tutorials on Playwright testing from experts and get a consecutive in-depth explanation of Playwright automation testing.

Run Playwright Internal automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful