construct-hub-webapp 0.1.298 → 0.1.302
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset-manifest.json +9 -9
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/js/11.ff498e82.chunk.js +2 -0
- package/build/static/js/11.ff498e82.chunk.js.map +1 -0
- package/build/static/js/8.691d34bd.chunk.js +2 -0
- package/build/static/js/8.691d34bd.chunk.js.map +1 -0
- package/build/static/js/9.45b9dbbd.chunk.js +2 -0
- package/build/static/js/9.45b9dbbd.chunk.js.map +1 -0
- package/build/static/js/{runtime-main.d3c4ab29.js → runtime-main.54bc95d1.js} +2 -2
- package/build/static/js/{runtime-main.d3c4ab29.js.map → runtime-main.54bc95d1.js.map} +1 -1
- package/cypress/integration/home.spec.ts +268 -17
- package/cypress/integration/search.spec.ts +176 -15
- package/cypress/support/commands.ts +8 -2
- package/cypress/tsconfig.json +5 -0
- package/cypress/types/cypress-override.d.ts +4 -3
- package/cypress.json +6 -1
- package/package.json +3 -3
- package/build/static/js/11.c3c4095a.chunk.js +0 -2
- package/build/static/js/11.c3c4095a.chunk.js.map +0 -1
- package/build/static/js/8.31a21ecd.chunk.js +0 -2
- package/build/static/js/8.31a21ecd.chunk.js.map +0 -1
- package/build/static/js/9.e8c984d8.chunk.js +0 -2
- package/build/static/js/9.e8c984d8.chunk.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","this","oldJsonpFunction","slice"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrB,EAAG,GAGAK,EAAkB,GAQtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAiB5B,GAAU6B,QAGnC,IAAIC,EAASF,EAAiB5B,GAAY,CACzCK,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B,OAAOA,GAEtC,OADAJ,EAAoB6C,EAAEC,EAAQ,IAAKA,GAC5BA,GAIR9C,EAAoB+C,EAAI,SAASgB,EAAQC,GAAY,OAAOlF,OAAOC,UAAUC,eAAeC,KAAK8E,EAAQC,IAGzGhE,EAAoBsB,EAAI,IAGxBtB,EAAoBiE,GAAK,SAASC,GAA2B,MAApBC,QAAQ3C,MAAM0C,GAAYA,GAEnE,IAAIE,EAAaC,KAAK,oCAAsCA,KAAK,qCAAuC,GACpGC,EAAmBF,EAAWjF,KAAK0E,KAAKO,GAC5CA,EAAWjF,KAAOf,EAClBgG,EAAaA,EAAWG,QACxB,IAAI,IAAI5F,EAAI,EAAGA,EAAIyF,EAAWvF,OAAQF,IAAKP,EAAqBgG,EAAWzF,IAC3E,IAAIU,EAAsBiF,EAI1B7E,I","file":"static/js/runtime-main.d3c4ab29.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t4: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"static/js/\" + ({}[chunkId]||chunkId) + \".\" + {\"0\":\"14ae620d\",\"1\":\"ba696ffb\",\"2\":\"5cef3eb0\",\"5\":\"a2fc9d7c\",\"7\":\"4fcbd19f\",\"8\":\"31a21ecd\",\"9\":\"e8c984d8\",\"10\":\"48221095\",\"11\":\"c3c4095a\",\"12\":\"cadd501c\",\"13\":\"fe1e2da5\",\"14\":\"0902aefd\",\"15\":\"50336305\",\"16\":\"2d478192\",\"17\":\"ee760920\"}[chunkId] + \".chunk.js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = this[\"webpackJsonpconstruct-hub-webapp\"] = this[\"webpackJsonpconstruct-hub-webapp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","this","oldJsonpFun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sB,EAAI,IAGxBtB,EAAoBiE,GAAK,SAASC,GAA2B,MAApBC,QAAQ3C,MAAM0C,GAAYA,GAEnE,IAAIE,EAAaC,KAAK,oCAAsCA,KAAK,qCAAuC,GACpGC,EAAmBF,EAAWjF,KAAK0E,KAAKO,GAC5CA,EAAWjF,KAAOf,EAClBgG,EAAaA,EAAWG,QACxB,IAAI,IAAI5F,EAAI,EAAGA,EAAIyF,EAAWvF,OAAQF,IAAKP,EAAqBgG,EAAWzF,IAC3E,IAAIU,EAAsBiF,EAI1B7E,I","file":"static/js/runtime-main.54bc95d1.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t4: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"static/js/\" + ({}[chunkId]||chunkId) + \".\" + {\"0\":\"14ae620d\",\"1\":\"ba696ffb\",\"2\":\"5cef3eb0\",\"5\":\"a2fc9d7c\",\"7\":\"4fcbd19f\",\"8\":\"691d34bd\",\"9\":\"45b9dbbd\",\"10\":\"48221095\",\"11\":\"ff498e82\",\"12\":\"cadd501c\",\"13\":\"fe1e2da5\",\"14\":\"0902aefd\",\"15\":\"50336305\",\"16\":\"2d478192\",\"17\":\"ee760920\"}[chunkId] + \".chunk.js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = this[\"webpackJsonpconstruct-hub-webapp\"] = this[\"webpackJsonpconstruct-hub-webapp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""}
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { checkHeaderAndFooter } from "../support/helpers";
|
|
2
2
|
import searchBar from "components/SearchBar/testIds";
|
|
3
3
|
import homeRedesign from "views/HomeRedesign/testIds";
|
|
4
|
+
import { getSearchPath } from "util/url";
|
|
5
|
+
import { CDKType, CDKTYPE_RENDER_MAP } from "constants/constructs";
|
|
6
|
+
import {
|
|
7
|
+
Language,
|
|
8
|
+
LANGUAGE_NAME_MAP,
|
|
9
|
+
TEMP_SUPPORTED_LANGUAGES,
|
|
10
|
+
} from "constants/languages";
|
|
11
|
+
import packageCard from "components/PackageCard/testIds";
|
|
12
|
+
import { CatalogSearchSort } from "api/catalog-search/constants";
|
|
4
13
|
|
|
5
14
|
describe("Home Page", () => {
|
|
6
15
|
describe("Renders expected content", () => {
|
|
7
16
|
before(() => {
|
|
8
|
-
cy.
|
|
17
|
+
cy.visitWithConfig("/", {
|
|
18
|
+
featureFlags: { homeRedesign: false },
|
|
19
|
+
});
|
|
9
20
|
});
|
|
10
21
|
|
|
11
22
|
checkHeaderAndFooter();
|
|
@@ -34,26 +45,266 @@ describe("Home Page", () => {
|
|
|
34
45
|
});
|
|
35
46
|
|
|
36
47
|
describe("Home (Redesign / WIP)", () => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
describe("Hero Section", () => {
|
|
49
|
+
beforeEach(() => {
|
|
50
|
+
cy.visitWithConfig("/", {
|
|
51
|
+
featureFlags: {
|
|
52
|
+
homeRedesign: true,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it("has heading and subtitle", () => {
|
|
58
|
+
cy.getByDataTest(homeRedesign.heroHeader).should("be.visible");
|
|
59
|
+
cy.getByDataTest(homeRedesign.heroSubtitle).should("be.visible");
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it("has search capabilities from home page", () => {
|
|
63
|
+
cy.getByDataTest(homeRedesign.page).within(() => {
|
|
64
|
+
cy.getByDataTest(searchBar.input)
|
|
65
|
+
.should("be.visible")
|
|
66
|
+
.type("@aws-cdk", { force: true });
|
|
67
|
+
cy.getByDataTest(searchBar.overlay).should("be.visible");
|
|
68
|
+
cy.getByDataTest(searchBar.suggestionsList).should("be.visible");
|
|
69
|
+
cy.getByDataTest(searchBar.suggestion).should("have.length", 5);
|
|
70
|
+
cy.getByDataTest(searchBar.input)
|
|
71
|
+
.type("{enter}")
|
|
72
|
+
.url()
|
|
73
|
+
.should("include", "/search");
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
describe("Informational Section", () => {
|
|
79
|
+
beforeEach(() => {
|
|
80
|
+
cy.visitWithConfig("/", {
|
|
81
|
+
featureFlags: {
|
|
82
|
+
homeRedesign: true,
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("has expected sections and content", () => {
|
|
88
|
+
cy.getByDataTest(homeRedesign.infoContainer)
|
|
89
|
+
.should("be.visible")
|
|
90
|
+
.within(() => {
|
|
91
|
+
cy.getByDataTest(homeRedesign.infoSection)
|
|
92
|
+
.should("have.length", 2)
|
|
93
|
+
.each((el) => {
|
|
94
|
+
cy.wrap(el).within(() => {
|
|
95
|
+
cy.getByDataTest(homeRedesign.infoSectionHeading).should(
|
|
96
|
+
"be.visible"
|
|
97
|
+
);
|
|
98
|
+
cy.getByDataTest(homeRedesign.infoSectionDescription).should(
|
|
99
|
+
"be.visible"
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it("has cdkType icon links with search urls", () => {
|
|
107
|
+
cy.getByDataTest(homeRedesign.infoSection)
|
|
108
|
+
.first()
|
|
109
|
+
.within(() => {
|
|
110
|
+
cy.getByDataTest(homeRedesign.infoSectionIcon).each((el, index) => {
|
|
111
|
+
const cdkType = [CDKType.awscdk, CDKType.cdk8s, CDKType.cdktf][
|
|
112
|
+
index
|
|
113
|
+
];
|
|
114
|
+
|
|
115
|
+
cy.wrap(el)
|
|
116
|
+
.should("have.text", CDKTYPE_RENDER_MAP[cdkType].name)
|
|
117
|
+
.should("have.attr", "href", getSearchPath({ cdkType }))
|
|
118
|
+
.find("img")
|
|
119
|
+
.should("have.attr", "src", CDKTYPE_RENDER_MAP[cdkType].imgsrc);
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
it("has language icon links with search urls", () => {
|
|
125
|
+
cy.getByDataTest(homeRedesign.infoSection)
|
|
126
|
+
.last()
|
|
127
|
+
.within(() => {
|
|
128
|
+
cy.getByDataTest(homeRedesign.infoSectionIcon).each((el, index) => {
|
|
129
|
+
const language = Object.keys(LANGUAGE_NAME_MAP).filter((l) =>
|
|
130
|
+
TEMP_SUPPORTED_LANGUAGES.has(l as Language)
|
|
131
|
+
)[index] as Language;
|
|
132
|
+
|
|
133
|
+
cy.wrap(el)
|
|
134
|
+
.should("have.text", LANGUAGE_NAME_MAP[language])
|
|
135
|
+
.should(
|
|
136
|
+
"have.attr",
|
|
137
|
+
"href",
|
|
138
|
+
getSearchPath({ languages: [language] })
|
|
139
|
+
);
|
|
140
|
+
});
|
|
141
|
+
});
|
|
42
142
|
});
|
|
43
143
|
});
|
|
44
144
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
cy.
|
|
145
|
+
describe("Featured Section", () => {
|
|
146
|
+
it("has a header and 4 cards", () => {
|
|
147
|
+
cy.visitWithConfig("/", {
|
|
148
|
+
featureFlags: {
|
|
149
|
+
homeRedesign: true,
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
cy.getByDataTest(homeRedesign.featuredContainer)
|
|
48
154
|
.should("be.visible")
|
|
49
|
-
.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
155
|
+
.within(() => {
|
|
156
|
+
cy.getByDataTest(homeRedesign.featuredHeader).should("be.visible");
|
|
157
|
+
cy.getByDataTest(homeRedesign.featuredGrid)
|
|
158
|
+
.should("be.visible")
|
|
159
|
+
.within(() => {
|
|
160
|
+
cy.getByDataTest(packageCard.wideContainer).should(
|
|
161
|
+
"have.length",
|
|
162
|
+
4
|
|
163
|
+
);
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
it("shows recently updated if no content is featured", () => {
|
|
169
|
+
cy.visitWithConfig("/", {
|
|
170
|
+
featureFlags: {
|
|
171
|
+
homeRedesign: true,
|
|
172
|
+
},
|
|
173
|
+
featuredPackages: undefined,
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
cy.getByDataTest(homeRedesign.featuredContainer).within(() => {
|
|
177
|
+
cy.getByDataTest(homeRedesign.featuredHeader).should(
|
|
178
|
+
"have.text",
|
|
179
|
+
"Recently updated"
|
|
180
|
+
);
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
it("shows featured content if config provides featured content", () => {
|
|
185
|
+
const featuredPackages = {
|
|
186
|
+
sections: [
|
|
187
|
+
{
|
|
188
|
+
name: "Featured packages",
|
|
189
|
+
showPackages: [
|
|
190
|
+
{
|
|
191
|
+
name: "@aws-cdk/aws-s3",
|
|
192
|
+
comment: "One of the most popular AWS CDK libraries!",
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: "@aws-cdk/aws-lambda",
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: "@aws-cdk/aws-iam",
|
|
199
|
+
comment:
|
|
200
|
+
"Secure your constructs with safe and manageable permission boundaries.",
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: "@aws-cdk/pipelines",
|
|
204
|
+
comment:
|
|
205
|
+
"The most recently released L3 construct library from the CDK team!",
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: "Recently updated",
|
|
211
|
+
showLastUpdated: 5,
|
|
212
|
+
},
|
|
213
|
+
],
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
cy.visitWithConfig("/", {
|
|
217
|
+
featureFlags: {
|
|
218
|
+
homeRedesign: true,
|
|
219
|
+
},
|
|
220
|
+
featuredPackages,
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
cy.getByDataTest(homeRedesign.featuredContainer).within(() => {
|
|
224
|
+
cy.getByDataTest(homeRedesign.featuredHeader).should(
|
|
225
|
+
"have.text",
|
|
226
|
+
"Featured packages"
|
|
227
|
+
);
|
|
228
|
+
|
|
229
|
+
cy.getByDataTest(packageCard.title).each((title, index) => {
|
|
230
|
+
const expectedName =
|
|
231
|
+
featuredPackages.sections[0].showPackages[index].name;
|
|
232
|
+
|
|
233
|
+
cy.wrap(title).should("have.text", expectedName);
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
describe("CDK Type Section", () => {
|
|
240
|
+
it("has heading, description, 4 tabs, 4 cards, and a see all button", () => {
|
|
241
|
+
cy.getByDataTest(homeRedesign.cdkTypeSection).within(() => {
|
|
242
|
+
cy.getByDataTest(homeRedesign.cdkTypeSectionHeading).should(
|
|
243
|
+
"be.visible"
|
|
244
|
+
);
|
|
245
|
+
cy.getByDataTest(homeRedesign.cdkTypeSectionDescription).should(
|
|
246
|
+
"be.visible"
|
|
247
|
+
);
|
|
248
|
+
|
|
249
|
+
cy.getByDataTest(homeRedesign.cdkTypeTab).should("have.length", 4);
|
|
250
|
+
|
|
251
|
+
cy.getByDataTest(homeRedesign.packageGrid)
|
|
252
|
+
.first()
|
|
253
|
+
.within(() => {
|
|
254
|
+
cy.getByDataTest(packageCard.wideContainer).should(
|
|
255
|
+
"have.length",
|
|
256
|
+
4
|
|
257
|
+
);
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
cy.getByDataTest(homeRedesign.cdkTypeSeeAllButton).should("be.visible");
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
it("reveals different cards for respective tabs", () => {
|
|
265
|
+
cy.getByDataTest(homeRedesign.cdkTypeSection).within(() => {
|
|
266
|
+
cy.getByDataTest(homeRedesign.cdkTypeTab).each((tab, index) => {
|
|
267
|
+
const cdkType: CDKType | undefined = [
|
|
268
|
+
undefined,
|
|
269
|
+
CDKType.awscdk,
|
|
270
|
+
CDKType.cdk8s,
|
|
271
|
+
CDKType.cdktf,
|
|
272
|
+
][index];
|
|
273
|
+
|
|
274
|
+
cy.wrap(tab).click();
|
|
275
|
+
|
|
276
|
+
if (cdkType) {
|
|
277
|
+
cy.wrap(tab).should("have.attr", "data-value", cdkType);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// Verify current tab's package grid is visible and others are not
|
|
281
|
+
cy.getByDataTest(homeRedesign.packageGrid).each((grid, gridIndex) => {
|
|
282
|
+
cy.wrap(grid).should(
|
|
283
|
+
index === gridIndex ? "be.visible" : "not.be.visible"
|
|
284
|
+
);
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
});
|
|
288
|
+
});
|
|
289
|
+
it("has a see all button which opens the correct search url", () => {
|
|
290
|
+
const testSeeAll = (cdkType: CDKType | undefined, index: number) => {
|
|
291
|
+
cy.getByDataTest(homeRedesign.cdkTypeTab).eq(index).click();
|
|
292
|
+
|
|
293
|
+
cy.getByDataTest(homeRedesign.cdkTypeSeeAllButton)
|
|
294
|
+
.eq(index)
|
|
295
|
+
.should(
|
|
296
|
+
"have.attr",
|
|
297
|
+
"href",
|
|
298
|
+
getSearchPath({
|
|
299
|
+
cdkType,
|
|
300
|
+
sort: cdkType ? CatalogSearchSort.DownloadsDesc : undefined,
|
|
301
|
+
})
|
|
302
|
+
);
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
[undefined, CDKType.awscdk, CDKType.cdk8s, CDKType.cdktf].forEach(
|
|
306
|
+
testSeeAll
|
|
307
|
+
);
|
|
57
308
|
});
|
|
58
309
|
});
|
|
59
310
|
});
|
|
@@ -2,16 +2,21 @@ import packageCardIds from "components/PackageCard/testIds";
|
|
|
2
2
|
import searchBar from "components/SearchBar/testIds";
|
|
3
3
|
import searchRedesign from "views/SearchRedesign/testIds";
|
|
4
4
|
import { checkHeaderAndFooter } from "../support/helpers";
|
|
5
|
+
import { getSearchPath } from "util/url";
|
|
6
|
+
import { CatalogSearchSort } from "api/catalog-search/constants";
|
|
7
|
+
import { CDKType } from "constants/constructs";
|
|
8
|
+
import { SORT_RENDER_MAP } from "views/SearchRedesign/constants";
|
|
5
9
|
|
|
6
10
|
const checkCard = (cardType: string) => {
|
|
7
11
|
cy.getByDataTest(cardType).within(() => {
|
|
8
|
-
|
|
9
|
-
cy.getByDataTest(packageCardIds.
|
|
10
|
-
cy.getByDataTest(packageCardIds.
|
|
11
|
-
cy.getByDataTest(packageCardIds.
|
|
12
|
-
cy.getByDataTest(packageCardIds.
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
cy.getByDataTest(packageCardIds.title).should("be.visible");
|
|
13
|
+
cy.getByDataTest(packageCardIds.description).should("be.visible");
|
|
14
|
+
cy.getByDataTest(packageCardIds.published).should("be.visible");
|
|
15
|
+
cy.getByDataTest(packageCardIds.author).should("be.visible");
|
|
16
|
+
cy.getByDataTest([packageCardIds.downloads, packageCardIds.version]).should(
|
|
17
|
+
"be.visible"
|
|
18
|
+
);
|
|
19
|
+
cy.getByDataTest(packageCardIds.languages).should("be.visible");
|
|
15
20
|
});
|
|
16
21
|
};
|
|
17
22
|
|
|
@@ -32,16 +37,172 @@ describe("Search (Redesign / WIP)", () => {
|
|
|
32
37
|
});
|
|
33
38
|
});
|
|
34
39
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
describe("Results Area", () => {
|
|
41
|
+
it("has expected elements for Wide Cards", () => {
|
|
42
|
+
checkCard(packageCardIds.wideContainer);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it("can go to next page", () => {
|
|
46
|
+
cy.getByDataTest(searchRedesign.nextPage)
|
|
47
|
+
.click()
|
|
48
|
+
.url()
|
|
49
|
+
.should("contain", getSearchPath({ query: "", offset: 1 }));
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it("can go to previous page", () => {
|
|
53
|
+
cy.visitWithConfig(getSearchPath({ offset: 3 }), {
|
|
54
|
+
featureFlags: { searchRedesign: true },
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
cy.getByDataTest(searchRedesign.prevPage)
|
|
58
|
+
.click()
|
|
59
|
+
.url()
|
|
60
|
+
.should("contain", getSearchPath({ query: "", offset: 2 }));
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it("can jump to a page", () => {
|
|
64
|
+
cy.visitWithConfig("/search", {
|
|
65
|
+
featureFlags: { searchRedesign: true },
|
|
66
|
+
});
|
|
38
67
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
.type("@aws-cdk{enter}")
|
|
68
|
+
cy.getByDataTest(searchRedesign.goToPage)
|
|
69
|
+
.clear()
|
|
70
|
+
.type("5{enter}")
|
|
43
71
|
.url()
|
|
44
|
-
.should("
|
|
72
|
+
.should("contain", getSearchPath({ query: "", offset: 4 }));
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
describe("Filters Panel", () => {
|
|
77
|
+
beforeEach(() => {
|
|
78
|
+
cy.visitWithConfig("/search", {
|
|
79
|
+
featureFlags: {
|
|
80
|
+
searchRedesign: true,
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const filterByCDKType = (cdkType: CDKType) => {
|
|
86
|
+
cy.getByDataTest(searchRedesign.cdkTypeFilter)
|
|
87
|
+
.find(`[data-value="${cdkType}"]`)
|
|
88
|
+
.click();
|
|
89
|
+
|
|
90
|
+
cy.url().should("contain", getSearchPath({ query: "", cdkType }));
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const filterByCDKMajors = (cdkType: CDKType, versions: number[]) => {
|
|
94
|
+
filterByCDKType(cdkType);
|
|
95
|
+
|
|
96
|
+
versions.forEach((cdkMajor) => {
|
|
97
|
+
cy.getByDataTest(searchRedesign.cdkVersionFilter)
|
|
98
|
+
.find(`[data-value="${cdkMajor}"]`)
|
|
99
|
+
.click()
|
|
100
|
+
.url()
|
|
101
|
+
.should("contain", getSearchPath({ query: "", cdkType, cdkMajor }));
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
it("has expected core filters", () => {
|
|
106
|
+
cy.getByDataTest(searchRedesign.filtersPanel)
|
|
107
|
+
.should("be.visible")
|
|
108
|
+
.within(() => {
|
|
109
|
+
[
|
|
110
|
+
searchRedesign.cdkTypeFilter,
|
|
111
|
+
searchRedesign.languagesFilter,
|
|
112
|
+
searchRedesign.authorFilter,
|
|
113
|
+
].forEach((testid) => {
|
|
114
|
+
cy.getByDataTest(testid).should("be.visible");
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
// If this test fails, it may be an indication of data failure in catalog.json
|
|
120
|
+
it("can filter by CDK Type", () => {
|
|
121
|
+
cy.getByDataTest(searchRedesign.filtersPanel).within(() => {
|
|
122
|
+
[CDKType.awscdk, CDKType.cdk8s, CDKType.cdktf].forEach(filterByCDKType);
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
// Only applies to CDKTypes with more than one version
|
|
127
|
+
it("can filter by CDK Version for each CDK Type", () => {
|
|
128
|
+
cy.getByDataTest(searchRedesign.filtersPanel).within(() => {
|
|
129
|
+
filterByCDKMajors(CDKType.awscdk, [0, 1, 2]);
|
|
130
|
+
filterByCDKMajors(CDKType.cdk8s, [0, 1]);
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
it("can filter by languages", () => {
|
|
135
|
+
cy.getByDataTest(searchRedesign.languagesFilter).within(() => {
|
|
136
|
+
const languages = [];
|
|
137
|
+
|
|
138
|
+
cy.getByDataTest(searchRedesign.filterItem).each((el) => {
|
|
139
|
+
const lang = el.attr("data-value");
|
|
140
|
+
|
|
141
|
+
languages.push(lang);
|
|
142
|
+
|
|
143
|
+
cy.wrap(el)
|
|
144
|
+
.click()
|
|
145
|
+
.url()
|
|
146
|
+
.should("contain", getSearchPath({ query: "", languages }));
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
// Now deselect each language
|
|
150
|
+
cy.getByDataTest(searchRedesign.filterItem).each((el) => {
|
|
151
|
+
languages.shift();
|
|
152
|
+
|
|
153
|
+
cy.wrap(el)
|
|
154
|
+
.click()
|
|
155
|
+
.url()
|
|
156
|
+
.should("contain", getSearchPath({ query: "", languages }));
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
describe("Sorting", () => {
|
|
163
|
+
it("supports re-ordering of results", () => {
|
|
164
|
+
const sorts = [undefined, ...Object.values(CatalogSearchSort)];
|
|
165
|
+
|
|
166
|
+
sorts.forEach((sort) => {
|
|
167
|
+
cy.getByDataTest(searchRedesign.sortButton)
|
|
168
|
+
.click()
|
|
169
|
+
.getByDataTest(searchRedesign.sortDropdown)
|
|
170
|
+
.should("be.visible")
|
|
171
|
+
.within(() => {
|
|
172
|
+
// Not ideal, but for some reason .click() doesn't actually trigger the onClick for the buttons in cypress
|
|
173
|
+
if (sort === undefined) {
|
|
174
|
+
cy.getByDataTest(searchRedesign.sortItem).first().invoke("click");
|
|
175
|
+
} else {
|
|
176
|
+
cy.get(`[data-value="${sort}"]`).invoke("click");
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
cy.url().should(
|
|
181
|
+
"contain",
|
|
182
|
+
sort ? getSearchPath({ query: "", sort }) : "/search"
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
cy.getByDataTest(searchRedesign.sortButton).should(
|
|
186
|
+
"contain",
|
|
187
|
+
sort ? SORT_RENDER_MAP[sort] : "Relevance"
|
|
188
|
+
);
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
describe("Querying", () => {
|
|
194
|
+
it("supports searching by a query", () => {
|
|
195
|
+
cy.getByDataTest(searchRedesign.page).within(() => {
|
|
196
|
+
cy.getByDataTest(searchBar.input)
|
|
197
|
+
.type("@aws-cdk{enter}")
|
|
198
|
+
.url()
|
|
199
|
+
.should("include", `/search?q=${encodeURIComponent("@aws-cdk")}`);
|
|
200
|
+
|
|
201
|
+
cy.getByDataTest(searchRedesign.searchDetails).should(
|
|
202
|
+
"contain",
|
|
203
|
+
"@aws-cdk"
|
|
204
|
+
);
|
|
205
|
+
});
|
|
45
206
|
});
|
|
46
207
|
});
|
|
47
208
|
});
|
|
@@ -5,6 +5,7 @@ import catalogCard from "components/CatalogCard/testIds";
|
|
|
5
5
|
import { Config } from "api/config";
|
|
6
6
|
|
|
7
7
|
Cypress.Commands.add("visitWithConfig", (url: string, config: Config) => {
|
|
8
|
+
cy.clearLocalStorage();
|
|
8
9
|
cy.visit(url, {
|
|
9
10
|
onBeforeLoad: (win) => {
|
|
10
11
|
win.configOverride = config;
|
|
@@ -12,8 +13,13 @@ Cypress.Commands.add("visitWithConfig", (url: string, config: Config) => {
|
|
|
12
13
|
});
|
|
13
14
|
});
|
|
14
15
|
|
|
15
|
-
Cypress.Commands.add("getByDataTest", (dataTest, options) =>
|
|
16
|
-
cy.get(
|
|
16
|
+
Cypress.Commands.add("getByDataTest", (dataTest: string | string[], options) =>
|
|
17
|
+
cy.get(
|
|
18
|
+
(typeof dataTest === "string" ? [dataTest] : dataTest)
|
|
19
|
+
.map((d) => `[data-testid="${d}"]`)
|
|
20
|
+
.join(", "),
|
|
21
|
+
options
|
|
22
|
+
)
|
|
17
23
|
);
|
|
18
24
|
|
|
19
25
|
Cypress.Commands.add("checkHeaderVisibility", () => {
|
package/cypress/tsconfig.json
CHANGED
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
declare namespace Cypress {
|
|
6
6
|
interface Chainable {
|
|
7
7
|
/**
|
|
8
|
-
* Custom command to select DOM element by data-testid attribute
|
|
9
|
-
* @example cy.getByDataTest("header")
|
|
8
|
+
* Custom command to select DOM element by data-testid attribute or multiple data-testid attributes (treated as an OR)
|
|
9
|
+
* @example cy.getByDataTest("header");
|
|
10
|
+
* @example cy.getByDataTest(["header", "footer"]);
|
|
10
11
|
*/
|
|
11
12
|
getByDataTest(
|
|
12
|
-
testId: string,
|
|
13
|
+
testId: string | string[],
|
|
13
14
|
options?: Parameters<Chainable["get"]>[1]
|
|
14
15
|
): Chainable;
|
|
15
16
|
/**
|