How to use registerNode method in Appium

Best JavaScript code snippet using appium

index.js

Source:index.js Github

copy

Full Screen

...125 * 注册图形库126 */127 const canvasRegister = () => {128 registerChart();129 registerNode('flowData', flowData, flowDataAnchors, flowDataIconRect, flowDataTextRect);130 registerNode(131 'flowSubprocess',132 flowSubprocess,133 null,134 flowSubprocessIconRect,135 flowSubprocessTextRect136 );137 registerNode('flowDb', flowDb, null, flowDbIconRect, flowDbTextRect);138 registerNode(139 'flowDocument',140 flowDocument,141 flowDocumentAnchors,142 flowDocumentIconRect,143 flowDocumentTextRect144 );145 registerNode(146 'flowInternalStorage',147 flowInternalStorage,148 null,149 flowInternalStorageIconRect,150 flowInternalStorageTextRect151 );152 registerNode(153 'flowExternStorage',154 flowExternStorage,155 flowExternStorageAnchors,156 flowExternStorageIconRect,157 flowExternStorageTextRect158 );159 registerNode('flowQueue', flowQueue, null, flowQueueIconRect, flowQueueTextRect);160 registerNode(161 'flowManually',162 flowManually,163 flowManuallyAnchors,164 flowManuallyIconRect,165 flowManuallyTextRect166 );167 registerNode(168 'flowDisplay',169 flowDisplay,170 flowDisplayAnchors,171 flowDisplayIconRect,172 flowDisplayTextRect173 );174 registerNode('flowParallel', flowParallel, flowParallelAnchors, null, null);175 registerNode('flowComment', flowComment, flowCommentAnchors, null, null);176 // activity177 registerNode(178 'activityFinal',179 activityFinal,180 null,181 activityFinalIconRect,182 activityFinalTextRect183 );184 registerNode('swimlaneV', swimlaneV, null, swimlaneVIconRect, swimlaneVTextRect);185 registerNode('swimlaneH', swimlaneH, null, swimlaneHIconRect, swimlaneHTextRect);186 registerNode('forkH', fork, forkHAnchors, forkIconRect, forkTextRect);187 registerNode('forkV', fork, forkVAnchors, forkIconRect, forkTextRect);188 // class189 registerNode('simpleClass', simpleClass, null, simpleClassIconRect, simpleClassTextRect);190 registerNode(191 'interfaceClass',192 interfaceClass,193 null,194 interfaceClassIconRect,195 interfaceClassTextRect196 );197 // sequence198 registerNode('lifeline', lifeline, lifelineAnchors, lifelineIconRect, lifelineTextRect);199 registerNode(200 'sequenceFocus',201 sequenceFocus,202 sequenceFocusAnchors,203 sequenceFocusIconRect,204 sequenceFocusTextRect205 );206 };207 const onDrag = (event, node) => {208 event.dataTransfer.setData('Text', JSON.stringify(node.data));209 };210 /**211 * 当表单数据变化时, 重新渲染canvas212 * @params {object} value - 图形的宽度,高度, x, y等等213 */...

Full Screen

Full Screen

flowNode.js

Source:flowNode.js Github

copy

Full Screen

...115 }116 }117}118export default function(G6) {119 G6.registerNode('task-node', {120 shapeType: 'rect',121 options: {122 ...taskDefaultOptions123 },124 getShapeStyle(cfg) {125 cfg.size = [80, 44]126 const width = cfg.size[0]127 const height = cfg.size[1]128 const style = {129 x: 0 - width / 2,130 y: 0 - height / 2,131 width,132 height,133 ...this.options.style134 }135 return style136 }137 }, 'base-node')138 G6.registerNode('gateway-node', {139 shapeType: 'path',140 labelPosition: 'bottom',141 options: {142 ...gatewayDefaultOptions143 },144 getShapeStyle(cfg) {145 cfg.size = [40, 40]146 const width = cfg.size[0]147 const height = cfg.size[1]148 const gap = 4149 const style = {150 path: [151 ['M', 0 - gap, 0 - height / 2 + gap],152 ['Q', 0, 0 - height / 2, gap, 0 - height / 2 + gap],153 ['L', width / 2 - gap, 0 - gap],154 ['Q', width / 2, 0, width / 2 - gap, gap],155 ['L', gap, height / 2 - gap],156 ['Q', 0, height / 2, 0 - gap, height / 2 - gap],157 ['L', -width / 2 + gap, gap],158 ['Q', -width / 2, 0, -width / 2 + gap, 0 - gap],159 ['Z']160 ],161 ...this.options.style162 }163 return style164 }165 }, 'base-node')166 G6.registerNode('exclusive-gateway-node', {167 afterDraw(cfg, group) {168 group.icon = group.addShape('path', {169 attrs: {170 path: [171 ['M', -8, -8],172 ['L', 8, 8],173 ['Z'],174 ['M', 8, -8],175 ['L', -8, 8],176 ['Z']177 ],178 lineWidth: 2,179 stroke: this.options.style.stroke180 }181 })182 this.runAnimate(cfg, group)183 }184 }, 'gateway-node')185 G6.registerNode('parallel-gateway-node', {186 afterDraw(cfg, group) {187 group.icon = group.addShape('path', {188 attrs: {189 path: [190 ['M', 0, -10],191 ['L', 0, 10],192 ['Z'],193 ['M', -10, 0],194 ['L', 10, 0],195 ['Z']196 ],197 lineWidth: 2,198 stroke: this.options.style.stroke199 }200 })201 this.runAnimate(cfg, group)202 }203 }, 'gateway-node')204 G6.registerNode('inclusive-gateway-node', {205 afterDraw(cfg, group) {206 group.icon = group.addShape('circle', {207 attrs: {208 x: 0,209 y: 0,210 r: 10,211 lineWidth: 2,212 stroke: this.options.style.stroke213 }214 })215 this.runAnimate(cfg, group)216 }217 }, 'gateway-node')218 G6.registerNode('start-node', {219 shapeType: 'circle',220 labelPosition: 'bottom',221 options: {222 ...startDefaultOptions223 },224 getShapeStyle(cfg) {225 cfg.size = [30, 30]226 const width = cfg.size[0]227 const style = {228 x: 0,229 y: 0,230 r: width / 2,231 ...this.options.style232 }233 return style234 },235 afterDraw(cfg, group) {236 group.icon = group.addShape('path', {237 attrs: {238 path: [239 ['M', -4, -6],240 ['L', 6, 0],241 ['L', -4, 6],242 ['Z'] // close243 ],244 fill: this.options.style.stroke,245 stroke: this.options.style.stroke246 }247 })248 },249 getAnchorPoints() {250 return [251 [0.5, 0], // top252 [1, 0.5], // right253 [0.5, 1] // bottom254 ]255 }256 }, 'base-node')257 G6.registerNode('end-node', {258 shapeType: 'circle',259 labelPosition: 'bottom',260 options: {261 ...endDefaultOptions262 },263 getShapeStyle(cfg) {264 cfg.size = [30, 30]265 const width = cfg.size[0]266 const style = {267 x: 0,268 y: 0,269 r: width / 2,270 ...this.options.style271 }272 return style273 },274 afterDraw(cfg, group) {275 group.icon = group.addShape('path', {276 attrs: {277 path: [278 ['M', -4, -4],279 ['L', 4, -4],280 ['L', 4, 4],281 ['L', -4, 4],282 ['Z'] // close283 ],284 fill: this.options.style.stroke,285 stroke: this.options.style.stroke286 }287 })288 },289 getAnchorPoints() {290 return [291 [0.5, 0], // top292 [0.5, 1], // bottom293 [0, 0.5] // left294 ]295 }296 }, 'base-node')297 G6.registerNode('catch-node', {298 shapeType: 'path',299 labelPosition: 'bottom',300 options: {301 ...catchDefaultOptions302 },303 getShapeStyle(cfg) {304 cfg.size = [50, 30]305 const width = cfg.size[0]306 const height = cfg.size[1]307 const style = {308 path: [309 ['M', 0, -height / 3],310 ['L', width / 2, -height / 3],311 ['L', 0, height / 3 * 2],312 ['L', -width / 2, -height / 3],313 ['Z'] // close314 ],315 ...this.options.style316 }317 return style318 },319 getAnchorPoints() {320 return [321 [0.5, 0], // top322 [0.8, 0.38], // right323 [0.5, 1], // bottom324 [0.2, 0.38] // left325 ]326 }327 }, 'base-node')328 G6.registerNode('user-task-node', {329 options: deepMix({}, taskDefaultOptions, {330 icon: require('../assets/icons/flow/icon_user.svg'),331 style: {332 fill: '#E7F7FE',333 stroke: '#1890FF'334 },335 stateStyles: {336 selected: {337 fill: '#95D6FB'338 }339 }340 })341 }, 'task-node')342 G6.registerNode('script-task-node', {343 options: deepMix({}, taskDefaultOptions, {344 icon: require('../assets/icons/flow/icon_script.svg'),345 style: {346 fill: '#FFF7E6',347 stroke: '#FFA940'348 },349 stateStyles: {350 selected: {351 fill: '#FFE7BA'352 }353 }354 })355 }, 'task-node')356 G6.registerNode('java-task-node', {357 options: deepMix({}, taskDefaultOptions, {358 icon: require('../assets/icons/flow/icon_java.svg'),359 style: {360 fill: '#FFF1F0',361 stroke: '#FF4D4F'362 },363 stateStyles: {364 selected: {365 fill: '#FFCCC7'366 }367 }368 })369 }, 'task-node')370 G6.registerNode('mail-task-node', {371 options: deepMix({}, taskDefaultOptions, {372 icon: require('../assets/icons/flow/icon_mail.svg'),373 style: {374 fill: '#F6FFED',375 stroke: '#73D13D'376 },377 stateStyles: {378 selected: {379 fill: '#D9F7BE'380 }381 }382 })383 }, 'task-node')384 G6.registerNode('receive-task-node', {385 options: deepMix({}, taskDefaultOptions, {386 icon: require('../assets/icons/flow/icon_receive.svg'),387 style: {388 fill: '#FFF0F6',389 stroke: '#FF85C0'390 },391 stateStyles: {392 selected: {393 fill: '#FFD6E7'394 }395 }396 })397 }, 'task-node')398 G6.registerNode('timer-start-node', {399 options: deepMix({}, startDefaultOptions, { icon: require('../assets/icons/flow/icon_timer.svg') }),400 afterDraw(cfg, group) { this.runAnimate(cfg, group) }401 }, 'start-node')402 G6.registerNode('message-start-node', {403 options: deepMix({}, startDefaultOptions, { icon: require('../assets/icons/flow/icon_message.svg') }),404 afterDraw(cfg, group) { this.runAnimate(cfg, group) }405 }, 'start-node')406 G6.registerNode('signal-start-node', {407 options: deepMix({}, startDefaultOptions, { icon: require('../assets/icons/flow/icon_signal.svg') }),408 afterDraw(cfg, group) { this.runAnimate(cfg, group) }409 }, 'start-node')410 G6.registerNode('timer-catch-node', {411 options: deepMix({}, catchDefaultOptions, { icon: require('../assets/icons/flow/icon_timer.svg') })412 }, 'catch-node')413 G6.registerNode('signal-catch-node', {414 options: deepMix({}, catchDefaultOptions, { icon: require('../assets/icons/flow/icon_signal.svg') })415 }, 'catch-node')416 G6.registerNode('message-catch-node', {417 options: deepMix({}, catchDefaultOptions, { icon: require('../assets/icons/flow/icon_message.svg') })418 }, 'catch-node')...

Full Screen

Full Screen

config.js

Source:config.js Github

copy

Full Screen

...66import RockKitSource from "./ui/assets/sources/RockKitSource";67import HubsSoundPackSource from "./ui/assets/sources/HubsSoundPackSource";68export function createEditor(api, settings) {69 const editor = new Editor(api, settings);70 editor.registerNode(SceneNode, SceneNodeEditor);71 editor.registerNode(GroupNode, GroupNodeEditor);72 editor.registerNode(ModelNode, ModelNodeEditor);73 editor.registerNode(BottleNode, BottleNodeEditor);74 editor.registerNode(GroundPlaneNode, GroundPlaneNodeEditor);75 editor.registerNode(BoxColliderNode, BoxColliderNodeEditor);76 editor.registerNode(AmbientLightNode, AmbientLightNodeEditor);77 editor.registerNode(DirectionalLightNode, DirectionalLightNodeEditor);78 editor.registerNode(HemisphereLightNode, HemisphereLightNodeEditor);79 editor.registerNode(SpotLightNode, SpotLightNodeEditor);80 editor.registerNode(PointLightNode, PointLightNodeEditor);81 editor.registerNode(SpawnPointNode, SpawnPointNodeEditor);82 editor.registerNode(WayPointNode, WayPointNodeEditor);83 editor.registerNode(SkyboxNode, SkyboxNodeEditor);84 editor.registerNode(FloorPlanNode, FloorPlanNodeEditor);85 editor.registerNode(ImageNode, ImageNodeEditor);86 editor.registerNode(VideoNode, VideoNodeEditor);87 editor.registerNode(AudioNode, AudioNodeEditor);88 editor.registerNode(SpawnerNode, SpawnerNodeEditor);89 editor.registerNode(TriggerVolumeNode, TriggerVolumeNodeEditor);90 editor.registerNode(LinkNode, LinkNodeEditor);91 editor.registerNode(ParticleEmitterNode, ParticleEmitterNodeEditor);92 editor.registerNode(KitPieceNode, KitPieceNodeEditor);93 editor.registerNode(SimpleWaterNode, SimpleWaterNodeEditor);94 editor.registerNode(ScenePreviewCameraNode, ScenePreviewCameraNodeEditor);95 editor.registerNode(MediaFrameNode, MediaFrameNodeEditor);96 editor.registerNode(FrameTriggerNode, FrameTriggerNodeEditor);97 editor.registerNode(ButtonNode, ButtonNodeEditor);98 editor.registerSource(new ElementsSource(editor));99 editor.registerSource(new MyAssetsSource(editor));100 editor.registerSource(new ArchitectureKitSource(api));101 editor.registerSource(new RockKitSource(api));102 editor.registerSource(new SketchfabSource(api));103 editor.registerSource(new PolySource(api));104 editor.registerSource(new BingImagesSource(api));105 editor.registerSource(new BingVideosSource(api));106 editor.registerSource(new HubsSoundPackSource(editor));107 editor.registerSource(new TenorSource(api));108 return editor;...

Full Screen

Full Screen

g6.js

Source:g6.js Github

copy

Full Screen

1import G6 from '@antv/g6';2G6.registerNode(3 'START',4 {5 drawShape(cfg, group) {6 const { size } = cfg;7 const rect = group.addShape('rect', {8 attrs: {9 x: -size[0] / 2,10 y: -size[1] / 2,11 width: size[0],12 height: size[1],13 radius: 4,14 stroke: 'rgb(255,194,116)',15 fill: 'rgba(254,228,211,0.92)',16 },17 });18 return rect;19 },20 },21 'single-shape'22);23G6.registerNode(24 'END',25 {26 drawShape(cfg, group) {27 const { size } = cfg;28 const circle = group.addShape('rect', {29 attrs: {30 x: -size[0] / 2,31 y: -size[1] / 2,32 width: size[0],33 height: size[1],34 radius: 4,35 fill: 'rgba(255,255,255,0)',36 },37 });38 return circle;39 },40 },41 'single-shape'42);43G6.registerNode(44 'USERTASK',45 {46 drawShape(cfg, group) {47 const { size } = cfg;48 const rect = group.addShape('rect', {49 attrs: {50 x: -size[0] / 2,51 y: -size[1] / 2,52 width: size[0],53 height: size[1],54 radius: 4,55 stroke: 'rgb(148,204,255)',56 fill: 'rgba(202,230,255,0.92)',57 },58 });59 return rect;60 },61 },62 'single-shape'63);64G6.registerNode(65 'DECISION',66 {67 drawShape(cfg, group) {68 const rect = group.addShape('rect', {69 attrs: {70 x: -40,71 y: -24,72 width: 80,73 height: 48,74 radius: 24,75 stroke: 'rgb(92,219,211)',76 fill: 'rgba(230,255,251,0.92)',77 },78 });79 return rect;80 },81 },82 'single-shape'83);84G6.registerNode(85 'USERDECISION',86 {87 drawShape(cfg, group) {88 const rect = group.addShape('rect', {89 attrs: {90 x: -40,91 y: -24,92 width: 80,93 height: 48,94 radius: 5,95 stroke: 'rgb(92,219,211)',96 fill: 'rgba(230,255,251,0.92)',97 },98 });99 return rect;100 },101 },102 'single-shape'103);104G6.registerNode(105 'FINISH',106 {107 drawShape(cfg, group) {108 const { size } = cfg;109 const rect = group.addShape('rect', {110 attrs: {111 x: -size[0] / 2,112 y: -size[1] / 2,113 width: size[0],114 height: size[1],115 radius: 4,116 stroke: '#1890FF',117 fill: '#FFFFFF',118 },119 });120 return rect;121 },122 },123 'single-shape'124);125G6.registerNode(126 'END',127 {128 drawShape(cfg, group) {129 const { size } = cfg;130 const circle = group.addShape('rect', {131 attrs: {132 x: -size[0] / 2,133 y: -size[1] / 2,134 width: size[0],135 height: size[1],136 radius: 4,137 fill: 'rgba(255,255,255,0)',138 },139 });140 return circle;141 },142 },143 'single-shape'144);145G6.registerNode(146 'CURRENT',147 {148 drawShape(cfg, group) {149 const { size } = cfg;150 const rect = group.addShape('rect', {151 attrs: {152 x: -size[0] / 2,153 y: -size[1] / 2,154 width: size[0],155 height: size[1],156 radius: 4,157 stroke: '#235685',158 fill: '#1890FF',159 },160 });161 return rect;162 },163 },164 'single-shape'165);166G6.registerNode(167 'WARNING',168 {169 drawShape(cfg, group) {170 const { size } = cfg;171 const rect = group.addShape('rect', {172 attrs: {173 x: -size[0] / 2,174 y: -size[1] / 2,175 width: size[0],176 height: size[1],177 radius: 4,178 stroke: '#D48116',179 fill: '#FF9A18',180 },181 });182 return rect;183 },184 },185 'single-shape'186);187G6.registerNode(188 'UNFINISH',189 {190 drawShape(cfg, group) {191 const { size } = cfg;192 const rect = group.addShape('rect', {193 attrs: {194 x: -size[0] / 2,195 y: -size[1] / 2,196 width: size[0],197 height: size[1],198 radius: 4,199 stroke: '#E0E0E0',200 fill: '#E0E0E0',201 },...

Full Screen

Full Screen

register.js

Source:register.js Github

copy

Full Screen

...41 // modules42 Poly.modulesRegister.register(ModuleName.DRACOLoader, DRACOLoader);43 Poly.modulesRegister.register(ModuleName.GLTFLoader, GLTFLoader);44 // cop45 Poly.registerNode(ImageCopNode);46 // event47 Poly.registerNode(CameraOrbitControlsEventNode);48 // mat49 Poly.registerNode(MeshLambertBuilderMatNode);50 // obj51 Poly.registerNode(CopNetworkObjNode);52 Poly.registerNode(GeoObjNode);53 Poly.registerNode(HemisphereLightObjNode);54 Poly.registerNode(PerspectiveCameraObjNode);55 // sop56 Poly.registerNode(AddSopNode);57 Poly.registerNode(AttribCreateSopNode);58 Poly.registerNode(CopySopNode);59 Poly.registerNode(DeleteSopNode);60 Poly.registerNode(EventsNetworkSopNode);61 Poly.registerNode(FileSopNode);62 Poly.registerNode(HexagonsSopNode);63 Poly.registerNode(HierarchySopNode);64 Poly.registerNode(InstanceSopNode);65 Poly.registerNode(JitterSopNode);66 Poly.registerNode(MaterialSopNode);67 Poly.registerNode(MaterialsNetworkSopNode);68 Poly.registerNode(MergeSopNode);69 Poly.registerNode(NormalsSopNode);70 Poly.registerNode(ObjectPropertiesSopNode);71 Poly.registerNode(PointSopNode);72 Poly.registerNode(RestAttributesSopNode);73 Poly.registerNode(TransformSopNode);74 // custom configuration75 configurePolygonjs(Poly);76 }...

Full Screen

Full Screen

netNode.js

Source:netNode.js Github

copy

Full Screen

...23 }24 }25}26export default function(G6) {27 G6.registerNode('net-base-node', {28 shapeType: 'circle',29 labelPosition: 'bottom',30 options: {31 ...netDefaultOptions32 },33 getShapeStyle(cfg) {34 cfg.size = [50, 50]35 const width = cfg.size[0]36 const style = {37 x: 0,38 y: 0,39 r: width / 2,40 ...this.options.style 41 }42 if (cfg.hasOwnProperty('color')) {43 style.fill = cfg.color44 }45 return style46 },47 afterDraw(cfg, group) {48 if (cfg.active) {49 const shape = group.get('children')[0]50 shape.animate({51 repeat: true,52 onFrame(ratio) {53 const diff = ratio <=0.5 ? ratio * 10 : (1 - ratio) * 1054 let radius = cfg.size55 if (isNaN(radius)) radius = radius[0]56 return {57 r: radius / 2 + diff58 }59 }60 }, 3000, 'easeCubic') 61 }62 group.icon = group.addShape('path', {63 attrs: {64 path: [65 ['M', -4 , -6],66 ['L', 6, 0],67 ['L', -4, 6],68 ['Z']69 ],70 fill: this.options.style.stroke,71 stroke: this.options.style.stroke72 }73 })74 },75 getAnchorPoints() {76 return [77 [0.5, 0], // top78 [1, 0.5], // right79 [0.5, 1], // left80 [0, 0.5], // bottom81 ]82 } 83 }, 'base-node')84 G6.registerNode('net-disk', {85 options: deepMix({}, netDefaultOptions, {icon: require('../assets/net/disk.svg')}),86 afterDraw(cfg, group) { this.runAnimate(cfg,group) }87 }, 'net-base-node')88 G6.registerNode('net-rack', {89 options: deepMix({}, netDefaultOptions, {icon: require('../assets/net/rack.svg')}),90 afterDraw(cfg, group) { this.runAnimate(cfg,group) }91 }, 'net-base-node')92 G6.registerNode('net-server', {93 options: deepMix({}, netDefaultOptions, {icon: require('../assets/net/server.svg')}),94 afterDraw(cfg, group) { this.runAnimate(cfg,group) }95 }, 'net-base-node')96 G6.registerNode('net-server1', {97 options: deepMix({}, netDefaultOptions, {icon: require('../assets/net/server1.svg')}),98 afterDraw(cfg, group) { this.runAnimate(cfg,group) }99 }, 'net-base-node') 100 G6.registerNode('net-netcard', {101 options: deepMix({}, netDefaultOptions, {icon: require('../assets/net/netcard.svg')}),102 afterDraw(cfg, group) { this.runAnimate(cfg,group) }103 }, 'net-base-node')104 G6.registerNode('net-disk1', {105 options: deepMix({}, netDefaultOptions, {icon: require('../assets/net/disk-img.png')}),106 afterDraw(cfg, group) { this.runAnimate(cfg,group) }107 }, 'net-base-node') 108 G6.registerNode('net-rack1', {109 options: deepMix({}, netDefaultOptions, {icon: require('../assets/net/netRack-img.png')}),110 afterDraw(cfg, group) { this.runAnimate(cfg,group) }111 }, 'net-base-node')112 G6.registerNode('net-server3', {113 options: deepMix({}, netDefaultOptions, {icon: require('../assets/net/server-img.png')}),114 afterDraw(cfg, group) { this.runAnimate(cfg,group) }115 }, 'net-base-node')116 G6.registerNode('net-server2', {117 options: deepMix({}, netDefaultOptions, {icon: require('../assets/net/server1-img.png')}),118 afterDraw(cfg, group) { this.runAnimate(cfg,group) }119 }, 'net-base-node') 120 G6.registerNode('net-netcard1', {121 options: deepMix({}, netDefaultOptions, {icon: require('../assets/net/netcard-img.png')}),122 afterDraw(cfg, group) { this.runAnimate(cfg,group) }123 }, 'net-base-node') ...

Full Screen

Full Screen

wire-node.js

Source:wire-node.js Github

copy

Full Screen

1const debug = require('debug')('linto:linto-components:components:wire-node')2const wireNodeLabel = require('../data/label').components.wireNode3class WireNode {4 onMessageSend(registerNode, handler, successMsg) {5 if (registerNode.node._wireCount === 0) {6 registerNode.node.status({ fill: 'yellow', shape: 'ring', text: wireNodeLabel.noLinkedWire })7 } else {8 9 if(!handler) errorhandler(registerNode, {message : wireNodeLabel.noFunctionLoaded})10 else{11 registerNode.node.on('input', async (payload, send, done) => {12 try {13 printStatusMsg(registerNode, successMsg)14 send(await handler.call(registerNode, payload)) // Load result function to the node15 persistStatusMsg(registerNode, successMsg)16 done()17 } catch (error) {18 errorhandler(registerNode, error)19 }20 })21 registerNode.node.status({})22 }23 }24 }25 onMessage(registerNode, handler, successMsg) {26 if(!handler) errorhandler(registerNode, {message : wireNodeLabel.noFunctionLoaded})27 else {28 registerNode.node.on('input', async (payload, send, done) => {29 try {30 printStatusMsg(registerNode)31 await handler.call(registerNode, payload)32 persistStatusMsg(registerNode, successMsg)33 done()34 } catch (error) {35 errorhandler(registerNode, error)36 }37 })38 }39 }40 nodeSend(registerNode, payload) {41 registerNode.send(payload)42 }43}44function printStatusMsg(registerNode) {45 registerNode.node.status({ fill: 'green', shape: 'ring' })46}47function persistStatusMsg(registerNode, text) {48 if (!text) {49 setTimeout(function () {50 registerNode.node.status({})51 }, registerNode.statusTimer);52 } else {53 registerNode.node.status({ fill: 'green', shape: 'ring', text })54 }55}56function errorhandler(registerNode, error) {57 console.error(error)58 let errorMessage = error.message59 if (!error.message)60 errorMessage = wireNodeLabel.handlerError61 registerNode.node.status({ fill: 'red', shape: 'ring', text: errorMessage })62}...

Full Screen

Full Screen

canvasRegister.js

Source:canvasRegister.js Github

copy

Full Screen

...17 activityFinalTextRect18} from '@topology/activity-diagram'19const requireComponents = require.context('./vue-components', true, /index.vue$/)20export default () => {21 registerNode(22 'flowData',23 flowData,24 flowDataAnchors,25 flowDataIconRect,26 flowDataTextRect27 )28 registerNode(29 'activityFinal',30 activityFinal,31 null,32 activityFinalIconRect,33 activityFinalTextRect34 )35 requireComponents.keys().forEach(fileName => {36 const component = requireComponents(fileName)37 const componentName = component.default.name38 // console.log('componentName',componentName)39 registerNode(componentName, vueNodes(component.default || component), null, null, null)40 })41 // registerNode('vButton', vueNodes(VButton), null, null, null)42 // registerNode('test', vueNodes(LeftArea), null, null, null)43 // registerNode('VGradientStackedAreaChart', vueNodes(VGradientStackedAreaChart), null, null, null)44 // registerNode('VAttributeText', vueNodes(VAttributeText), null, null, null)...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var Appium = require('appium');2var appium = new Appium();3var Appium = require('appium');4var appium = new Appium();5var Appium = require('appium');6var appium = new Appium();7var Appium = require('appium');8var appium = new Appium();9var Appium = require('appium');10var appium = new Appium();11var Appium = require('appium');12var appium = new Appium();13var Appium = require('appium');14var appium = new Appium();15var Appium = require('appium');16var appium = new Appium();17var Appium = require('appium');18var appium = new Appium();19var Appium = require('appium');20var appium = new Appium();21var Appium = require('appium');22var appium = new Appium();23var Appium = require('appium');

Full Screen

Using AI Code Generation

copy

Full Screen

1var driver = new AppiumDriver();2driver.reset();3driver.listNodes();4driver.getActiveNodes();5driver.getRegisteredNodes();6driver.getActiveSessions();7driver.getSessions();8driver.getCapabilities();

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Appium 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