Skip to content

Commit 82c373d

Browse files
committed
Moved Order of login with bad passwd/login
1 parent fdf263a commit 82c373d

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

PyMatchaV2.postman_collection.json

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -534,28 +534,25 @@
534534
"name": "Login",
535535
"item": [
536536
{
537-
"name": "Login w/ username",
537+
"name": "Login incorrect email",
538538
"event": [
539539
{
540540
"listen": "test",
541541
"script": {
542-
"id": "e7f490eb-6443-4f92-b56c-7a52e7c4b196",
542+
"id": "dc0f765a-5518-4ec8-9b7d-75e270cc6e2d",
543543
"exec": [
544544
"var response = JSON.parse(responseBody);",
545545
"",
546546
"",
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);",
549549
"});",
550550
"",
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",
556552
"",
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\""
559556
],
560557
"type": "text/javascript"
561558
}
@@ -566,7 +563,7 @@
566563
"header": [],
567564
"body": {
568565
"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}",
570567
"options": {
571568
"raw": {
572569
"language": "json"
@@ -587,28 +584,25 @@
587584
"response": []
588585
},
589586
{
590-
"name": "Login w/ email",
587+
"name": "Login incorrect password",
591588
"event": [
592589
{
593590
"listen": "test",
594591
"script": {
595-
"id": "2a9088b0-3a8a-4d53-a9c7-3985ac06d0d6",
592+
"id": "8919e3c3-dcb9-4b72-b13d-11fa7241cb1b",
596593
"exec": [
597594
"var response = JSON.parse(responseBody);",
598595
"",
599596
"",
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);",
602599
"});",
603600
"",
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",
609602
"",
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\""
612606
],
613607
"type": "text/javascript"
614608
}
@@ -619,7 +613,7 @@
619613
"header": [],
620614
"body": {
621615
"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}",
623617
"options": {
624618
"raw": {
625619
"language": "json"
@@ -640,25 +634,28 @@
640634
"response": []
641635
},
642636
{
643-
"name": "Login incorrect email",
637+
"name": "Login w/ username",
644638
"event": [
645639
{
646640
"listen": "test",
647641
"script": {
648-
"id": "dc0f765a-5518-4ec8-9b7d-75e270cc6e2d",
642+
"id": "e7f490eb-6443-4f92-b56c-7a52e7c4b196",
649643
"exec": [
650644
"var response = JSON.parse(responseBody);",
651645
"",
652646
"",
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);",
655649
"});",
656650
"",
657-
"tests[\"JSON return code is 401\"] = response.code == 401",
651+
"tests[\"JSON return code is 200\"] = response.code == 200",
658652
"",
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);"
662659
],
663660
"type": "text/javascript"
664661
}
@@ -669,7 +666,7 @@
669666
"header": [],
670667
"body": {
671668
"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}",
673670
"options": {
674671
"raw": {
675672
"language": "json"
@@ -690,25 +687,28 @@
690687
"response": []
691688
},
692689
{
693-
"name": "Login incorrect password",
690+
"name": "Login w/ email",
694691
"event": [
695692
{
696693
"listen": "test",
697694
"script": {
698-
"id": "8919e3c3-dcb9-4b72-b13d-11fa7241cb1b",
695+
"id": "2a9088b0-3a8a-4d53-a9c7-3985ac06d0d6",
699696
"exec": [
700697
"var response = JSON.parse(responseBody);",
701698
"",
702699
"",
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);",
705702
"});",
706703
"",
707-
"tests[\"JSON return code is 401\"] = response.code == 401",
704+
"tests[\"JSON return code is 200\"] = response.code == 200",
708705
"",
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);"
712712
],
713713
"type": "text/javascript"
714714
}
@@ -719,7 +719,7 @@
719719
"header": [],
720720
"body": {
721721
"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}",
723723
"options": {
724724
"raw": {
725725
"language": "json"

0 commit comments

Comments
 (0)