|
534 | 534 | "name": "Login", |
535 | 535 | "item": [ |
536 | 536 | { |
537 | | - "name": "Login w/ username", |
| 537 | + "name": "Login incorrect email", |
538 | 538 | "event": [ |
539 | 539 | { |
540 | 540 | "listen": "test", |
541 | 541 | "script": { |
542 | | - "id": "e7f490eb-6443-4f92-b56c-7a52e7c4b196", |
| 542 | + "id": "dc0f765a-5518-4ec8-9b7d-75e270cc6e2d", |
543 | 543 | "exec": [ |
544 | 544 | "var response = JSON.parse(responseBody);", |
545 | 545 | "", |
546 | 546 | "", |
547 | | - "pm.test(\"Status code is 200\", function () {", |
548 | | - " pm.response.to.have.status(200);", |
| 547 | + "pm.test(\"Status code is 401\", function () {", |
| 548 | + " pm.response.to.have.status(401);", |
549 | 549 | "});", |
550 | 550 | "", |
551 | | - "tests[\"JSON return code is 200\"] = response.code == 200", |
552 | | - "", |
553 | | - "tests[\"success is true\"] = response.success == true", |
554 | | - "", |
555 | | - "tests[\"Is profile completed is 0\"] = response.return.is_profile_completed == 0", |
| 551 | + "tests[\"JSON return code is 401\"] = response.code == 401", |
556 | 552 | "", |
557 | | - "pm.collectionVariables.set(\"access_token\", response.return.access_token);", |
558 | | - "pm.collectionVariables.set(\"refresh_token\", response.return.refresh_token);" |
| 553 | + "tests[\"success is true\"] = response.success == false", |
| 554 | + "tests[\"Message is correct\"] = response.error.message == \"Incorrect username or password.\"", |
| 555 | + "tests[\"Error type is Bad Request\"] = response.error.type == \"UnauthorizedError\"" |
559 | 556 | ], |
560 | 557 | "type": "text/javascript" |
561 | 558 | } |
|
566 | 563 | "header": [], |
567 | 564 | "body": { |
568 | 565 | "mode": "raw", |
569 | | - "raw": "{\n\t\"username\": \"{{username}}\",\n\t\"password\": \"{{password}}\"\n}", |
| 566 | + "raw": "{\n\t\"password\": \"{{password}}\",\n\t\"username\": \"{{email}}1\"\n}", |
570 | 567 | "options": { |
571 | 568 | "raw": { |
572 | 569 | "language": "json" |
|
587 | 584 | "response": [] |
588 | 585 | }, |
589 | 586 | { |
590 | | - "name": "Login w/ email", |
| 587 | + "name": "Login incorrect password", |
591 | 588 | "event": [ |
592 | 589 | { |
593 | 590 | "listen": "test", |
594 | 591 | "script": { |
595 | | - "id": "2a9088b0-3a8a-4d53-a9c7-3985ac06d0d6", |
| 592 | + "id": "8919e3c3-dcb9-4b72-b13d-11fa7241cb1b", |
596 | 593 | "exec": [ |
597 | 594 | "var response = JSON.parse(responseBody);", |
598 | 595 | "", |
599 | 596 | "", |
600 | | - "pm.test(\"Status code is 200\", function () {", |
601 | | - " pm.response.to.have.status(200);", |
| 597 | + "pm.test(\"Status code is 401\", function () {", |
| 598 | + " pm.response.to.have.status(401);", |
602 | 599 | "});", |
603 | 600 | "", |
604 | | - "tests[\"JSON return code is 200\"] = response.code == 200", |
605 | | - "", |
606 | | - "tests[\"success is true\"] = response.success == true", |
607 | | - "", |
608 | | - "tests[\"Is profile completed is 0\"] = response.return.is_profile_completed == 0", |
| 601 | + "tests[\"JSON return code is 401\"] = response.code == 401", |
609 | 602 | "", |
610 | | - "pm.collectionVariables.set(\"access_token\", response.return.access_token);", |
611 | | - "pm.collectionVariables.set(\"refresh_token\", response.return.refresh_token);" |
| 603 | + "tests[\"success is true\"] = response.success == false", |
| 604 | + "tests[\"Message is correct\"] = response.error.message == \"Incorrect username or password.\"", |
| 605 | + "tests[\"Error type is Bad Request\"] = response.error.type == \"UnauthorizedError\"" |
612 | 606 | ], |
613 | 607 | "type": "text/javascript" |
614 | 608 | } |
|
619 | 613 | "header": [], |
620 | 614 | "body": { |
621 | 615 | "mode": "raw", |
622 | | - "raw": "{\n\t\"password\": \"{{password}}\",\n\t\"username\": \"{{email}}\"\n}", |
| 616 | + "raw": "{\n\t\"password\": \"{{password}}1\",\n\t\"username\": \"{{email}}\"\n}", |
623 | 617 | "options": { |
624 | 618 | "raw": { |
625 | 619 | "language": "json" |
|
640 | 634 | "response": [] |
641 | 635 | }, |
642 | 636 | { |
643 | | - "name": "Login incorrect email", |
| 637 | + "name": "Login w/ username", |
644 | 638 | "event": [ |
645 | 639 | { |
646 | 640 | "listen": "test", |
647 | 641 | "script": { |
648 | | - "id": "dc0f765a-5518-4ec8-9b7d-75e270cc6e2d", |
| 642 | + "id": "e7f490eb-6443-4f92-b56c-7a52e7c4b196", |
649 | 643 | "exec": [ |
650 | 644 | "var response = JSON.parse(responseBody);", |
651 | 645 | "", |
652 | 646 | "", |
653 | | - "pm.test(\"Status code is 401\", function () {", |
654 | | - " pm.response.to.have.status(401);", |
| 647 | + "pm.test(\"Status code is 200\", function () {", |
| 648 | + " pm.response.to.have.status(200);", |
655 | 649 | "});", |
656 | 650 | "", |
657 | | - "tests[\"JSON return code is 401\"] = response.code == 401", |
| 651 | + "tests[\"JSON return code is 200\"] = response.code == 200", |
658 | 652 | "", |
659 | | - "tests[\"success is true\"] = response.success == false", |
660 | | - "tests[\"Message is correct\"] = response.error.message == \"Incorrect username or password.\"", |
661 | | - "tests[\"Error type is Bad Request\"] = response.error.type == \"UnauthorizedError\"" |
| 653 | + "tests[\"success is true\"] = response.success == true", |
| 654 | + "", |
| 655 | + "tests[\"Is profile completed is 0\"] = response.return.is_profile_completed == 0", |
| 656 | + "", |
| 657 | + "pm.collectionVariables.set(\"access_token\", response.return.access_token);", |
| 658 | + "pm.collectionVariables.set(\"refresh_token\", response.return.refresh_token);" |
662 | 659 | ], |
663 | 660 | "type": "text/javascript" |
664 | 661 | } |
|
669 | 666 | "header": [], |
670 | 667 | "body": { |
671 | 668 | "mode": "raw", |
672 | | - "raw": "{\n\t\"password\": \"{{password}}\",\n\t\"username\": \"{{email}}1\"\n}", |
| 669 | + "raw": "{\n\t\"username\": \"{{username}}\",\n\t\"password\": \"{{password}}\"\n}", |
673 | 670 | "options": { |
674 | 671 | "raw": { |
675 | 672 | "language": "json" |
|
690 | 687 | "response": [] |
691 | 688 | }, |
692 | 689 | { |
693 | | - "name": "Login incorrect password", |
| 690 | + "name": "Login w/ email", |
694 | 691 | "event": [ |
695 | 692 | { |
696 | 693 | "listen": "test", |
697 | 694 | "script": { |
698 | | - "id": "8919e3c3-dcb9-4b72-b13d-11fa7241cb1b", |
| 695 | + "id": "2a9088b0-3a8a-4d53-a9c7-3985ac06d0d6", |
699 | 696 | "exec": [ |
700 | 697 | "var response = JSON.parse(responseBody);", |
701 | 698 | "", |
702 | 699 | "", |
703 | | - "pm.test(\"Status code is 401\", function () {", |
704 | | - " pm.response.to.have.status(401);", |
| 700 | + "pm.test(\"Status code is 200\", function () {", |
| 701 | + " pm.response.to.have.status(200);", |
705 | 702 | "});", |
706 | 703 | "", |
707 | | - "tests[\"JSON return code is 401\"] = response.code == 401", |
| 704 | + "tests[\"JSON return code is 200\"] = response.code == 200", |
708 | 705 | "", |
709 | | - "tests[\"success is true\"] = response.success == false", |
710 | | - "tests[\"Message is correct\"] = response.error.message == \"Incorrect username or password.\"", |
711 | | - "tests[\"Error type is Bad Request\"] = response.error.type == \"UnauthorizedError\"" |
| 706 | + "tests[\"success is true\"] = response.success == true", |
| 707 | + "", |
| 708 | + "tests[\"Is profile completed is 0\"] = response.return.is_profile_completed == 0", |
| 709 | + "", |
| 710 | + "pm.collectionVariables.set(\"access_token\", response.return.access_token);", |
| 711 | + "pm.collectionVariables.set(\"refresh_token\", response.return.refresh_token);" |
712 | 712 | ], |
713 | 713 | "type": "text/javascript" |
714 | 714 | } |
|
719 | 719 | "header": [], |
720 | 720 | "body": { |
721 | 721 | "mode": "raw", |
722 | | - "raw": "{\n\t\"password\": \"{{password}}1\",\n\t\"username\": \"{{email}}\"\n}", |
| 722 | + "raw": "{\n\t\"password\": \"{{password}}\",\n\t\"username\": \"{{email}}\"\n}", |
723 | 723 | "options": { |
724 | 724 | "raw": { |
725 | 725 | "language": "json" |
|
0 commit comments