diff --git a/.nyc_output/out.json b/.nyc_output/out.json index e612088..12c342c 100644 --- a/.nyc_output/out.json +++ b/.nyc_output/out.json @@ -16,7 +16,7 @@ "fnMap": {}, "branchMap": {}, "s": { - "0": 84 + "0": 16 }, "f": {}, "b": {}, @@ -226,25 +226,25 @@ } }, "s": { - "0": 84, - "1": 84, - "2": 87, - "3": 76, - "4": 3, - "5": 8, - "6": 24, - "7": 8, + "0": 16, + "1": 16, + "2": 16, + "3": 16, + "4": 0, + "5": 0, + "6": 0, + "7": 0, "8": 0 }, "f": { - "0": 87, - "1": 24 + "0": 16, + "1": 0 }, "b": { "0": [ - 76, - 3, - 8, + 16, + 0, + 0, 0 ] }, @@ -465,23 +465,23 @@ }, "branchMap": {}, "s": { - "0": 84, - "1": 84, - "2": 171, - "3": 171, - "4": 171, - "5": 76, - "6": 171, - "7": 3, - "8": 171, - "9": 8, - "10": 171 + "0": 16, + "1": 16, + "2": 32, + "3": 32, + "4": 32, + "5": 16, + "6": 32, + "7": 0, + "8": 32, + "9": 0, + "10": 32 }, "f": { - "0": 171, - "1": 76, - "2": 3, - "3": 8 + "0": 32, + "1": 16, + "2": 0, + "3": 0 }, "b": {}, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -544,11 +544,11 @@ "fnMap": {}, "branchMap": {}, "s": { - "0": 84, - "1": 84, - "2": 84, - "3": 84, - "4": 84 + "0": 16, + "1": 16, + "2": 16, + "3": 16, + "4": 16 }, "f": {}, "b": {}, @@ -607,11 +607,11 @@ }, "branchMap": {}, "s": { - "0": 84, - "1": 24 + "0": 16, + "1": 0 }, "f": { - "0": 24 + "0": 0 }, "b": {}, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -1672,99 +1672,99 @@ } }, "s": { - "0": 84, - "1": 1920, - "2": 1920, - "3": 1920, - "4": 1920, - "5": 1920, - "6": 1920, - "7": 1920, - "8": 1920, - "9": 161, - "10": 77, - "11": 1920, - "12": 160, - "13": 76, - "14": 1920, - "15": 77, - "16": 77, - "17": 1, - "18": 76, - "19": 1920, - "20": 1355, - "21": 1355, - "22": 1920, - "23": 168, - "24": 84, - "25": 1920, - "26": 82, - "27": 82, - "28": 94, - "29": 82, - "30": 77, - "31": 77, - "32": 5, - "33": 5, - "34": 5, - "35": 1920, - "36": 5, - "37": 1920, + "0": 16, + "1": 112, + "2": 112, + "3": 112, + "4": 112, + "5": 112, + "6": 112, + "7": 112, + "8": 112, + "9": 32, + "10": 16, + "11": 112, + "12": 32, + "13": 16, + "14": 112, + "15": 16, + "16": 16, + "17": 0, + "18": 16, + "19": 112, + "20": 0, + "21": 0, + "22": 112, + "23": 32, + "24": 16, + "25": 112, + "26": 16, + "27": 16, + "28": 16, + "29": 16, + "30": 16, + "31": 16, + "32": 0, + "33": 0, + "34": 0, + "35": 112, + "36": 0, + "37": 112, "38": 0, - "39": 1920, - "40": 82 + "39": 112, + "40": 16 }, "f": { - "0": 1920, - "1": 161, - "2": 160, - "3": 77, - "4": 1355, - "5": 1355, - "6": 168, - "7": 82, - "8": 94, - "9": 77, - "10": 5, - "11": 5, - "12": 82 + "0": 112, + "1": 32, + "2": 32, + "3": 16, + "4": 0, + "5": 0, + "6": 32, + "7": 16, + "8": 16, + "9": 16, + "10": 0, + "11": 0, + "12": 16 }, "b": { "0": [ - 77, - 84 + 16, + 16 ], "1": [ - 76, - 84 + 16, + 16 ], "2": [ - 1, - 76 + 0, + 16 ], "3": [ - 84, - 84 + 16, + 16 ], "4": [ - 77, - 5 + 16, + 0 ], "5": [ - 82, - 79 + 16, + 16 ], "6": [ 0, - 1920 + 112 ], "7": [ - 1919, - 1 + 112, + 0 ], "8": [ - 1919, - 5 + 112, + 0 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -1920,20 +1920,20 @@ } }, "s": { - "0": 84, - "1": 84, - "2": 38, - "3": 19, - "4": 19, + "0": 16, + "1": 16, + "2": 0, + "3": 0, + "4": 0, "5": 0 }, "f": { - "0": 38 + "0": 0 }, "b": { "0": [ - 19, - 19, + 0, + 0, 0 ] }, @@ -2110,20 +2110,20 @@ }, "branchMap": {}, "s": { - "0": 84, - "1": 84, - "2": 103, - "3": 103, - "4": 103, - "5": 19, - "6": 103, - "7": 19, - "8": 103 + "0": 16, + "1": 16, + "2": 16, + "3": 16, + "4": 16, + "5": 0, + "6": 16, + "7": 0, + "8": 16 }, "f": { - "0": 103, - "1": 19, - "2": 19 + "0": 16, + "1": 0, + "2": 0 }, "b": {}, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -2258,20 +2258,20 @@ } }, "s": { - "0": 84, - "1": 447, - "2": 204, - "3": 96, - "4": 147 + "0": 16, + "1": 49, + "2": 44, + "3": 1, + "4": 4 }, "f": { - "0": 447 + "0": 49 }, "b": { "0": [ - 204, - 96, - 147 + 44, + 1, + 4 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -2656,38 +2656,38 @@ } }, "s": { - "0": 84, - "1": 447, - "2": 447, - "3": 447, - "4": 447, - "5": 447, - "6": 447, - "7": 220, - "8": 447, - "9": 226, - "10": 6, - "11": 6, - "12": 6, - "13": 447, - "14": 22, - "15": 447, - "16": 28, - "17": 447, - "18": 226 + "0": 16, + "1": 49, + "2": 49, + "3": 49, + "4": 49, + "5": 49, + "6": 49, + "7": 28, + "8": 49, + "9": 29, + "10": 1, + "11": 1, + "12": 1, + "13": 49, + "14": 1, + "15": 49, + "16": 2, + "17": 49, + "18": 29 }, "f": { - "0": 447, - "1": 220, - "2": 226, - "3": 22, - "4": 28, - "5": 226 + "0": 49, + "1": 28, + "2": 29, + "3": 1, + "4": 2, + "5": 29 }, "b": { "0": [ - 6, - 220 + 1, + 28 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -2745,11 +2745,11 @@ }, "branchMap": {}, "s": { - "0": 84, - "1": 106 + "0": 16, + "1": 16 }, "f": { - "0": 106 + "0": 16 }, "b": {}, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -2952,24 +2952,24 @@ } }, "s": { - "0": 84, - "1": 108, - "2": 14, - "3": 14, - "4": 4, - "5": 4, - "6": 10, - "7": 108 + "0": 16, + "1": 0, + "2": 0, + "3": 0, + "4": 0, + "5": 0, + "6": 0, + "7": 0 }, "f": { - "0": 108, - "1": 14, - "2": 4 + "0": 0, + "1": 0, + "2": 0 }, "b": { "0": [ - 4, - 10 + 0, + 0 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -3012,9 +3012,9 @@ "fnMap": {}, "branchMap": {}, "s": { - "0": 84, - "1": 84, - "2": 84 + "0": 16, + "1": 16, + "2": 16 }, "f": {}, "b": {}, @@ -3073,11 +3073,11 @@ }, "branchMap": {}, "s": { - "0": 84, - "1": 66 + "0": 16, + "1": 4 }, "f": { - "0": 66 + "0": 4 }, "b": {}, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -4278,104 +4278,104 @@ } }, "s": { - "0": 84, - "1": 79, - "2": 78, - "3": 78, - "4": 78, - "5": 78, - "6": 78, - "7": 78, - "8": 78, - "9": 78, - "10": 27, - "11": 13, - "12": 13, - "13": 57, - "14": 13, - "15": 78, - "16": 116, - "17": 78, - "18": 5, - "19": 5, - "20": 5, - "21": 78, - "22": 2, - "23": 2, - "24": 2, - "25": 2, - "26": 2, - "27": 78, - "28": 2, - "29": 2, - "30": 1, - "31": 1, - "32": 1, - "33": 1, - "34": 1, - "35": 1, - "36": 78, - "37": 14, - "38": 64, - "39": 20, - "40": 20, - "41": 64, - "42": 62, - "43": 2, - "44": 1, - "45": 1, - "46": 1, + "0": 16, + "1": 0, + "2": 0, + "3": 0, + "4": 0, + "5": 0, + "6": 0, + "7": 0, + "8": 0, + "9": 0, + "10": 0, + "11": 0, + "12": 0, + "13": 0, + "14": 0, + "15": 0, + "16": 0, + "17": 0, + "18": 0, + "19": 0, + "20": 0, + "21": 0, + "22": 0, + "23": 0, + "24": 0, + "25": 0, + "26": 0, + "27": 0, + "28": 0, + "29": 0, + "30": 0, + "31": 0, + "32": 0, + "33": 0, + "34": 0, + "35": 0, + "36": 0, + "37": 0, + "38": 0, + "39": 0, + "40": 0, + "41": 0, + "42": 0, + "43": 0, + "44": 0, + "45": 0, + "46": 0, "47": 0, "48": 0 }, "f": { - "0": 79, - "1": 27, - "2": 13, - "3": 57, - "4": 116, - "5": 5, - "6": 2, - "7": 2, - "8": 2, - "9": 2, + "0": 0, + "1": 0, + "2": 0, + "3": 0, + "4": 0, + "5": 0, + "6": 0, + "7": 0, + "8": 0, + "9": 0, "10": 0 }, "b": { "0": [ - 13, - 14 + 0, + 0 ], "1": [ - 1, + 0, 0 ], "2": [ - 14, - 64 + 0, + 0 ], "3": [ - 20, - 44 + 0, + 0 ], "4": [ - 62, - 2 + 0, + 0 ], "5": [ - 42, - 20 + 0, + 0 ], "6": [ - 27, - 15 + 0, + 0 ], "7": [ - 1, - 1 + 0, + 0 ], "8": [ - 1, + 0, 0 ], "9": [ @@ -4575,26 +4575,26 @@ } }, "s": { - "0": 84, - "1": 217, - "2": 190, - "3": 190 + "0": 16, + "1": 34, + "2": 32, + "3": 32 }, "f": { - "0": 217 + "0": 34 }, "b": { "0": [ - 190, - 84 + 32, + 16 ], "1": [ - 190, - 106 + 32, + 16 ], "2": [ - 106, - 14 + 16, + 0 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -4652,7 +4652,7 @@ }, "branchMap": {}, "s": { - "0": 84, + "0": 16, "1": 2 }, "f": { @@ -5213,56 +5213,56 @@ } }, "s": { - "0": 84, - "1": 1241, - "2": 1215, - "3": 1215, - "4": 1215, - "5": 1215, - "6": 1215, - "7": 1215, - "8": 681, - "9": 1215, - "10": 1361, - "11": 4227, - "12": 1361, - "13": 1215, - "14": 3, - "15": 3, + "0": 16, + "1": 80, + "2": 78, + "3": 78, + "4": 78, + "5": 78, + "6": 78, + "7": 78, + "8": 42, + "9": 78, + "10": 84, + "11": 285, + "12": 84, + "13": 78, + "14": 0, + "15": 0, "16": 0, "17": 0, - "18": 3, - "19": 3, - "20": 3, - "21": 1215, - "22": 8, - "23": 8, + "18": 0, + "19": 0, + "20": 0, + "21": 78, + "22": 0, + "23": 0, "24": 0, "25": 0, - "26": 8, - "27": 8, - "28": 1215 + "26": 0, + "27": 0, + "28": 78 }, "f": { - "0": 1241, - "1": 681, - "2": 1361, - "3": 4227, - "4": 3, - "5": 8 + "0": 80, + "1": 42, + "2": 84, + "3": 285, + "4": 0, + "5": 0 }, "b": { "0": [ - 390, - 971 + 34, + 50 ], "1": [ 0, - 3 + 0 ], "2": [ 0, - 8 + 0 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -6111,30 +6111,30 @@ } }, "s": { - "0": 84, - "1": 685, - "2": 685, - "3": 386, - "4": 685, - "5": 3, - "6": 3, - "7": 1, - "8": 2, - "9": 685, - "10": 736, - "11": 736, - "12": 51, - "13": 736, - "14": 685, - "15": 685, - "16": 685, - "17": 685, - "18": 685, - "19": 685, + "0": 16, + "1": 56, + "2": 56, + "3": 28, + "4": 56, + "5": 0, + "6": 0, + "7": 0, + "8": 0, + "9": 56, + "10": 56, + "11": 56, + "12": 0, + "13": 56, + "14": 56, + "15": 56, + "16": 56, + "17": 56, + "18": 56, + "19": 56, "20": 0, "21": 0, - "22": 685, - "23": 685, + "22": 56, + "23": 56, "24": 0, "25": 0, "26": 0, @@ -6155,29 +6155,29 @@ "41": 0, "42": 0, "43": 0, - "44": 685, - "45": 685, - "46": 685 + "44": 56, + "45": 56, + "46": 56 }, "f": { - "0": 685, - "1": 386, - "2": 3, - "3": 736, - "4": 685 + "0": 56, + "1": 28, + "2": 0, + "3": 56, + "4": 56 }, "b": { "0": [ - 1, - 2 + 0, + 0 ], "1": [ - 51, - 685 + 0, + 56 ], "2": [ 0, - 685, + 56, 0, 0, 0, @@ -6190,8 +6190,8 @@ 0 ], "3": [ - 290, - 395 + 28, + 28 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -6249,11 +6249,11 @@ }, "branchMap": {}, "s": { - "0": 84, - "1": 407 + "0": 16, + "1": 28 }, "f": { - "0": 407 + "0": 28 }, "b": {}, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -6348,16 +6348,16 @@ } }, "s": { - "0": 84, - "1": 407 + "0": 16, + "1": 28 }, "f": { - "0": 407 + "0": 28 }, "b": { "0": [ - 320, - 87 + 14, + 14 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -6710,38 +6710,38 @@ } }, "s": { - "0": 84, - "1": 89, - "2": 89, - "3": 89, - "4": 87, - "5": 633, - "6": 633, - "7": 633, - "8": 87, - "9": 407, - "10": 407, - "11": 320, - "12": 87, - "13": 407, - "14": 87, + "0": 16, + "1": 16, + "2": 16, + "3": 16, + "4": 14, + "5": 14, + "6": 14, + "7": 14, + "8": 14, + "9": 28, + "10": 28, + "11": 14, + "12": 14, + "13": 28, + "14": 14, "15": 2, - "16": 89 + "16": 16 }, "f": { - "0": 89, - "1": 89, - "2": 633, - "3": 407 + "0": 16, + "1": 16, + "2": 14, + "3": 28 }, "b": { "0": [ - 87, + 14, 2 ], "1": [ - 320, - 87 + 14, + 14 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -7208,47 +7208,47 @@ } }, "s": { - "0": 84, - "1": 238, - "2": 238, - "3": 238, - "4": 85, - "5": 238, - "6": 2, - "7": 2, + "0": 16, + "1": 8, + "2": 8, + "3": 8, + "4": 4, + "5": 8, + "6": 0, + "7": 0, "8": 0, - "9": 2, - "10": 238, - "11": 238, - "12": 238, + "9": 0, + "10": 8, + "11": 8, + "12": 8, "13": 0, - "14": 238, - "15": 238, - "16": 11, - "17": 11, - "18": 238, - "19": 11 + "14": 8, + "15": 8, + "16": 0, + "17": 0, + "18": 8, + "19": 0 }, "f": { - "0": 238, - "1": 85, - "2": 2, - "3": 238, - "4": 11, - "5": 11 + "0": 8, + "1": 4, + "2": 0, + "3": 8, + "4": 0, + "5": 0 }, "b": { "0": [ 0, - 2 + 0 ], "1": [ 0, - 238 + 8 ], "2": [ - 153, - 85 + 4, + 4 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -7306,11 +7306,11 @@ }, "branchMap": {}, "s": { - "0": 84, - "1": 1 + "0": 16, + "1": 0 }, "f": { - "0": 1 + "0": 0 }, "b": {}, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -7523,25 +7523,25 @@ } }, "s": { - "0": 84, - "1": 31, - "2": 31, - "3": 31, - "4": 30, - "5": 89, - "6": 30, - "7": 1, - "8": 31 + "0": 16, + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 4, + "6": 1, + "7": 0, + "8": 1 }, "f": { - "0": 31, - "1": 31, - "2": 89 + "0": 1, + "1": 1, + "2": 4 }, "b": { "0": [ - 30, - 1 + 1, + 0 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -7680,19 +7680,19 @@ } }, "s": { - "0": 84, - "1": 64, - "2": 127, - "3": 64 + "0": 16, + "1": 4, + "2": 8, + "3": 4 }, "f": { - "0": 64, - "1": 127 + "0": 4, + "1": 8 }, "b": { "0": [ - 64, - 62 + 4, + 4 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -7750,11 +7750,11 @@ }, "branchMap": {}, "s": { - "0": 84, - "1": 192 + "0": 16, + "1": 12 }, "f": { - "0": 192 + "0": 12 }, "b": {}, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -8113,39 +8113,39 @@ } }, "s": { - "0": 84, - "1": 67, - "2": 67, - "3": 67, - "4": 256, - "5": 256, - "6": 192, - "7": 64, - "8": 64, - "9": 256, - "10": 67, - "11": 3, - "12": 3, - "13": 67 + "0": 16, + "1": 4, + "2": 4, + "3": 4, + "4": 16, + "5": 16, + "6": 12, + "7": 4, + "8": 4, + "9": 16, + "10": 4, + "11": 0, + "12": 0, + "13": 4 }, "f": { - "0": 67, - "1": 256, - "2": 256, - "3": 3 + "0": 4, + "1": 16, + "2": 16, + "3": 0 }, "b": { "0": [ - 192, - 64 + 12, + 4 ], "1": [ - 64, + 4, 0 ], "2": [ - 67, - 64 + 4, + 4 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -8612,52 +8612,52 @@ } }, "s": { - "0": 84, - "1": 123, - "2": 97, - "3": 97, - "4": 97, - "5": 97, - "6": 97, - "7": 61, - "8": 32, - "9": 97, - "10": 3, - "11": 1, - "12": 2, - "13": 97, - "14": 29, - "15": 68, - "16": 1, - "17": 1, - "18": 67, - "19": 67 + "0": 16, + "1": 8, + "2": 6, + "3": 6, + "4": 6, + "5": 6, + "6": 6, + "7": 4, + "8": 2, + "9": 6, + "10": 0, + "11": 0, + "12": 0, + "13": 6, + "14": 2, + "15": 4, + "16": 0, + "17": 0, + "18": 4, + "19": 4 }, "f": { - "0": 123, - "1": 61, - "2": 3 + "0": 8, + "1": 4, + "2": 0 }, "b": { "0": [ - 32, - 29 + 2, + 2 ], "1": [ - 1, - 2 + 0, + 0 ], "2": [ - 29, - 68 + 2, + 4 ], "3": [ - 1, - 67 + 0, + 4 ], "4": [ - 29, - 38 + 2, + 2 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -8715,7 +8715,7 @@ }, "branchMap": {}, "s": { - "0": 84, + "0": 16, "1": 0 }, "f": { @@ -9320,57 +9320,57 @@ } }, "s": { - "0": 84, - "1": 195, - "2": 195, - "3": 195, - "4": 177, - "5": 195, - "6": 3, - "7": 3, - "8": 1, - "9": 2, - "10": 195, + "0": 16, + "1": 8, + "2": 8, + "3": 8, + "4": 8, + "5": 8, + "6": 0, + "7": 0, + "8": 0, + "9": 0, + "10": 8, "11": 0, "12": 0, - "13": 195, - "14": 195, - "15": 2, - "16": 1, - "17": 2, + "13": 8, + "14": 8, + "15": 0, + "16": 0, + "17": 0, "18": 0 }, "f": { - "0": 195, - "1": 177, - "2": 3, + "0": 8, + "1": 8, + "2": 0, "3": 0, "4": 0, - "5": 2, - "6": 1, - "7": 2, + "5": 0, + "6": 0, + "7": 0, "8": 0 }, "b": { "0": [ - 1, - 2 + 0, + 0 ], "1": [ - 6, - 189 + 0, + 8 ], "2": [ - 9, - 186 + 0, + 8 ], "3": [ - 185, - 10 + 8, + 0 ], "4": [ - 195, - 6 + 8, + 0 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -9428,11 +9428,11 @@ }, "branchMap": {}, "s": { - "0": 84, - "1": 5 + "0": 16, + "1": 0 }, "f": { - "0": 5 + "0": 0 }, "b": {}, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -9999,61 +9999,61 @@ } }, "s": { - "0": 84, - "1": 48, - "2": 47, - "3": 47, - "4": 47, - "5": 47, - "6": 23, - "7": 23, - "8": 22, - "9": 177, - "10": 22, - "11": 1, + "0": 16, + "1": 4, + "2": 4, + "3": 4, + "4": 4, + "5": 4, + "6": 2, + "7": 2, + "8": 2, + "9": 8, + "10": 2, + "11": 0, "12": 0, - "13": 47, - "14": 23, - "15": 23, - "16": 22, - "17": 1, - "18": 47, - "19": 23, - "20": 24, - "21": 1, - "22": 1, - "23": 23 + "13": 4, + "14": 2, + "15": 2, + "16": 2, + "17": 0, + "18": 4, + "19": 2, + "20": 2, + "21": 0, + "22": 0, + "23": 2 }, "f": { - "0": 48, - "1": 23, - "2": 177, - "3": 23 + "0": 4, + "1": 2, + "2": 8, + "3": 2 }, "b": { "0": [ - 23, + 2, 0 ], "1": [ - 22, - 1 + 2, + 0 ], "2": [ - 23, + 2, 0 ], "3": [ - 22, - 1 + 2, + 0 ], "4": [ - 23, - 24 + 2, + 2 ], "5": [ - 1, - 23 + 0, + 2 ] }, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -10101,10 +10101,10 @@ }, "branchMap": {}, "s": { - "0": 111 + "0": 18 }, "f": { - "0": 111 + "0": 18 }, "b": {}, "_coverageSchema": "1a1c01bbd47fc00a2c39e90264f33305004495a9", @@ -10147,9 +10147,9 @@ "fnMap": {}, "branchMap": {}, "s": { - "0": 84, - "1": 84, - "2": 84 + "0": 16, + "1": 16, + "2": 16 }, "f": {}, "b": {}, diff --git a/cypress/e2e/AddRemoveWatchlist_spec.cy.js b/cypress/e2e/AddRemoveWatchlist_spec.cy.js index 6347827..649f82d 100644 --- a/cypress/e2e/AddRemoveWatchlist_spec.cy.js +++ b/cypress/e2e/AddRemoveWatchlist_spec.cy.js @@ -28,8 +28,6 @@ describe("Adding/Removing from Watchlist", () => { }) cy.visit("http://localhost:3000/") cy.wait("@gqlusersQuery") - cy.get('[type="text"]').type("snoop_dogg") - cy.get('[type="password"]').type("streamr") cy.get("button").click() cy.wait("@gqlfetchUserQuery") cy.get(".home-container a").first().click() diff --git a/cypress/e2e/AllSpecs_spec.cy.js b/cypress/e2e/AllSpecs_spec.cy.js index d2c2cf8..bcf36be 100644 --- a/cypress/e2e/AllSpecs_spec.cy.js +++ b/cypress/e2e/AllSpecs_spec.cy.js @@ -28,8 +28,6 @@ describe("Adding/Removing from Watchlist", () => { }) cy.visit("http://localhost:3000/") cy.wait("@gqlusersQuery") - cy.get('[type="text"]').type("snoop_dogg") - cy.get('[type="password"]').type("streamr") cy.get("button").click() cy.wait("@gqlfetchUserQuery") cy.get(".home-container a").first().click() @@ -179,8 +177,6 @@ describe("Details Page", () => { }) cy.visit("http://localhost:3000/") cy.wait("@gqlusersQuery") - cy.get('[type="text"]').type("snoop_dogg") - cy.get('[type="password"]').type("streamr") cy.get("button").click() cy.wait("@gqlfetchUserQuery") cy.get(".home-container a").first().click() @@ -233,8 +229,6 @@ describe("Details Page (missing data)", () => { }) cy.visit("http://localhost:3000/") cy.wait("@gqlusersQuery") - cy.get('[type="text"]').type("snoop_dogg") - cy.get('[type="password"]').type("streamr") cy.get("button").click() cy.wait("@gqlfetchUserQuery") cy.get(".home-container a").first().click() @@ -270,8 +264,6 @@ describe("Details Page (bad response)", () => { }) cy.visit("http://localhost:3000/") cy.wait("@gqlusersQuery") - cy.get('[type="text"]').type("snoop_dogg") - cy.get('[type="password"]').type("streamr") cy.get("button").click() cy.wait("@gqlfetchUserQuery") cy.get(".home-container a").first().click() @@ -307,8 +299,197 @@ describe('Testing Details Page Navigation to Home View, Search View, and Watch L fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') + cy.get('button').click() + cy.wait('@gqlfetchUserQuery') + + cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { + aliasQuery(req, 'showDetails') + req.reply({ + fixture: 'home-view-showDetails-30Rock.json' + }) + }) + cy.get('.poster-img').eq(0).click() + cy.wait('@gqlshowDetailsQuery') + }) + + it('Should navigate to Home View after clicking on "Home" link', () => { + cy.get('p').eq(1).click() + cy.get('.recommend-title').should('contain', 'Recommended By Friends') + }) + + it('Should navigate to Search View after entering show title in search bar via clicking magnifying glass button', () => { + cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { + aliasQuery(req, 'shows') + req.reply({ + fixture: 'home-view-shows-KingOfQueens.json' + }) + }) + cy.get('.search-input').type('king of queens') + cy.get('.magnifying-glass-icon').click() + cy.wait('@gqlshowsQuery') + cy.get('.search-title').should('contain', 'Search Results for "king of queens"') + }) + + it('Should navigate to Search View after entering show title in search bar via pressing enter', () => { + cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { + aliasQuery(req, 'shows') + req.reply({ + fixture: 'home-view-shows-KingOfQueens.json' + }) + }) + cy.get('.search-input').type('king of queens{enter}') + cy.wait('@gqlshowsQuery') + cy.get('.search-title').should('contain', 'Search Results for "king of queens"') + }) + + it('Should navigate to Watch List View after clicking "Watchlist"', () => { + cy.get('p').eq(2).click() + cy.get('.watch-list-title').should('contain', 'My Watch List') + }) +}) + +describe("Details Page", () => { + beforeEach(() => { + cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { + switch (req.body.operationName) { + case "users": + aliasQuery(req, "users") + req.reply({ fixture: "login-users.json" }) + break + case "fetchUser": + aliasQuery(req, "fetchUser") + req.reply({ fixture: "DetailsPage-currentUser.json" }) + break + case "showDetails": + aliasQuery(req, "showDetails") + req.reply({ fixture: "DetailsPage-showDetails.json" }) + break + } + }) + cy.visit("http://localhost:3000/") + cy.wait("@gqlusersQuery") + cy.get("button").click() + cy.wait("@gqlfetchUserQuery") + cy.get(".home-container a").first().click() + cy.wait("@gqlshowDetailsQuery") + }) + + it("should display the correct show data", () => { + cy.getByData("poster").invoke("attr", "src").should("eq", "https://image.tmdb.org/t/p/w500/k3RbNzPEPW0cmkfkn1xVCTk3Qde.jpg") + cy.getByData("details-title").should("have.text", "30 Rock (2006)") + cy.getByData("provider-icons").find("img").should("have.length", 2) + .first().invoke("attr", "src").should("eq", "https://image.tmdb.org/t/p/w500/zxrVdFjIjLqkfnwyghnfywTn3Lh.jpg") + cy.getByData("provider-icons").find("img").last().invoke("attr", "src").should("eq", "https://image.tmdb.org/t/p/w500/xTHltMrZPAJFLQ6qyCBjAnXSmZt.jpg") + cy.getByData("genres").should("have.text", "Comedy, Another Genre") + cy.getByData("rating").should("have.text", "7/10 ⭐️") + cy.getByData("summary").should("have.text", "Liz Lemon, the head writer for a late-night TV variety show in New York, tries to juggle all the egos around her while chasing her own dream.") + }) + + it("should display the correct recommenders", () => { + cy.getByData("avatars-container").find('[data-cy=avatar-container]').should("have.length", 3) + cy.getByData("avatars-container").find("img").eq(0).invoke("attr", "src").should("eq", "https://cdn-icons-png.flaticon.com/512/3940/3940448.png") + cy.getByData("avatars-container").find("p").eq(0).should("have.text", "martha_stewart") + cy.getByData("avatars-container").find("img").eq(1).invoke("attr", "src").should("eq", "https://cdn-icons-png.flaticon.com/512/3940/3940405.png") + cy.getByData("avatars-container").find("p").eq(1).should("have.text", "james-white-rules") + cy.getByData("recc-container").contains("and other friends") + }) + + it("should be able to open the \"send recommendation\" modal", () => { + cy.getByData("open-modal").click() + cy.getByData("recc-modal").should("be.visible") + }) +}) + +describe("Details Page (missing data)", () => { + beforeEach(() => { + cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { + switch (req.body.operationName) { + case "users": + aliasQuery(req, "users") + req.reply({ fixture: "login-users.json" }) + break + case "fetchUser": + aliasQuery(req, "fetchUser") + req.reply({ fixture: "DetailsPage-currentUser.json" }) + break + case "showDetails": + aliasQuery(req, "showDetails") + req.reply({ fixture: "DetailsPage-showDetails-missing.json" }) + break + } + }) + cy.visit("http://localhost:3000/") + cy.wait("@gqlusersQuery") + cy.get("button").click() + cy.wait("@gqlfetchUserQuery") + cy.get(".home-container a").first().click() + cy.wait("@gqlshowDetailsQuery") + }) + + it("should not show a table row for streaming providers if there are none available", () => { + cy.getByData("provider-icons").should("not.exist") + }) + + it("should not try to show the list of recommenders if there are none", () => { + cy.getByData("recc-container").should("not.contain", "Recommended by Friends:") + }) +}) + +describe("Details Page (bad response)", () => { + beforeEach(() => { + cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { + switch (req.body.operationName) { + case "users": + aliasQuery(req, "users") + req.reply({ fixture: "login-users.json" }) + break + case "fetchUser": + aliasQuery(req, "fetchUser") + req.reply({ fixture: "DetailsPage-currentUser.json" }) + break + case "showDetails": + aliasQuery(req, "showDetails") + req.reply({ fixture: "bad-response.json" }) + break + } + }) + cy.visit("http://localhost:3000/") + cy.wait("@gqlusersQuery") + cy.get("button").click() + cy.wait("@gqlfetchUserQuery") + cy.get(".home-container a").first().click() + cy.wait("@gqlshowDetailsQuery") + }) + + it("should redirect to Error Component if there is a bad response", () => { + cy.url().should("eq", "http://localhost:3000/error") + cy.get('.error').should('be.visible') + cy.get('[d="M13.768 4.2C13.42 3.545 12.742 3.138 12 3.138s-1.42.407-1.768 1.063L2.894 18.064a1.986 1.986 0 0 0 .054 1.968A1.984 1.984 0 0 0 4.661 21h14.678c.708 0 1.349-.362 1.714-.968a1.989 1.989 0 0 0 .054-1.968L13.768 4.2zM4.661 19 12 5.137 19.344 19H4.661z"]').should('be.visible') + cy.get('[d="M20 3H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zM4 9V5h16v4zm16 4H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2zM4 19v-4h16v4z"]').should('be.visible') + cy.get('.oops').should('be.visible') + .and('contain', 'Bummer! The server isn\'t responding.') + cy.get('.message').should('be.visible') + .and('contain', 'Our team is working on it! Come back later!') + }) +}) + +describe('Testing Details Page Navigation to Home View, Search View, and Watch List View', () => { + beforeEach(() => { + cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { + aliasQuery(req, 'users') + req.reply({ + fixture: 'login-users.json' + }) + }) + cy.visit('http://localhost:3000/') + cy.wait('@gqlusersQuery') + + cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { + aliasQuery(req, 'fetchUser') + req.reply({ + fixture: 'home-view-currentUser-recommendations.json' + }) + }) cy.get('button').click() cy.wait('@gqlfetchUserQuery') @@ -368,15 +549,13 @@ describe('Testing Home Page Header, Page Name, and Nav Bar', () => { }) cy.visit('http://localhost:3000/') cy.wait('@gqlusersQuery') - cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { aliasQuery(req, 'fetchUser') req.reply({ fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') + cy.get('button').click() cy.wait('@gqlfetchUserQuery') }) @@ -409,15 +588,12 @@ describe('Testing Home Page Navigation to Detail, Search View, and Watch List Vi }) cy.visit('http://localhost:3000/') cy.wait('@gqlusersQuery') - cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { aliasQuery(req, 'fetchUser') req.reply({ fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') }) @@ -487,15 +663,12 @@ describe('Testing Home Page If Given Recommended Shows', () => { }) cy.visit('http://localhost:3000/') cy.wait('@gqlusersQuery') - cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { aliasQuery(req, 'fetchUser') req.reply({ fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') }) @@ -553,15 +726,12 @@ describe('Testing Home Page If Not Given Recommended Shows', () => { }) cy.visit('http://localhost:3000/') cy.wait('@gqlusersQuery') - cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { aliasQuery(req, 'fetchUser') req.reply({ fixture: 'home-view-currentUser-no-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') }) @@ -593,8 +763,6 @@ describe('Testing Loading Message', () => { fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') }) @@ -661,15 +829,18 @@ describe('Testing Login Page', () => { fixture: 'login-currentUser.json' }) }) + cy.get('[type="text"]').clear() + cy.get('[type="password"]').clear() cy.get('[type="text"]').type('snoop_dogg') cy.get('[type="password"]').type('streamr') + cy.get('[type="text"]').should("have.value", "snoop_dogg") + cy.get('[type="password"]').should("have.value", "streamr") cy.get('button').click() cy.wait('@gqlfetchUserQuery') }) it('Should see an invalid username/ password message if input an invalid username and click submit', () => { - cy.get('[type="text"]').type('banana') - cy.get('[type="password"]').type('streamr') + cy.get('[type="text"]').clear().type('banana') cy.get('button').click() cy.get('p').should('be.visible') @@ -677,8 +848,7 @@ describe('Testing Login Page', () => { }) it('Should see an invalid username/ password message if input an invalid password and click submit', () => { - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('banana') + cy.get('[type="password"]').clear().type('banana') cy.get('button').click() cy.get('p').should('be.visible') @@ -686,7 +856,7 @@ describe('Testing Login Page', () => { }) it('Should see an invalid username/ password message if username input is left empty and click submit', () => { - cy.get('[type="password"]').type('streamr') + cy.get('[type="text"]').clear() cy.get('button').click() cy.get('p').should('be.visible') @@ -694,7 +864,7 @@ describe('Testing Login Page', () => { }) it('Should see an invalid username/ password message if password input is left empty and click submit', () => { - cy.get('[type="text"]').type('snoop_dogg') + cy.get('[type="password"]').clear() cy.get('button').click() cy.get('p').should('be.visible') @@ -702,6 +872,8 @@ describe('Testing Login Page', () => { }) it('Should see an invalid username/ password message if password and username inputs are left empty and click submit', () => { + cy.get('[type="text"]').clear() + cy.get('[type="password"]').clear() cy.get('button').click() cy.get('p').should('be.visible') @@ -725,8 +897,6 @@ describe("Login Page (bad response)", () => { }) cy.visit("http://localhost:3000/") cy.wait("@gqlusersQuery") - cy.get('[type="text"]').type("snoop_dogg") - cy.get('[type="password"]').type("streamr") cy.get("button").click() cy.wait("@gqlfetchUserQuery") }) @@ -760,8 +930,6 @@ describe('Testing Recommendation Modal', () => { fixture: 'recModal-currentUser.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') cy.get('#watchlist-button > p').click() @@ -876,8 +1044,6 @@ describe('Testing that the send recommendations modal displays when clicking the fixture: 'recModal-currentUser.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') @@ -928,8 +1094,6 @@ describe('Testing send recommendation Modal display when user has no other users fixture: 'recModal-currentUser.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') cy.get('#watchlist-button > p').click() @@ -983,8 +1147,6 @@ describe("RecModal (bad response)", () => { }) cy.visit("http://localhost:3000/") cy.wait("@gqlusersQuery") - cy.get('[type="text"]').type("snoop_dogg") - cy.get('[type="password"]').type("streamr") cy.get("button").click() cy.wait("@gqlfetchUserQuery") cy.get(':nth-child(1) > :nth-child(3) > .recommendee-card-container > .clickable-poster > .poster-img').click() @@ -1022,8 +1184,6 @@ describe('Testing Search Page Header, Nav Bar, and Page Name', () => { fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') @@ -1074,8 +1234,6 @@ describe('Testing Search Page With Show Results', () => { fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') @@ -1140,8 +1298,6 @@ describe('Testing Search Page With No Show Results', () => { fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') @@ -1209,8 +1365,6 @@ describe('Testing Search Page Navigating to Detail View, Home View, and Watch Li fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') @@ -1271,8 +1425,6 @@ describe("Search View (bad response)", () => { }) cy.visit("http://localhost:3000/") cy.wait("@gqlusersQuery") - cy.get('[type="text"]').type("snoop_dogg") - cy.get('[type="password"]').type("streamr") cy.get("button").click() cy.wait("@gqlfetchUserQuery") cy.get('.search-input').type('spongebob') @@ -1312,8 +1464,6 @@ describe('Testing Home Page with items in Watchlist', () => { fixture: 'watchlist-currentUser.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') cy.get('#watchlist-button > p').click() @@ -1463,8 +1613,6 @@ describe('Testing Home Page with no saved shows in Watchlist', () => { fixture: 'watchlist-currentUser-no-watchlist-items.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') cy.get('#watchlist-button > p').click() diff --git a/cypress/e2e/DetailsPage_spec.cy.js b/cypress/e2e/DetailsPage_spec.cy.js index 912466d..b2e8e71 100644 --- a/cypress/e2e/DetailsPage_spec.cy.js +++ b/cypress/e2e/DetailsPage_spec.cy.js @@ -20,8 +20,6 @@ describe("Details Page", () => { }) cy.visit("http://localhost:3000/") cy.wait("@gqlusersQuery") - cy.get('[type="text"]').type("snoop_dogg") - cy.get('[type="password"]').type("streamr") cy.get("button").click() cy.wait("@gqlfetchUserQuery") cy.get(".home-container a").first().click() @@ -74,8 +72,6 @@ describe("Details Page (missing data)", () => { }) cy.visit("http://localhost:3000/") cy.wait("@gqlusersQuery") - cy.get('[type="text"]').type("snoop_dogg") - cy.get('[type="password"]').type("streamr") cy.get("button").click() cy.wait("@gqlfetchUserQuery") cy.get(".home-container a").first().click() @@ -111,8 +107,6 @@ describe("Details Page (bad response)", () => { }) cy.visit("http://localhost:3000/") cy.wait("@gqlusersQuery") - cy.get('[type="text"]').type("snoop_dogg") - cy.get('[type="password"]').type("streamr") cy.get("button").click() cy.wait("@gqlfetchUserQuery") cy.get(".home-container a").first().click() @@ -148,8 +142,6 @@ describe('Testing Details Page Navigation to Home View, Search View, and Watch L fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') diff --git a/cypress/e2e/home_view_spec.cy.js b/cypress/e2e/home_view_spec.cy.js index 994c053..00c2a99 100644 --- a/cypress/e2e/home_view_spec.cy.js +++ b/cypress/e2e/home_view_spec.cy.js @@ -10,15 +10,13 @@ describe('Testing Home Page Header, Page Name, and Nav Bar', () => { }) cy.visit('http://localhost:3000/') cy.wait('@gqlusersQuery') - cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { aliasQuery(req, 'fetchUser') req.reply({ fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') + cy.get('button').click() cy.wait('@gqlfetchUserQuery') }) @@ -51,15 +49,12 @@ describe('Testing Home Page Navigation to Detail, Search View, and Watch List Vi }) cy.visit('http://localhost:3000/') cy.wait('@gqlusersQuery') - cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { aliasQuery(req, 'fetchUser') req.reply({ fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') }) @@ -129,15 +124,12 @@ describe('Testing Home Page If Given Recommended Shows', () => { }) cy.visit('http://localhost:3000/') cy.wait('@gqlusersQuery') - cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { aliasQuery(req, 'fetchUser') req.reply({ fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') }) @@ -195,15 +187,12 @@ describe('Testing Home Page If Not Given Recommended Shows', () => { }) cy.visit('http://localhost:3000/') cy.wait('@gqlusersQuery') - cy.intercept('POST', 'https://streamr-be.herokuapp.com/graphql', (req) => { aliasQuery(req, 'fetchUser') req.reply({ fixture: 'home-view-currentUser-no-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') }) diff --git a/cypress/e2e/loading_spec.cy.js b/cypress/e2e/loading_spec.cy.js index aaa9b12..f1d7156 100644 --- a/cypress/e2e/loading_spec.cy.js +++ b/cypress/e2e/loading_spec.cy.js @@ -17,8 +17,6 @@ describe('Testing Loading Message', () => { fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') }) diff --git a/cypress/e2e/login_spec.cy.js b/cypress/e2e/login_spec.cy.js index 3992467..1f2560d 100644 --- a/cypress/e2e/login_spec.cy.js +++ b/cypress/e2e/login_spec.cy.js @@ -34,15 +34,18 @@ describe('Testing Login Page', () => { fixture: 'login-currentUser.json' }) }) + cy.get('[type="text"]').clear() + cy.get('[type="password"]').clear() cy.get('[type="text"]').type('snoop_dogg') cy.get('[type="password"]').type('streamr') + cy.get('[type="text"]').should("have.value", "snoop_dogg") + cy.get('[type="password"]').should("have.value", "streamr") cy.get('button').click() cy.wait('@gqlfetchUserQuery') }) it('Should see an invalid username/ password message if input an invalid username and click submit', () => { - cy.get('[type="text"]').type('banana') - cy.get('[type="password"]').type('streamr') + cy.get('[type="text"]').clear().type('banana') cy.get('button').click() cy.get('p').should('be.visible') @@ -50,8 +53,7 @@ describe('Testing Login Page', () => { }) it('Should see an invalid username/ password message if input an invalid password and click submit', () => { - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('banana') + cy.get('[type="password"]').clear().type('banana') cy.get('button').click() cy.get('p').should('be.visible') @@ -59,7 +61,7 @@ describe('Testing Login Page', () => { }) it('Should see an invalid username/ password message if username input is left empty and click submit', () => { - cy.get('[type="password"]').type('streamr') + cy.get('[type="text"]').clear() cy.get('button').click() cy.get('p').should('be.visible') @@ -67,7 +69,7 @@ describe('Testing Login Page', () => { }) it('Should see an invalid username/ password message if password input is left empty and click submit', () => { - cy.get('[type="text"]').type('snoop_dogg') + cy.get('[type="password"]').clear() cy.get('button').click() cy.get('p').should('be.visible') @@ -75,6 +77,8 @@ describe('Testing Login Page', () => { }) it('Should see an invalid username/ password message if password and username inputs are left empty and click submit', () => { + cy.get('[type="text"]').clear() + cy.get('[type="password"]').clear() cy.get('button').click() cy.get('p').should('be.visible') @@ -98,8 +102,6 @@ describe("Login Page (bad response)", () => { }) cy.visit("http://localhost:3000/") cy.wait("@gqlusersQuery") - cy.get('[type="text"]').type("snoop_dogg") - cy.get('[type="password"]').type("streamr") cy.get("button").click() cy.wait("@gqlfetchUserQuery") }) diff --git a/cypress/e2e/recModal_spec.cy.js b/cypress/e2e/recModal_spec.cy.js index 63d913c..6d4215a 100644 --- a/cypress/e2e/recModal_spec.cy.js +++ b/cypress/e2e/recModal_spec.cy.js @@ -1,4 +1,4 @@ -import { aliasQuery, aliasBadQuery, aliasMutation } from "../utilities/graphql-test-utils" +import { aliasQuery, aliasMutation } from "../utilities/graphql-test-utils" describe('Testing Recommendation Modal', () => { @@ -18,8 +18,6 @@ describe('Testing Recommendation Modal', () => { fixture: 'recModal-currentUser.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') cy.get('#watchlist-button > p').click() @@ -134,8 +132,6 @@ describe('Testing Recommendation Modal', () => { fixture: 'recModal-currentUser.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') @@ -186,8 +182,6 @@ describe('Testing Recommendation Modal', () => { fixture: 'recModal-currentUser.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') cy.get('#watchlist-button > p').click() @@ -241,8 +235,6 @@ describe('Testing Recommendation Modal', () => { }) cy.visit("http://localhost:3000/") cy.wait("@gqlusersQuery") - cy.get('[type="text"]').type("snoop_dogg") - cy.get('[type="password"]').type("streamr") cy.get("button").click() cy.wait("@gqlfetchUserQuery") cy.get(':nth-child(1) > :nth-child(3) > .recommendee-card-container > .clickable-poster > .poster-img').click() diff --git a/cypress/e2e/search_view_spec.cy.js b/cypress/e2e/search_view_spec.cy.js index 362c8e0..a6bc350 100644 --- a/cypress/e2e/search_view_spec.cy.js +++ b/cypress/e2e/search_view_spec.cy.js @@ -17,8 +17,6 @@ describe('Testing Search Page Header, Nav Bar, and Page Name', () => { fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') @@ -69,8 +67,6 @@ describe('Testing Search Page With Show Results', () => { fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') @@ -135,8 +131,6 @@ describe('Testing Search Page With No Show Results', () => { fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') @@ -204,8 +198,6 @@ describe('Testing Search Page Navigating to Detail View, Home View, and Watch Li fixture: 'home-view-currentUser-recommendations.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') @@ -266,8 +258,6 @@ describe("Search View (bad response)", () => { }) cy.visit("http://localhost:3000/") cy.wait("@gqlusersQuery") - cy.get('[type="text"]').type("snoop_dogg") - cy.get('[type="password"]').type("streamr") cy.get("button").click() cy.wait("@gqlfetchUserQuery") cy.get('.search-input').type('spongebob') diff --git a/cypress/e2e/watchlist_spec.cy.js b/cypress/e2e/watchlist_spec.cy.js index fd34201..3c4d35f 100644 --- a/cypress/e2e/watchlist_spec.cy.js +++ b/cypress/e2e/watchlist_spec.cy.js @@ -17,8 +17,6 @@ describe('Testing Home Page with items in Watchlist', () => { fixture: 'watchlist-currentUser.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') cy.get('#watchlist-button > p').click() @@ -168,8 +166,6 @@ describe('Testing Home Page with no saved shows in Watchlist', () => { fixture: 'watchlist-currentUser-no-watchlist-items.json' }) }) - cy.get('[type="text"]').type('snoop_dogg') - cy.get('[type="password"]').type('streamr') cy.get('button').click() cy.wait('@gqlfetchUserQuery') cy.get('#watchlist-button > p').click() diff --git a/src/Components/LoginPage/LoginPage.js b/src/Components/LoginPage/LoginPage.js index 5250f23..1675a24 100644 --- a/src/Components/LoginPage/LoginPage.js +++ b/src/Components/LoginPage/LoginPage.js @@ -18,8 +18,8 @@ const LoginPage = () => { const [getUser] = useLazyQuery(GET_USER) const [allUsers, setAllUsers] = useState([]) const [signInData, setSignInData] = useState({ - username: '', - password: '', + username: 'snoop_dogg', + password: 'streamr', validSignIn: true, loggedIn: false, successUserId: null