diff --git a/webui/react/package-lock.json b/webui/react/package-lock.json index c69a49e6e4b..d9e4dfa98c5 100644 --- a/webui/react/package-lock.json +++ b/webui/react/package-lock.json @@ -18,7 +18,7 @@ "fp-ts": "^2.16.5", "fuse.js": "^7.0.0", "hermes-parallel-coordinates": "^0.6.17", - "hew": "npm:@hpe.com/hew@^0.6.44", + "hew": "npm:@hpe.com/hew@^0.6.45", "humanize-duration": "^3.28.0", "immutable": "^4.3.0", "io-ts": "^2.2.21", @@ -627,91 +627,44 @@ "@lezer/common": "^1.0.0" } }, - "node_modules/@codemirror/lang-angular": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@codemirror/lang-angular/-/lang-angular-0.1.3.tgz", - "integrity": "sha512-xgeWGJQQl1LyStvndWtruUvb4SnBZDAu/gvFH/ZU+c0W25tQR8e5hq7WTwiIY2dNxnf+49mRiGI/9yxIwB6f5w==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-html": "^6.0.0", - "@codemirror/lang-javascript": "^6.1.2", - "@codemirror/language": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.3.3" - } - }, - "node_modules/@codemirror/lang-cpp": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-cpp/-/lang-cpp-6.0.2.tgz", - "integrity": "sha512-6oYEYUKHvrnacXxWxYa6t4puTlbN3dgV662BDfSH8+MfjQjVmP697/KYTDOqpxgerkvoNm7q5wlFMBeX8ZMocg==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@lezer/cpp": "^1.0.0" - } - }, "node_modules/@codemirror/lang-css": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@codemirror/lang-css/-/lang-css-6.2.0.tgz", - "integrity": "sha512-oyIdJM29AyRPM3+PPq1I2oIk8NpUfEN3kAM05XWDDs6o3gSneIKaVJifT2P+fqONLou2uIgXynFyMUDQvo/szA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@codemirror/lang-css/-/lang-css-6.3.0.tgz", + "integrity": "sha512-CyR4rUNG9OYcXDZwMPvJdtb6PHbBDKUc/6Na2BIwZ6dKab1JQqKa4di+RNRY9Myn7JB81vayKwJeQ7jEdmNVDA==", "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", "@lezer/common": "^1.0.2", - "@lezer/css": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-go": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-go/-/lang-go-6.0.1.tgz", - "integrity": "sha512-7fNvbyNylvqCphW9HD6WFnRpcDjr+KXX/FgqXy5H5ZS0eC5edDljukm/yNgYkwTsgp2busdod50AOTIy6Jikfg==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.6.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/go": "^1.0.0" + "@lezer/css": "^1.1.7" } }, "node_modules/@codemirror/lang-html": { - "version": "6.4.3", - "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.3.tgz", - "integrity": "sha512-VKzQXEC8nL69Jg2hvAFPBwOdZNvL8tMFOrdFwWpU+wc6a6KEkndJ/19R5xSaglNX6v2bttm8uIEFYxdQDcIZVQ==", + "version": "6.4.9", + "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.9.tgz", + "integrity": "sha512-aQv37pIMSlueybId/2PVSP6NPnmurFDVmZwzc7jszd2KAF8qd4VBbvNYPXWQq90WIARjsdVkPbw29pszmHws3Q==", "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/lang-css": "^6.0.0", "@codemirror/lang-javascript": "^6.0.0", "@codemirror/language": "^6.4.0", "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.2.2", + "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0", "@lezer/css": "^1.1.0", "@lezer/html": "^1.3.0" } }, - "node_modules/@codemirror/lang-java": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-java/-/lang-java-6.0.1.tgz", - "integrity": "sha512-OOnmhH67h97jHzCuFaIEspbmsT98fNdhVhmA3zCxW0cn7l8rChDhZtwiwJ/JOKXgfm4J+ELxQihxaI7bj7mJRg==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@lezer/java": "^1.0.0" - } - }, "node_modules/@codemirror/lang-javascript": { - "version": "6.1.8", - "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.1.8.tgz", - "integrity": "sha512-5cIA6IOkslTu1DtldcYnj7hsBm3p+cD37qSaKvW1kV16M6q9ysKvKrveCOWgbrj4+ilSWRL2JtSLudbeB158xg==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.2.2.tgz", + "integrity": "sha512-VGQfY+FCc285AhWuwjYxQyUQcYurWlxdKYT4bqwr3Twnd5wP5WSeu52t4tvvuWmljT4EmgEgZCqSieokhtY8hg==", "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.6.0", "@codemirror/lint": "^6.0.0", "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", + "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0", "@lezer/javascript": "^1.0.0" } @@ -720,53 +673,11 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/@codemirror/lang-json/-/lang-json-6.0.1.tgz", "integrity": "sha512-+T1flHdgpqDDlJZ2Lkil/rLiRy684WMLc74xUnjJH48GQdfJo/pudlTRreZmKwzP8/tGdKf83wlbAdOCzlJOGQ==", - "license": "MIT", "dependencies": { "@codemirror/language": "^6.0.0", "@lezer/json": "^1.0.0" } }, - "node_modules/@codemirror/lang-less": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-less/-/lang-less-6.0.2.tgz", - "integrity": "sha512-EYdQTG22V+KUUk8Qq582g7FMnCZeEHsyuOJisHRft/mQ+ZSZ2w51NupvDUHiqtsOy7It5cHLPGfHQLpMh9bqpQ==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-css": "^6.2.0", - "@codemirror/language": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-lezer": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-lezer/-/lang-lezer-6.0.1.tgz", - "integrity": "sha512-WHwjI7OqKFBEfkunohweqA5B/jIlxaZso6Nl3weVckz8EafYbPZldQEKSDb4QQ9H9BUkle4PVELP4sftKoA0uQ==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/lezer": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-liquid": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-liquid/-/lang-liquid-6.2.1.tgz", - "integrity": "sha512-J1Mratcm6JLNEiX+U2OlCDTysGuwbHD76XwuL5o5bo9soJtSbz2g6RU3vGHFyS5DC8rgVmFSzi7i6oBftm7tnA==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/lang-html": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.3.1" - } - }, "node_modules/@codemirror/lang-markdown": { "version": "6.2.5", "resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.2.5.tgz", @@ -781,19 +692,6 @@ "@lezer/markdown": "^1.0.0" } }, - "node_modules/@codemirror/lang-php": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-php/-/lang-php-6.0.1.tgz", - "integrity": "sha512-ublojMdw/PNWa7qdN5TMsjmqkNuTBD3k6ndZ4Z0S25SBAiweFGyY68AS3xNcIOlb6DDFDvKlinLQ40vSLqf8xA==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-html": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/php": "^1.0.0" - } - }, "node_modules/@codemirror/lang-python": { "version": "6.1.6", "resolved": "https://registry.npmjs.org/@codemirror/lang-python/-/lang-python-6.1.6.tgz", @@ -806,88 +704,10 @@ "@lezer/python": "^1.1.4" } }, - "node_modules/@codemirror/lang-rust": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-rust/-/lang-rust-6.0.1.tgz", - "integrity": "sha512-344EMWFBzWArHWdZn/NcgkwMvZIWUR1GEBdwG8FEp++6o6vT6KL9V7vGs2ONsKxxFUPXKI0SPcWhyYyl2zPYxQ==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@lezer/rust": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-sass": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-sass/-/lang-sass-6.0.2.tgz", - "integrity": "sha512-l/bdzIABvnTo1nzdY6U+kPAC51czYQcOErfzQ9zSm9D8GmNPD0WTW8st/CJwBTPLO8jlrbyvlSEcN20dc4iL0Q==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-css": "^6.2.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.0.2", - "@lezer/sass": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-sql": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-sql/-/lang-sql-6.7.1.tgz", - "integrity": "sha512-flQa7zemrLKk0TIrOJnpeyH/b29BcVybtsTeZMgAo40O6kGbrnUSCgwI3TF5iJY3O9VXJKKCA+i0CBVvDfr88w==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-vue": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@codemirror/lang-vue/-/lang-vue-0.1.3.tgz", - "integrity": "sha512-QSKdtYTDRhEHCfo5zOShzxCmqKJvgGrZwDQSdbvCRJ5pRLWBS7pD/8e/tH44aVQT6FKm0t6RVNoSUWHOI5vNug==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-html": "^6.0.0", - "@codemirror/lang-javascript": "^6.1.2", - "@codemirror/language": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.3.1" - } - }, - "node_modules/@codemirror/lang-wast": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-wast/-/lang-wast-6.0.2.tgz", - "integrity": "sha512-Imi2KTpVGm7TKuUkqyJ5NRmeFWF7aMpNiwHnLQe0x9kmrxElndyH0K6H/gXtWwY6UshMRAhpENsgfpSwsgmC6Q==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-xml": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@codemirror/lang-xml/-/lang-xml-6.1.0.tgz", - "integrity": "sha512-3z0blhicHLfwi2UgkZYRPioSgVTo9PV5GP5ducFH6FaHy0IAJRg+ixj5gTR1gnT/glAIC8xv4w2VL1LoZfs+Jg==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.4.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/xml": "^1.0.0" - } - }, "node_modules/@codemirror/lang-yaml": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/@codemirror/lang-yaml/-/lang-yaml-6.1.1.tgz", "integrity": "sha512-HV2NzbK9bbVnjWxwObuZh5FuPCowx51mEfoFT9y3y+M37fA3+pbxx4I7uePuygFzDsAmCTwQSc/kXh/flab4uw==", - "license": "MIT", "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.0.0", @@ -910,45 +730,6 @@ "style-mod": "^4.0.0" } }, - "node_modules/@codemirror/language-data": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@codemirror/language-data/-/language-data-6.5.1.tgz", - "integrity": "sha512-0sWxeUSNlBr6OmkqybUTImADFUP0M3P0IiSde4nc24bz/6jIYzqYSgkOSLS+CBIoW1vU8Q9KUWXscBXeoMVC9w==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-angular": "^0.1.0", - "@codemirror/lang-cpp": "^6.0.0", - "@codemirror/lang-css": "^6.0.0", - "@codemirror/lang-go": "^6.0.0", - "@codemirror/lang-html": "^6.0.0", - "@codemirror/lang-java": "^6.0.0", - "@codemirror/lang-javascript": "^6.0.0", - "@codemirror/lang-json": "^6.0.0", - "@codemirror/lang-less": "^6.0.0", - "@codemirror/lang-liquid": "^6.0.0", - "@codemirror/lang-markdown": "^6.0.0", - "@codemirror/lang-php": "^6.0.0", - "@codemirror/lang-python": "^6.0.0", - "@codemirror/lang-rust": "^6.0.0", - "@codemirror/lang-sass": "^6.0.0", - "@codemirror/lang-sql": "^6.0.0", - "@codemirror/lang-vue": "^0.1.1", - "@codemirror/lang-wast": "^6.0.0", - "@codemirror/lang-xml": "^6.0.0", - "@codemirror/lang-yaml": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/legacy-modes": "^6.4.0" - } - }, - "node_modules/@codemirror/legacy-modes": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@codemirror/legacy-modes/-/legacy-modes-6.4.1.tgz", - "integrity": "sha512-vdg3XY7OAs5uLDx2Iw+cGfnwtd7kM+Et/eMsqAGTfT/JKiVBQZXosTzjEbWAi/FrY6DcQIz8mQjBozFHZEUWQA==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0" - } - }, "node_modules/@codemirror/lint": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.2.1.tgz", @@ -970,9 +751,9 @@ } }, "node_modules/@codemirror/state": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.2.0.tgz", - "integrity": "sha512-69QXtcrsc3RYtOtd+GsvczJ319udtBf1PTrr2KbLWM/e2CXUPnh0Nz9AUo8WfhSQ7GeL8dPVNUmhQVgpmuaNGA==" + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.4.1.tgz", + "integrity": "sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==" }, "node_modules/@codemirror/theme-one-dark": { "version": "6.1.2", @@ -986,12 +767,12 @@ } }, "node_modules/@codemirror/view": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.12.0.tgz", - "integrity": "sha512-xNHvbJBc2v8JuEcIGOck6EUGShpP+TYGCEMVEVQMYxbFXfMhYnoF3znxB/2GgeKR0nrxBs+nhBupiTYQqCp2kw==", + "version": "6.33.0", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.33.0.tgz", + "integrity": "sha512-AroaR3BvnjRW8fiZBalAaK+ZzB5usGgI014YKElYZvQdNH5ZIidHlO+cyf/2rWzyBFRkvG6VhiXeAEbC53P2YQ==", "dependencies": { - "@codemirror/state": "^6.1.4", - "style-mod": "^4.0.0", + "@codemirror/state": "^6.4.0", + "style-mod": "^4.1.0", "w3c-keyname": "^2.2.4" } }, @@ -1725,31 +1506,10 @@ "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.1.tgz", "integrity": "sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ==" }, - "node_modules/@lezer/cpp": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@lezer/cpp/-/cpp-1.1.2.tgz", - "integrity": "sha512-macwKtyeUO0EW86r3xWQCzOV9/CF8imJLpJlPv3sDY57cPGeUZ8gXWOWNlJr52TVByMV3PayFQCA5SHEERDmVQ==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, "node_modules/@lezer/css": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.1.2.tgz", - "integrity": "sha512-5TKMAReXukfEmIiZprDlGfZVfOOCyEStFi1YLzxclm9H3G/HHI49/2wzlRT6bQw5r7PoZVEtjTItEkb/UuZQyg==", - "dependencies": { - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/go": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@lezer/go/-/go-1.0.0.tgz", - "integrity": "sha512-co9JfT3QqX1YkrMmourYw2Z8meGC50Ko4d54QEcQbEYpvdUvN4yb0NBZdn/9ertgvjsySxHsKzH3lbm3vqJ4Jw==", - "license": "MIT", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.1.8.tgz", + "integrity": "sha512-7JhxupKuMBaWQKjQoLtzhGj83DdnZY9MckEOG5+/iLKNK2ZJqKc6hf6uc0HjwCX7Qlok44jBNqZhHKDhEhZYLA==", "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", @@ -1766,20 +1526,9 @@ } }, "node_modules/@lezer/html": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.4.tgz", - "integrity": "sha512-HdJYMVZcT4YsMo7lW3ipL4NoyS2T67kMPuSVS5TgLGqmaCjEU/D6xv7zsa1ktvTK5lwk7zzF1e3eU6gBZIPm5g==", - "dependencies": { - "@lezer/common": "^1.0.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/java": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@lezer/java/-/java-1.1.2.tgz", - "integrity": "sha512-3j8X70JvYf0BZt8iSRLXLkt0Ry1hVUgH6wT32yBxH/Xi55nW2VMhc1Az4SKwu4YGSmxCm1fsqDDcHTuFjC8pmg==", - "license": "MIT", + "version": "1.3.10", + "resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.10.tgz", + "integrity": "sha512-dqpT8nISx/p9Do3AchvYGV3qYc4/rKr3IBZxlHmpIKam56P47RSHkSF5f13Vu9hebS1jM0HmtJIwLbWz1VIY6w==", "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", @@ -1787,10 +1536,11 @@ } }, "node_modules/@lezer/javascript": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.3.tgz", - "integrity": "sha512-k7Eo9z9B1supZ5cCD4ilQv/RZVN30eUQL+gGbr6ybrEY3avBAL5MDiYi2aa23Aj0A79ry4rJRvPAwE2TM8bd+A==", + "version": "1.4.17", + "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.17.tgz", + "integrity": "sha512-bYW4ctpyGK+JMumDApeUzuIezX01H76R1foD6LcRX224FWfyYit/HYxiPGDjXXe/wQWASjCvVGoukTH68+0HIA==", "dependencies": { + "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.1.3", "@lezer/lr": "^1.3.0" } @@ -1799,23 +1549,12 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/@lezer/json/-/json-1.0.2.tgz", "integrity": "sha512-xHT2P4S5eeCYECyKNPhr4cbEL9tc8w83SPwRC373o9uEdrvGKTZoJVAGxpOsZckMlEh9W23Pc72ew918RWQOBQ==", - "license": "MIT", "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0" } }, - "node_modules/@lezer/lezer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@lezer/lezer/-/lezer-1.1.2.tgz", - "integrity": "sha512-O8yw3CxPhzYHB1hvwbdozjnAslhhR8A5BH7vfEMof0xk3p+/DFDfZkA9Tde6J+88WgtwaHy4Sy6ThZSkaI0Evw==", - "license": "MIT", - "dependencies": { - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, "node_modules/@lezer/lr": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.2.tgz", @@ -1826,61 +1565,18 @@ } }, "node_modules/@lezer/markdown": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@lezer/markdown/-/markdown-1.0.2.tgz", - "integrity": "sha512-8CY0OoZ6V5EzPjSPeJ4KLVbtXdLBd8V6sRCooN5kHnO28ytreEGTyrtU/zUwo/XLRzGr/e1g44KlzKi3yWGB5A==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@lezer/markdown/-/markdown-1.3.1.tgz", + "integrity": "sha512-DGlzU/i8DC8k0uz1F+jeePrkATl0jWakauTzftMQOcbaMkHbNSRki/4E2tOzJWsVpoKYhe7iTJ03aepdwVUXUA==", "dependencies": { "@lezer/common": "^1.0.0", "@lezer/highlight": "^1.0.0" } }, - "node_modules/@lezer/php": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@lezer/php/-/php-1.0.2.tgz", - "integrity": "sha512-GN7BnqtGRpFyeoKSEqxvGvhJQiI4zkgmYnDk/JIyc7H7Ifc1tkPnUn/R2R8meH3h/aBf5rzjvU8ZQoyiNDtDrA==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.1.0" - } - }, "node_modules/@lezer/python": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@lezer/python/-/python-1.1.6.tgz", - "integrity": "sha512-TJ/kaaJYHQMXphV2GcIi/0pSt400A9yFU6FWn/3mCYDwe0UCeEyAKP1IxTfqlfnWWDl9cZf/vzWPOrw5775yDw==", - "dependencies": { - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/rust": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@lezer/rust/-/rust-1.0.2.tgz", - "integrity": "sha512-Lz5sIPBdF2FUXcWeCu1//ojFAZqzTQNRga0aYv6dYXqJqPfMdCAI0NzajWUd4Xijj1IKJLtjoXRPMvTKWBcqKg==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/sass": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@lezer/sass/-/sass-1.0.6.tgz", - "integrity": "sha512-w/RCO2dIzZH1To8p+xjs8cE+yfgGus8NZ/dXeWl/QzHyr+TeBs71qiE70KPImEwvTsmEjoWh0A5SxMzKd5BWBQ==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/xml": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@lezer/xml/-/xml-1.0.5.tgz", - "integrity": "sha512-VFouqOzmUWfIg+tfmpcdV33ewtK+NSwd4ngSe1aG7HFb4BN0ExyY1b8msp+ndFrnlG4V4iC8yXacjFtrwERnaw==", - "license": "MIT", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/@lezer/python/-/python-1.1.14.tgz", + "integrity": "sha512-ykDOb2Ti24n76PJsSa4ZoDF0zH12BSw1LGfQXCYJhJyOGiFTfGaX0Du66Ze72R+u/P35U+O6I9m8TFXov1JzsA==", "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", @@ -1891,7 +1587,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/@lezer/yaml/-/yaml-1.0.3.tgz", "integrity": "sha512-GuBLekbw9jDBDhGur82nuwkxKQ+a3W5H0GfaAthDXcAu+XdpS43VlnxA9E9hllkpSP5ellRDKjLLj7Lu9Wr6xA==", - "license": "MIT", "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", @@ -2081,25 +1776,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@nextjournal/lang-clojure": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@nextjournal/lang-clojure/-/lang-clojure-1.0.0.tgz", - "integrity": "sha512-gOCV71XrYD0DhwGoPMWZmZ0r92/lIHsqQu9QWdpZYYBwiChNwMO4sbVMP7eTuAqffFB2BTtCSC+1skSH9d3bNg==", - "license": "ISC", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@nextjournal/lezer-clojure": "1.0.0" - } - }, - "node_modules/@nextjournal/lezer-clojure": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@nextjournal/lezer-clojure/-/lezer-clojure-1.0.0.tgz", - "integrity": "sha512-VZyuGu4zw5mkTOwQBTaGVNWmsOZAPw5ZRxu1/Knk/Xfs7EDBIogwIs5UXTYkuECX5ZQB8eOB+wKA2pc7VyqaZQ==", - "license": "ISC", - "dependencies": { - "@lezer/lr": "^1.0.0" - } - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2250,67 +1926,6 @@ "node": ">=14" } }, - "node_modules/@replit/codemirror-lang-csharp": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@replit/codemirror-lang-csharp/-/codemirror-lang-csharp-6.2.0.tgz", - "integrity": "sha512-6utbaWkoymhoAXj051mkRp+VIJlpwUgCX9Toevz3YatiZsz512fw3OVCedXQx+WcR0wb6zVHjChnuxqfCLtFVQ==", - "license": "MIT", - "peerDependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@replit/codemirror-lang-nix": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@replit/codemirror-lang-nix/-/codemirror-lang-nix-6.0.1.tgz", - "integrity": "sha512-lvzjoYn9nfJzBD5qdm3Ut6G3+Or2wEacYIDJ49h9+19WSChVnxv4ojf+rNmQ78ncuxIt/bfbMvDLMeMP0xze6g==", - "license": "MIT", - "peerDependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@replit/codemirror-lang-solidity": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@replit/codemirror-lang-solidity/-/codemirror-lang-solidity-6.0.2.tgz", - "integrity": "sha512-/dpTVH338KFV6SaDYYSadkB4bI/0B0QRF/bkt1XS3t3QtyR49mn6+2k0OUQhvt2ZSO7kt10J+OPilRAtgbmX0w==", - "license": "MIT", - "dependencies": { - "@lezer/highlight": "^1.2.0" - }, - "peerDependencies": { - "@codemirror/language": "^6.0.0" - } - }, - "node_modules/@replit/codemirror-lang-svelte": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@replit/codemirror-lang-svelte/-/codemirror-lang-svelte-6.0.0.tgz", - "integrity": "sha512-U2OqqgMM6jKelL0GNWbAmqlu1S078zZNoBqlJBW+retTc5M4Mha6/Y2cf4SVg6ddgloJvmcSpt4hHrVoM4ePRA==", - "license": "MIT", - "peerDependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/lang-css": "^6.0.1", - "@codemirror/lang-html": "^6.2.0", - "@codemirror/lang-javascript": "^6.1.1", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/highlight": "^1.0.0", - "@lezer/javascript": "^1.2.0", - "@lezer/lr": "^1.0.0" - } - }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.17.2", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.17.2.tgz", @@ -4039,48 +3654,6 @@ "@codemirror/view": ">=6.0.0" } }, - "node_modules/@uiw/codemirror-extensions-langs": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/@uiw/codemirror-extensions-langs/-/codemirror-extensions-langs-4.23.0.tgz", - "integrity": "sha512-WUJnTgS3CIV5TZPjwYO+mvRqxfvSSSKC2a+Wm5Uk3uFoZZ7O/GKi4bKKLsIHQkCwNnd9CHJzwN2dpIVrK1AmLA==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-angular": "^0.1.0", - "@codemirror/lang-cpp": "^6.0.0", - "@codemirror/lang-css": "^6.2.0", - "@codemirror/lang-html": "^6.4.0", - "@codemirror/lang-java": "^6.0.0", - "@codemirror/lang-javascript": "^6.1.0", - "@codemirror/lang-json": "^6.0.0", - "@codemirror/lang-less": "^6.0.1", - "@codemirror/lang-lezer": "^6.0.0", - "@codemirror/lang-liquid": "^6.0.1", - "@codemirror/lang-markdown": "^6.1.0", - "@codemirror/lang-php": "^6.0.0", - "@codemirror/lang-python": "^6.1.0", - "@codemirror/lang-rust": "^6.0.0", - "@codemirror/lang-sass": "^6.0.1", - "@codemirror/lang-sql": "^6.4.0", - "@codemirror/lang-vue": "^0.1.1", - "@codemirror/lang-wast": "^6.0.0", - "@codemirror/lang-xml": "^6.0.0", - "@codemirror/language-data": ">=6.0.0", - "@codemirror/legacy-modes": ">=6.0.0", - "@nextjournal/lang-clojure": "^1.0.0", - "@replit/codemirror-lang-csharp": "^6.1.0", - "@replit/codemirror-lang-nix": "^6.0.1", - "@replit/codemirror-lang-solidity": "^6.0.1", - "@replit/codemirror-lang-svelte": "^6.0.0", - "codemirror-lang-mermaid": "^0.5.0" - }, - "funding": { - "url": "https://jaywcjlove.github.io/#/sponsor" - }, - "peerDependencies": { - "@codemirror/language-data": ">=6.0.0", - "@codemirror/legacy-modes": ">=6.0.0" - } - }, "node_modules/@uiw/react-codemirror": { "version": "4.23.0", "resolved": "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.23.0.tgz", @@ -5383,17 +4956,6 @@ "@codemirror/view": "^6.0.0" } }, - "node_modules/codemirror-lang-mermaid": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/codemirror-lang-mermaid/-/codemirror-lang-mermaid-0.5.0.tgz", - "integrity": "sha512-Taw/2gPCyNArQJCxIP/HSUif+3zrvD+6Ugt7KJZ2dUKou/8r3ZhcfG8krNTZfV2iu8AuGnymKuo7bLPFyqsh/A==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.9.0", - "@lezer/highlight": "^1.1.6", - "@lezer/lr": "^1.3.10" - } - }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -8209,13 +7771,16 @@ }, "node_modules/hew": { "name": "@hpe.com/hew", - "version": "0.6.44", - "resolved": "https://registry.npmjs.org/@hpe.com/hew/-/hew-0.6.44.tgz", - "integrity": "sha512-o0y9lJkiI1lixduICstNumBZYGEc4cvQg1FK658AKP0uB84rwIP960vebKgIJEho1jlz47fxdESMPtRUrwss+A==", + "version": "0.6.46", + "resolved": "https://registry.npmjs.org/@hpe.com/hew/-/hew-0.6.46.tgz", + "integrity": "sha512-POWd1PbdCBCaEvZW4tkZSXMwV+vEBiFIJ8vw50TsbLPraBO410qu/uwhLb92m0pt+9Xl9IbAotFx+s89PDfcJg==", "dependencies": { "@ant-design/icons": "^5.0.1", + "@codemirror/lang-json": "^6.0.1", + "@codemirror/lang-markdown": "^6.2.5", + "@codemirror/lang-python": "^6.1.6", + "@codemirror/lang-yaml": "^6.1.1", "@glideapps/glide-data-grid": "^6.0.3", - "@uiw/codemirror-extensions-langs": "^4.23.0", "@uiw/react-codemirror": "^4.23.0", "ansi-to-html": "^0.7.2", "antd": "^5.1.7", @@ -13710,9 +13275,9 @@ "dev": true }, "node_modules/style-mod": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.0.3.tgz", - "integrity": "sha512-78Jv8kYJdjbvRwwijtCevYADfsI0lGzYJe4mMFdceO8l75DFFDoqBhR1jVDicDRRaX4//g1u9wKeo+ztc2h1Rw==" + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.2.tgz", + "integrity": "sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw==" }, "node_modules/style-to-object": { "version": "0.4.1", diff --git a/webui/react/package.json b/webui/react/package.json index f3adbff3371..427db6d4d7b 100644 --- a/webui/react/package.json +++ b/webui/react/package.json @@ -42,7 +42,7 @@ "fp-ts": "^2.16.5", "fuse.js": "^7.0.0", "hermes-parallel-coordinates": "^0.6.17", - "hew": "npm:@hpe.com/hew@^0.6.44", + "hew": "npm:@hpe.com/hew@^0.6.45", "humanize-duration": "^3.28.0", "immutable": "^4.3.0", "io-ts": "^2.2.21", diff --git a/webui/react/src/components/GridListRadioGroup.tsx b/webui/react/src/components/GridListRadioGroup.tsx index c48abc6f2cf..feb35e6a369 100644 --- a/webui/react/src/components/GridListRadioGroup.tsx +++ b/webui/react/src/components/GridListRadioGroup.tsx @@ -24,15 +24,17 @@ const GridListRadioGroup: React.FC = ({ onChange, value }: Props) => { ); return ( - +
+ +
); }; diff --git a/webui/react/src/e2e/fixtures/global-fixtures.ts b/webui/react/src/e2e/fixtures/global-fixtures.ts index c0212641c80..df4b0208fd9 100644 --- a/webui/react/src/e2e/fixtures/global-fixtures.ts +++ b/webui/react/src/e2e/fixtures/global-fixtures.ts @@ -192,11 +192,7 @@ export const test = baseTest.extend({ }, }); const adminUser = await backgroundApiUser.createUser(request); - await backgroundApiUser.apiAuth.loginApi({ - creds: { password: request.password!, username: adminUser.user!.username }, - }); await use({ request, response: adminUser }); - await backgroundApiUser.apiAuth.loginApi(); await backgroundApiUser.patchUser(adminUser.user!.id!, { active: false }); }, { scope: 'worker' }, diff --git a/webui/react/src/e2e/models/components/GridListRadioGroup.ts b/webui/react/src/e2e/models/components/GridListRadioGroup.ts new file mode 100644 index 00000000000..d37ab823378 --- /dev/null +++ b/webui/react/src/e2e/models/components/GridListRadioGroup.ts @@ -0,0 +1,13 @@ +import { BaseComponent, NamedComponent } from 'playwright-page-model-base/BaseComponent'; + +export class GridListRadioGroup extends NamedComponent { + override defaultSelector = '[data-test-component="grid-list-radio-group"]'; + readonly grid = new BaseComponent({ + parent: this, + selector: 'label:first-of-type', + }); + readonly list = new BaseComponent({ + parent: this, + selector: 'label:last-of-type', + }); +} diff --git a/webui/react/src/e2e/models/pages/WorkspaceList.ts b/webui/react/src/e2e/models/pages/WorkspaceList.ts index 9c27c2f4824..f7ed4225267 100644 --- a/webui/react/src/e2e/models/pages/WorkspaceList.ts +++ b/webui/react/src/e2e/models/pages/WorkspaceList.ts @@ -4,10 +4,26 @@ import { DeterminedPage } from 'e2e/models/common/base/BasePage'; import { Message } from 'e2e/models/common/hew/Message'; import { Select } from 'e2e/models/common/hew/Select'; import { Toggle } from 'e2e/models/common/hew/Toggle'; +import { GridListRadioGroup } from 'e2e/models/components/GridListRadioGroup'; +import { HeadRow, InteractiveTable, Row } from 'e2e/models/components/Table/InteractiveTable'; import { WorkspaceCreateModal } from 'e2e/models/components/WorkspaceCreateModal'; import { WorkspaceDeleteModal } from 'e2e/models/components/WorkspaceDeleteModal'; import { WorkspaceCard } from 'e2e/models/pages/WorkspaceList/WorkspaceCard'; +class WorkspaceHeadRow extends HeadRow { + readonly name = new BaseComponent({ + parent: this, + selector: '[data-testid="Name"]', + }); +} + +class WorkspaceRow extends Row { + readonly name = new BaseComponent({ + parent: this, + selector: '[data-testid="name"]', + }); +} + /** * Represents the WorkspaceList page from src/pages/WorkspaceList.tsx */ @@ -36,7 +52,17 @@ export class WorkspaceList extends DeterminedPage { parent: this, selector: '[data-testid="newWorkspace"]', }); - // TODO missing grid list + readonly gridListRadioGroup = new GridListRadioGroup({ + parent: this, + }); + readonly table = new InteractiveTable({ + parent: this, + tableArgs: { + attachment: '[data-testid="table"]', + headRowType: WorkspaceHeadRow, + rowType: WorkspaceRow, + }, + }); readonly workspaceCards = new WorkspaceCard({ parent: this, }); diff --git a/webui/react/src/e2e/models/pages/WorkspaceList/WorkspaceCard.ts b/webui/react/src/e2e/models/pages/WorkspaceList/WorkspaceCard.ts index 5ee5c2d0f2d..68eeab1672f 100644 --- a/webui/react/src/e2e/models/pages/WorkspaceList/WorkspaceCard.ts +++ b/webui/react/src/e2e/models/pages/WorkspaceList/WorkspaceCard.ts @@ -15,4 +15,8 @@ export class WorkspaceCard extends Card { parent: this, selector: '[data-testid="archived"]', }); + readonly title = new BaseComponent({ + parent: this, + selector: 'h1', + }); } diff --git a/webui/react/src/e2e/tests/projectsWorkspaces.spec.ts b/webui/react/src/e2e/tests/projectsWorkspaces.spec.ts index 68e1fa2e057..ed24d0c8529 100644 --- a/webui/react/src/e2e/tests/projectsWorkspaces.spec.ts +++ b/webui/react/src/e2e/tests/projectsWorkspaces.spec.ts @@ -1,9 +1,12 @@ +import _ from 'lodash'; + import { expect, test } from 'e2e/fixtures/global-fixtures'; import { WorkspaceCreateModal } from 'e2e/models/components/WorkspaceCreateModal'; import { ProjectDetails } from 'e2e/models/pages/ProjectDetails'; import { WorkspaceDetails } from 'e2e/models/pages/WorkspaceDetails'; import { WorkspaceList } from 'e2e/models/pages/WorkspaceList'; import { randId, safeName } from 'e2e/utils/naming'; +import { V1Workspace } from 'services/api-ts-sdk'; const createWorkspaceAllFields = async function ( modal: WorkspaceCreateModal, @@ -30,6 +33,17 @@ const createWorkspaceAllFields = async function ( return fullName; }; +const getCurrentWorkspaceNames = async (workspaceList: WorkspaceList) => { + await workspaceList.workspaceCards.pwLocator.nth(0).waitFor(); + + const cardTitles = await workspaceList.workspaceCards.title.pwLocator.all(); + return await Promise.all( + cardTitles.map(async (title) => { + return await title.textContent(); + }), + ); +}; + test.describe('Workspace UI CRUD', () => { const workspaceIds: number[] = []; @@ -115,10 +129,10 @@ test.describe('Workspace UI CRUD', () => { }); }); - test('Pin and Unpin a Workspace from Card', async ({ authedPage, backgroundApiWorkspace }) => { + test('Pin and Unpin a Workspace from Card', async ({ authedPage, apiWorkspace }) => { const workspaceList = new WorkspaceList(authedPage); - const newWorkspace = await backgroundApiWorkspace.createWorkspace(backgroundApiWorkspace.new()); + const newWorkspace = await apiWorkspace.createWorkspace(apiWorkspace.new()); workspaceIds.push(newWorkspace.workspace.id!); const workspaceCard = workspaceList.cardByName(newWorkspace.workspace.name!); const sidebarItem = workspaceList.nav.sidebar.sidebarWorkspaceItem( @@ -141,10 +155,10 @@ test.describe('Workspace UI CRUD', () => { }); }); - test('Unpin a Workspace from Sidebar', async ({ authedPage, backgroundApiWorkspace }) => { + test('Unpin a Workspace from Sidebar', async ({ authedPage, apiWorkspace }) => { const workspaceList = new WorkspaceList(authedPage); - const newWorkspace = await backgroundApiWorkspace.createWorkspace(backgroundApiWorkspace.new()); + const newWorkspace = await apiWorkspace.createWorkspace(apiWorkspace.new()); workspaceIds.push(newWorkspace.workspace.id!); const workspaceCard = workspaceList.cardByName(newWorkspace.workspace.name!); const sidebarItem = workspaceList.nav.sidebar.sidebarWorkspaceItem( @@ -160,13 +174,10 @@ test.describe('Workspace UI CRUD', () => { ); }); - test('Archive and Unarchive Workspace from Card', async ({ - authedPage, - backgroundApiWorkspace, - }) => { + test('Archive and Unarchive Workspace from Card', async ({ authedPage, apiWorkspace }) => { const workspaceList = new WorkspaceList(authedPage); - const newWorkspace = await backgroundApiWorkspace.createWorkspace(backgroundApiWorkspace.new()); + const newWorkspace = await apiWorkspace.createWorkspace(apiWorkspace.new()); workspaceIds.push(newWorkspace.workspace.id!); const workspaceCard = workspaceList.cardByName(newWorkspace.workspace.name!); const sidebarItem = workspaceList.nav.sidebar.sidebarWorkspaceItem( @@ -193,13 +204,10 @@ test.describe('Workspace UI CRUD', () => { }); }); - test('Archive and Unarchive Workspace from Sidebar', async ({ - authedPage, - backgroundApiWorkspace, - }) => { + test('Archive and Unarchive Workspace from Sidebar', async ({ authedPage, apiWorkspace }) => { const workspaceList = new WorkspaceList(authedPage); - const newWorkspace = await backgroundApiWorkspace.createWorkspace(backgroundApiWorkspace.new()); + const newWorkspace = await apiWorkspace.createWorkspace(apiWorkspace.new()); workspaceIds.push(newWorkspace.workspace.id!); const workspaceCard = workspaceList.cardByName(newWorkspace.workspace.name!); const sidebarItem = workspaceList.nav.sidebar.sidebarWorkspaceItem( @@ -239,124 +247,196 @@ test.describe('Workspace UI CRUD', () => { workspaceCardEdited.pwLocator.waitFor({ timeout: 10_000 }), ]); }); -}); - -test.describe('With a Workspace', () => { - test.beforeEach(async ({ authedPage, newWorkspace }) => { - const workspaceList = new WorkspaceList(authedPage); - const workspaceCard = workspaceList.cardByName(newWorkspace.response.workspace.name); - - await test.step('Navigate to Workspaces', async () => { - await workspaceList.goto(); - await workspaceCard.pwLocator.waitFor({ timeout: 10_000 }); - }); - }); test('Attempt to delete a workspace but with bad validation', async ({ authedPage, - newWorkspace, + backgroundApiWorkspace, }) => { const workspaceList = new WorkspaceList(authedPage); const deleteModal = workspaceList.deleteModal; - const workspaceCard = workspaceList.cardByName(newWorkspace.response.workspace.name); + const newWorkspace = await backgroundApiWorkspace.createWorkspace(backgroundApiWorkspace.new()); + workspaceIds.push(newWorkspace.workspace.id!); + const workspaceCard = workspaceList.cardByName(newWorkspace.workspace.name!); + + await authedPage.reload(); await workspaceList.nav.sidebar.workspaces.pwLocator.click(); await (await workspaceCard.actionMenu.open()).delete.pwLocator.click(); await deleteModal.nameConfirmation.pwLocator.fill('bad validation'); await expect(deleteModal.footer.submit.pwLocator).toBeDisabled(); }); +}); - test.describe('Project UI CRUD', () => { - const projectIds: number[] = []; +test.describe('Workspace List', () => { + const workspaces: V1Workspace[] = []; - test.beforeEach(async ({ authedPage, newWorkspace }) => { - const workspaceDetails = new WorkspaceDetails(authedPage); + test.beforeAll(async ({ backgroundApiWorkspace }) => { + const olderWorkspace = await backgroundApiWorkspace.createWorkspace( + backgroundApiWorkspace.new({ + // older workspace with first alphabetical name + workspacePrefix: 'a-test-workspace', + }), + ); + workspaces.push(olderWorkspace.workspace); + + const newerWorkspace = await backgroundApiWorkspace.createWorkspace( + backgroundApiWorkspace.new({ + // newer workspace with last alphabetical name + workspacePrefix: 'b-test-workspace', + }), + ); + workspaces.push(newerWorkspace.workspace); + }); + + test.beforeEach(async ({ authedPage }) => { + const workspaceList = new WorkspaceList(authedPage); + await workspaceList.goto(); + await workspaceList.whoseSelect.selectMenuOption('All Workspaces'); + await workspaceList.sortSelect.selectMenuOption('Newest to Oldest'); + await workspaceList.gridListRadioGroup.grid.pwLocator.click(); + }); + + test.afterAll(async ({ backgroundApiWorkspace }) => { + for (const workspace of workspaces) { + await backgroundApiWorkspace.deleteWorkspace(workspace.id); + } + }); + + test('Sort', async ({ authedPage }) => { + const workspaceList = new WorkspaceList(authedPage); + + const namesAfterNewest = await getCurrentWorkspaceNames(workspaceList); + const idSortedWorkspaceNames = _.orderBy(workspaces, 'id', 'desc').map((w) => w.name); + expect(idSortedWorkspaceNames).toEqual( + namesAfterNewest.filter((n) => { + return n && workspaces.map((w) => w.name).includes(n); + }), + ); + + await workspaceList.sortSelect.selectMenuOption('Alphabetical'); + + const namesAfterAlphabetical = await getCurrentWorkspaceNames(workspaceList); + const nameSortedWorkspaceNames = _.orderBy(workspaces, 'name', 'asc').map((w) => w.name); + expect(nameSortedWorkspaceNames).toEqual( + namesAfterAlphabetical.filter((n) => { + return n && workspaces.map((w) => w.name).includes(n); + }), + ); + }); + + test('Filter', async ({ authedPage, apiWorkspace }) => { + const workspaceList = new WorkspaceList(authedPage); + + const currentUserWorkspace = (await apiWorkspace.createWorkspace(apiWorkspace.new())).workspace; + + const currentUserWorkspaceName = currentUserWorkspace.name; + const otherUserWorkspaceName = workspaces.map((w) => w.name)[0]; + + await authedPage.reload(); + + const namesAfterAll = await getCurrentWorkspaceNames(workspaceList); + expect(namesAfterAll).toContain(otherUserWorkspaceName); + expect(namesAfterAll).toContain(currentUserWorkspaceName); + + await workspaceList.whoseSelect.selectMenuOption("Others' Workspaces"); + const namesAfterOthers = await getCurrentWorkspaceNames(workspaceList); + expect(namesAfterOthers).toContain(otherUserWorkspaceName); + expect(namesAfterOthers).not.toContain(currentUserWorkspaceName); + + await workspaceList.whoseSelect.selectMenuOption('My Workspaces'); + const namesAfterMy = await getCurrentWorkspaceNames(workspaceList); + expect(namesAfterMy).toContain(currentUserWorkspaceName); + expect(namesAfterMy).not.toContain(otherUserWorkspaceName); + + await apiWorkspace.deleteWorkspace(currentUserWorkspace.id); + }); + + test('View Toggle', async ({ authedPage }) => { + const workspaceList = new WorkspaceList(authedPage); + + await workspaceList.gridListRadioGroup.list.pwLocator.click(); + + const idSortedWorkspaceNames = _.orderBy(workspaces, 'id', 'desc').map((w) => w.name); + + expect(await workspaceList.table.table.rows.nth(0).name.pwLocator.textContent()).toEqual( + idSortedWorkspaceNames[0], + ); + }); +}); + +test.describe('Project UI CRUD', () => { + const projectIds: number[] = []; + + test.beforeEach(async ({ authedPage, newWorkspace }) => { + const workspaceDetails = new WorkspaceDetails(authedPage); + await workspaceDetails.gotoWorkspace(newWorkspace.response.workspace.id); + await workspaceDetails.workspaceProjects.showArchived.switch.uncheck(); + }); + + test.afterAll(async ({ backgroundApiProject }) => { + for (const project of projectIds) { + await backgroundApiProject.deleteProject(project); + } + }); + + test('Create a Project', async ({ authedPage, newWorkspace }) => { + const projectName = safeName('test-project'); + const workspaceDetails = new WorkspaceDetails(authedPage); + const projectDetails = new ProjectDetails(authedPage); + + const projects = workspaceDetails.workspaceProjects; + + await test.step('Create a Project', async () => { + await projects.newProject.pwLocator.click(); + await projects.createModal.projectName.pwLocator.fill(projectName); + await projects.createModal.description.pwLocator.fill(randId()); + await projects.createModal.footer.submit.pwLocator.click(); + projectIds.push(await projectDetails.getIdFromUrl()); await workspaceDetails.gotoWorkspace(newWorkspace.response.workspace.id); - await workspaceDetails.workspaceProjects.showArchived.switch.uncheck(); + await projects.cardByName(projectName).pwLocator.waitFor(); }); - test.afterAll(async ({ backgroundApiProject }) => { - for (const project of projectIds) { - await backgroundApiProject.deleteProject(project); - } + await test.step('Delete a Project', async () => { + await workspaceDetails.gotoWorkspace(newWorkspace.response.workspace.id); + await workspaceDetails.projectsTab.pwLocator.click(); + const projectCard = projects.cardByName(projectName); + await projectCard.actionMenu.open(); + await projectCard.actionMenu.delete.pwLocator.click(); + await projects.deleteModal.nameConfirmation.pwLocator.fill(projectName); + await projects.deleteModal.footer.submit.pwLocator.click(); }); + }); - test('Create a Project', async ({ authedPage, newWorkspace }) => { - const projectName = safeName('test-project'); - const workspaceDetails = new WorkspaceDetails(authedPage); - const projectDetails = new ProjectDetails(authedPage); - - const projects = workspaceDetails.workspaceProjects; - - await test.step('Create a Project', async () => { - await projects.newProject.pwLocator.click(); - await projects.createModal.projectName.pwLocator.fill(projectName); - await projects.createModal.description.pwLocator.fill(randId()); - await projects.createModal.footer.submit.pwLocator.click(); - projectIds.push(await projectDetails.getIdFromUrl()); - await workspaceDetails.gotoWorkspace(newWorkspace.response.workspace.id); - await projects.cardByName(projectName).pwLocator.waitFor(); - }); - - await test.step('Delete a Project', async () => { - await workspaceDetails.gotoWorkspace(newWorkspace.response.workspace.id); - await workspaceDetails.projectsTab.pwLocator.click(); - const projectCard = projects.cardByName(projectName); - await projectCard.actionMenu.open(); - await projectCard.actionMenu.delete.pwLocator.click(); - await projects.deleteModal.nameConfirmation.pwLocator.fill(projectName); - await projects.deleteModal.footer.submit.pwLocator.click(); - }); - }); + test('Archive and Unarchive Project', async ({ + authedPage, + newWorkspace, + backgroundApiProject, + }) => { + const workspaceDetails = new WorkspaceDetails(authedPage); - test('Archive and Unarchive Project', async ({ - authedPage, - newWorkspace, - backgroundApiProject, - }) => { - const workspaceDetails = new WorkspaceDetails(authedPage); + const newProject = await backgroundApiProject.createProject( + newWorkspace.response.workspace.id, + backgroundApiProject.new(), + ); + projectIds.push(newProject.project.id); + const projectCard = workspaceDetails.workspaceProjects.cardByName(newProject.project.name); + const archiveMenuItem = projectCard.actionMenu.archive; - const newProject = await backgroundApiProject.createProject( - newWorkspace.response.workspace.id, - backgroundApiProject.new(), - ); - projectIds.push(newProject.project.id); - const projectCard = workspaceDetails.workspaceProjects.cardByName(newProject.project.name); - const archiveMenuItem = projectCard.actionMenu.archive; - - await test.step('Archive', async () => { - await authedPage.reload(); - await projectCard.actionMenu.open(); - await expect(archiveMenuItem.pwLocator).toHaveText('Archive'); - await archiveMenuItem.pwLocator.click(); - await projectCard.pwLocator.waitFor({ state: 'hidden' }); - }); - - await test.step('Unarchive', async () => { - await workspaceDetails.workspaceProjects.showArchived.switch.pwLocator.click(); - await projectCard.archivedBadge.pwLocator.waitFor(); - await projectCard.actionMenu.open(); - await expect(archiveMenuItem.pwLocator).toHaveText('Unarchive'); - await archiveMenuItem.pwLocator.click(); - await projectCard.archivedBadge.pwLocator.waitFor({ state: 'hidden' }); - }); + await test.step('Archive', async () => { + await authedPage.reload(); + await projectCard.actionMenu.open(); + await expect(archiveMenuItem.pwLocator).toHaveText('Archive'); + await archiveMenuItem.pwLocator.click(); + await projectCard.pwLocator.waitFor({ state: 'hidden' }); }); - // remianing tests - // test('Navigation on Projects Page - Sorting and List', async () => {}); - // test('Navigation on Workspaces Page - Sorting and List', async () => {}); - // test('Navigate with Breadcrumbs on the Workspaces Page', async () => {}); - // test('Navigate with Breadcrumbs on the Projects Page', async () => {}); - // test.describe('With Model Teardown', () => { - // test('Use UI to create and Delete a Model with All Possible Metadata', async () => {}); - // test('Create a model with backend, Archive and Unarchive Model', async () => {}); - // test('Move a Model Between Projects', async () => {}); - // }); - // test.describe('Task', () => { - // beforeAll('Visit tasks page') - // test('Launch JupyterLab, View Task Logs', async () => {}); - // test('Launch JupyterLab, Kill, View Task Logs', async () => {}); - // afterAll('Kill Tasks') - // }); + await test.step('Unarchive', async () => { + await workspaceDetails.workspaceProjects.showArchived.switch.pwLocator.click(); + await projectCard.archivedBadge.pwLocator.waitFor(); + await projectCard.actionMenu.open(); + await expect(archiveMenuItem.pwLocator).toHaveText('Unarchive'); + await archiveMenuItem.pwLocator.click(); + await projectCard.archivedBadge.pwLocator.waitFor({ state: 'hidden' }); + }); }); }); diff --git a/webui/react/src/pages/WorkspaceList.tsx b/webui/react/src/pages/WorkspaceList.tsx index 655d7ec3318..38b539dea41 100644 --- a/webui/react/src/pages/WorkspaceList.tsx +++ b/webui/react/src/pages/WorkspaceList.tsx @@ -178,7 +178,7 @@ const WorkspaceList: React.FC = () => { dataIndex: 'name', defaultWidth: DEFAULT_COLUMN_WIDTHS['name'], key: V1GetWorkspacesRequestSortBy.NAME, - onCell: onRightClickableCell, + onCell: () => ({ ...onRightClickableCell(), 'data-testid': 'name' }), render: workspaceNameRenderer, title: 'Name', }, @@ -394,15 +394,15 @@ const WorkspaceList: React.FC = () => { workspacesList ) : settings.whose === WhoseWorkspaces.All && settings.archived && !isLoading ? ( ) : ( )}