diff --git a/merch-dropper/.nyc_output/out.json b/merch-dropper/.nyc_output/out.json index e41c4abc..69601085 100644 --- a/merch-dropper/.nyc_output/out.json +++ b/merch-dropper/.nyc_output/out.json @@ -1,3 +1,6 @@ +<<<<<<< HEAD +{} +======= { "/Users/lturner/Lambda/Labs/Merch-Dropper-fe/merch-dropper/src/components/Auth/Auth.js": { "path": "/Users/lturner/Lambda/Labs/Merch-Dropper-fe/merch-dropper/src/components/Auth/Auth.js", @@ -6744,6 +6747,893 @@ } } }, + "fnMap": { + "0": { + "name": "(anonymous_0)", + "decl": { + "start": { + "line": 47, + "column": 19 + }, + "end": { + "line": 47, + "column": 20 + } + }, + "loc": { + "start": { + "line": 53, + "column": 6 + }, + "end": { + "line": 106, + "column": 1 + } + }, + "line": 53 + }, + "1": { + "name": "(anonymous_1)", + "decl": { + "start": { + "line": 59, + "column": 17 + }, + "end": { + "line": 59, + "column": 18 + } + }, + "loc": { + "start": { + "line": 59, + "column": 23 + }, + "end": { + "line": 61, + "column": 9 + } + }, + "line": 59 + }, + "2": { + "name": "(anonymous_2)", + "decl": { + "start": { + "line": 67, + "column": 17 + }, + "end": { + "line": 67, + "column": 18 + } + }, + "loc": { + "start": { + "line": 67, + "column": 23 + }, + "end": { + "line": 69, + "column": 9 + } + }, + "line": 67 + }, + "3": { + "name": "(anonymous_3)", + "decl": { + "start": { + "line": 75, + "column": 26 + }, + "end": { + "line": 75, + "column": 27 + } + }, + "loc": { + "start": { + "line": 75, + "column": 32 + }, + "end": { + "line": 75, + "column": 52 + } + }, + "end": { + "line": 40, + "column": 66 + } + }, + "15": { + "start": { + "line": 41, + "column": 20 + }, + "end": { + "line": 50, + "column": 22 + } + }, + "16": { + "start": { + "line": 43, + "column": 24 + }, + "end": { + "line": 43, + "column": 62 + } + }, + "17": { + "start": { + "line": 44, + "column": 24 + }, + "end": { + "line": 44, + "column": 82 + } + }, + "18": { + "start": { + "line": 45, + "column": 24 + }, + "end": { + "line": 45, + "column": 64 + } + }, + "19": { + "start": { + "line": 46, + "column": 24 + }, + "end": { + "line": 46, + "column": 53 + } + }, + "20": { + "start": { + "line": 49, + "column": 24 + }, + "end": { + "line": 49, + "column": 60 + } + }, + "21": { + "start": { + "line": 53, + "column": 20 + }, + "end": { + "line": 53, + "column": 56 + } + }, + "22": { + "start": { + "line": 58, + "column": 16 + }, + "end": { + "line": 58, + "column": 26 + } + }, + "23": { + "start": { + "line": 59, + "column": 16 + }, + "end": { + "line": 59, + "column": 34 + } + }, + "24": { + "start": { + "line": 62, + "column": 12 + }, + "end": { + "line": 78, + "column": 14 + } + }, + "25": { + "start": { + "line": 64, + "column": 16 + }, + "end": { + "line": 64, + "column": 62 + } + }, + "26": { + "start": { + "line": 65, + "column": 16 + }, + "end": { + "line": 74, + "column": 18 + } + }, + "27": { + "start": { + "line": 67, + "column": 20 + }, + "end": { + "line": 67, + "column": 58 + } + }, + "28": { + "start": { + "line": 68, + "column": 20 + }, + "end": { + "line": 68, + "column": 78 + } + }, + "29": { + "start": { + "line": 69, + "column": 20 + }, + "end": { + "line": 69, + "column": 60 + } + }, + "30": { + "start": { + "line": 70, + "column": 20 + }, + "end": { + "line": 70, + "column": 46 + } + }, + "31": { + "start": { + "line": 73, + "column": 20 + }, + "end": { + "line": 73, + "column": 56 + } + }, + "32": { + "start": { + "line": 77, + "column": 16 + }, + "end": { + "line": 77, + "column": 52 + } + }, + "33": { + "start": { + "line": 82, + "column": 4 + }, + "end": { + "line": 82, + "column": 28 + } + }, + "34": { + "start": { + "line": 83, + "column": 4 + }, + "end": { + "line": 109, + "column": 5 + } + } + }, + "fnMap": { + "0": { + "name": "(anonymous_0)", + "decl": { + "start": { + "line": 14, + "column": 16 + }, + "end": { + "line": 14, + "column": 17 + } + }, + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 110, + "column": 1 + } + }, + "line": 14 + }, + "1": { + "name": "(anonymous_1)", + "decl": { + "start": { + "line": 22, + "column": 23 + }, + "end": { + "line": 22, + "column": 24 + } + }, + "loc": { + "start": { + "line": 22, + "column": 27 + }, + "end": { + "line": 24, + "column": 5 + } + }, + "line": 22 + }, + "2": { + "name": "(anonymous_2)", + "decl": { + "start": { + "line": 26, + "column": 26 + }, + "end": { + "line": 26, + "column": 27 + } + }, + "loc": { + "start": { + "line": 26, + "column": 30 + }, + "end": { + "line": 31, + "column": 5 + } + }, + "line": 26 + }, + "3": { + "name": "(anonymous_3)", + "decl": { + "start": { + "line": 33, + "column": 21 + }, + "end": { + "line": 33, + "column": 22 + } + }, + "loc": { + "start": { + "line": 33, + "column": 26 + }, + "end": { + "line": 81, + "column": 5 + } + }, + "line": 33 + }, + "4": { + "name": "(anonymous_4)", + "decl": { + "start": { + "line": 37, + "column": 19 + }, + "end": { + "line": 37, + "column": 20 + } + }, + "loc": { + "start": { + "line": 37, + "column": 26 + }, + "end": { + "line": 55, + "column": 13 + } + }, + "line": 37 + }, + "5": { + "name": "(anonymous_5)", + "decl": { + "start": { + "line": 39, + "column": 22 + }, + "end": { + "line": 39, + "column": 23 + } + }, + "loc": { + "start": { + "line": 39, + "column": 28 + }, + "end": { + "line": 51, + "column": 17 + } + }, + "line": 39 + }, + "6": { + "name": "(anonymous_6)", + "decl": { + "start": { + "line": 42, + "column": 26 + }, + "end": { + "line": 42, + "column": 27 + } + }, + "loc": { + "start": { + "line": 42, + "column": 32 + }, + "end": { + "line": 47, + "column": 21 + } + }, + "line": 42 + }, + "7": { + "name": "(anonymous_7)", + "decl": { + "start": { + "line": 48, + "column": 27 + }, + "end": { + "line": 48, + "column": 28 + } + }, + "loc": { + "start": { + "line": 48, + "column": 33 + }, + "end": { + "line": 50, + "column": 21 + } + }, + "line": 48 + }, + "8": { + "name": "(anonymous_8)", + "decl": { + "start": { + "line": 52, + "column": 23 + }, + "end": { + "line": 52, + "column": 24 + } + }, + "loc": { + "start": { + "line": 52, + "column": 29 + }, + "end": { + "line": 54, + "column": 17 + } + }, + "line": 52 + }, + "9": { + "name": "(anonymous_9)", + "decl": { + "start": { + "line": 57, + "column": 19 + }, + "end": { + "line": 57, + "column": 20 + } + }, + "loc": { + "start": { + "line": 57, + "column": 24 + }, + "end": { + "line": 60, + "column": 13 + } + }, + "line": 57 + }, + "10": { + "name": "(anonymous_10)", + "decl": { + "start": { + "line": 63, + "column": 18 + }, + "end": { + "line": 63, + "column": 19 + } + }, + "loc": { + "start": { + "line": 63, + "column": 24 + }, + "end": { + "line": 75, + "column": 13 + } + }, + "line": 63 + }, + "11": { + "name": "(anonymous_11)", + "decl": { + "start": { + "line": 66, + "column": 22 + }, + "end": { + "line": 66, + "column": 23 + } + }, + "loc": { + "start": { + "line": 66, + "column": 28 + }, + "end": { + "line": 71, + "column": 17 + } + }, + "line": 66 + }, + "12": { + "name": "(anonymous_12)", + "decl": { + "start": { + "line": 72, + "column": 23 + }, + "end": { + "line": 72, + "column": 24 + } + }, + "loc": { + "start": { + "line": 72, + "column": 29 + }, + "end": { + "line": 74, + "column": 17 + } + }, + "line": 72 + }, + "13": { + "name": "(anonymous_13)", + "decl": { + "start": { + "line": 76, + "column": 19 + }, + "end": { + "line": 76, + "column": 20 + } + }, + "loc": { + "start": { + "line": 76, + "column": 25 + }, + "end": { + "line": 78, + "column": 13 + } + }, + "line": 76 + } + }, + "branchMap": { + "0": { + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 79, + "column": 9 + } + }, + "type": "if", + "locations": [ + { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 79, + "column": 9 + } + }, + { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 79, + "column": 9 + } + } + ], + "line": 35 + }, + "1": { + "loc": { + "start": { + "line": 86, + "column": 13 + }, + "end": { + "line": 107, + "column": 26 + } + }, + "type": "cond-expr", + "locations": [ + { + "start": { + "line": 87, + "column": 16 + }, + "end": { + "line": 96, + "column": 26 + } + }, + { + "start": { + "line": 98, + "column": 16 + }, + "end": { + "line": 107, + "column": 26 + } + } + ], + "line": 86 + } + }, + "s": { + "0": 8, + "1": 8, + "2": 97, + "3": 97, + "4": 97, + "5": 97, + "6": 4, + "7": 97, + "8": 88, + "9": 97, + "10": 4, + "11": 4, + "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": 4, + "25": 4, + "26": 4, + "27": 4, + "28": 4, + "29": 4, + "30": 4, + "31": 0, + "32": 0, + "33": 97, + "34": 97 + }, + "f": { + "0": 97, + "1": 4, + "2": 88, + "3": 4, + "4": 0, + "5": 0, + "6": 0, + "7": 0, + "8": 0, + "9": 0, + "10": 4, + "11": 4, + "12": 0, + "13": 0 + }, + "b": { + "0": [ + 0, + 4 + ], + "1": [ + 5, + 92 + ] + }, + "_coverageSchema": "43e27e138ebf9cfc5966b082cf9a028302ed4184", + "hash": "77b23d9d75f778ad07eae51f83592eac920650bf" + }, + "C:\\Users\\zakad\\sites\\Merch-Dropper-fe\\merch-dropper\\src\\components\\Component-Styles\\Navbar-styles.js": { + "path": "C:\\Users\\zakad\\sites\\Merch-Dropper-fe\\merch-dropper\\src\\components\\Component-Styles\\Navbar-styles.js", + "statementMap": { + "0": { + "start": { + "line": 5, + "column": 28 + }, + "end": { + "line": 155, + "column": 1 + } + } + }, + "fnMap": {}, + "branchMap": {}, + "s": { + "0": 8 + }, + "f": {}, + "b": {}, + "_coverageSchema": "43e27e138ebf9cfc5966b082cf9a028302ed4184", + "hash": "a5a8bc7f660aee9e1ddd5c05b7bc2af1427e1211" + }, + "C:\\Users\\zakad\\sites\\Merch-Dropper-fe\\merch-dropper\\src\\components\\SideDrawer.js": { + "path": "C:\\Users\\zakad\\sites\\Merch-Dropper-fe\\merch-dropper\\src\\components\\SideDrawer.js", + "statementMap": { + "0": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 19, + "column": 1 + } + }, + "1": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 37, + "column": 1 + } + }, + "2": { + "start": { + "line": 38, + "column": 16 + }, + "end": { + "line": 45, + "column": 1 + } + }, + "3": { + "start": { + "line": 47, + "column": 19 + }, + "end": { + "line": 106, + "column": 1 + } + }, + "4": { + "start": { + "line": 54, + "column": 2 + }, + "end": { + "line": 105, + "column": 4 + } + }, + "5": { + "start": { + "line": 60, + "column": 10 + }, + "end": { + "line": 60, + "column": 39 + } + }, + "6": { + "start": { + "line": 68, + "column": 10 + }, + "end": { + "line": 68, + "column": 36 + } + }, + "7": { + "start": { + "line": 75, + "column": 32 + }, + "end": { + "line": 75, + "column": 52 + } + } + }, "fnMap": { "0": { "name": "(anonymous_0)", @@ -8781,7 +9671,7 @@ "column": 5 } }, - "type": "if", + "type": "cond-expr", "locations": [ { "start": { @@ -9665,6 +10555,54 @@ }, "line": 8 }, + "2": { + "name": "(anonymous_2)", + "decl": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 16 + } + }, + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 46, + "column": 1 + } + }, + "line": 10 + }, + "3": { + "name": "(anonymous_3)", + "decl": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 21 + } + }, + "loc": { + "start": { + "line": 8, + "column": 26 + }, + "end": { + "line": 13, + "column": 3 + } + }, + "line": 8 + }, "2": { "name": "(anonymous_2)", "decl": { @@ -12163,33 +13101,34 @@ "42": 7 }, "f": { - "0": 0, - "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 + "0": 8, + "1": 8 }, - "b": { - "0": [ - 0, - 0 - ], - "1": [ - 0, - 0 - ] + "b": {}, + "_coverageSchema": "43e27e138ebf9cfc5966b082cf9a028302ed4184", + "hash": "dff1f66e7e513439dcfb4aafd45037ba9d1fcd5a" + }, + "C:\\Users\\zakad\\sites\\Merch-Dropper-fe\\merch-dropper\\src\\components\\Component-Styles\\Home.js": { + "path": "C:\\Users\\zakad\\sites\\Merch-Dropper-fe\\merch-dropper\\src\\components\\Component-Styles\\Home.js", + "statementMap": { + "0": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 27, + "column": 2 + } + } + }, + "fnMap": {}, + "branchMap": {}, + "s": { + "0": 8 }, + "f": {}, + "b": {}, "_coverageSchema": "43e27e138ebf9cfc5966b082cf9a028302ed4184", "hash": "e6d5e7da295152473599f45312039c6ac4d7bd86" }, @@ -15782,247 +16721,443 @@ "column": 28 }, "end": { +<<<<<<< HEAD + "line": 8, +======= "line": 9, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "1": { "start": { +<<<<<<< HEAD + "line": 10, + "column": 25 + }, + "end": { + "line": 13, +======= "line": 11, "column": 25 }, "end": { "line": 15, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "2": { "start": { +<<<<<<< HEAD + "line": 15, + "column": 33 + }, + "end": { + "line": 21, +======= "line": 17, "column": 33 }, "end": { "line": 25, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "3": { "start": { +<<<<<<< HEAD + "line": 23, + "column": 26 + }, + "end": { + "line": 34, +======= "line": 27, "column": 26 }, "end": { "line": 39, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "4": { "start": { +<<<<<<< HEAD + "line": 36, + "column": 27 + }, + "end": { + "line": 45, +======= "line": 41, "column": 27 }, "end": { "line": 56, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "5": { "start": { +<<<<<<< HEAD + "line": 47, + "column": 31 + }, + "end": { + "line": 52, +======= "line": 58, "column": 31 }, "end": { "line": 65, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "6": { "start": { +<<<<<<< HEAD + "line": 54, + "column": 37 + }, + "end": { + "line": 58, +======= "line": 67, "column": 37 }, "end": { "line": 73, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "7": { "start": { +<<<<<<< HEAD + "line": 60, + "column": 32 + }, + "end": { + "line": 64, +======= "line": 75, "column": 32 }, "end": { "line": 81, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "8": { "start": { +<<<<<<< HEAD + "line": 66, + "column": 24 + }, + "end": { + "line": 76, +======= "line": 83, "column": 25 }, "end": { "line": 95, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "9": { "start": { +<<<<<<< HEAD + "line": 78, + "column": 33 + }, + "end": { + "line": 88, +======= "line": 97, "column": 33 }, "end": { "line": 109, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "10": { "start": { +<<<<<<< HEAD + "line": 90, + "column": 28 + }, + "end": { + "line": 101, +======= "line": 111, "column": 28 }, "end": { "line": 124, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "11": { "start": { +<<<<<<< HEAD + "line": 103, + "column": 28 + }, + "end": { + "line": 114, +======= "line": 126, "column": 28 }, "end": { "line": 138, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "12": { "start": { +<<<<<<< HEAD + "line": 116, + "column": 29 + }, + "end": { + "line": 127, +======= "line": 140, "column": 29 }, "end": { "line": 153, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "13": { "start": { +<<<<<<< HEAD + "line": 129, + "column": 23 + }, + "end": { + "line": 135, +======= "line": 155, "column": 23 }, "end": { "line": 162, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "14": { "start": { +<<<<<<< HEAD + "line": 137, + "column": 35 + }, + "end": { + "line": 142, +======= "line": 164, "column": 35 }, "end": { "line": 171, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "15": { "start": { +<<<<<<< HEAD + "line": 144, + "column": 28 + }, + "end": { + "line": 155, +======= "line": 174, "column": 28 }, "end": { "line": 187, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "16": { "start": { +<<<<<<< HEAD + "line": 157, + "column": 37 + }, + "end": { + "line": 167, +======= "line": 189, "column": 37 }, "end": { "line": 198, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "17": { "start": { +<<<<<<< HEAD + "line": 169, + "column": 40 + }, + "end": { + "line": 173, +======= "line": 200, "column": 41 }, "end": { "line": 207, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "18": { "start": { +<<<<<<< HEAD + "line": 175, + "column": 37 + }, + "end": { + "line": 179, +======= "line": 209, "column": 37 }, "end": { "line": 213, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "19": { "start": { +<<<<<<< HEAD + "line": 181, + "column": 35 + }, + "end": { + "line": 188, +======= "line": 215, "column": 35 }, "end": { "line": 223, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "20": { "start": { +<<<<<<< HEAD + "line": 190, + "column": 32 + }, + "end": { + "line": 202, +======= "line": 225, "column": 32 }, "end": { "line": 235, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "21": { "start": { +<<<<<<< HEAD + "line": 204, + "column": 39 + }, + "end": { + "line": 208, +======= "line": 237, "column": 39 }, "end": { "line": 243, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "22": { "start": { +<<<<<<< HEAD + "line": 210, + "column": 31 + }, + "end": { + "line": 220, +======= "line": 246, "column": 31 }, "end": { "line": 258, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "23": { "start": { +<<<<<<< HEAD + "line": 222, + "column": 30 + }, + "end": { + "line": 232, +======= "line": 260, "column": 30 }, "end": { "line": 272, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } }, "24": { "start": { +<<<<<<< HEAD + "line": 234, + "column": 28 + }, + "end": { + "line": 247, +======= "line": 274, "column": 28 }, "end": { "line": 287, +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "column": 1 } } @@ -17076,7 +18211,7 @@ "column": 2 } }, - "1": { + "2": { "start": { "line": 39, "column": 17 @@ -17086,7 +18221,7 @@ "column": 1 } }, - "2": { + "7": { "start": { "line": 41, "column": 2 @@ -17096,7 +18231,7 @@ "column": 3 } }, - "3": { + "8": { "start": { "line": 42, "column": 4 @@ -17106,7 +18241,7 @@ "column": 60 } }, - "4": { + "9": { "start": { "line": 44, "column": 4 @@ -19536,7 +20671,7 @@ ], "line": 38 }, - "1": { + "3": { "loc": { "start": { "line": 45, @@ -19608,7 +20743,11 @@ ], "line": 65 }, +<<<<<<< HEAD + "4": { +======= "3": { +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "loc": { "start": { "line": 87, @@ -19619,7 +20758,7 @@ "column": 3 } }, - "type": "if", + "type": "binary-expr", "locations": [ { "start": { @@ -19644,7 +20783,11 @@ ], "line": 87 }, +<<<<<<< HEAD + "5": { +======= "4": { +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "loc": { "start": { "line": 91, @@ -19680,7 +20823,11 @@ ], "line": 91 }, +<<<<<<< HEAD + "6": { +======= "5": { +>>>>>>> aed3a881e847fc829f00d05b7419fe8a81306e9a "loc": { "start": { "line": 123, @@ -24463,4 +25610,5 @@ "_coverageSchema": "43e27e138ebf9cfc5966b082cf9a028302ed4184", "hash": "ed0984045589903599a5778f923a75d914d93d4c" } -} \ No newline at end of file +} +>>>>>>> 977bfb9da416b5f5660d1b60026929c29d73c946 diff --git a/merch-dropper/cypress/integration/tests/create-store.spec.js b/merch-dropper/cypress/integration/tests/create-store.spec.js new file mode 100644 index 00000000..c04a9d60 --- /dev/null +++ b/merch-dropper/cypress/integration/tests/create-store.spec.js @@ -0,0 +1,8 @@ +import { cyan } from "@material-ui/core/colors" + +context ('creates store scenario', () => { + it ('creates store', () => { +cy.visit('http://localhost:3000/') +cy.get('#root > div > div:nth-child(1) > div.DesktopWrapper > nav > span').click() + }) +}) \ No newline at end of file diff --git a/merch-dropper/cypress/integration/tests/sample.spec.js b/merch-dropper/cypress/integration/tests/sample.spec.js new file mode 100644 index 00000000..fd215132 --- /dev/null +++ b/merch-dropper/cypress/integration/tests/sample.spec.js @@ -0,0 +1,45 @@ +describe("My First Test", function () { + it("sanity check", function () { + expect(true).to.equal(true); + }); +}); + +describe("Landing page", () => { + it("contains a Dev Auth button", () => { + cy.visit("/"); + cy.contains("Dev Auth"); + }); + it("contains a Prod Nav button", () => { + cy.contains("Prod Nav"); + }); + it("contains an FAQ", () => { + cy.contains("Frequently Asked Questions"); + }); +}); + +describe("Dev Auth path", () => { + it("redirects to register page", () => { + cy.contains("Dev Auth").click(); + cy.url().should("include", "/develop"); + }); + it("goes to dashboard", () => { + cy.contains("Toggle Login/Register").click(); + cy.get("input[name=email]").type("bah@gmail.com"); + cy.get("input[name=password]").type("datking9@"); + cy.get("button[type=submit]").click(); + cy.url().should("include", "/dashboard"); + }); + describe("dashboard", () => { + it("contains the right nav links w/out store", () => { + cy.contains('Your Store').should('not.be.visible') + cy.contains("Dashboard") + cy.contains("Logout") + }) + it("contains inventory section", () => { + cy.contains("Inventory") + }) + it("contains storefront settings w/ incomplete status", () => { + cy.contains("Status:") + }) + }) +}); diff --git a/merch-dropper/src/components/BuyerNavBar.js b/merch-dropper/src/components/BuyerNavBar.js new file mode 100644 index 00000000..9730d162 --- /dev/null +++ b/merch-dropper/src/components/BuyerNavBar.js @@ -0,0 +1,260 @@ +import React, { useState, useEffect } from "react"; +import { connect, useDispatch } from "react-redux"; +import { withRouter, Link } from "react-router-dom"; +import { axiosWithAuth } from "../utils/axiosWithAuth"; +// components +import CartIcon from "./Cart/CartIcon.js"; +import CartDropDown from "./Cart/CartDropDown"; +import Button from '@material-ui/core/Button'; +import Menu from '@material-ui/core/Menu'; // menu needs the state in the nav until a smarter dev comes along that can effectively modularize(is that a word? 🤔) this. +import MenuItem from '@material-ui/core/MenuItem'; +import MenuIcon from '@material-ui/icons/Menu'; // Icon could likely be broken down more modularly +// styles +import { useStyles } from "./Component-Styles/NavBar.js"; +// auth0 client +import { useAuth0 } from "./Auth/Auth"; +// logo +import logo from "../assets/merchdropper-logo.png"; + +const NavBar = ({ hidden, history, location }) => { + const classes = useStyles(); + const dispatch = useDispatch(); + const { loginWithRedirect, logout } = useAuth0(); + const { pathname } = location; + const domain_name = localStorage.getItem("domain_name"); + const [store_name, setStore_name] = useState(); + + const [anchorEl, setAnchorEl] = useState(null); // new mobile menu + const [inDevelop, setInDevelop] = useState(false); + + const logoutWithRedirect = () => { + localStorage.removeItem("profile"); + localStorage.removeItem("token"); + localStorage.removeItem("id"); + localStorage.removeItem("store_name"); + localStorage.removeItem("storeID"); + localStorage.removeItem("fromSettings"); + logout({ + returnTo: window.location.origin, + }); + }; + if (localStorage.getItem("profile")) { + + const userID = JSON.parse(localStorage.getItem("profile")).id; + axiosWithAuth() + .get(`/api/stores/user/${userID}`) + .then((res) => { + if (res.status === 200) { + localStorage.setItem("store_name", res.data.store_name); + setStore_name(localStorage.getItem("store_name")); + } + }) + .catch((err) => { + console.log(err); + }); + } + useEffect(() => { + + if (process.env.REACT_APP_BASE_URL === "development") { + setInDevelop(true); + } + }, []); + // force closes cart dropdown if nav isn't a storefront + useEffect(() => { + if (pathname !== domain_name) { + dispatch(resetCart()); + } + }, [pathname]); + + let url = ""; + + if (process.env.REACT_APP_BASE_URL === "development") { + url = "http://localhost:3000/redirect"; + } else { + url = "https://merchdropper.store/redirect"; + } + + const customLogin = () => { + loginWithRedirect({ + redirect_uri: url, + }); + }; + + const customSignup = () => { + loginWithRedirect({ + redirect_uri: url, + signup: true, + }); + }; + + const homepageRedirect = () => { + history.push("/"); + }; + + const handleClick = (event) => { + setAnchorEl(event.currentTarget); + }; + + const handleClose = () => { + setAnchorEl(null); + }; + + const Nav = () => { + if (!!localStorage.getItem("profile")) { + return ( + + ); + } else if (domain_name === pathname.substr(1).split("/")[0]) { + return ( + + ); + } else { + return ( + + ); + } + }; + + return ( +
+ {/* */} +
+
+ merch-dropper logo +
+
+ + + {localStorage.getItem("profile") ? + + Logout + {/* My account // if CRUD profiles added */} + Close + + : + + Login + SignUp + {inDevelop ? + + Dev Auth + + : null + } + Close + + } + +
+ {hidden ? null : } +
+ +
+
+ merch-dropper logo +
+ +
+
+ ); + }; + + const mapStateToProps = (state) => ({ + hidden: state.CartReducer.hidden, + }); + + export default withRouter(connect(mapStateToProps, resetCart)(NavBar)); \ No newline at end of file diff --git a/merch-dropper/src/components/NavBar.js b/merch-dropper/src/components/NavBar.js index 858845ab..ebb9ca3c 100644 --- a/merch-dropper/src/components/NavBar.js +++ b/merch-dropper/src/components/NavBar.js @@ -151,7 +151,7 @@ const NavBar = ({ hidden, history, location }) => { {domain_name} - + ); } else {