How to use getUid method in Cypress

Best JavaScript code snippet using cypress

all_tables_seed.js

Source:all_tables_seed.js Github

copy

Full Screen

1exports.seed = function(knex, Promise) {2 function getDrId() {3 return knex('doctors')4 .select('id')5 .where('name', 'like', 'James%');6 }7 function getUId() {8 return knex('users')9 .select('id')10 .where('name', 'like', 'Jacen%');11 }12 // Deletes ALL existing entries13 return knex('inputs').del()14 .then(function() {15 return knex('users').del()16 }).then(function() {17 return knex('doctors').del()18 //seed doctors table19 }).then(function() {20 return knex('doctors').insert({21 name: 'James Moriarty',22 email: 'james.moriarty@notadoctor.com',23 specialty: 'general practitioner',24 password: 'doctor'25 });26 }).then(function() {27 return knex('users').insert({28 doctor_id: getDrId(),29 name: 'Jacen Solo',30 email: 'jsolo@example.com',31 password: '$2a$10$HoqV4ZXhy.uUt9F1qngGCuW80xnTms1.I0c2LME/vvrghzMSHT7FW', //working pwd is 'sick'32 age: 22,33 gender: 'male',34 weight: 145,35 height_feet: '5',36 height_inches: '7',37 allergies: 'peanuts',38 medication: 'aspirin',39 conditions: 'frequent blood clots'40 });41 }).then(function() {42 return knex('inputs').insert({43 user_id: getUId(),44 body_part_id: '2a',45 pain_rating: 4,46 title: 'back pain',47 description: 'Frequent muscle cramps in the upper back between shoulders',48 date_created: '2017-02-22'49 });50 }).then(function() {51 return knex('inputs').insert({52 user_id: getUId(),53 body_part_id: '3b',54 pain_rating: 3,55 title: 'elbow pain',56 description: 'Feeling some tension around the elbow when straightening left arm.',57 date_created: '2017-03-01'58 });59 }).then(function() {60 return knex('inputs').insert({61 user_id: getUId(),62 body_part_id: '1a',63 pain_rating: 5,64 title: 'headache',65 description: 'Very intense migraine that lasted all day.',66 date_created: '2017-01-20'67 });68 }).then(function() {69 return knex('inputs').insert({70 user_id: getUId(),71 body_part_id: '1a',72 pain_rating: 5,73 title: 'migraine',74 description: 'Very intense migraine that lasted all day.',75 date_created: '2017-01-20'76 });77 }).then(function() {78 return knex('inputs').insert({79 user_id: getUId(),80 body_part_id: '2a',81 pain_rating: 2,82 title: 'shoudler blade',83 description: 'Shoulder blade hurts',84 date_created: '2017-02-20'85 });86 }).then(function() {87 return knex('inputs').insert({88 user_id: getUId(),89 body_part_id: '3c',90 pain_rating: 2,91 title: 'palm',92 description: 'smacked a bug off the wall',93 date_created: '2017-02-20'94 });95 }).then(function() {96 return knex('inputs').insert({97 user_id: getUId(),98 body_part_id: '1a',99 pain_rating: 1,100 title: 'headache',101 description: 'Very intense migraine that lasted all day.',102 date_created: '2017-03-20'103 });104 }).then(function() {105 return knex('inputs').insert({106 user_id: getUId(),107 body_part_id: '1a',108 pain_rating: 5,109 title: 'headache',110 description: 'Very intense migraine that lasted all day.',111 date_created: '2017-02-20'112 });113 }).then(function() {114 return knex('inputs').insert({115 user_id: getUId(),116 body_part_id: '1a',117 pain_rating: 5,118 title: 'headache',119 description: 'Very intense migraine that lasted all day.',120 date_created: '2017-04-20'121 });122 }).then(function() {123 return knex('inputs').insert({124 user_id: getUId(),125 body_part_id: '1a',126 pain_rating: 5,127 title: 'headache',128 description: 'Very intense migraine that lasted all day.',129 date_created: '2017-04-20'130 });131 }).then(function() {132 return knex('inputs').insert({133 user_id: getUId(),134 body_part_id: '1a',135 pain_rating: 5,136 title: 'headache',137 description: 'Very intense migraine that lasted all day.',138 date_created: '2017-04-20'139 });140 }).then(function() {141 return knex('inputs').insert({142 user_id: getUId(),143 body_part_id: '1a',144 pain_rating: 5,145 title: 'headache',146 description: 'Very intense migraine that lasted all day.',147 date_created: '2017-04-20'148 });149 }).then(function() {150 return knex('inputs').insert({151 user_id: getUId(),152 body_part_id: '3e',153 pain_rating: 5,154 title: 'finger',155 description: 'sprain on my finger',156 date_created: '2017-05-20'157 });158 }).then(function() {159 return knex('inputs').insert({160 user_id: getUId(),161 body_part_id: '3e',162 pain_rating: 5,163 title: 'finger',164 description: 'sprain on my finger',165 date_created: '2017-05-20'166 });167 }).then(function() {168 return knex('inputs').insert({169 user_id: getUId(),170 body_part_id: '3e',171 pain_rating: 5,172 title: 'finger',173 description: 'sprain on my finger',174 date_created: '2017-05-20'175 });176 }).then(function() {177 return knex('inputs').insert({178 user_id: getUId(),179 body_part_id: '3e',180 pain_rating: 5,181 title: 'finger',182 description: 'sprain on my finger',183 date_created: '2017-05-20'184 });185 }).then(function() {186 return knex('inputs').insert({187 user_id: getUId(),188 body_part_id: '4c',189 pain_rating: 5,190 title: 'finger',191 description: 'sprain on my finger',192 date_created: '2017-05-20'193 });194 }).then(function() {195 return knex('inputs').insert({196 user_id: getUId(),197 body_part_id: '1a',198 pain_rating: 5,199 title: 'finger',200 description: 'sprain on my finger',201 date_created: '2017-05-20'202 });203 }).then(function() {204 return knex('inputs').insert({205 user_id: getUId(),206 body_part_id: '2a',207 pain_rating: 5,208 title: 'finger',209 description: 'sprain on my finger',210 date_created: '2017-05-20'211 });212 }).then(function() {213 return knex('inputs').insert({214 user_id: getUId(),215 body_part_id: '2a',216 pain_rating: 5,217 title: 'finger',218 description: 'sprain on my finger',219 date_created: '2017-06-20'220 });221 }).then(function() {222 return knex('inputs').insert({223 user_id: getUId(),224 body_part_id: '2a',225 pain_rating: 5,226 title: 'finger',227 description: 'sprain on my finger',228 date_created: '2017-06-20'229 });230 }).then(function() {231 return knex('inputs').insert({232 user_id: getUId(),233 body_part_id: '2a',234 pain_rating: 5,235 title: 'finger',236 description: 'sprain on my finger',237 date_created: '2017-06-20'238 });239 }).then(function() {240 return knex('inputs').insert({241 user_id: getUId(),242 body_part_id: '2a',243 pain_rating: 5,244 title: 'finger',245 description: 'sprain on my finger',246 date_created: '2017-06-20'247 });248 }).then(function() {249 return knex('inputs').insert({250 user_id: getUId(),251 body_part_id: '2a',252 pain_rating: 5,253 title: 'finger',254 description: 'sprain on my finger',255 date_created: '2017-06-20'256 });257 }).then(function() {258 return knex('inputs').insert({259 user_id: getUId(),260 body_part_id: '2a',261 pain_rating: 5,262 title: 'finger',263 description: 'sprain on my finger',264 date_created: '2017-05-20'265 });266 }).then(function() {267 return knex('inputs').insert({268 user_id: getUId(),269 body_part_id: '2a',270 pain_rating: 5,271 title: 'finger',272 description: 'sprain on my finger',273 date_created: '2017-05-20'274 });275 }).then(function() {276 return knex('inputs').insert({277 user_id: getUId(),278 body_part_id: '2a',279 pain_rating: 5,280 title: 'finger',281 description: 'sprain on my finger',282 date_created: '2017-05-20'283 });284 }).then(function() {285 return knex('inputs').insert({286 user_id: getUId(),287 body_part_id: '2a',288 pain_rating: 5,289 title: 'finger',290 description: 'sprain on my finger',291 date_created: '2017-05-20'292 });293 }).then(function() {294 return knex('inputs').insert({295 user_id: getUId(),296 body_part_id: '2a',297 pain_rating: 5,298 title: 'finger',299 description: 'sprain on my finger',300 date_created: '2017-07-20'301 });302 }).then(function() {303 return knex('inputs').insert({304 user_id: getUId(),305 body_part_id: '2a',306 pain_rating: 5,307 title: 'finger',308 description: 'sprain on my finger',309 date_created: '2017-07-20'310 });311 }).then(function() {312 return knex('inputs').insert({313 user_id: getUId(),314 body_part_id: '2a',315 pain_rating: 5,316 title: 'finger',317 description: 'sprain on my finger',318 date_created: '2017-07-20'319 });320 }).then(function() {321 return knex('inputs').insert({322 user_id: getUId(),323 body_part_id: '2a',324 pain_rating: 5,325 title: 'finger',326 description: 'sprain on my finger',327 date_created: '2017-07-20'328 });329 }).then(function() {330 return knex('inputs').insert({331 user_id: getUId(),332 body_part_id: '2a',333 pain_rating: 5,334 title: 'finger',335 description: 'sprain on my finger',336 date_created: '2017-07-20'337 });338 }).then(function() {339 return knex('inputs').insert({340 user_id: getUId(),341 body_part_id: '2a',342 pain_rating: 5,343 title: 'finger',344 description: 'sprain on my finger',345 date_created: '2017-07-20'346 });347 }).then(function() {348 return knex('inputs').insert({349 user_id: getUId(),350 body_part_id: '2a',351 pain_rating: 5,352 title: 'finger',353 description: 'sprain on my finger',354 date_created: '2017-08-20'355 });356 }).then(function() {357 return knex('inputs').insert({358 user_id: getUId(),359 body_part_id: '2a',360 pain_rating: 5,361 title: 'finger',362 description: 'sprain on my finger',363 date_created: '2017-08-20'364 });365 }).then(function() {366 return knex('inputs').insert({367 user_id: getUId(),368 body_part_id: '2a',369 pain_rating: 5,370 title: 'finger',371 description: 'sprain on my finger',372 date_created: '2017-08-20'373 });374 }).then(function() {375 return knex('inputs').insert({376 user_id: getUId(),377 body_part_id: '2a',378 pain_rating: 5,379 title: 'finger',380 description: 'sprain on my finger',381 date_created: '2017-08-20'382 });383 }).then(function() {384 return knex('inputs').insert({385 user_id: getUId(),386 body_part_id: '2a',387 pain_rating: 5,388 title: 'finger',389 description: 'sprain on my finger',390 date_created: '2017-09-20'391 });392 }).then(function() {393 return knex('inputs').insert({394 user_id: getUId(),395 body_part_id: '2a',396 pain_rating: 5,397 title: 'finger',398 description: 'sprain on my finger',399 date_created: '2017-09-20'400 });401 }).then(function() {402 return knex('inputs').insert({403 user_id: getUId(),404 body_part_id: '2a',405 pain_rating: 5,406 title: 'finger',407 description: 'sprain on my finger',408 date_created: '2017-09-20'409 });410 }).then(function() {411 return knex('inputs').insert({412 user_id: getUId(),413 body_part_id: '2a',414 pain_rating: 5,415 title: 'finger',416 description: 'sprain on my finger',417 date_created: '2017-09-20'418 });419 }).then(function() {420 return knex('inputs').insert({421 user_id: getUId(),422 body_part_id: '2a',423 pain_rating: 5,424 title: 'finger',425 description: 'sprain on my finger',426 date_created: '2017-09-20'427 });428 }).then(function() {429 return knex('inputs').insert({430 user_id: getUId(),431 body_part_id: '2a',432 pain_rating: 5,433 title: 'finger',434 description: 'sprain on my finger',435 date_created: '2017-09-20'436 });437 }).then(function() {438 return knex('inputs').insert({439 user_id: getUId(),440 body_part_id: '2a',441 pain_rating: 5,442 title: 'finger',443 description: 'sprain on my finger',444 date_created: '2017-09-20'445 });446 }).then(function() {447 return knex('inputs').insert({448 user_id: getUId(),449 body_part_id: '2a',450 pain_rating: 5,451 title: 'finger',452 description: 'sprain on my finger',453 date_created: '2017-10-20'454 });455 }).then(function() {456 return knex('inputs').insert({457 user_id: getUId(),458 body_part_id: '2a',459 pain_rating: 5,460 title: 'finger',461 description: 'sprain on my finger',462 date_created: '2017-10-20'463 });464 }).then(function() {465 return knex('inputs').insert({466 user_id: getUId(),467 body_part_id: '2a',468 pain_rating: 5,469 title: 'finger',470 description: 'sprain on my finger',471 date_created: '2017-10-20'472 });473 }).then(function() {474 return knex('inputs').insert({475 user_id: getUId(),476 body_part_id: '2a',477 pain_rating: 5,478 title: 'finger',479 description: 'sprain on my finger',480 date_created: '2017-10-20'481 });482 }).then(function() {483 return knex('inputs').insert({484 user_id: getUId(),485 body_part_id: '2a',486 pain_rating: 5,487 title: 'finger',488 description: 'sprain on my finger',489 date_created: '2017-10-20'490 });491 }).then(function() {492 return knex('inputs').insert({493 user_id: getUId(),494 body_part_id: '2a',495 pain_rating: 5,496 title: 'finger',497 description: 'sprain on my finger',498 date_created: '2017-10-20'499 });500 }).then(function() {501 return knex('inputs').insert({502 user_id: getUId(),503 body_part_id: '2a',504 pain_rating: 5,505 title: 'finger',506 description: 'sprain on my finger',507 date_created: '2017-11-20'508 });509 }).then(function() {510 return knex('inputs').insert({511 user_id: getUId(),512 body_part_id: '2a',513 pain_rating: 5,514 title: 'finger',515 description: 'sprain on my finger',516 date_created: '2017-11-20'517 });518 }).then(function() {519 return knex('inputs').insert({520 user_id: getUId(),521 body_part_id: '2a',522 pain_rating: 5,523 title: 'finger',524 description: 'sprain on my finger',525 date_created: '2017-11-20'526 });527 }).then(function() {528 return knex('inputs').insert({529 user_id: getUId(),530 body_part_id: '2a',531 pain_rating: 5,532 title: 'finger',533 description: 'sprain on my finger',534 date_created: '2017-11-20'535 });536 }).then(function() {537 return knex('inputs').insert({538 user_id: getUId(),539 body_part_id: '2a',540 pain_rating: 5,541 title: 'finger',542 description: 'sprain on my finger',543 date_created: '2017-11-20'544 });545 }).then(function() {546 return knex('inputs').insert({547 user_id: getUId(),548 body_part_id: '2a',549 pain_rating: 5,550 title: 'finger',551 description: 'sprain on my finger',552 date_created: '2017-11-20'553 });554 }).then(function() {555 return knex('inputs').insert({556 user_id: getUId(),557 body_part_id: '2a',558 pain_rating: 5,559 title: 'finger',560 description: 'sprain on my finger',561 date_created: '2017-12-20'562 });563 }).then(function() {564 return knex('inputs').insert({565 user_id: getUId(),566 body_part_id: '2a',567 pain_rating: 5,568 title: 'finger',569 description: 'sprain on my finger',570 date_created: '2017-12-20'571 });572 }).then(function() {573 return knex('inputs').insert({574 user_id: getUId(),575 body_part_id: '2a',576 pain_rating: 5,577 title: 'finger',578 description: 'sprain on my finger',579 date_created: '2017-12-20'580 });581 }).then(function() {582 return knex('inputs').insert({583 user_id: getUId(),584 body_part_id: '2a',585 pain_rating: 5,586 title: 'finger',587 description: 'sprain on my finger',588 date_created: '2017-12-20'589 });590 }).then(function() {591 return knex('inputs').insert({592 user_id: getUId(),593 body_part_id: '2a',594 pain_rating: 5,595 title: 'finger',596 description: 'sprain on my finger',597 date_created: '2017-12-20'598 });599 }).then(function() {600 return knex('inputs').insert({601 user_id: getUId(),602 body_part_id: '2a',603 pain_rating: 5,604 title: 'finger',605 description: 'sprain on my finger',606 date_created: '2017-12-20'607 });608 }).then(function() {609 return knex('inputs').insert({610 user_id: getUId(),611 body_part_id: '2a',612 pain_rating: 5,613 title: 'finger',614 description: 'sprain on my finger',615 date_created: '2017-12-20'616 });617 }).then(function() {618 return knex('inputs').insert({619 user_id: getUId(),620 body_part_id: '1a',621 pain_rating: 5,622 title: 'headache',623 description: 'Very intense migraine that lasted all day.',624 date_created: '2017-04-20'625 });626 }).then(function() {627 return knex('inputs').insert({628 user_id: getUId(),629 body_part_id: '1a',630 pain_rating: 5,631 title: 'headache',632 description: 'Very intense migraine that lasted all day.',633 date_created: '2017-04-20'634 });635 }).then(function() {636 return knex('inputs').insert({637 user_id: getUId(),638 body_part_id: '1a',639 pain_rating: 5,640 title: 'headache',641 description: 'Very intense migraine that lasted all day.',642 date_created: '2017-04-20'643 });644 }).then(function() {645 return knex('inputs').insert({646 user_id: getUId(),647 body_part_id: '1a',648 pain_rating: 5,649 title: 'headache',650 description: 'Very intense migraine that lasted all day.',651 date_created: '2017-05-20'652 });653 }).then(function() {654 return knex('inputs').insert({655 user_id: getUId(),656 body_part_id: '1a',657 pain_rating: 5,658 title: 'headache',659 description: 'Very intense migraine that lasted all day.',660 date_created: '2017-05-20'661 });662 }).then(function() {663 return knex('inputs').insert({664 user_id: getUId(),665 body_part_id: '1a',666 pain_rating: 5,667 title: 'headache',668 description: 'Very intense migraine that lasted all day.',669 date_created: '2017-05-20'670 });671 }).then(function() {672 return knex('inputs').insert({673 user_id: getUId(),674 body_part_id: '1a',675 pain_rating: 5,676 title: 'headache',677 description: 'Very intense migraine that lasted all day.',678 date_created: '2017-05-20'679 });680 }).then(function() {681 return knex('inputs').insert({682 user_id: getUId(),683 body_part_id: '1a',684 pain_rating: 5,685 title: 'headache',686 description: 'Very intense migraine that lasted all day.',687 date_created: '2017-05-20'688 });689 }).then(function() {690 return knex('inputs').insert({691 user_id: getUId(),692 body_part_id: '1a',693 pain_rating: 5,694 title: 'headache',695 description: 'Very intense migraine that lasted all day.',696 date_created: '2017-05-20'697 });698 }).then(function() {699 return knex('inputs').insert({700 user_id: getUId(),701 body_part_id: '1a',702 pain_rating: 5,703 title: 'headache',704 description: 'Very intense migraine that lasted all day.',705 date_created: '2017-05-20'706 });707 }).then(function() {708 return knex('inputs').insert({709 user_id: getUId(),710 body_part_id: '1a',711 pain_rating: 5,712 title: 'headache',713 description: 'Very intense migraine that lasted all day.',714 date_created: '2017-06-20'715 });716 }).then(function() {717 return knex('inputs').insert({718 user_id: getUId(),719 body_part_id: '1a',720 pain_rating: 5,721 title: 'headache',722 description: 'Very intense migraine that lasted all day.',723 date_created: '2017-06-20'724 });725 }).then(function() {726 return knex('inputs').insert({727 user_id: getUId(),728 body_part_id: '1a',729 pain_rating: 5,730 title: 'headache',731 description: 'Very intense migraine that lasted all day.',732 date_created: '2017-06-20'733 });734 }).then(function() {735 return knex('inputs').insert({736 user_id: getUId(),737 body_part_id: '1a',738 pain_rating: 5,739 title: 'headache',740 description: 'Very intense migraine that lasted all day.',741 date_created: '2017-06-20'742 });743 }).then(function() {744 return knex('inputs').insert({745 user_id: getUId(),746 body_part_id: '1a',747 pain_rating: 5,748 title: 'headache',749 description: 'Very intense migraine that lasted all day.',750 date_created: '2017-06-20'751 });752 }).then(function() {753 return knex('inputs').insert({754 user_id: getUId(),755 body_part_id: '1a',756 pain_rating: 5,757 title: 'headache',758 description: 'Very intense migraine that lasted all day.',759 date_created: '2017-06-20'760 });761 }).then(function() {762 return knex('inputs').insert({763 user_id: getUId(),764 body_part_id: '1a',765 pain_rating: 5,766 title: 'headache',767 description: 'Very intense migraine that lasted all day.',768 date_created: '2017-06-20'769 });770 }).then(function() {771 return knex('inputs').insert({772 user_id: getUId(),773 body_part_id: '1a',774 pain_rating: 5,775 title: 'headache',776 description: 'Very intense migraine that lasted all day.',777 date_created: '2017-06-20'778 });779 }).then(function() {780 return knex('inputs').insert({781 user_id: getUId(),782 body_part_id: '1a',783 pain_rating: 5,784 title: 'headache',785 description: 'Very intense migraine that lasted all day.',786 date_created: '2017-06-20'787 });788 }).then(function() {789 return knex('inputs').insert({790 user_id: getUId(),791 body_part_id: '1a',792 pain_rating: 5,793 title: 'headache',794 description: 'Very intense migraine that lasted all day.',795 date_created: '2017-06-20'796 });797 }).then(function() {798 return knex('inputs').insert({799 user_id: getUId(),800 body_part_id: '1a',801 pain_rating: 5,802 title: 'headache',803 description: 'Very intense migraine that lasted all day.',804 date_created: '2017-06-20'805 });806 }).then(function() {807 return knex('inputs').insert({808 user_id: getUId(),809 body_part_id: '1a',810 pain_rating: 5,811 title: 'headache',812 description: 'Very intense migraine that lasted all day.',813 date_created: '2017-06-20'814 });815 }).then(function() {816 return knex('inputs').insert({817 user_id: getUId(),818 body_part_id: '1a',819 pain_rating: 5,820 title: 'headache',821 description: 'Very intense migraine that lasted all day.',822 date_created: '2017-06-20'823 });824 }).then(function() {825 return knex('inputs').insert({826 user_id: getUId(),827 body_part_id: '1a',828 pain_rating: 5,829 title: 'headache',830 description: 'Very intense migraine that lasted all day.',831 date_created: '2017-06-20'832 });833 }).then(function() {834 return knex('inputs').insert({835 user_id: getUId(),836 body_part_id: '1a',837 pain_rating: 5,838 title: 'headache',839 description: 'Very intense migraine that lasted all day.',840 date_created: '2017-06-20'841 });842 }).then(function() {843 return knex('inputs').insert({844 user_id: getUId(),845 body_part_id: '1a',846 pain_rating: 5,847 title: 'headache',848 description: 'Very intense migraine that lasted all day.',849 date_created: '2017-07-20'850 });851 }).then(function() {852 return knex('inputs').insert({853 user_id: getUId(),854 body_part_id: '1a',855 pain_rating: 5,856 title: 'headache',857 description: 'Very intense migraine that lasted all day.',858 date_created: '2017-07-20'859 });860 }).then(function() {861 return knex('inputs').insert({862 user_id: getUId(),863 body_part_id: '1a',864 pain_rating: 5,865 title: 'headache',866 description: 'Very intense migraine that lasted all day.',867 date_created: '2017-07-20'868 });869 }).then(function() {870 return knex('inputs').insert({871 user_id: getUId(),872 body_part_id: '1a',873 pain_rating: 5,874 title: 'headache',875 description: 'Very intense migraine that lasted all day.',876 date_created: '2017-07-20'877 });878 }).then(function() {879 return knex('inputs').insert({880 user_id: getUId(),881 body_part_id: '1a',882 pain_rating: 5,883 title: 'headache',884 description: 'Very intense migraine that lasted all day.',885 date_created: '2017-07-20'886 });887 }).then(function() {888 return knex('inputs').insert({889 user_id: getUId(),890 body_part_id: '1a',891 pain_rating: 5,892 title: 'headache',893 description: 'Very intense migraine that lasted all day.',894 date_created: '2017-07-20'895 });896 }).then(function() {897 return knex('inputs').insert({898 user_id: getUId(),899 body_part_id: '1a',900 pain_rating: 5,901 title: 'headache',902 description: 'Very intense migraine that lasted all day.',903 date_created: '2017-07-20'904 });905 }).then(function() {906 return knex('inputs').insert({907 user_id: getUId(),908 body_part_id: '1a',909 pain_rating: 5,910 title: 'headache',911 description: 'Very intense migraine that lasted all day.',912 date_created: '2017-07-20'913 });914 }).then(function() {915 return knex('inputs').insert({916 user_id: getUId(),917 body_part_id: '1a',918 pain_rating: 5,919 title: 'headache',920 description: 'Very intense migraine that lasted all day.',921 date_created: '2017-08-20'922 });923 }).then(function() {924 return knex('inputs').insert({925 user_id: getUId(),926 body_part_id: '1a',927 pain_rating: 5,928 title: 'headache',929 description: 'Very intense migraine that lasted all day.',930 date_created: '2017-09-20'931 });932 }).then(function() {933 return knex('inputs').insert({934 user_id: getUId(),935 body_part_id: '1a',936 pain_rating: 5,937 title: 'headache',938 description: 'Very intense migraine that lasted all day.',939 date_created: '2017-09-20'940 });941 }).then(function() {942 return knex('inputs').insert({943 user_id: getUId(),944 body_part_id: '1a',945 pain_rating: 5,946 title: 'headache',947 description: 'Very intense migraine that lasted all day.',948 date_created: '2017-09-20'949 });950 }).then(function() {951 return knex('inputs').insert({952 user_id: getUId(),953 body_part_id: '1a',954 pain_rating: 5,955 title: 'headache',956 description: 'Very intense migraine that lasted all day.',957 date_created: '2017-09-20'958 });959 }).then(function() {960 return knex('inputs').insert({961 user_id: getUId(),962 body_part_id: '1a',963 pain_rating: 5,964 title: 'headache',965 description: 'Very intense migraine that lasted all day.',966 date_created: '2017-09-20'967 });968 }).then(function() {969 return knex('inputs').insert({970 user_id: getUId(),971 body_part_id: '1a',972 pain_rating: 5,973 title: 'headache',974 description: 'Very intense migraine that lasted all day.',975 date_created: '2017-10-20'976 });977 }).then(function() {978 return knex('inputs').insert({979 user_id: getUId(),980 body_part_id: '1a',981 pain_rating: 5,982 title: 'headache',983 description: 'Very intense migraine that lasted all day.',984 date_created: '2017-10-20'985 });986 }).then(function() {987 return knex('inputs').insert({988 user_id: getUId(),989 body_part_id: '1a',990 pain_rating: 5,991 title: 'headache',992 description: 'Very intense migraine that lasted all day.',993 date_created: '2017-10-20'994 });995 }).then(function() {996 return knex('inputs').insert({997 user_id: getUId(),998 body_part_id: '1a',999 pain_rating: 5,1000 title: 'headache',1001 description: 'Very intense migraine that lasted all day.',1002 date_created: '2017-10-20'1003 });1004 }).then(function() {1005 return knex('inputs').insert({1006 user_id: getUId(),1007 body_part_id: '1a',1008 pain_rating: 5,1009 title: 'headache',1010 description: 'Very intense migraine that lasted all day.',1011 date_created: '2017-10-20'1012 });1013 }).then(function() {1014 return knex('inputs').insert({1015 user_id: getUId(),1016 body_part_id: '1a',1017 pain_rating: 5,1018 title: 'headache',1019 description: 'Very intense migraine that lasted all day.',1020 date_created: '2017-10-20'1021 });1022 }).then(function() {1023 return knex('inputs').insert({1024 user_id: getUId(),1025 body_part_id: '1a',1026 pain_rating: 5,1027 title: 'headache',1028 description: 'Very intense migraine that lasted all day.',1029 date_created: '2017-10-20'1030 });1031 }).then(function() {1032 return knex('inputs').insert({1033 user_id: getUId(),1034 body_part_id: '1a',1035 pain_rating: 5,1036 title: 'headache',1037 description: 'Very intense migraine that lasted all day.',1038 date_created: '2017-11-20'1039 });1040 }).then(function() {1041 return knex('inputs').insert({1042 user_id: getUId(),1043 body_part_id: '1a',1044 pain_rating: 5,1045 title: 'headache',1046 description: 'Very intense migraine that lasted all day.',1047 date_created: '2017-12-20'1048 });1049 }).then(function() {1050 return knex('inputs').insert({1051 user_id: getUId(),1052 body_part_id: '3a',1053 pain_rating: 5,1054 title: 'Shoudler blade',1055 description: 'Hurt real abd',1056 date_created: '2017-10-20'1057 });1058 }).then(function() {1059 return knex('inputs').insert({1060 user_id: getUId(),1061 body_part_id: '3a',1062 pain_rating: 5,1063 title: 'Shoudler blade',1064 description: 'Hurt real abd',1065 date_created: '2017-10-20'1066 });1067 }).then(function() {1068 return knex('inputs').insert({1069 user_id: getUId(),1070 body_part_id: '3a',1071 pain_rating: 5,1072 title: 'Shoudler blade',1073 description: 'Hurt real abd',1074 date_created: '2017-10-20'1075 });1076 }).then(function() {1077 return knex('inputs').insert({1078 user_id: getUId(),1079 body_part_id: '3a',1080 pain_rating: 5,1081 title: 'Shoudler blade',1082 description: 'Hurt real abd',1083 date_created: '2017-10-20'1084 });1085 }).then(function() {1086 return knex('inputs').insert({1087 user_id: getUId(),1088 body_part_id: '3a',1089 pain_rating: 5,1090 title: 'Shoudler blade',1091 description: 'Hurt real abd',1092 date_created: '2017-10-20'1093 });1094 }).then(function() {1095 return knex('inputs').insert({1096 user_id: getUId(),1097 body_part_id: '3a',1098 pain_rating: 5,1099 title: 'Shoudler blade',1100 description: 'Hurt real abd',1101 date_created: '2017-05-20'1102 });1103 }).then(function() {1104 return knex('inputs').insert({1105 user_id: getUId(),1106 body_part_id: '3a',1107 pain_rating: 5,1108 title: 'Shoudler blade',1109 description: 'Hurt real abd',1110 date_created: '2017-05-20'1111 });1112 }).then(function() {1113 return knex('inputs').insert({1114 user_id: getUId(),1115 body_part_id: '3a',1116 pain_rating: 5,1117 title: 'Shoudler blade',1118 description: 'Hurt real abd',1119 date_created: '2017-05-20'1120 });1121 }).then(function() {1122 return knex('inputs').insert({1123 user_id: getUId(),1124 body_part_id: '3a',1125 pain_rating: 5,1126 title: 'Shoudler blade',1127 description: 'Hurt real abd',1128 date_created: '2017-05-20'1129 });1130 }).then(function() {1131 return knex('inputs').insert({1132 user_id: getUId(),1133 body_part_id: '3a',1134 pain_rating: 5,1135 title: 'Shoudler blade',1136 description: 'Hurt real abd',1137 date_created: '2017-05-20'1138 });1139 }).then(function() {1140 return knex('inputs').insert({1141 user_id: getUId(),1142 body_part_id: '3a',1143 pain_rating: 5,1144 title: 'Shoudler blade',1145 description: 'Hurt real abd',1146 date_created: '2017-06-20'1147 });1148 }).then(function() {1149 return knex('inputs').insert({1150 user_id: getUId(),1151 body_part_id: '3a',1152 pain_rating: 5,1153 title: 'Shoudler blade',1154 description: 'Hurt real abd',1155 date_created: '2017-06-20'1156 });1157 }).then(function() {1158 return knex('inputs').insert({1159 user_id: getUId(),1160 body_part_id: '3a',1161 pain_rating: 5,1162 title: 'Shoudler blade',1163 description: 'Hurt real abd',1164 date_created: '2017-06-20'1165 });1166 }).then(function() {1167 return knex('inputs').insert({1168 user_id: getUId(),1169 body_part_id: '3a',1170 pain_rating: 5,1171 title: 'Shoudler blade',1172 description: 'Hurt real abd',1173 date_created: '2017-06-20'1174 });1175 }).then(function() {1176 return knex('inputs').insert({1177 user_id: getUId(),1178 body_part_id: '3a',1179 pain_rating: 5,1180 title: 'Shoudler blade',1181 description: 'Hurt real abd',1182 date_created: '2017-06-20'1183 });1184 }).then(function() {1185 return knex('inputs').insert({1186 user_id: getUId(),1187 body_part_id: '3a',1188 pain_rating: 5,1189 title: 'Shoudler blade',1190 description: 'Hurt real abd',1191 date_created: '2017-06-20'1192 });1193 }).then(function() {1194 return knex('inputs').insert({1195 user_id: getUId(),1196 body_part_id: '3a',1197 pain_rating: 5,1198 title: 'Shoudler blade',1199 description: 'Hurt real abd',1200 date_created: '2017-06-20'1201 });1202 }).then(function() {1203 return knex('inputs').insert({1204 user_id: getUId(),1205 body_part_id: '3a',1206 pain_rating: 5,1207 title: 'Shoudler blade',1208 description: 'Hurt real abd',1209 date_created: '2017-06-20'1210 });1211 }).then(function() {1212 return knex('inputs').insert({1213 user_id: getUId(),1214 body_part_id: '3a',1215 pain_rating: 5,1216 title: 'Shoudler blade',1217 description: 'Hurt real abd',1218 date_created: '2017-06-20'1219 });1220 }).then(function() {1221 return knex('inputs').insert({1222 user_id: getUId(),1223 body_part_id: '3a',1224 pain_rating: 5,1225 title: 'Shoudler blade',1226 description: 'Hurt real abd',1227 date_created: '2017-06-20'1228 });1229 }).then(function() {1230 return knex('inputs').insert({1231 user_id: getUId(),1232 body_part_id: '3a',1233 pain_rating: 5,1234 title: 'Shoudler blade',1235 description: 'Hurt real abd',1236 date_created: '2017-06-20'1237 });1238 }).then(function() {1239 return knex('inputs').insert({1240 user_id: getUId(),1241 body_part_id: '3a',1242 pain_rating: 5,1243 title: 'Shoudler blade',1244 description: 'Hurt real abd',1245 date_created: '2017-06-20'1246 });1247 }).then(function() {1248 return knex('inputs').insert({1249 user_id: getUId(),1250 body_part_id: '3a',1251 pain_rating: 5,1252 title: 'Shoudler blade',1253 description: 'Hurt real abd',1254 date_created: '2017-06-20'1255 });1256 }).then(function() {1257 return knex('inputs').insert({1258 user_id: getUId(),1259 body_part_id: '3a',1260 pain_rating: 5,1261 title: 'Shoudler blade',1262 description: 'Hurt real abd',1263 date_created: '2017-07-20'1264 });1265 }).then(function() {1266 return knex('inputs').insert({1267 user_id: getUId(),1268 body_part_id: '3a',1269 pain_rating: 5,1270 title: 'Shoudler blade',1271 description: 'Hurt real abd',1272 date_created: '2017-07-20'1273 });1274 }).then(function() {1275 return knex('inputs').insert({1276 user_id: getUId(),1277 body_part_id: '3a',1278 pain_rating: 5,1279 title: 'Shoudler blade',1280 description: 'Hurt real abd',1281 date_created: '2017-07-20'1282 });1283 }).then(function() {1284 return knex('inputs').insert({1285 user_id: getUId(),1286 body_part_id: '3a',1287 pain_rating: 5,1288 title: 'Shoudler blade',1289 description: 'Hurt real abd',1290 date_created: '2017-07-20'1291 });1292 }).then(function() {1293 return knex('inputs').insert({1294 user_id: getUId(),1295 body_part_id: '3a',1296 pain_rating: 5,1297 title: 'Shoudler blade',1298 description: 'Hurt real abd',1299 date_created: '2017-07-20'1300 });1301 }).then(function() {1302 return knex('inputs').insert({1303 user_id: getUId(),1304 body_part_id: '3a',1305 pain_rating: 5,1306 title: 'Shoudler blade',1307 description: 'Hurt real abd',1308 date_created: '2017-07-20'1309 });1310 }).then(function() {1311 return knex('inputs').insert({1312 user_id: getUId(),1313 body_part_id: '3a',1314 pain_rating: 5,1315 title: 'Shoudler blade',1316 description: 'Hurt real abd',1317 date_created: '2017-08-20'1318 });1319 }).then(function() {1320 return knex('inputs').insert({1321 user_id: getUId(),1322 body_part_id: '3a',1323 pain_rating: 5,1324 title: 'Shoudler blade',1325 description: 'Hurt real abd',1326 date_created: '2017-08-20'1327 });1328 }).then(function() {1329 return knex('inputs').insert({1330 user_id: getUId(),1331 body_part_id: '3a',1332 pain_rating: 5,1333 title: 'Shoudler blade',1334 description: 'Hurt real abd',1335 date_created: '2017-08-20'1336 });1337 }).then(function() {1338 return knex('inputs').insert({1339 user_id: getUId(),1340 body_part_id: '3a',1341 pain_rating: 5,1342 title: 'Shoudler blade',1343 description: 'Hurt real abd',1344 date_created: '2017-08-20'1345 });1346 }).then(function() {1347 return knex('inputs').insert({1348 user_id: getUId(),1349 body_part_id: '3a',1350 pain_rating: 5,1351 title: 'Shoudler blade',1352 description: 'Hurt real abd',1353 date_created: '2017-08-20'1354 });1355 }).then(function() {1356 return knex('inputs').insert({1357 user_id: getUId(),1358 body_part_id: '3a',1359 pain_rating: 5,1360 title: 'Shoudler blade',1361 description: 'Hurt real abd',1362 date_created: '2017-08-20'1363 });1364 }).then(function() {1365 return knex('inputs').insert({1366 user_id: getUId(),1367 body_part_id: '3a',1368 pain_rating: 5,1369 title: 'Shoudler blade',1370 description: 'Hurt real abd',1371 date_created: '2017-08-20'1372 });1373 }).then(function() {1374 return knex('inputs').insert({1375 user_id: getUId(),1376 body_part_id: '3a',1377 pain_rating: 5,1378 title: 'Shoudler blade',1379 description: 'Hurt real abd',1380 date_created: '2017-09-20'1381 });1382 }).then(function() {1383 return knex('inputs').insert({1384 user_id: getUId(),1385 body_part_id: '3a',1386 pain_rating: 5,1387 title: 'Shoudler blade',1388 description: 'Hurt real abd',1389 date_created: '2017-11-20'1390 });1391 }).then(function() {1392 return knex('inputs').insert({1393 user_id: getUId(),1394 body_part_id: '3a',1395 pain_rating: 5,1396 title: 'Shoudler blade',1397 description: 'Hurt real abd',1398 date_created: '2017-11-20'1399 });1400 }).then(function() {1401 return knex('inputs').insert({1402 user_id: getUId(),1403 body_part_id: '3a',1404 pain_rating: 5,1405 title: 'Shoudler blade',1406 description: 'Hurt real abd',1407 date_created: '2017-11-20'1408 });1409 }).then(function() {1410 return knex('inputs').insert({1411 user_id: getUId(),1412 body_part_id: '3a',1413 pain_rating: 5,1414 title: 'Shoudler blade',1415 description: 'Hurt real abd',1416 date_created: '2017-11-20'1417 });1418 }).then(function() {1419 return knex('inputs').insert({1420 user_id: getUId(),1421 body_part_id: '3a',1422 pain_rating: 5,1423 title: 'Shoudler blade',1424 description: 'Hurt real abd',1425 date_created: '2017-11-20'1426 });1427 }).then(function() {1428 return knex('inputs').insert({1429 user_id: getUId(),1430 body_part_id: '3a',1431 pain_rating: 5,1432 title: 'Shoudler blade',1433 description: 'Hurt real abd',1434 date_created: '2017-11-20'1435 });1436 }).then(function() {1437 return knex('inputs').insert({1438 user_id: getUId(),1439 body_part_id: '3a',1440 pain_rating: 5,1441 title: 'Shoudler blade',1442 description: 'Hurt real abd',1443 date_created: '2017-12-20'1444 });1445 }).then(function() {1446 return knex('inputs').insert({1447 user_id: getUId(),1448 body_part_id: '4c',1449 pain_rating: 5,1450 title: 'knees',1451 description: 'Patella',1452 date_created: '2017-01-20'1453 });1454 }).then(function() {1455 return knex('inputs').insert({1456 user_id: getUId(),1457 body_part_id: '4c',1458 pain_rating: 5,1459 title: 'knees',1460 description: 'Patella',1461 date_created: '2017-01-20'1462 });1463 }).then(function() {1464 return knex('inputs').insert({1465 user_id: getUId(),1466 body_part_id: '4c',1467 pain_rating: 5,1468 title: 'knees',1469 description: 'Patella',1470 date_created: '2017-01-20'1471 });1472 }).then(function() {1473 return knex('inputs').insert({1474 user_id: getUId(),1475 body_part_id: '4c',1476 pain_rating: 5,1477 title: 'knees',1478 description: 'Patella',1479 date_created: '2017-01-20'1480 });1481 }).then(function() {1482 return knex('inputs').insert({1483 user_id: getUId(),1484 body_part_id: '4c',1485 pain_rating: 5,1486 title: 'knees',1487 description: 'Patella',1488 date_created: '2017-01-20'1489 });1490 }).then(function() {1491 return knex('inputs').insert({1492 user_id: getUId(),1493 body_part_id: '4c',1494 pain_rating: 5,1495 title: 'knees',1496 description: 'Patella',1497 date_created: '2017-01-20'1498 });1499 }).then(function() {1500 return knex('inputs').insert({1501 user_id: getUId(),1502 body_part_id: '4c',1503 pain_rating: 5,1504 title: 'knees',1505 description: 'Patella',1506 date_created: '2017-01-20'1507 });1508 }).then(function() {1509 return knex('inputs').insert({1510 user_id: getUId(),1511 body_part_id: '4c',1512 pain_rating: 5,1513 title: 'knees',1514 description: 'Patella',1515 date_created: '2017-01-20'1516 });1517 }).then(function() {1518 return knex('inputs').insert({1519 user_id: getUId(),1520 body_part_id: '4c',1521 pain_rating: 5,1522 title: 'knees',1523 description: 'Patella',1524 date_created: '2017-02-20'1525 });1526 }).then(function() {1527 return knex('inputs').insert({1528 user_id: getUId(),1529 body_part_id: '4c',1530 pain_rating: 5,1531 title: 'knees',1532 description: 'Patella',1533 date_created: '2017-02-20'1534 });1535 }).then(function() {1536 return knex('inputs').insert({1537 user_id: getUId(),1538 body_part_id: '4c',1539 pain_rating: 5,1540 title: 'knees',1541 description: 'Patella',1542 date_created: '2017-02-20'1543 });1544 }).then(function() {1545 return knex('inputs').insert({1546 user_id: getUId(),1547 body_part_id: '4c',1548 pain_rating: 5,1549 title: 'knees',1550 description: 'Patella',1551 date_created: '2017-02-20'1552 });1553 }).then(function() {1554 return knex('inputs').insert({1555 user_id: getUId(),1556 body_part_id: '4c',1557 pain_rating: 5,1558 title: 'knees',1559 description: 'Patella',1560 date_created: '2017-02-20'1561 });1562 }).then(function() {1563 return knex('inputs').insert({1564 user_id: getUId(),1565 body_part_id: '4c',1566 pain_rating: 5,1567 title: 'knees',1568 description: 'Patella',1569 date_created: '2017-02-20'1570 });1571 }).then(function() {1572 return knex('inputs').insert({1573 user_id: getUId(),1574 body_part_id: '4c',1575 pain_rating: 5,1576 title: 'knees',1577 description: 'Patella',1578 date_created: '2017-03-20'1579 });1580 }).then(function() {1581 return knex('inputs').insert({1582 user_id: getUId(),1583 body_part_id: '4c',1584 pain_rating: 5,1585 title: 'knees',1586 description: 'Patella',1587 date_created: '2017-03-20'1588 });1589 }).then(function() {1590 return knex('inputs').insert({1591 user_id: getUId(),1592 body_part_id: '4c',1593 pain_rating: 5,1594 title: 'knees',1595 description: 'Patella',1596 date_created: '2017-03-20'1597 });1598 }).then(function() {1599 return knex('inputs').insert({1600 user_id: getUId(),1601 body_part_id: '4c',1602 pain_rating: 5,1603 title: 'knees',1604 description: 'Patella',1605 date_created: '2017-03-20'1606 });1607 }).then(function() {1608 return knex('inputs').insert({1609 user_id: getUId(),1610 body_part_id: '4c',1611 pain_rating: 5,1612 title: 'knees',1613 description: 'Patella',1614 date_created: '2017-03-20'1615 });1616 }).then(function() {1617 return knex('inputs').insert({1618 user_id: getUId(),1619 body_part_id: '4c',1620 pain_rating: 5,1621 title: 'knees',1622 description: 'Patella',1623 date_created: '2017-03-20'1624 });1625 }).then(function() {1626 return knex('inputs').insert({1627 user_id: getUId(),1628 body_part_id: '4c',1629 pain_rating: 5,1630 title: 'knees',1631 description: 'Patella',1632 date_created: '2017-03-20'1633 });1634 }).then(function() {1635 return knex('inputs').insert({1636 user_id: getUId(),1637 body_part_id: '4c',1638 pain_rating: 5,1639 title: 'knees',1640 description: 'Patella',1641 date_created: '2017-03-20'1642 });1643 }).then(function() {1644 return knex('inputs').insert({1645 user_id: getUId(),1646 body_part_id: '4c',1647 pain_rating: 5,1648 title: 'knees',1649 description: 'Patella',1650 date_created: '2017-03-20'1651 });1652 }).then(function() {1653 return knex('inputs').insert({1654 user_id: getUId(),1655 body_part_id: '4c',1656 pain_rating: 5,1657 title: 'knees',1658 description: 'Patella',1659 date_created: '2017-03-20'1660 });1661 }).then(function() {1662 return knex('inputs').insert({1663 user_id: getUId(),1664 body_part_id: '4c',1665 pain_rating: 5,1666 title: 'knees',1667 description: 'Patella',1668 date_created: '2017-03-20'1669 });1670 }).then(function() {1671 return knex('inputs').insert({1672 user_id: getUId(),1673 body_part_id: '4c',1674 pain_rating: 5,1675 title: 'knees',1676 description: 'Patella',1677 date_created: '2017-03-20'1678 });1679 }).then(function() {1680 return knex('inputs').insert({1681 user_id: getUId(),1682 body_part_id: '4c',1683 pain_rating: 5,1684 title: 'knees',1685 description: 'Patella',1686 date_created: '2017-03-20'1687 });1688 }).then(function() {1689 return knex('inputs').insert({1690 user_id: getUId(),1691 body_part_id: '4c',1692 pain_rating: 5,1693 title: 'knees',1694 description: 'Patella',1695 date_created: '2017-03-20'1696 });1697 }).then(function() {1698 return knex('inputs').insert({1699 user_id: getUId(),1700 body_part_id: '4c',1701 pain_rating: 5,1702 title: 'knees',1703 description: 'Patella',1704 date_created: '2017-03-20'1705 });1706 }).then(function() {1707 return knex('inputs').insert({1708 user_id: getUId(),1709 body_part_id: '4c',1710 pain_rating: 5,1711 title: 'knees',1712 description: 'Patella',1713 date_created: '2017-03-20'1714 });1715 }).then(function() {1716 return knex('inputs').insert({1717 user_id: getUId(),1718 body_part_id: '4c',1719 pain_rating: 5,1720 title: 'knees',1721 description: 'Patella',1722 date_created: '2017-03-20'1723 });1724 }).then(function() {1725 return knex('inputs').insert({1726 user_id: getUId(),1727 body_part_id: '4c',1728 pain_rating: 5,1729 title: 'knees',1730 description: 'Patella',1731 date_created: '2017-03-20'1732 });1733 }).then(function() {1734 return knex('inputs').insert({1735 user_id: getUId(),1736 body_part_id: '4c',1737 pain_rating: 5,1738 title: 'knees',1739 description: 'Patella',1740 date_created: '2017-03-20'1741 });1742 }).then(function() {1743 return knex('inputs').insert({1744 user_id: getUId(),1745 body_part_id: '4c',1746 pain_rating: 5,1747 title: 'knees',1748 description: 'Patella',1749 date_created: '2017-04-20'1750 });1751 }).then(function() {1752 return knex('inputs').insert({1753 user_id: getUId(),1754 body_part_id: '4c',1755 pain_rating: 5,1756 title: 'knees',1757 description: 'Patella',1758 date_created: '2017-04-20'1759 });1760 }).then(function() {1761 return knex('inputs').insert({1762 user_id: getUId(),1763 body_part_id: '4c',1764 pain_rating: 5,1765 title: 'knees',1766 description: 'Patella',1767 date_created: '2017-04-20'1768 });1769 }).then(function() {1770 return knex('inputs').insert({1771 user_id: getUId(),1772 body_part_id: '4c',1773 pain_rating: 5,1774 title: 'knees',1775 description: 'Patella',1776 date_created: '2017-04-20'1777 });1778 }).then(function() {1779 return knex('inputs').insert({1780 user_id: getUId(),1781 body_part_id: '4c',1782 pain_rating: 5,1783 title: 'knees',1784 description: 'Patella',1785 date_created: '2017-04-20'1786 });1787 }).then(function() {1788 return knex('inputs').insert({1789 user_id: getUId(),1790 body_part_id: '4c',1791 pain_rating: 5,1792 title: 'knees',1793 description: 'Patella',1794 date_created: '2017-04-20'1795 });1796 }).then(function() {1797 return knex('inputs').insert({1798 user_id: getUId(),1799 body_part_id: '4c',1800 pain_rating: 5,1801 title: 'knees',1802 description: 'Patella',1803 date_created: '2017-04-20'1804 });1805 }).then(function() {1806 return knex('inputs').insert({1807 user_id: getUId(),1808 body_part_id: '4c',1809 pain_rating: 5,1810 title: 'knees',1811 description: 'Patella',1812 date_created: '2017-04-20'1813 });1814 }).then(function() {1815 return knex('inputs').insert({1816 user_id: getUId(),1817 body_part_id: '4c',1818 pain_rating: 5,1819 title: 'knees',1820 description: 'Patella',1821 date_created: '2017-05-20'1822 });1823 }).then(function() {1824 return knex('inputs').insert({1825 user_id: getUId(),1826 body_part_id: '4c',1827 pain_rating: 5,1828 title: 'knees',1829 description: 'Patella',1830 date_created: '2017-06-20'1831 });1832 }).then(function() {1833 return knex('inputs').insert({1834 user_id: getUId(),1835 body_part_id: '4c',1836 pain_rating: 5,1837 title: 'knees',1838 description: 'Patella',1839 date_created: '2017-06-20'1840 });1841 }).then(function() {1842 return knex('inputs').insert({1843 user_id: getUId(),1844 body_part_id: '4c',1845 pain_rating: 5,1846 title: 'knees',1847 description: 'Patella',1848 date_created: '2017-06-20'1849 });1850 }).then(function() {1851 return knex('inputs').insert({1852 user_id: getUId(),1853 body_part_id: '4c',1854 pain_rating: 5,1855 title: 'knees',1856 description: 'Patella',1857 date_created: '2017-06-20'1858 });1859 }).then(function() {1860 return knex('inputs').insert({1861 user_id: getUId(),1862 body_part_id: '4c',1863 pain_rating: 5,1864 title: 'knees',1865 description: 'Patella',1866 date_created: '2017-06-20'1867 });1868 }).then(function() {1869 return knex('inputs').insert({1870 user_id: getUId(),1871 body_part_id: '4c',1872 pain_rating: 5,1873 title: 'knees',1874 description: 'Patella',1875 date_created: '2017-06-20'1876 });1877 }).then(function() {1878 return knex('inputs').insert({1879 user_id: getUId(),1880 body_part_id: '4c',1881 pain_rating: 5,1882 title: 'knees',1883 description: 'Patella',1884 date_created: '2017-07-20'1885 });1886 }).then(function() {1887 return knex('inputs').insert({1888 user_id: getUId(),1889 body_part_id: '4c',1890 pain_rating: 5,1891 title: 'knees',1892 description: 'Patella',1893 date_created: '2017-07-20'1894 });1895 }).then(function() {1896 return knex('inputs').insert({1897 user_id: getUId(),1898 body_part_id: '4c',1899 pain_rating: 5,1900 title: 'knees',1901 description: 'Patella',1902 date_created: '2017-07-20'1903 });1904 }).then(function() {1905 return knex('inputs').insert({1906 user_id: getUId(),1907 body_part_id: '4c',1908 pain_rating: 5,1909 title: 'knees',1910 description: 'Patella',1911 date_created: '2017-07-20'1912 });1913 }).then(function() {1914 return knex('inputs').insert({1915 user_id: getUId(),1916 body_part_id: '4c',1917 pain_rating: 5,1918 title: 'knees',1919 description: 'Patella',1920 date_created: '2017-08-20'1921 });1922 }).then(function() {1923 return knex('inputs').insert({1924 user_id: getUId(),1925 body_part_id: '4c',1926 pain_rating: 5,1927 title: 'knees',1928 description: 'Patella',1929 date_created: '2017-08-20'1930 });1931 }).then(function() {1932 return knex('inputs').insert({1933 user_id: getUId(),1934 body_part_id: '4c',1935 pain_rating: 5,1936 title: 'knees',1937 description: 'Patella',1938 date_created: '2017-08-20'1939 });1940 }).then(function() {1941 return knex('inputs').insert({1942 user_id: getUId(),1943 body_part_id: '4c',1944 pain_rating: 5,1945 title: 'knees',1946 description: 'Patella',1947 date_created: '2017-08-20'1948 });1949 }).then(function() {1950 return knex('inputs').insert({1951 user_id: getUId(),1952 body_part_id: '4c',1953 pain_rating: 5,1954 title: 'knees',1955 description: 'Patella',1956 date_created: '2017-08-20'1957 });1958 }).then(function() {1959 return knex('inputs').insert({1960 user_id: getUId(),1961 body_part_id: '4c',1962 pain_rating: 5,1963 title: 'knees',1964 description: 'Patella',1965 date_created: '2017-08-20'1966 });1967 }).then(function() {1968 return knex('inputs').insert({1969 user_id: getUId(),1970 body_part_id: '4c',1971 pain_rating: 5,1972 title: 'knees',1973 description: 'Patella',1974 date_created: '2017-08-20'1975 });1976 }).then(function() {1977 return knex('inputs').insert({1978 user_id: getUId(),1979 body_part_id: '4c',1980 pain_rating: 5,1981 title: 'knees',1982 description: 'Patella',1983 date_created: '2017-08-20'1984 });1985 }).then(function() {1986 return knex('inputs').insert({1987 user_id: getUId(),1988 body_part_id: '4c',1989 pain_rating: 5,1990 title: 'knees',1991 description: 'Patella',1992 date_created: '2017-08-20'1993 });1994 }).then(function() {1995 return knex('inputs').insert({1996 user_id: getUId(),1997 body_part_id: '4c',1998 pain_rating: 5,1999 title: 'knees',2000 description: 'Patella',2001 date_created: '2017-09-20'2002 });2003 }).then(function() {2004 return knex('inputs').insert({2005 user_id: getUId(),2006 body_part_id: '4c',2007 pain_rating: 5,2008 title: 'knees',2009 description: 'Patella',2010 date_created: '2017-09-20'2011 });2012 }).then(function() {2013 return knex('inputs').insert({2014 user_id: getUId(),2015 body_part_id: '4c',2016 pain_rating: 5,2017 title: 'knees',2018 description: 'Patella',2019 date_created: '2017-09-20'2020 });2021 }).then(function() {2022 return knex('inputs').insert({2023 user_id: getUId(),2024 body_part_id: '4c',2025 pain_rating: 5,2026 title: 'knees',2027 description: 'Patella',2028 date_created: '2017-09-20'2029 });2030 }).then(function() {2031 return knex('inputs').insert({2032 user_id: getUId(),2033 body_part_id: '4c',2034 pain_rating: 5,2035 title: 'knees',2036 description: 'Patella',2037 date_created: '2017-09-20'2038 });2039 }).then(function() {2040 return knex('inputs').insert({2041 user_id: getUId(),2042 body_part_id: '4c',2043 pain_rating: 5,2044 title: 'knees',2045 description: 'Patella',2046 date_created: '2017-09-20'2047 });2048 }).then(function() {2049 return knex('inputs').insert({2050 user_id: getUId(),2051 body_part_id: '4c',2052 pain_rating: 5,2053 title: 'knees',2054 description: 'Patella',2055 date_created: '2017-09-20'2056 });2057 }).then(function() {2058 return knex('inputs').insert({2059 user_id: getUId(),2060 body_part_id: '4c',2061 pain_rating: 5,2062 title: 'knees',2063 description: 'Patella',2064 date_created: '2017-09-20'2065 });2066 }).then(function() {2067 return knex('inputs').insert({2068 user_id: getUId(),2069 body_part_id: '4c',2070 pain_rating: 5,2071 title: 'knees',2072 description: 'Patella',2073 date_created: '2017-09-20'2074 });2075 }).then(function() {2076 return knex('inputs').insert({2077 user_id: getUId(),2078 body_part_id: '4c',2079 pain_rating: 5,2080 title: 'knees',2081 description: 'Patella',2082 date_created: '2017-10-20'2083 });2084 }).then(function() {2085 return knex('inputs').insert({2086 user_id: getUId(),2087 body_part_id: '4c',2088 pain_rating: 5,2089 title: 'knees',2090 description: 'Patella',2091 date_created: '2017-10-20'2092 });2093 }).then(function() {2094 return knex('inputs').insert({2095 user_id: getUId(),2096 body_part_id: '4c',2097 pain_rating: 5,2098 title: 'knees',2099 description: 'Patella',2100 date_created: '2017-10-20'2101 });2102 }).then(function() {2103 return knex('inputs').insert({2104 user_id: getUId(),2105 body_part_id: '4c',2106 pain_rating: 5,2107 title: 'knees',2108 description: 'Patella',2109 date_created: '2017-10-20'2110 });2111 }).then(function() {2112 return knex('inputs').insert({2113 user_id: getUId(),2114 body_part_id: '4c',2115 pain_rating: 5,2116 title: 'knees',2117 description: 'Patella',2118 date_created: '2017-10-20'2119 });2120 }).then(function() {2121 return knex('inputs').insert({2122 user_id: getUId(),2123 body_part_id: '4c',2124 pain_rating: 5,2125 title: 'knees',2126 description: 'Patella',2127 date_created: '2017-10-20'2128 });2129 }).then(function() {2130 return knex('inputs').insert({2131 user_id: getUId(),2132 body_part_id: '4c',2133 pain_rating: 5,2134 title: 'knees',2135 description: 'Patella',2136 date_created: '2017-11-20'2137 });2138 }).then(function() {2139 return knex('inputs').insert({2140 user_id: getUId(),2141 body_part_id: '4c',2142 pain_rating: 5,2143 title: 'knees',2144 description: 'Patella',2145 date_created: '2017-11-20'2146 });2147 }).then(function() {2148 return knex('inputs').insert({2149 user_id: getUId(),2150 body_part_id: '4c',2151 pain_rating: 5,2152 title: 'knees',2153 description: 'Patella',2154 date_created: '2017-11-20'2155 });2156 }).then(function() {2157 return knex('inputs').insert({2158 user_id: getUId(),2159 body_part_id: '4c',2160 pain_rating: 5,2161 title: 'knees',2162 description: 'Patella',2163 date_created: '2017-11-20'2164 });2165 }).then(function() {2166 return knex('inputs').insert({2167 user_id: getUId(),2168 body_part_id: '4c',2169 pain_rating: 5,2170 title: 'knees',2171 description: 'Patella',2172 date_created: '2017-11-20'2173 });2174 }).then(function() {2175 return knex('inputs').insert({2176 user_id: getUId(),2177 body_part_id: '4c',2178 pain_rating: 5,2179 title: 'knees',2180 description: 'Patella',2181 date_created: '2017-12-20'2182 });2183 })...

Full Screen

Full Screen

EventKey.js

Source:EventKey.js Github

copy

Full Screen

1//返回唯一标识符,仅用于事件定义2let __uuid = 0;3let getUID = function () {4 __uuid = __uuid + 1;5 return "UUID" + __uuid.toString();6};7let M = {};8//网络连接成功9M.BASIC_NET_CONNECT_SUCCESS = getUID();10M.SHOW_PROMPT_DIALOG = getUID(); //显示通用提示框11M.REMOVE_PROMPT_DIALOG = getUID(); //移除通用提示框12M.GLOBAL_TOAST = getUID(); //吐司13//应用前后台切换事件14M.APPLICATION_ACTIONS_EVENT = getUID();15//游戏前后台切换事件16M.GAME_ACTION_EVENT = getUID();17M.EXIT_LORD_GAME = getUID() //退出牌桌18M.GLOBAL_REMOVE_TOAST = getUID(); // 删除吐司19M.OPEN_VIEW_DIALOG = getUID(); // 打开对话框20M.REMOVE_VIEW_DIALOG = getUID(); // 删除对话框21M.INTERACT_PHIZ_NTF = getUID(); // 互动表情22M.GLOBAL_SHOW_WAITING = getUID(); //显示透明全屏等待23M.GLOBAL_REMOVE_WAITING = getUID(); //移除透明全屏等待24//进入房间25M.NET_INPUT_REQ = getUID();26M.GLOBAL_SINGLE_TOAST = getUID(); //打开单个吐司27M.GLOBAL_REMOVE_SINGLE_TOAST = getUID(); // 删除单个吐司28//////////////////////////////斗地主事件 start//////////////////////////////////////29//退桌30M.LORD_NET_EXIT_DESK_REQ = getUID();31//叫分32M.LORD_NET_CALL_POINT_REQ = getUID();33//托管34M.LORD_NET_AUTO_PLAY_REQ = getUID();35//打牌36M.LORD_NET_DISCARD_REQ = getUID();37//退桌通知38M.LORD_NET_EXIT_DESK_NOTIFY = getUID();39//进桌通知40M.LORD_NET_ENTER_DESK_NOTIFY = getUID();41//结算通知42M.LORD_NET_RESULT_NOTIFY = getUID();43//叫分通知44M.LORD_NET_CALL_POINT_NOTIFY = getUID();45//游戏开始通知46M.LORD_NET_START_GAME_NOTIFY = getUID();47//打牌通知48M.LORD_NET_DISCARD_NOTIFY = getUID();49//托管通知50M.LORD_NET_AUTO_PLAY_NOTIFY = getUID();51//加倍请求52M.LORD_NET_MUTI_REQ = getUID();53//加倍通知54M.LORD_NET_MUTI_NOTIFY = getUID();55//倒计时超时请求56M.LORD_NET_OP_TIME_OUT_REQ = getUID();57M.LORD_FEEDBACK_EVENT = getUID(); //用户反馈58//查询牌桌59M.LOGIN_SUCCESS_IN_GAME = getUID();60M.DDZ_PROTECT_NOTIFY = getUID(); //移除破产提示框61M.SHOW_BACKRUPT_DIALOG = getUID(); //显示破产提示框62M.REMOVE_BACKRUPT_DIALOG = getUID(); //移除破产提示框63M.UPADTE_MULTIPLE_DIALOG = getUID(); //更新公共倍数弹窗64M.NET_USER_READY_REQ = getUID(); //玩家准备请求65M.NET_USER_READY_NOTIFY = getUID(); //玩家准备通知66M.DDZ_SHOW_CARD_NOTIFY = getUID(); //明牌通知67M.RECORD_OPEN_DIALOG = getUID(); //打开战绩中窗口68M.DDZ_SHOW_CARD_REQ = getUID(); //发牌过程中明牌请求69M.DDZ_DESK_MULTI_NOTIFY = getUID(); //牌桌倍数变化通知70M.UPDATE_BEGIN_BUTTONS = getUID(); //更新开始按钮71M.HIDE_ALL_BTNS = getUID(); //隐藏按钮72M.UPDATE_SHOW_CARD_BTN = getUID(); //更新明牌按钮73M.OPEN_MULTI_DIALOG = getUID(); //打开公共倍数弹窗74M.ROOM_CHECK = getUID(); //请求是否有未完成牌局75M.DDZ_OPUSER_NOTIFY = getUID(); //牌桌当前操作者通知76M.DDZ_USER_STAND_REQ = getUID(); //玩家站起请求77M.NET_USER_STAND_NOTIFY = getUID(); //玩家站起通知78M.DDZ_USER_SITDOWN_REQ = getUID(); //玩家坐下请求79M.NET_USER_SITDOWN_NOTIFY = getUID(); //玩家坐下通知80M.DDZ_GOLD_CHANGE_NOTIFY = getUID(); //单独通知用户金币变化81M.LORD_REQUEST_VIEWER_CREATE_DESK = getUID(); //请求旁观玩家新开房间82M.LORD_REQUEST_USER_CHANGE_DESK = getUID(); //请求换桌83M.OPEN_PLAYERINFO_DIALOGVIEW = getUID(); /////打开玩家信息84M.REMOVE_PLAYERINFO_DIALOGVIEW = getUID(); /////关闭/移除玩家信息85M.LORD_REQUEST_OPEN_EMAIL = getUID();86M.NET_GAME_CHAT_NOTIFY = getUID();87M.DDZ_GAME_CHAT_REQ = getUID();88M.GET_EMAIL_DATA_CONTENTS = getUID();89M.EVT_SHOW_MAIL_VIEW = getUID();90M.EVT_REQ_MAIL_DATA = getUID();91M.NET_PRODUCT_EXCHANGE_BY_DIAMOND = getUID(); //用钻石兑换金币92M.GAME_PAY_NOTICE = getUID(); //购买钻石93M.DDZ_DIAMOND_CHANGE_NOTIFY = getUID(); //单独通知用户钻石变化94M.DDZ_BUY_SUCCESS_NOTIFY = getUID(); //通知购买商城物品成功了95M.UPDATE_USER_GOLD = getUID(); //金币更新96M.UPDATE_USER_DIAMOND = getUID(); //钻石更新97M.DDZ_PRODUCT_EXCHANGE_BY_MONEY = getUID(); //兑换金币钻石不足调用计费点98M.EVT_SHOW_EXCHANGE_DIALOG = getUID();99M.EVT_REQ_EXCHANGE_DATA = getUID();100M.LORD_EMAIL_NOTE_NUMS_TO_MAINVIEW = getUID();101M.EMAIL_DATAS_REQ = getUID();102M.UPDATE_EMAILDATAS_UNREAD_NUM = getUID();103M.GET_VIEW_DIALOG_BY_NAME = getUID(); //获取相应的对话框104M.UPDATE_WELFARE_INFO = getUID(); //更新新手福利信息105M.RECEIVE_GIFT_REQ = getUID(); //领取福利106M.GET_WELFARE_DATA_REQ = getUID(); // 请求登录礼包数据107M.CHECK_GOLD_LIMIT = getUID(); //进桌检查金币限制108M.KICK_OUT_REQ = getUID(); //踢人请求109M.DDZ_CLOSE_BUY_COVER = getUID(); //取消商城点击购买遮罩110M.UPDATE_FOCUS_INFO = getUID(); //更新关注有礼信息111M.UPDATE_CARD_COUNTER_NUM = getUID(); //更新记牌器数量112M.EVT_LAUNCH_FROM_COUNTER_LINK = getUID(); //从记牌器链接进来113M.EVT_LAUNCH_FROM_INVITATION_LINK = getUID(); //从邀请有礼链接进来114M.SHOW_CARD_COUNTER_VIEW = getUID(); //打开记牌器115M.UPDATE_CARD_COUNTER_INFO = getUID(); //更新记牌器信息116M.REQ_CARD_COUNTER_DATA = getUID();117M.RECEIVE_COUNTER_REQ = getUID(); //领取记牌器请求118M.COUNTER_MAIN_SHARE_REQ = getUID(); //记牌器大厅内分享119M.COUNTER_INVITE_REQ = getUID(); //记牌器大厅内邀请120M.COUNTER_DESK_SHARE_REQ = getUID(); //记牌器牌桌内分享121M.STATISTICAL_RECONNECTION_INFO = getUID(); //统计断线重连相关122M.SHOW_REWARD_DIALOG = getUID(); //显示获得物品提示框123M.SHOW_REWARD_DIALOG_LIST = getUID();124M.REMOVE_REWARD_DIALOG = getUID(); //移除获得物品提示框125M.UPDATE_CHANGE_TABLE_BUTTONS = getUID(); //更新换桌按钮126M.CHECK_WELFARE_FLAG = getUID(); //检测福利弹窗127M.DDZ_USER_UNREADNUM_NOTIFY = getUID(); //用户未读消息的数量(目前只在登录时候推送)128M.DDZ_USER_SYNC_FORTUNE_INFO_NOTIFY = getUID(); //同步人员的财产信息。 比如同步人员金币信息到客户端,后续可拓展其他129M.UPDATE_USER_LOTTERYTICKET = getUID(); //更新玩家奖券130M.DDZ_LOTTERYTICKET_CHANGE_NOTIFY = getUID(); //玩家奖券变化通知131M.UPDATE_COMPETITION_INFO = getUID(); //更新赛事信息132M.OPEN_ROUND_DETAIL_DIALOG = getUID(); //打开赛事详情弹窗133M.UPDATE_USER_LEVEL = getUID(); //更新用户段位134M.DDZ_LEVEL_CHANGE_NOTIFY = getUID(); //通知用户段位变化135M.EXIT_COMPETITION_REQ = getUID(); //退赛兑奖按钮请求136M.UPDATE_EXIT_COMPETITION_INFO = getUID(); //更新退赛弹框信息137M.EXCHANGE_SOMETHING_REQ = getUID(); //退赛兑换请求138M.DDZ_CLEAR_UI_BY_OVER = getUID(); //好友房结算后清掉ui139M.UPDATE_RANK_OF_WORLD_INFO = getUID(); //更新世界排行榜140M.GROUP_RANK_SHARE_REQ = getUID(); //群排行分享141M.UPDATE_EXCHANGE_CLASSIFY_INFO = getUID(); //更新兑换信息142M.SEND_EXCHANGE_GOODS = getUID(); //发送兑换请求143M.SEND_ALTER_ADDRESS = getUID(); //发送修改信息请求144M.SEND_EXCHANGE_RECORD = getUID(); //发送兑换记录请求145M.USER_AUTOMATIC_AWARD_REQ = getUID(); //玩家请求是否展示最强王者自动退赛兑奖弹窗请求146M.DDZ_CARD_COUNTER_NOTIFY = getUID(); //记牌器数量147M.DDZ_EVT_BROADCAST = getUID(); //赛事广播148M.SHOW_OR_HIDE_BROADCAST = getUID(); //是否显示跑马灯149M.EVT_SHOW_VOUCHER_DIALOG = getUID(); //打开奖券弹窗150M.EVT_REQ_VOUCHER_DATA = getUID(); //获取奖券数据151M.DDZ_AWARD_INFO_DETAIL_REQ = getUID(); //获取奖券弹窗信息152M.DDZ_RED_DOT_NOTIFY = getUID(); //通知小红点153M.UPDATE_MAIL_ALL_LIST = getUID(); //更新邮件数据154M.UPDATE_RED_DOT_LIST = getUID(); //更新小红点列表155M.SEND_SYSMESSAGE_READ = getUID(); //发送系统消息已读156M.SEND_MAIL_RECEIVE_READ = getUID(); //邮件领取157M.UPDATE_REMOVE_MAIL_DATA = getUID(); //移除邮件158M.DDZ_UPDATE_MAIL_NOTIFY = getUID(); //邮件消息通知159M.Add_MAIL_DATE = getUID(); //新的可领邮件消息通知160M.Add_SYS_DATE = getUID(); //新的系统邮件消息通知161M.HIDE_LOADING_BAR = getUID(); //隐藏进度条162M.UPDATE_BAG_PROPS_LIST = getUID(); //更新背包产品列表163M.EVT_SHOW_BAG_DIALOG = getUID(); //打开背包界面164M.SEND_USE_BAG_PROPS = getUID(); //使用背包产品165M.SEND_GO_COMPETITION = getUID(); //去比赛场166M.CLOSE_COMPETITION_VIEW = getUID(); //关闭比赛场167M.DDZ_MATCH_USER_BOARD_INFO_NTF = getUID(); //通知玩家排行榜的分数改变168M.EVT_SHOW_PLAYER_DIALOG = getUID(); //打开个人资料卡169M.EVT_REMOVE_PLAYER_DIALOG = getUID(); //移除个人资料卡170M.DZZ_EVENT_RESULT_SHARE = getUID(); //赛事结算分享171//经典场结算172M.SHOW_CLASSIC_OVER_DIALOG = getUID();173M.REMOVE_CLASSIC_OVER_DIALOG = getUID();174M.SHOW_FRIENDROOM_OVER_DIALOG = getUID(); //打开好友房结算界面175//经典场结束分享176M.SHOW_CLASSIC_SHARE_DIALOG = getUID();177M.REMOVE_CLASSIC_SHARE_DIALOG = getUID();178//关注有礼相关信息通知179M.DDZ_SUBSCRIBEGIFT_WINDOWEVT_NTF = getUID();180M.UPDATE_MODULE_POP_INFO = getUID(); //更新模块弹出181M.UPDATE_INVITATION_INFO = getUID(); //更新邀请有礼182M.SHOW_INVITATION_VIEW = getUID();183M.EVT_REQ_INVITATION_DATA = getUID();184M.INVIT_EREWARD_GET_REQ = getUID(); //领取超级礼包185M.INVIT_SHARE_REQ = getUID(); //邀请有礼邀请186M.DDZ_INVITE_HELPRET_NTF = getUID(); //邀请有礼结果返回187M.DDZ_DIAMOND_ACTIVITY_HELPRET_NTF = getUID(); //钻石活动结果返回188M.SEND_INVITER_REQ = getUID(); //发送邀请者信息189M.DDZ_JOIN_MATCH_REWARD_NOTIFY = getUID(); //参赛进度通知190M.SEND_EVENT_MATCH_REWARD = getUID(); //请求领取赛事活动奖励191M.EVT_SHOW_EVENTACT_DIALOG = getUID(); //打开显示奖励弹窗192M.EVT_REQ_EVENTACT_DATA = getUID();193M.BACKPACK_LEVEL_CARD_REQ = getUID(); //背包检测有无等级卡194M.GET_USER_AD_INFO_REQ = getUID(); //流量主需求 查看广告数据195M.UPDATE_VEDIO_AD_INFO = getUID(); //更新流量主196M.UPDATE_CARD_COUNTER_CANGET_NUM = getUID(); //更新可获取记牌器的数量197M.DDZ_CARD_COUNTER_INFO_NOTIFY = getUID(); //通知记牌器信息变化198M.DDZ_USER_LOGIN_OFF_NOTIFY = getUID(); //封号199M.CHECK_IF_CAN_JOIN_MATCH = getUID(); //检测是否可以参赛200M.TAKE_OUT_AD_REDDOT = getUID(); //去掉小红点201M.WECHAT_GAME_GETUSERINFO = getUID(); //用户授权202M.HIDE_LORDGAME_VIEW_INVITE_BTN = getUID(); // 隐藏房间内邀请有礼按钮203M.START_BY_CLASSSSIC_OVER = getUID(); //经典场结算界面通知继续游戏给匹配界面204M.SHOW_REDPACKET_VIEW = getUID(); //显示红包界面205M.EVT_REQ_REDPACKET_DATA = getUID(); //拉取红包界面信息206M.UPDATE_REDPACKET_VIEW = getUID(); //更新红包界面207M.GET_REDPACKET_DETAIL_REQ = getUID(); //红包奖励明细208M.UPDATE_REDPACKET_DETAIL_VIEW = getUID(); //更新红包奖励界面209M.REDPACKET_GET_CASH_REQ = getUID(); //提现210M.SHOW_REDPACKET_RECORD_VIEW = getUID(); //显示历史记录界面211M.GET_REDPACKET_GETCASH_REQ = getUID(); //提现明细212M.REFRESH_REDPACKET_DETAIL_VIEW = getUID(); //更新历史明细界面213M.END_GAME_LEVEL_CHANGE_NTF = getUID(); //残局通过数改变通知214M.UPDATE_END_GAME_LEVEL = getUID(); //更新残局通关数215M.DDZ_END_GAME_OVER_EVT = getUID(); //残局结算通知216M.UPDATE_DIAMOND_ACTIVITY_VIEW = getUID(); //更新钻石活动界面数据217M.UPDATE_DIAMOND_REDPACKET_TIP = getUID(); //钻石红包邀请回来更新提示218M.DIAMOND_ACTIVITY_SHARE = getUID(); //钻石活动分享219M.SHOP_TAB_CHANGE = getUID(); //商城tab切换220M.DDZ_REWARD_DIAMOND_CLICK_NTF = getUID(); //点击获取钻石链接结果返回221M.DDZ_REWARD_DIAMOND_SUCCESS_NTF = getUID(); //获取钻石为成功邀请之后,邀请者会收到的通知222M.LORD_ENDGAME_REMIND = getUID(); //残局提示223M.LORD_ENDGAME_REMIND_VIEW = getUID(); //残局提示框224M.ENDGAME_RESET_GAME = getUID(); //重新挑战提示框225M.ENDGAME_ENTER_DESK = getUID(); //残局进桌请求226M.ENDGAME_GROUP_RANK_SHARE_REQ = getUID(); //残局排行群分享227M.ENDGAME_RANK_CHANGE_NTF = getUID(); //残局排行数据变更228M.ENDGAME_LOBBY_PAUSE_UPDATE = getUID(); //残局大厅开放数据停止刷新229M.ENDGAME_LOBBY_RESUME_UPDATE = getUID(); //残局大厅开放数据继续刷新230M.ENDGAME_RESET_GAME_REQ = getUID(); //残局重新挑战请求231M.SHOW_DIAMOND_ACTIVITY_BACK_VIEW = getUID(); //显示钻石活动back弹框232M.HIDE_WELFARE_RED_DOT = getUID(); //关闭登录礼包小红点233M.MAIN_HIDE_WELFARE_RED_DOT = getUID(); //主界面关闭登录礼包小红点234M.CLICK_VEDIO_AD = getUID(); //点击流量主功能235M.DDZ_NATIONALDAY_BONUSESHELP_NTF = getUID(); //国庆活动助攻成功通知236M.SHOW_NATIONALDAY_ACT_BACK_VIEW = getUID(); //国庆活动助力弹窗237M.SHOW_NATIONALDAY_ACT_RULE_VIEW = getUID(); //国庆助力攻略弹窗238M.SHOW_NATIONALDAY = getUID();239M.EVT_REQ_NATIONALDAY_DATA = getUID();240M.SHOW_NATIONALDAY_ACT_HELPLIST_VIEW = getUID(); //国庆助力列表弹窗241M.GET_NATIONALDAY_ACT_HELPLIST_REQ = getUID(); //获取国庆助力列表数据242M.SHOW_NATIONALDAY_ACT_LOGIN_AWARD_VIEW = getUID(); //国庆登陆红包弹窗243M.UPDATE_NATIONALDAY_ICON_ACTION = getUID(); //国庆活动ICON动画状态更新244M.SAVE_PHOTO_NATIONALDAY_ACT = getUID(); //国庆活动保存图片到相册245M.SHOW_FIRST_LOGIN_REWARD = getUID(); //打开首次登陆奖励弹窗246M.HIDE_FIRST_LOGIN_REWARD = getUID();247M.PICK_GOLD_BOX_REQ = getUID(); //领取金币宝箱248M.SHOW_GUIDE_VIEW = getUID(); // 显示引导组件249M.DDZ_GOLD_GUIDE_NTF = getUID(); //金币不足通知250M.DZZ_EVENT_SAVE_LEVEL = getUID(); //分享保级251M.DDZ_TASK_RECHARGE_SUCC_NTF = getUID(); //每日任务充值成功252M.UPDATE_TASK_VIEW = getUID(); //更新任务界面253M.PICK_TASK_REWARD = getUID(); //领取任务奖励254M.GET_WELFARE_VIEW_DATA = getUID(); //获取福利中心数据255M.PICK_REWARD_BY_VEDIO_OR_SHARE = getUID(); //看视频或分享领取任务奖励256M.GET_TASK_DATA_REQ = getUID(); //获取任务数据257M.CLASSICROOM_ONEXIT_GAME = getUID(); //经典场退出询问258M.ADD_LUCKY_REWARD_DIALOG = getUID(); //显示幸运奖励弹框259M.EVENT_LESS_VOUCHER = getUID(); //奖券不足260M.WIN_STREAK_DETAIL_REQ = getUID(); //连胜详细请求261M.WIN_STREAK_TASK_PICK_REQ = getUID(); //领取任务奖励262M.GET_MULTINFO_REQ = getUID(); //获得加倍信息263M.WIN_STREAK_TASK_QUERY_REQ = getUID(); //连胜任务查询264M.UPDATE_WIN_STREAKINFO = getUID(); //更新牌桌内连胜数据265M.SEND_VOICE_REQ = getUID(); //发送语音请求266M.DDZ_VOLTE_MSG_NTF = getUID(); //语音通知267M.SHOW_FLOWMAIN_DIALOG = getUID(); //流量主提示框268M.GET_DIAMOND_ACTIVITY_REDPACKET_REQ = getUID(); //请求钻石活动助力好友数据269M.GET_DIAMOND_ACTIVITY_INVITE_REQ = getUID(); //请求钻石活动邀请有礼数据270M.PICK_DIAMOND_ACTIVITY_REDPACKET = getUID(); //领取助力好友奖励271M.PICK_DIAMOND_ACTIVITY_INVITE = getUID(); //领取邀请有礼奖励272M.UPDATE_WIN_STREAKINFO = getUID(); //更新牌桌内连胜数据273M.DDZ_DISMISS_VOTE_NTF = getUID(); //好友房解散牌桌投票274M.REMOVE_DISBAND_DIALOG = getUID(); //移除解散弹窗275M.OPEN_CREATE_ROOM_DIALOG = getUID(); //打开好友房创建弹窗276M.CLICK_LINK_TO_PICK_REWARD = getUID(); //点击链接领取奖励277M.HIDE_VOICE_UI = getUID(); //隐藏语音图标278M.UPDATE_BACK_CARD_NUM = getUID(); //更新牌背手牌数量279M.CLICK_QUICK_START = getUID(); //点击快速开始280M.HIDE_VOICE_UI = getUID(); //隐藏语音图标281M.GET_WINSTREAK_DATA_REQ = getUID(); //获取首登连胜详情请求282M.SHOW_WINSTREAK_BUBBLE = getUID(); //显示连胜气泡283M.HIDE_WINSTREAK_BUBBLE = getUID(); //隐藏连胜气泡284M.REMOVE_ALL_VOICE = getUID(); //去除所有语音285M.SHOW_WELFARE_DIALOG = getUID(); //打开新手福利-登陆奖励弹窗286M.SHOW_RECORD_MAIN_DIALOG = getUID(); //打开战绩mian弹窗287M.GET_LORD_ROUND_SETTLE_INFO = getUID(); //获取战绩main弹窗数据288M.SHOW_RECORD_RANK_DIALOG = getUID(); //打开战绩排行弹窗289M.GET_RECORD_RANK_INFO = getUID(); //获取战绩排行弹窗数据290M.SHOW_RECORD_DETAIL_DIALOG = getUID(); //打开战绩detail弹窗291M.SHOW_FOCUS_MAIN_DIALOG = getUID(); //打开关注有礼弹窗292M.GET_FOCUS_MAIN_INFO = getUID(); //打开关注有礼弹窗数据293M.SHOW_EXCHANGE_RECORD_DIALOG = getUID(); //打开兑换记录弹窗294M.SHOW_EXCHANGE_INPUT_DIALOG = getUID(); //打开兑换地址弹窗295M.SHOW_EXCHANGE_DETAIL_DIALOG = getUID(); //打开兑换物品详情弹窗296M.SHOW_EXCHANGE_COMFIRM_DIALOG = getUID(); //打开兑换物品确认弹窗297M.SHOW_EXCHANGE_PHONE_DIALOG = getUID(); //打开兑换phone弹窗298M.SHOW_EXCHANGE_ALTER_DIALOG = getUID(); //打开兑换alter弹窗299M.SHOW_EXCHANGE_SUCCESS_DIALOG = getUID(); //打开兑换成功弹窗300M.SEND_BAG_LIST_REQ = getUID(); //请求背包信息列表301M.SHOW_DIAMOND_ACTIVITY_DIALOG = getUID(); //打开钻石活动弹窗302M.SEND_MAIL_INFO_REQ = getUID(); //请求邮件信息303M.EVT_LAUNCH_FROM_DIAMONDACTIVITY_LINK = getUID(); //从钻石活动链接进游戏304M.EVT_FIRST_ENTER_ENDGAMELOBBY_REWARD = getUID(); //残局大厅每日首次奖励305M.SHOW_ENDGAME_RANK_DIALOG = getUID(); //打开残局排行榜306M.SHOW_RANK_DIALOG = getUID(); //打开排行榜307M.SHOW_TASK_REDPACKET_REWARD_DIALOG = getUID(); //打开任务奖励-红包奖励弹窗308M.SHOW_TASK_REWARD_DIALOG = getUID();309M.SHOW_REDPACKET_REWARD_DIALOG = getUID(); //打开红包奖励弹窗310M.SHOW_WINSTREAK_REWARD_DIALOG = getUID(); //打开连胜奖励红包弹窗311M.DDZ_SHOW_CARD_EVENT_NTF = getUID(); //明牌通知312M.SHOW_NEW_SEASON_TIP_DIALOG = getUID(); //打开新版赛事提醒313M.OPEN_EVENT_GAME_OVER_DIALOG = getUID(); //打开赛事结算弹窗314M.SHOW_COMPETITION_SEASON_OVER_DIALOG = getUID(); //打开赛季结算弹窗315M.SHOW_COMPETITION_EXCHANGE_COUPON = getUID(); //打开强行兑换弹窗316M.GET_EXCHANGE_NEW_COUPON_INFO = getUID(); //请求强行兑换弹窗数据317M.USE_MATCH_BOX_REQ = getUID(); //使用宝箱请求318M.STAR_PROTECT_REQ = getUID(); //保星请求319M.CLOSE_BAG_MAIN = getUID(); //关闭背包主弹窗320M.SEND_USER_HEAD_FRAME_REQ = getUID(); //发送使用头像请求321M.UPDATE_MAIN_HEAD_FRAME = getUID(); //更新大厅头像框322M.GET_RANK_OF_WORLD_INFO = getUID(); //获取赛事世界榜排名信息323M.AGAIN_SAVE_STAR_REQ = getUID(); //二次弹窗保星请求324M.STAR_PROTECT_AGAIN_REQ = getUID(); //保星二次弹窗通知服务器325M.EVENT_LOADDING_FINISH = getUID();326M.IS_SHOW_BROADCAST = getUID();327M.DDZ_BM_SETCOUNTDOWNPOS = getUID();328M.DDZ_BM_SENDCARD = getUID();329M.DDZ_BM_DONTSENDCARD = getUID();330M.DDZ_BM_PMPROMIT = getUID();331M.DDZ_BM_SETOTHERSHOW = getUID();332M.DDZ_BM_UPDATEOPEBTN = getUID();333M.DDZ_BM_UPDATEMULTI = getUID();334M.DDZ_MENU_EXIT = getUID();335M.DDZ_MENU_AUTO = getUID();336M.DDZ_MENU_SET = getUID();337M.DDZ_PM_UPDATEOPERBTNS = getUID();338M.DDZ_PM_SETIMGNOLARGER = getUID();339M.DDZ_PM_DONTSENDCARD = getUID();340M.DDZ_PM_HINDALLBTNS = getUID();341M.DDZ_PM_SHUFFLEPANELHIDE = getUID();342M.EVT_SHOW_HALL = getUID();343M.EVT_CHECK_GOLD_ENOUGH = getUID();344M.EVT_SHOW_MATCH = getUID();345M.EVT_CHECK_GOLD_ENOUGH_INGAME = getUID();346M.EVT_INPUT_SPECIFIED_DESK = getUID();347M.SHOW_EVENT_MATCH_DIALOG = getUID(); //打开赛事匹配界面348M.REMOVE_EVENT_MATCH_DIALOG = getUID(); //移除赛事匹配界面349M.UPDATE_EVENT_MATCH_VIEW = getUID(); //刷新赛事匹配界面...

Full Screen

Full Screen

adapter.test.js

Source:adapter.test.js Github

copy

Full Screen

1import path from 'path'2import logger from '@wdio/logger'3import { runTestInFiberContext, executeHooksWithArgs } from '@wdio/config'4import MochaAdapterFactory, { MochaAdapter } from '../src'5import { loadModule } from '../src/utils'6import { EVENTS } from '../src/constants'7jest.mock('../src/utils', () => ({8 loadModule: jest.fn()9}))10const wdioReporter = {11 write: jest.fn(),12 emit: jest.fn(),13 on: jest.fn()14}15test('comes with a factory', async () => {16 expect(typeof MochaAdapterFactory.run).toBe('function')17 const result = await MochaAdapterFactory.run(18 '0-2',19 {},20 ['/foo/bar.test.js'],21 { browserName: 'chrome' },22 wdioReporter23 )24 expect(result).toBe(0)25})26test('should properly set up mocha', async () => {27 const adapter = new MochaAdapter(28 '0-2',29 {},30 ['/foo/bar.test.js'],31 { browserName: 'chrome' },32 wdioReporter33 )34 const result = await adapter.run()35 expect(result).toBe(0)36 expect(adapter.mocha.loadFiles).toBeCalled()37 expect(adapter.mocha.reporter).toBeCalled()38 expect(adapter.mocha.fullTrace).toBeCalled()39 expect(adapter.mocha.run).toBeCalled()40 expect(executeHooksWithArgs.mock.calls).toHaveLength(2)41 expect(adapter.mocha.runner.on.mock.calls).toHaveLength(Object.keys(EVENTS).length)42 expect(adapter.mocha.runner.suite.beforeAll).toBeCalled()43 expect(adapter.mocha.runner.suite.beforeEach).toBeCalled()44 expect(adapter.mocha.runner.suite.afterEach).toBeCalled()45 expect(adapter.mocha.runner.suite.afterAll).toBeCalled()46 expect(adapter.mocha.addFile).toBeCalledWith('/foo/bar.test.js')47})48test('should return amount of errors', async () => {49 const adapter = new MochaAdapter(50 '0-2',51 { mochaOpts: { mockFailureCount: 42 } },52 ['/foo/bar.test.js'],53 { browserName: 'chrome' },54 wdioReporter55 )56 const result = await adapter.run()57 expect(result).toBe(42)58})59test('should throw runtime error if spec is invalid', async () => {60 const runtimeError = new Error('Uuups')61 const adapter = new MochaAdapter(62 '0-2',63 { mochaOpts: { mockRuntimeError: runtimeError } },64 ['/foo/bar.test.js'],65 { browserName: 'chrome' },66 wdioReporter67 )68 await expect(adapter.run()).rejects.toEqual(runtimeError)69})70test('options', () => {71 const adapter = new MochaAdapter(72 '0-2',73 {},74 ['/foo/bar.test.js'],75 { browserName: 'chrome' },76 wdioReporter77 )78 adapter.requireExternalModules = jest.fn()79 adapter.options({80 require: 'foo/bar.js',81 compilers: ['the/compiler.js']82 }, 'context')83 expect(adapter.requireExternalModules).toBeCalledWith(['the/compiler.js', 'foo/bar.js'], 'context')84})85test('preRequire', () => {86 const mochaOpts = { foo: 'bar', ui: 'tdd' }87 const adapter = new MochaAdapter(88 '0-2',89 { mochaOpts, beforeHook: 'beforeHook123', afterHook: 'afterHook123' },90 ['/foo/bar.test.js'],91 { browserName: 'chrome' },92 wdioReporter93 )94 adapter.preRequire('context', 'file', 'mocha')95 expect(runTestInFiberContext).toBeCalledWith(['test', 'test.only'], 'beforeHook123', 'afterHook123', 'suiteSetup')96 expect(runTestInFiberContext).toBeCalledWith(['test', 'test.only'], 'beforeHook123', 'afterHook123', 'setup')97 expect(runTestInFiberContext).toBeCalledWith(['test', 'test.only'], 'beforeHook123', 'afterHook123', 'test')98 expect(runTestInFiberContext).toBeCalledWith(['test', 'test.only'], 'beforeHook123', 'afterHook123', 'suiteTeardown')99 expect(runTestInFiberContext).toBeCalledWith(['test', 'test.only'], 'beforeHook123', 'afterHook123', 'teardown')100})101test('custom ui', () => {102 const mochaOpts = { ui: 'custom-qunit' }103 const adapter = new MochaAdapter(104 '0-2',105 { mochaOpts },106 ['/foo/bar.test.js'],107 { browserName: 'chrome' },108 wdioReporter109 )110 adapter.preRequire('context', 'file', 'mocha')111 expect(runTestInFiberContext).toBeCalledWith(['test', 'test.only'], undefined, undefined, 'after')112 expect(runTestInFiberContext).toBeCalledWith(['test', 'test.only'], undefined, undefined, 'afterEach')113 expect(runTestInFiberContext).toBeCalledWith(['test', 'test.only'], undefined, undefined, 'beforeEach')114 expect(runTestInFiberContext).toBeCalledWith(['test', 'test.only'], undefined, undefined, 'before')115})116test('wrapHook if successful', async () => {117 const config = { beforeAll: 'somehook' }118 const adapter = new MochaAdapter(119 '0-2',120 config,121 ['/foo/bar.test.js'],122 { browserName: 'chrome' },123 wdioReporter124 )125 const wrappedHook = adapter.wrapHook('beforeAll')126 executeHooksWithArgs.mockImplementation((...args) => Promise.resolve(args))127 await wrappedHook()128 expect(executeHooksWithArgs.mock.calls[0][0]).toBe('somehook')129 expect(executeHooksWithArgs.mock.calls[0][1].type).toBe('beforeAll')130})131test('wrapHook if failing', async () => {132 const config = { beforeAll: 'somehook' }133 const adapter = new MochaAdapter(134 '0-2',135 config,136 ['/foo/bar.test.js'],137 { browserName: 'chrome' },138 wdioReporter139 )140 const wrappedHook = adapter.wrapHook('beforeAll')141 executeHooksWithArgs.mockImplementation(() => Promise.reject(new Error('uuuups')))142 await wrappedHook()143 expect(executeHooksWithArgs.mock.calls[0][0]).toBe('somehook')144 expect(executeHooksWithArgs.mock.calls[0][1].type).toBe('beforeAll')145 expect(logger().error.mock.calls[0][0].startsWith('Error in beforeAll hook: uuuups')).toBe(true)146})147test('prepareMessage', async () => {148 const adapter = new MochaAdapter(149 '0-2',150 {},151 ['/foo/bar.test.js'],152 { browserName: 'chrome' },153 wdioReporter154 )155 await adapter.run()156 adapter.lastError = new Error('uuups')157 let result = adapter.prepareMessage('beforeSuite')158 expect(result.type).toBe('beforeSuite')159 expect(result.error.message).toBe('uuups')160 adapter.runner.test = { title: 'foobar', file: '/foo/bar.test.js' }161 result = adapter.prepareMessage('afterTest')162 expect(result.type).toBe('afterTest')163 expect(result.title).toBe('foobar')164 expect(result.file).toBe('/foo/bar.test.js')165})166test('formatMessage', () => {167 const adapter = new MochaAdapter(168 '0-2',169 {},170 ['/foo/bar.test.js'],171 { browserName: 'chrome' },172 wdioReporter173 )174 let params = { type: 'foobar' }175 let message = adapter.formatMessage(params)176 expect(message).toEqual(params)177 params = { type: 'foobar', err: new Error('uups') }178 message = adapter.formatMessage(params)179 expect(message.error.message).toEqual('uups')180 expect(message.error.type).toEqual('Error')181 params = { type: 'foobar', payload: {182 title: 'barfoo',183 parent: { title: 'parentfoo' },184 context: 'some context',185 ctx: { currentTest: { title: 'current test' } },186 file: '/foo/bar.test.js'187 } }188 message = adapter.formatMessage(params)189 expect(message.title).toEqual('barfoo')190 expect(message.parent).toEqual('parentfoo')191 expect(message.currentTest).toEqual('current test')192 expect(message.fullTitle).toBe('parentfoo barfoo')193 expect(message.file).toBe('/foo/bar.test.js')194 params = { type: 'foobar', payload: {195 title: 'barfoo',196 parent: { title: '', suites: [{ title: 'first suite' }] }197 } }198 message = adapter.formatMessage(params)199 expect(message.parent).toEqual('')200 params = { type: 'foobar', payload: {201 title: 'barfoo',202 parent: {},203 fullTitle: () => 'full title'204 } }205 message = adapter.formatMessage(params)206 expect(message.fullTitle).toEqual('full title')207 params = { type: 'afterTest', payload: {208 title: 'barfoo',209 parent: {},210 state: 'failed',211 duration: 123212 } }213 message = adapter.formatMessage(params)214 expect(message.passed).toBe(false)215 expect(message.duration).toBe(123)216})217test('requireExternalModules', () => {218 const adapter = new MochaAdapter(219 '0-2',220 {},221 ['/foo/bar.test.js'],222 { browserName: 'chrome' },223 wdioReporter224 )225 adapter.requireExternalModules(['/foo/bar.js', null, './bar/foo.js'], { myContext: 123 })226 expect(loadModule).toBeCalledWith('/foo/bar.js', { myContext: 123 })227 expect(loadModule).toBeCalledWith(path.resolve(__dirname, '..', '..', '..', 'bar', 'foo.js'), { myContext: 123 })228})229test('emit does not emit anything on root level', () => {230 const adapter = new MochaAdapter(231 '0-2',232 {},233 ['/foo/bar.test.js'],234 { browserName: 'chrome' },235 wdioReporter236 )237 adapter.emit(null, { root: true })238 expect(wdioReporter.emit).not.toBeCalled()239})240test('emit properly reports to reporter', () => {241 const adapter = new MochaAdapter(242 '0-2',243 {},244 ['/foo/bar.test.js'],245 { browserName: 'chrome' },246 wdioReporter247 )248 adapter.getUID = () => 123249 adapter.emit(250 'suite:start',251 { title: 'foobar' },252 new Error('uups')253 )254 expect(wdioReporter.emit.mock.calls[0][0]).toBe('suite:start')255 expect(wdioReporter.emit.mock.calls[0][1].error.message).toBe('uups')256 expect(wdioReporter.emit.mock.calls[0][1].cid).toBe('0-2')257 expect(wdioReporter.emit.mock.calls[0][1].uid).toBe(123)258})259test('emits hook errors as hook:end', () => {260 const adapter = new MochaAdapter(261 '0-2',262 {},263 ['/foo/bar.test.js'],264 { browserName: 'chrome' },265 wdioReporter266 )267 adapter.getUID = () => 123268 adapter.emit(269 'test:fail',270 { title: '"before all" hook' },271 new Error('uups')272 )273 expect(wdioReporter.emit.mock.calls[1][0]).toBe('hook:end')274 expect(wdioReporter.emit.mock.calls[1][1].error.message).toBe('uups')275})276test('getUID', () => {277 const adapter = new MochaAdapter(278 '0-2',279 {},280 ['/foo/bar.test.js'],281 { browserName: 'chrome' },282 wdioReporter283 )284 // disabling indent eslint rule for better visibility285 /*eslint-disable indent */286 expect(adapter.getUID({ type: 'hook:start' })).toBe('hook-0-0')287 expect(adapter.getUID({ type: 'hook:end' })).toBe('hook-0-0')288 expect(adapter.getUID({ type: 'hook:start' })).toBe('hook-0-1')289 expect(adapter.getUID({ type: 'hook:end' })).toBe('hook-0-1')290 expect(adapter.getUID({ type: 'suite:start' })).toBe('suite-0-0')291 expect(adapter.getUID({ type: 'hook:start' })).toBe('hook-00-0')292 expect(adapter.getUID({ type: 'hook:end' })).toBe('hook-00-0')293 expect(adapter.getUID({ type: 'suite:start' })).toBe('suite-1-0')294 expect(adapter.getUID({ type: 'suite:start' })).toBe('suite-2-0')295 expect(adapter.getUID({ type: 'hook:start' })).toBe('hook-20-0')296 expect(adapter.getUID({ type: 'hook:end' })).toBe('hook-20-0')297 expect(adapter.getUID({ type: 'test:start' })).toBe('test-20-0')298 expect(adapter.getUID({ type: 'test:pass' })).toBe('test-20-0')299 expect(adapter.getUID({ type: 'test:start' })).toBe('test-20-1')300 expect(adapter.getUID({ type: 'test:fail' })).toBe('test-20-1')301 expect(adapter.getUID({ type: 'hook:start' })).toBe('hook-20-1')302 expect(adapter.getUID({ type: 'hook:end' })).toBe('hook-20-1')303 expect(adapter.getUID({ type: 'suite:end' })).toBe('suite-2-0')304 expect(adapter.getUID({ type: 'hook:start' })).toBe('hook-10-0')305 expect(adapter.getUID({ type: 'hook:end' })).toBe('hook-10-0')306 expect(adapter.getUID({ type: 'test:start' })).toBe('test-10-0')307 expect(adapter.getUID({ type: 'test:fail' })).toBe('test-10-0')308 expect(adapter.getUID({ type: 'hook:start' })).toBe('hook-10-1')309 expect(adapter.getUID({ type: 'hook:end' })).toBe('hook-10-1')310 expect(adapter.getUID({ type: 'test:start' })).toBe('test-10-1')311 expect(adapter.getUID({ type: 'test:fail' })).toBe('test-10-1')312 expect(adapter.getUID({ type: 'suite:end' })).toBe('suite-1-0')313 expect(adapter.getUID({ type: 'suite:start' })).toBe('suite-1-1')314 expect(adapter.getUID({ type: 'suite:end' })).toBe('suite-1-1')315 expect(adapter.getUID({ type: 'suite:start' })).toBe('suite-1-2')316 expect(adapter.getUID({ type: 'suite:start' })).toBe('suite-2-1')317 expect(adapter.getUID({ type: 'suite:end' })).toBe('suite-2-1')318 expect(adapter.getUID({ type: 'hook:start' })).toBe('hook-12-0')319 expect(adapter.getUID({ type: 'hook:end' })).toBe('hook-12-0')320 expect(adapter.getUID({ type: 'test:start' })).toBe('test-12-0')321 expect(adapter.getUID({ type: 'test:fail' })).toBe('test-12-0')322 expect(adapter.getUID({ type: 'suite:start' })).toBe('suite-2-2')323 expect(adapter.getUID({ type: 'suite:end' })).toBe('suite-2-2')324 expect(adapter.getUID({ type: 'suite:end' })).toBe('suite-1-2')325 expect(adapter.getUID({ type: 'suite:start' })).toBe('suite-1-3')326 expect(adapter.getUID({ type: 'suite:end' })).toBe('suite-1-3')327 expect(adapter.getUID({ type: 'suite:start' })).toBe('suite-1-4')328 expect(adapter.getUID({ type: 'test:start' })).toBe('test-14-0')329 expect(adapter.getUID({ type: 'test:fail' })).toBe('test-14-0')330 expect(adapter.getUID({ type: 'suite:end' })).toBe('suite-1-4')331 expect(adapter.getUID({ type: 'test:start' })).toBe('test-00-0')332 expect(adapter.getUID({ type: 'test:fail' })).toBe('test-00-0')333 expect(adapter.getUID({ type: 'suite:end' })).toBe('suite-0-0')334 expect(() => adapter.getUID({ type: 'test:nonexisting' })).toThrow()335 /*eslint-enable indent */336})337afterEach(() => {338 runTestInFiberContext.mockReset()339 executeHooksWithArgs.mockReset()...

Full Screen

Full Screen

util.fix-owner.js

Source:util.fix-owner.js Github

copy

Full Screen

1'use strict'2const os = require('os')3const t = require('tap')4const uniqueFilename = require('unique-filename')5// defines reusable errors6const genericError = new Error('ERR')7genericError.code = 'ERR'8const missingFileError = new Error('ENOENT')9missingFileError.code = 'ENOENT'10const pathExistsError = new Error('EEXIST')11pathExistsError.code = 'EEXIST'12// helpers13const CACHE = t.testdir()14const filename = uniqueFilename(os.tmpdir())15const getuid = process.getuid16const patchesGetuid = (t) => {17 process.getuid = () => 018 t.teardown(() => {19 process.getuid = getuid20 })21}22const getFixOwner = (t, opts) => t.mock('../lib/util/fix-owner', opts)23// chownr and chownr.fix error handling tests24t.test('attempt to chownr existing path', (t) => {25 patchesGetuid(t)26 const fixOwner = getFixOwner(t, {27 chownr: function chownr (path, uid, gid, cb) {28 cb(missingFileError)29 },30 'infer-owner': () => Promise.resolve({}),31 })32 t.plan(1)33 return fixOwner.chownr(CACHE, filename)34 .then(res => {35 t.notOk(res, 'should not throw if path exists')36 })37})38t.test('attempt to chownr unknown error', (t) => {39 patchesGetuid(t)40 const fixOwner = getFixOwner(t, {41 chownr: function chownr (path, uid, gid, cb) {42 cb(genericError)43 },44 'infer-owner': () => Promise.resolve({}),45 })46 t.plan(1)47 t.rejects(() => fixOwner.chownr(CACHE, filename), 'should throw unknown errors')48})49t.test('attempt to chownr using same user', (t) => {50 patchesGetuid(t)51 const fixOwner = getFixOwner(t, {52 'infer-owner': () => Promise.resolve({53 uid: process.getuid(),54 gid: process.getgid(),55 }),56 })57 t.plan(1)58 return fixOwner.chownr(CACHE, filename)59 .then(res => {60 t.notOk(res, 'should not throw')61 })62})63t.test('calls setuid setgid to replace user', (t) => {64 const setuid = process.setuid65 const setgid = process.setgid66 process.getuid = () => 067 process.setuid = () => undefined68 process.setgid = () => undefined69 t.teardown(() => {70 process.getuid = getuid71 process.stuid = setuid72 process.stgid = setgid73 })74 const fixOwner = getFixOwner(t, {75 'infer-owner': () => {76 process.setuid(process.getuid())77 process.setgid(process.getgid())78 return Promise.resolve({79 uid: process.getuid(),80 gid: process.getgid(),81 })82 },83 })84 t.plan(1)85 return fixOwner.chownr(CACHE, filename)86 .then(res => {87 t.notOk(res, 'should not throw')88 })89})90t.test('attempt to chownr.sync on platforms that do not need ownership fix', (t) => {91 process.getuid = undefined92 t.teardown(() => {93 process.getuid = getuid94 })95 const fixOwner = require('../lib/util/fix-owner')96 t.plan(1)97 return fixOwner.chownr(CACHE, filename)98 .then(res => {99 t.notOk(res, 'should not throw')100 })101})102t.test('attempt to chownr.sync existing path', (t) => {103 patchesGetuid(t)104 function chownr () {}105 chownr.sync = () => {106 throw missingFileError107 }108 const fixOwner = getFixOwner(t, {109 chownr,110 'infer-owner': { sync: () => ({}) },111 })112 t.notOk(fixOwner.chownr.sync(CACHE, filename), 'should not throw if path exists')113 t.end()114})115t.test('attempt to chownr.sync unknown error', (t) => {116 patchesGetuid(t)117 function chownr () {}118 chownr.sync = () => {119 throw genericError120 }121 const fixOwner = getFixOwner(t, {122 chownr,123 'infer-owner': { sync: () => ({}) },124 })125 t.throws(() => fixOwner.chownr.sync(CACHE, filename), genericError, 'should throw unknown errors')126 t.end()127})128t.test('attempt to chownr.sync using same user', (t) => {129 patchesGetuid(t)130 const fixOwner = getFixOwner(t, {131 'infer-owner': {132 sync: () => ({133 uid: process.getuid(),134 gid: process.getgid(),135 }),136 },137 })138 t.notOk(fixOwner.chownr.sync(CACHE, filename), 'should not throw')139 t.end()140})141t.test('attempt to chownr.sync on platforms that do not need ownership fix', (t) => {142 process.getuid = undefined143 t.teardown(() => {144 process.getuid = getuid145 })146 const fixOwner = require('../lib/util/fix-owner')147 t.notOk(fixOwner.chownr.sync(CACHE, filename), 'should not throw')148 t.end()149})150t.test('uses infer-owner ids instead of process-retrieved if valid', (t) => {151 const getgid = process.getgid152 process.getuid = () => 0153 process.getgid = () => 1154 t.teardown(() => {155 process.getuid = getuid156 process.getgid = getgid157 })158 t.plan(3)159 function chownr () {}160 chownr.sync = (path, uid, gid) => {161 t.equal(path, filename, 'should match filename')162 t.equal(uid, 501, 'should match uid')163 t.equal(gid, 20, 'should match gid')164 }165 const fixOwner = getFixOwner(t, {166 chownr,167 'infer-owner': {168 sync: () => ({169 uid: 501,170 gid: 20,171 }),172 },173 })174 fixOwner.chownr.sync(CACHE, filename)175})176// mkdirfix and mkdirfix.sync error handling tests177t.test('attempt to mkdirfix existing path', (t) => {178 const fixOwner = getFixOwner(t, {179 mkdirp: () => Promise.reject(pathExistsError),180 })181 t.plan(1)182 return fixOwner.mkdirfix(CACHE, filename)183 .then(res => {184 t.notOk(res, 'should not throw if path exists')185 })186})187t.test('attempt to mkdirfix unknown error', (t) => {188 const fixOwner = getFixOwner(t, {189 mkdirp: () => Promise.reject(genericError),190 })191 t.plan(1)192 t.rejects(() => fixOwner.mkdirfix(CACHE, filename), 'should throw unknown errors')193})194t.test('attempt to mkdirfix.sync existing path', (t) => {195 function mkdirp () {}196 mkdirp.sync = () => {197 throw pathExistsError198 }199 const fixOwner = getFixOwner(t, { mkdirp })200 t.notOk(fixOwner.mkdirfix.sync(CACHE, filename), 'should not throw if path exists')201 t.end()202})203t.test('attempt to mkdirfix.sync unknown error', (t) => {204 function mkdirp () {}205 mkdirp.sync = () => {206 throw genericError207 }208 const fixOwner = getFixOwner(t, { mkdirp })209 t.throws(210 () => fixOwner.mkdirfix.sync(CACHE, filename),211 genericError,212 'should throw unknown errors'213 )214 t.end()215})216t.test('attempt to mkdirfix.sync but no dir created', (t) => {217 function mkdirp () {}218 mkdirp.sync = () => {}219 const fixOwner = getFixOwner(t, { mkdirp })220 t.notOk(fixOwner.mkdirfix.sync(CACHE, filename), 'should not throw')221 t.end()...

Full Screen

Full Screen

template.js

Source:template.js Github

copy

Full Screen

1import {2 getuid3} from './utils';4export const templates = [{5 id: getuid(),6 background: '#fff',7 width: '660rpx',8 height: '400rpx',9 views: [{10 id: getuid(),11 type: 'rect',12 css: [{13 height: '160rpx',14 width: '160rpx',15 color: '#DC4553',16 top: '190rpx',17 left: '0'18 }]19 }, {20 id: getuid(),21 type: 'rect',22 css: [{23 height: '160rpx',24 width: '490rpx',25 color: '#DC4553',26 top: '190rpx',27 left: '170rpx'28 }]29 }, {30 id: getuid(),31 type: 'rect',32 css: [{33 height: '40rpx',34 width: '660rpx',35 color: '#DC4553',36 top: '360rpx',37 left: '0'38 }]39 }, {40 id: getuid(),41 type: 'image',42 url: '/images/qr.jpg',43 css: [{44 height: '130rpx',45 width: '130rpx',46 top: '205rpx',47 left: '96rpx'48 }]49 }, {50 id: getuid(),51 type: 'image',52 url: '/images/hui.png',53 css: [{54 height: '200rpx',55 top: '10rpx',56 left: '20rpx',57 }]58 }, {59 id: getuid(),60 type: 'text',61 text: '百小绘',62 css: [{63 fontSize: '40rpx',64 color: '#222',65 left: '200rpx',66 top: '60rpx',67 }]68 }, {69 id: getuid(),70 type: 'image',71 url: '/images/iphone.png',72 css: [{73 height: '30rpx',74 top: '210rpx',75 left: '270rpx'76 }]77 }, {78 id: getuid(),79 type: 'text',80 text: '17688888888',81 css: [{82 fontSize: '24rpx',83 color: '#fff',84 left: '310rpx',85 top: '210rpx',86 }]87 }, {88 id: getuid(),89 type: 'image',90 url: '/images/email.png',91 css: [{92 height: '30rpx',93 top: '255rpx',94 left: '270rpx'95 }]96 }, {97 id: getuid(),98 type: 'text',99 text: '41438@qq.com',100 css: [{101 fontSize: '24rpx',102 color: '#fff',103 left: '310rpx',104 top: '255rpx',105 }]106 }, {107 id: getuid(),108 type: 'image',109 url: '/images/address.png',110 css: [{111 height: '30rpx',112 top: '300rpx',113 left: '270rpx'114 }]115 }, {116 id: getuid(),117 type: 'text',118 text: '杭州滨江',119 css: [{120 fontSize: '24rpx',121 color: '#fff',122 left: '310rpx',123 top: '300rpx',124 }]125 }]126}, {127 id: getuid(),128 background: '#fff',129 width: '660rpx',130 height: '400rpx',131 views: [{132 id: getuid(),133 type: 'rect',134 css: [{135 height: '1000rpx',136 width: '1000rpx',137 color: '#efc8cb',138 top: '0',139 left: '-450rpx',140 rotate: 45141 }]142 }, {143 id: getuid(),144 type: 'rect',145 css: [{146      height: '600rpx',147      width: '600rpx',148      color: '#9cbdb2',149      top: '-410rpx',150      left: '-300rpx',151      rotate: 60152    }]153 }, {154 id: getuid(),155 type: 'text',156 text: '联系方式:',157 css: [{158 fontSize: '24rpx',159 color: '#ad9f64',160 left: '126rpx',161 top: '200rpx',162 }]163 }, {164 id: getuid(),165 type: 'text',166 text: '17688888888',167 css: [{168 fontSize: '24rpx',169 color: '#ad9f64',170 left: '240rpx',171 top: '200rpx',172 }]173 }, {174 id: getuid(),175 type: 'text',176 text: '邮箱:',177 css: [{178 fontSize: '24rpx',179 color: '#ad9f64',180 left: '172rpx',181 top: '250rpx',182 }]183 }, {184 id: getuid(),185 type: 'text',186 text: '41438@qq.com',187 css: [{188 fontSize: '24rpx',189 color: '#ad9f64',190 left: '240rpx',191 top: '250rpx',192 }]193 }, {194 id: getuid(),195 type: 'text',196 text: '地址:',197 css: [{198 fontSize: '24rpx',199 color: '#ad9f64',200 left: '172rpx',201 top: '300rpx',202 }]203 }, {204 id: getuid(),205 type: 'text',206 text: '杭州滨江',207 css: [{208 fontSize: '24rpx',209 color: '#ad9f64',210 left: '240rpx',211 top: '300rpx',212 }]213 }, {214 id: getuid(),215 type: 'image',216 url: '/images/hui.png',217 css: [{218 height: '200rpx',219 top: '16rpx',220 left: '460rpx'221 }]222 }]223}]224export const templateEmpty = {225 id: '',226 background: '#eee',227 width: '660rpx',228 height: '400rpx',229 views: []230}231export const defaultText = {232 id: '',233 type: 'text',234 text: '请填写',235 css: [{236 fontSize: '50rpx',237 color: '#F56C6C',238 left: '20rpx',239 top: '20rpx',240 }]241}242export const defaultImage = {243 id: '',244 type: 'image',245 url: '',246 css: [{247 height: '130rpx',248 width: '130rpx',249 top: '20rpx',250 left: '20rpx'251 }]252}253export const defaultRect = {254 id: '',255 type: 'rect',256 css: [{257 height: '160rpx',258 width: '160rpx',259 color: '#F56C6C',260 top: '20rpx',261 left: '20rpx'262 }]...

Full Screen

Full Screen

todo.js

Source:todo.js Github

copy

Full Screen

1import fire from "./fire"2export function Save({ currentWeight , targetWeight , set__Msg__ , setWeightData}){3 const getUid = fire.auth().getUid()4 if(getUid){5 const todo = fire.database().ref(getUid) , 6 d = {7 date : Date.now(),8 currentWeight,9 targetWeight 10 }11 todo.push(d,e=>{12 if(set__Msg__){13 set__Msg__(e?.message ? e?.message : <span style={{color:'green'}}>Successfully submitted</span>)14 }15 if(setWeightData){ setWeightData({16 currentWeight: '' , targetWeight : ''17 })}18 })19 }else if(set__Msg__){20 set__Msg__("You are not signin")21 }22}23export function Fetch(setEntries){24 const getUid = fire.auth().getUid()25 if(getUid){26 const todo = fire.database().ref(getUid)27 todo.on('value',(d)=>{28 if('function'===typeof setEntries){29 let e = Object.entries(d.val() || {})30 setEntries(e)31 }32 })33 }34}35export function Delete(id){36 const getUid = fire.auth().getUid()37 if(getUid){38 fire.database().ref(getUid).child(id).remove()39 }40}41export function Update(id,payload={},cb){42 const getUid = fire.auth().getUid()43 if(getUid){ 44 fire.database().ref(getUid)45 .child(id).update({46 date : Date.now(),47 ...payload48 },e=>{49 'function'===typeof cb && cb(e)50 })51 }52 ...

Full Screen

Full Screen

get-uid.test.js

Source:get-uid.test.js Github

copy

Full Screen

1import getUID from './get-uid';2describe('getUid', () => {3 it('should throw an exception if the "name" argument isn\'t passed', () => {4 () => getUID().should.throw(Error);5 });6 it('should return a unique id every time', () => {7 const id1 = getUID('test');8 const id2 = getUID('test');9 const id3 = getUID('test');10 id1.should.not.be.equal(id2);11 id2.should.not.be.equal(id3);12 });13 it('should return an id having a passed prefix', () => {14 getUID('test').should.have.string('test');15 getUID('tset').should.have.string('tset');16 });...

Full Screen

Full Screen

index.test.js

Source:index.test.js Github

copy

Full Screen

1goog.require('ol');2describe('getUid()', function() {3 it('is constant once generated', function() {4 var a = {};5 expect(ol.getUid(a)).to.be(ol.getUid(a));6 });7 it('generates a strictly increasing sequence', function() {8 var a = {}, b = {}, c = {};9 ol.getUid(a);10 ol.getUid(c);11 ol.getUid(b);12 //uid order should be a < c < b13 expect(ol.getUid(a)).to.be.lessThan(ol.getUid(c));14 expect(ol.getUid(c)).to.be.lessThan(ol.getUid(b));15 expect(ol.getUid(a)).to.be.lessThan(ol.getUid(b));16 });...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { getUid } = require('cypress/types/lodash')2describe('My First Test', function () {3 it('Does not do much!', function () {4 expect(true).to.equal(true)5 })6 it('Does not do much!', function () {7 console.log(getUid())8 expect(true).to.equal(true)9 })10})11const { getUid } = require('cypress/types/lodash')12Cypress.Commands.add('getUid', () => {13 return getUid()14})15const { getUid } = require('cypress/types/lodash')16Cypress.Commands.add('getUid', () => {17 return getUid()18})19describe('My First Test', function () {20 it('Does not do much!', function () {21 expect(true).to.equal(true)22 })23 it('Does not do much!', function () {24 console.log(getUid())25 expect(true).to.equal(true)26 })27})28describe('My First Test', function () {29 it('Does not do much!', function () {30 expect(true).to.equal(true)31 })32 it('Does not do much!', function () {33 console.log(getUid())34 expect(true).to.equal(true)35 })36})37describe('My First Test', function () {38 it('Does not do much!', function () {39 expect(true).to.equal(true)40 })41 it('Does not do much!', function () {42 console.log(getUid())43 expect(true).to.equal(true)44 })45})46describe('My First Test', function () {47 it('Does not do much!', function () {48 expect(true).to.equal(true)49 })50 it('Does not do much!', function () {51 console.log(getUid())52 expect(true).to.equal(true)53 })54})55describe('My First

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('Test', () => {2 it('test', () => {3 cy.getUid().then((uid) => {4 console.log(uid)5 })6 })7})

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('Test', () => {2 it('Test', () => {3 cy.getUid('test')4 })5})6Cypress.Commands.add('getUid', (uid) => {7 return cy.get(`[data-uid=${uid}]`)8})9import './commands'

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('Get UID', function () {2 it('should get uid', function () {3 cy.getUid().then((uid) => {4 cy.log(uid);5 });6 });7});8Cypress.Commands.add('getUid', () => {9 return response.body.uid;10 });11});12const uid = require('uid');13module.exports = (on, config) => {14 on('task', {15 'uid'() {16 return uid();17 },18 });19};20const express = require('express');21const app = express();22const port = 8080;23app.get('/api/uid', (req, res) => {24 res.send({ uid: Cypress._.random(1, 1000000) });25});26app.listen(port, () => {27});28{29 "reporterOptions": {30 }31}32{33 "mochawesomeReporterOptions": {34 },35 "mochaJunitReporterReporterOptions": {

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('Test', () => {2 beforeEach(() => {3 })4 it('Get UID', () => {5 cy.getUid().then((uid) => {6 console.log(uid)7 })8 })9})10Cypress.Commands.add('getUid', () => {11 return cy.window().then((win) => {12 return win.firebase.auth().currentUser.uid13 })14})

Full Screen

Using AI Code Generation

copy

Full Screen

1var uid = Cypress.$('button').getUid()2var uid = Cypress.$('button').getUid()3var el = Cypress.$(`[data-cy=${uid}]`)4var el = Cypress.$(`[data-cy=${uid}]`)5el.click()6el.click()

Full Screen

Cypress Tutorial

Cypress is a renowned Javascript-based open-source, easy-to-use end-to-end testing framework primarily used for testing web applications. Cypress is a relatively new player in the automation testing space and has been gaining much traction lately, as evidenced by the number of Forks (2.7K) and Stars (42.1K) for the project. LambdaTest’s Cypress Tutorial covers step-by-step guides that will help you learn from the basics till you run automation tests on LambdaTest.

Chapters:

  1. What is Cypress? -
  2. Why Cypress? - Learn why Cypress might be a good choice for testing your web applications.
  3. Features of Cypress Testing - Learn about features that make Cypress a powerful and flexible tool for testing web applications.
  4. Cypress Drawbacks - Although Cypress has many strengths, it has a few limitations that you should be aware of.
  5. Cypress Architecture - Learn more about Cypress architecture and how it is designed to be run directly in the browser, i.e., it does not have any additional servers.
  6. Browsers Supported by Cypress - Cypress is built on top of the Electron browser, supporting all modern web browsers. Learn browsers that support Cypress.
  7. Selenium vs Cypress: A Detailed Comparison - Compare and explore some key differences in terms of their design and features.
  8. Cypress Learning: Best Practices - Take a deep dive into some of the best practices you should use to avoid anti-patterns in your automation tests.
  9. How To Run Cypress Tests on LambdaTest? - Set up a LambdaTest account, and now you are all set to learn how to run Cypress tests.

Certification

You can elevate your expertise with end-to-end testing using the Cypress automation framework and stay one step ahead in your career by earning a Cypress certification. Check out our Cypress 101 Certification.

YouTube

Watch this 3 hours of complete tutorial to learn the basics of Cypress and various Cypress commands with the Cypress testing at LambdaTest.

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