From fa0e2b7a9cfc0d32724082d91afb1971b999e0eb Mon Sep 17 00:00:00 2001 From: Tom Matthews Date: Wed, 24 Jun 2020 15:29:59 -0500 Subject: [PATCH 01/11] changed RemoteStatus default constructor to private --- .../bioinformatics/irida/model/remote/RemoteStatus.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ca/corefacility/bioinformatics/irida/model/remote/RemoteStatus.java b/src/main/java/ca/corefacility/bioinformatics/irida/model/remote/RemoteStatus.java index 91b5dad4714..0360246bb86 100644 --- a/src/main/java/ca/corefacility/bioinformatics/irida/model/remote/RemoteStatus.java +++ b/src/main/java/ca/corefacility/bioinformatics/irida/model/remote/RemoteStatus.java @@ -65,7 +65,7 @@ public class RemoteStatus { private Date lastUpdate; @SuppressWarnings("unused") - private RemoteStatus() { + protected RemoteStatus() { } public RemoteStatus(String url, RemoteAPI api) { From b88900bee483439ec2bf072d239e3c4d6378d413 Mon Sep 17 00:00:00 2001 From: Tom Matthews Date: Wed, 24 Jun 2020 15:42:56 -0500 Subject: [PATCH 02/11] updated pom version and added to changelog --- CHANGELOG.md | 1 + pom.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdc2dda5e39..65b30dd1f1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Changes -------------- * [UI]: Fixed bug when creating/modifying a metadata template the user could not search for a field. (20.05.1) * [UI]: Fixed bug where managers could not load Users listing page. (20.05.1) +* [UI]: Fixed issue where analysis results pages would hang after running with remote synchronized data. (20.05.2) 20.01 to 20.05 -------------- diff --git a/pom.xml b/pom.xml index 2570ec03cb3..56acfb3cf06 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ ca.corefacility.bioinformatics irida war - 20.05.1 + 20.05.2 irida http://www.irida.ca From 3586945065e43d9aaa3ad5d832a846d71cb885d9 Mon Sep 17 00:00:00 2001 From: Tom Matthews Date: Wed, 24 Jun 2020 16:00:47 -0500 Subject: [PATCH 03/11] updated chromedriver version to latest for tests --- CHANGELOG.md | 1 + src/main/webapp/package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65b30dd1f1b..45ba918c4ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Changes * [UI]: Fixed bug when creating/modifying a metadata template the user could not search for a field. (20.05.1) * [UI]: Fixed bug where managers could not load Users listing page. (20.05.1) * [UI]: Fixed issue where analysis results pages would hang after running with remote synchronized data. (20.05.2) +* [Developer]: Updated chromedriver to version `latest`. (20.05.2) 20.01 to 20.05 -------------- diff --git a/src/main/webapp/package.json b/src/main/webapp/package.json index b299905cb96..a7bf9832a8d 100644 --- a/src/main/webapp/package.json +++ b/src/main/webapp/package.json @@ -99,7 +99,7 @@ "babel-loader": "^8.1.0", "babel-plugin-import": "^1.13.0", "bootstrap-sass": "^3.3.7", - "chromedriver": "^79.0.0", + "chromedriver": "latest", "clean-webpack-plugin": "^3.0.0", "css-loader": "^3.5.2", "cssnano": "^4.1.10", From 3f232b80c5354de8bdf92d0724c4ad8f62ef7047 Mon Sep 17 00:00:00 2001 From: Tom Matthews Date: Thu, 25 Jun 2020 09:54:26 -0500 Subject: [PATCH 04/11] fixed analysis page test errors by bringing in changes from development --- src/main/webapp/yarn.lock | 219 ++++++++++++++++-- .../AnnouncementControlPage.java | 6 +- 2 files changed, 204 insertions(+), 21 deletions(-) diff --git a/src/main/webapp/yarn.lock b/src/main/webapp/yarn.lock index f3ae9e36c43..e285032ed6c 100644 --- a/src/main/webapp/yarn.lock +++ b/src/main/webapp/yarn.lock @@ -1012,6 +1012,27 @@ dependencies: "@fortawesome/fontawesome-common-types" "^0.2.28" +"@nodelib/fs.scandir@2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" + integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== + dependencies: + "@nodelib/fs.stat" "2.0.3" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" + integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" + integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== + dependencies: + "@nodelib/fs.scandir" "2.1.3" + fastq "^1.6.0" + "@reach/router@^1.2.1": version "1.3.3" resolved "https://registry.yarnpkg.com/@reach/router/-/router-1.3.3.tgz#58162860dce6c9449d49be86b0561b5ef46d80db" @@ -1153,6 +1174,13 @@ "@types/webpack-sources" "*" source-map "^0.6.0" +"@types/yauzl@^2.9.1": + version "2.9.1" + resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.1.tgz#d10f69f9f522eef3cf98e30afb684a1e1ec923af" + integrity sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA== + dependencies: + "@types/node" "*" + "@webassemblyjs/ast@1.9.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" @@ -1653,6 +1681,11 @@ array-union@^1.0.1: dependencies: array-uniq "^1.0.1" +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + array-uniq@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" @@ -2031,6 +2064,13 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" +braces@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + brorand@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" @@ -2374,16 +2414,16 @@ chrome-trace-event@^1.0.2: dependencies: tslib "^1.9.0" -chromedriver@^79.0.0: - version "79.0.3" - resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-79.0.3.tgz#b3a5d62017e68b9a86e3475b66e3eb23fca26273" - integrity sha512-XkgXrYF+M1oAT02aIIEjaM4x0oaUXTBoB+PvCNdh3rKUhn596byCc6Jy3USutZj4/0R/K+Bqf4I+4RESvfjehg== +chromedriver@latest: + version "83.0.0" + resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-83.0.0.tgz#75d7d838e58014658c3990089464166fef951926" + integrity sha512-AePp9ykma+z4aKPRqlbzvVlc22VsQ6+rgF+0aL3B5onHOncK18dWSkLrSSJMczP/mXILN9ohGsvpuTwoRSj6OQ== dependencies: "@testim/chrome-version" "^1.0.7" - del "^4.1.1" - extract-zip "^1.6.7" - mkdirp "^0.5.1" - request "^2.88.0" + axios "^0.19.2" + del "^5.1.0" + extract-zip "^2.0.0" + mkdirp "^1.0.4" tcp-port-used "^1.0.1" cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: @@ -2605,7 +2645,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.5.0, concat-stream@^1.6.2: +concat-stream@^1.5.0: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== @@ -3218,6 +3258,20 @@ del@^4.1.1: pify "^4.0.1" rimraf "^2.6.3" +del@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/del/-/del-5.1.0.tgz#d9487c94e367410e6eff2925ee58c0c84a75b3a7" + integrity sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA== + dependencies: + globby "^10.0.1" + graceful-fs "^4.2.2" + is-glob "^4.0.1" + is-path-cwd "^2.2.0" + is-path-inside "^3.0.1" + p-map "^3.0.0" + rimraf "^3.0.0" + slash "^3.0.0" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -3270,6 +3324,13 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + dns-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" @@ -3912,15 +3973,16 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-zip@^1.6.7: - version "1.7.0" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927" - integrity sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA== +extract-zip@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" + integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== dependencies: - concat-stream "^1.6.2" - debug "^2.6.9" - mkdirp "^0.5.4" + debug "^4.1.1" + get-stream "^5.1.0" yauzl "^2.10.0" + optionalDependencies: + "@types/yauzl" "^2.9.1" extsprintf@1.3.0: version "1.3.0" @@ -3942,6 +4004,18 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== +fast-glob@^3.0.3: + version "3.2.4" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3" + integrity sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.0" + merge2 "^1.3.0" + micromatch "^4.0.2" + picomatch "^2.2.1" + fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -3952,6 +4026,13 @@ fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fastq@^1.6.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481" + integrity sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q== + dependencies: + reusify "^1.0.4" + faye-websocket@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" @@ -4015,6 +4096,13 @@ fill-range@^4.0.0: repeat-string "^1.6.1" to-regex-range "^2.1.0" +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + finalhandler@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" @@ -4298,6 +4386,13 @@ get-stream@^4.0.0: dependencies: pump "^3.0.0" +get-stream@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9" + integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== + dependencies: + pump "^3.0.0" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -4318,7 +4413,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0: +glob-parent@^5.0.0, glob-parent@^5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== @@ -4385,6 +4480,20 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" +globby@^10.0.1: + version "10.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" + integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== + dependencies: + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" + globby@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" @@ -4714,6 +4823,11 @@ ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== +ignore@^5.1.1: + version "5.1.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" + integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== + immediate@~3.0.5: version "3.0.6" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" @@ -5083,12 +5197,17 @@ is-number@^3.0.0: dependencies: kind-of "^3.0.2" +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + is-obj@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-path-cwd@^2.0.0: +is-path-cwd@^2.0.0, is-path-cwd@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== @@ -5107,6 +5226,11 @@ is-path-inside@^2.1.0: dependencies: path-is-inside "^1.0.2" +is-path-inside@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" + integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg== + is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -5743,6 +5867,11 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== +merge2@^1.2.3, merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -5767,6 +5896,14 @@ micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" +micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" @@ -5895,13 +6032,18 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.4, mkdirp@~0.5.1: +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== dependencies: minimist "^1.2.5" +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + moment@^2.24.0, moment@^2.9.0, moment@~2.25.3: version "2.25.3" resolved "https://registry.yarnpkg.com/moment/-/moment-2.25.3.tgz#252ff41319cf41e47761a1a88cab30edfe9808c0" @@ -6602,6 +6744,11 @@ path-type@^2.0.0: dependencies: pify "^2.0.0" +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + pbkdf2@^3.0.3: version "3.0.17" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" @@ -6638,6 +6785,11 @@ phylocanvas@^2.8.1: resolved "https://registry.yarnpkg.com/phylocanvas/-/phylocanvas-2.8.1.tgz#8314d6b9b6a1b0cbd6c593a96f069354f80ec56d" integrity sha1-gxTWubahsMvWxZOpbwaTVPgOxW0= +picomatch@^2.0.5, picomatch@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -8031,6 +8183,11 @@ retry@^0.12.0: resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + rework-visit@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/rework-visit/-/rework-visit-1.0.0.tgz#9945b2803f219e2f7aca00adb8bc9f640f842c9a" @@ -8068,6 +8225,13 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" +rimraf@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -8081,6 +8245,11 @@ run-async@^2.4.0: resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== +run-parallel@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" + integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q== + run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" @@ -8381,6 +8550,11 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + slice-ansi@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" @@ -9073,6 +9247,13 @@ to-regex-range@^2.1.0: is-number "^3.0.0" repeat-string "^1.6.1" +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + to-regex@^3.0.1, to-regex@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" diff --git a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/announcements/AnnouncementControlPage.java b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/announcements/AnnouncementControlPage.java index be44055f648..689ca0e896c 100644 --- a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/announcements/AnnouncementControlPage.java +++ b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/announcements/AnnouncementControlPage.java @@ -10,6 +10,7 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.Wait; import org.openqa.selenium.support.ui.WebDriverWait; import org.slf4j.Logger; @@ -79,10 +80,11 @@ public void clickCreateNewAnnouncementButton() { } public void gotoMessageDetails(int index) { - List messages = driver.findElements(By.cssSelector("td.t-announcement a")); + List messages = driver.findElements(By.cssSelector("td.t-announcement p")); if (index < messages.size()) { messages.get(index).click(); - waitForTime(DEFAULT_WAIT); + WebDriverWait wait = new WebDriverWait(driver, 10); + wait.until(ExpectedConditions.urlContains("/details")); } else { throw new IndexOutOfBoundsException(); } From 61abd64a0cabb1a78a3aba3de4c775c097197331 Mon Sep 17 00:00:00 2001 From: Josh Adam Date: Mon, 27 Jul 2020 11:34:42 -0500 Subject: [PATCH 05/11] :ambulance: Fixed issues with formatting on the sample details page. --- CHANGELOG.md | 2 ++ pom.xml | 2 +- src/main/webapp/pages/samples/sample.html | 12 +++++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45ba918c4ef..452013d76d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ Changes * [UI]: Fixed bug where managers could not load Users listing page. (20.05.1) * [UI]: Fixed issue where analysis results pages would hang after running with remote synchronized data. (20.05.2) * [Developer]: Updated chromedriver to version `latest`. (20.05.2) +* [UI]: Updated sample details metadata numbers containing decimal places will be display 2 significant places. (20.05.3); +* [UI]: Updated sample details metadata so that long values will be broken up over multiple lines. (20.05.3); 20.01 to 20.05 -------------- diff --git a/pom.xml b/pom.xml index 56acfb3cf06..9bc3c342191 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ ca.corefacility.bioinformatics irida war - 20.05.2 + 20.05.3 irida http://www.irida.ca diff --git a/src/main/webapp/pages/samples/sample.html b/src/main/webapp/pages/samples/sample.html index 46807f5ab25..c38bd6521cf 100644 --- a/src/main/webapp/pages/samples/sample.html +++ b/src/main/webapp/pages/samples/sample.html @@ -4,6 +4,11 @@ data-layout-decorate="~{samples/_base}"> THIS IS SOMETHING WRONG +
@@ -91,7 +96,12 @@
-
+ +
+
NUMBER
+
+
From 68081c2382124056a5a4ec1c2c6502bc69f1def5 Mon Sep 17 00:00:00 2001 From: Josh Adam Date: Mon, 27 Jul 2020 13:47:41 -0500 Subject: [PATCH 06/11] :construction: Fix cell format during upload. --- CHANGELOG.md | 2 +- .../metadata/ProjectSampleMetadataController.java | 12 ++++++++++-- src/main/webapp/pages/samples/sample.html | 7 +------ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 452013d76d9..7855e0acb4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ Changes * [UI]: Fixed bug where managers could not load Users listing page. (20.05.1) * [UI]: Fixed issue where analysis results pages would hang after running with remote synchronized data. (20.05.2) * [Developer]: Updated chromedriver to version `latest`. (20.05.2) -* [UI]: Updated sample details metadata numbers containing decimal places will be display 2 significant places. (20.05.3); +* [UI]: Updated importing numbers through excel file. IRIDA will now check for excel formatted numeric cells and keep the formatting. (20.05.3); * [UI]: Updated sample details metadata so that long values will be broken up over multiple lines. (20.05.3); 20.01 to 20.05 diff --git a/src/main/java/ca/corefacility/bioinformatics/irida/ria/web/projects/metadata/ProjectSampleMetadataController.java b/src/main/java/ca/corefacility/bioinformatics/irida/ria/web/projects/metadata/ProjectSampleMetadataController.java index 8710921e5c8..06ff40a6f18 100644 --- a/src/main/java/ca/corefacility/bioinformatics/irida/ria/web/projects/metadata/ProjectSampleMetadataController.java +++ b/src/main/java/ca/corefacility/bioinformatics/irida/ria/web/projects/metadata/ProjectSampleMetadataController.java @@ -132,14 +132,22 @@ public SampleMetadataStorage createProjectSampleMetadata(HttpSession session, @P Iterator cellIterator = row.cellIterator(); while (cellIterator.hasNext()) { Cell cell = cellIterator.next(); + int columnIndex = cell.getColumnIndex(); if (columnIndex < headers.size()) { String header = headers.get(columnIndex); if (!Strings.isNullOrEmpty(header)) { // Need to ignore empty headers. - cell.setCellType(CellType.STRING); - rowMap.put(header, cell.getStringCellValue()); + if(cell.getCellTypeEnum().equals(CellType.NUMERIC)) { + DataFormatter formatter = new DataFormatter(); + String value = formatter.formatCellValue(cell); + rowMap.put(header, value); + } + else { + cell.setCellType(CellType.STRING); + rowMap.put(header, cell.getStringCellValue()); + } } } } diff --git a/src/main/webapp/pages/samples/sample.html b/src/main/webapp/pages/samples/sample.html index c38bd6521cf..670cb0683a5 100644 --- a/src/main/webapp/pages/samples/sample.html +++ b/src/main/webapp/pages/samples/sample.html @@ -96,12 +96,7 @@
- -
-
NUMBER
-
- +
From 8225710892b864fec5f931b454e69addbe6ad003 Mon Sep 17 00:00:00 2001 From: Josh Adam Date: Wed, 29 Jul 2020 10:31:19 -0500 Subject: [PATCH 07/11] :white_check_mark: Added test to ensure numbers are formatted properly. --- .../ProjectSampleMetadataController.java | 5 +++ .../ProjectSampleMetadataImportPage.java | 14 +++++++ .../ProjectSampleMetadataImportPageIT.java | 36 +++++++++++++++--- .../resources/files/metadata-upload/good.xlsx | Bin 11270 -> 7930 bytes 4 files changed, 50 insertions(+), 5 deletions(-) diff --git a/src/main/java/ca/corefacility/bioinformatics/irida/ria/web/projects/metadata/ProjectSampleMetadataController.java b/src/main/java/ca/corefacility/bioinformatics/irida/ria/web/projects/metadata/ProjectSampleMetadataController.java index 06ff40a6f18..4e54f7632fb 100644 --- a/src/main/java/ca/corefacility/bioinformatics/irida/ria/web/projects/metadata/ProjectSampleMetadataController.java +++ b/src/main/java/ca/corefacility/bioinformatics/irida/ria/web/projects/metadata/ProjectSampleMetadataController.java @@ -140,6 +140,11 @@ public SampleMetadataStorage createProjectSampleMetadata(HttpSession session, @P if (!Strings.isNullOrEmpty(header)) { // Need to ignore empty headers. if(cell.getCellTypeEnum().equals(CellType.NUMERIC)) { + /* + This is a special handler for number cells. It was requested that numbers + keep their formatting from their excel files. E.g. 2.222222 with formatting + for 2 decimal places will be saved as 2.22. + */ DataFormatter formatter = new DataFormatter(); String value = formatter.formatCellValue(cell); rowMap.put(header, value); diff --git a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/projects/ProjectSampleMetadataImportPage.java b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/projects/ProjectSampleMetadataImportPage.java index 623e6cd6562..82a34733fd4 100644 --- a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/projects/ProjectSampleMetadataImportPage.java +++ b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/projects/ProjectSampleMetadataImportPage.java @@ -3,6 +3,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; +import java.util.stream.Collectors; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; @@ -24,6 +25,8 @@ public class ProjectSampleMetadataImportPage extends AbstractPage { @FindBy(id = "preview-btn") WebElement previewBtn; @FindBy(id = "found-pill") WebElement foundPill; @FindBy(id = "missing-pill") WebElement missingPill; + @FindBy(css = "thead th") List headers; + @FindBy(css = "tbody tr") List rows; public ProjectSampleMetadataImportPage(WebDriver driver) { super(driver); @@ -55,4 +58,15 @@ public int getFoundCount() { public int getMissingCount() { return Integer.parseInt(missingPill.findElement(By.className("badge")).getText()); } + + public List getNumberColumnValues() { + // Get the text from the headers + List headerText = headers.stream() + .map(WebElement::getText).collect(Collectors.toList()); + // Find which columns is the numbers + int index = headerText.indexOf("Numbers"); + List numbers = rows.stream().map(row -> row.findElements(By.tagName("td")).get(index).getText()).collect( + Collectors.toList()); + return numbers; + } } diff --git a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectSampleMetadataImportPageIT.java b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectSampleMetadataImportPageIT.java index 8402c798e94..e2349779735 100644 --- a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectSampleMetadataImportPageIT.java +++ b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectSampleMetadataImportPageIT.java @@ -1,16 +1,23 @@ package ca.corefacility.bioinformatics.irida.ria.integration.projects; -import static org.junit.Assert.assertEquals; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.List; +import java.util.stream.Collectors; import org.junit.Before; import org.junit.Test; -import com.github.springtestdbunit.annotation.DatabaseSetup; - import ca.corefacility.bioinformatics.irida.ria.integration.AbstractIridaUIITChromeDriver; import ca.corefacility.bioinformatics.irida.ria.integration.pages.LoginPage; import ca.corefacility.bioinformatics.irida.ria.integration.pages.projects.ProjectSampleMetadataImportPage; +import com.github.springtestdbunit.annotation.DatabaseSetup; +import com.google.common.collect.ImmutableList; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + @DatabaseSetup("/ca/corefacility/bioinformatics/irida/ria/web/projects/ProjectSampleMetadataView.xml") public class ProjectSampleMetadataImportPageIT extends AbstractIridaUIITChromeDriver { private static final String GOOD_FILE_PATH = "src/test/resources/files/metadata-upload/good.xlsx"; @@ -27,7 +34,26 @@ public void testGoodFileAndHeaders() { page.uploadMetadataFile(GOOD_FILE_PATH); page.selectSampleNameColumn(); assertEquals("Has incorrect amount of rows matching sample names", 5, page.getFoundCount()); - assertEquals("Has incorrect amout of rows missing sample names", 0, page.getMissingCount()); + assertEquals("Has incorrect amount of rows missing sample names", 0, page.getMissingCount()); + + /* + Check formatting. A special check for number column formatting has been added in July 2020. + Expected: 2.2222 -> 2.22 (if formatting set to 2 decimals). Actual numbers from file, before formatting: + 2.222222 + 2.3666 + 1.5689 + 63.89756 + 59.6666 + */ + List values = ImmutableList.of(2.222222, 2.3666, 1.5689, 63.89756, 59.6666) + .stream() + .map(num -> BigDecimal.valueOf(num) + .setScale(2, RoundingMode.HALF_UP) + .doubleValue()) + .collect(Collectors.toList()); + List formattedNumbers = page.getNumberColumnValues(); + formattedNumbers.forEach(num -> assertTrue("Found " + num + " that was not formatted properly", values.contains(Double.valueOf(num)))); + } @Test @@ -36,6 +62,6 @@ public void testMixedFileAndHeaders() { page.uploadMetadataFile(MIXED_FILE_PATH); page.selectSampleNameColumn(); assertEquals("Has incorrect amount of rows matching sample names", 5, page.getFoundCount()); - assertEquals("Has incorrect amout of rows missing sample names", 2, page.getMissingCount()); + assertEquals("Has incorrect amount of rows missing sample names", 2, page.getMissingCount()); } } diff --git a/src/test/resources/files/metadata-upload/good.xlsx b/src/test/resources/files/metadata-upload/good.xlsx index 5c0221148bbf370f2f1360ce71e7cc6bc926eaf0..723f16c471c2c682e6f16b291c2a713fdec7058f 100644 GIT binary patch literal 7930 zcmeHMWmH@1(#GAbxEFVCp}4z4arY1iUI-Kl6nD4cP)c!^;!aw;xI+uYDK7oOxzgT# z=bRt+_noY)oi}UG?7ilBXWnOK)Ro{72w+f9P+;Er-l@aNUmC-r|ne^~9L5NcQ zb5a&jXGW!b%uk*hM*FQKG2%?Q>mW`n`LVEJ~39NH$%3W28 ztGAb^FYQ|1#{{z4Ny z;&iQhpMGHe6=*Fb%Ppd(HLofC`+PXL9J_SCxfmLO)4TLuk`7$VcY%qyD<9Lm=>#({ zk=gkoU0a`hs=g(Ewn)o==DKKPl1eo2P46|#m-=FC^7A|Au@Am8HNXcL{m+@{LttTG z2$25{M&f_K_^{L6?5wTb-8lca@IF8pt)rqw#*Nc{p;zt)6bO{0OTv`QV@`&Xz$ADp zX!|U){^&(RgCNcAbxivkb*!zIBEXr`cn5e=*)~TmzweT6Xnea_vaCVthi_IsrF@OxIu6-1xvCW||g2i}y&uVr| z7hDcP7EzMePa8o>kX@8V+W{74DMJJm-0#uGDzGfXUFEhGj8ak{wlqEM;XH52(+ml; zJ^PapPm=wR$y{Qsk6Mx27;`-aPMo|(322R zPS6M_hw&HGEH6Zo%zjIH#7Ie0>Kuk<0seZ4i6q=PXso*Rp4!b=exQ*|J?<$EaH5>G zglS}3-$}y*7s0Ac^W$gntFgMv97WZ%^Fo%0@S;!EFh!Dy8oM2L5~v?Ls=g9d&lVct z$|N3po2`U=JJe9yj-aYWYvVJiOk!WJeeJhcO{HPilV}L4EGtGMa+SOo)0`jGIGf`adkJ6=a$OIEMS=~UzOnynrrp0vXXc6FoeTwd)=D|B@v#^H9GtPTUyK}49Nxil}>vy^{$^q##~ z0@Wra=_BsM$eEIH3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y$lR}rF5PlhTH}uRqU)>Q7ux&UxQn%K2y1b;O6kKVr*~;=IgM#f;m=xrJCXiX%daPwfAr-V|8KSYc8>Y0mS6WZe`ui~ z`%TNg>~en9@GGnSL&FC22p&2bm;d3|zl#2q0sJ8d0Ju;C0Kf8qU#0)*SpO`o3;dJx Y?`~E_0Rf6M008ah2MX2=`k#0I4~?d!DgXcg From 74d225cd77e406427fb637a1f07c90a0c5870dd0 Mon Sep 17 00:00:00 2001 From: Josh Adam Date: Wed, 29 Jul 2020 13:44:08 -0500 Subject: [PATCH 08/11] :white_check_mark: Updated method call to get the values for a column --- .../ProjectSampleMetadataImportPage.java | 21 ++++++++++++------- .../ProjectSampleMetadataImportPageIT.java | 2 +- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/projects/ProjectSampleMetadataImportPage.java b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/projects/ProjectSampleMetadataImportPage.java index 82a34733fd4..4fbc0df9f77 100644 --- a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/projects/ProjectSampleMetadataImportPage.java +++ b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/projects/ProjectSampleMetadataImportPage.java @@ -52,21 +52,26 @@ public void selectSampleNameColumn() { } public int getFoundCount() { - return Integer.parseInt(foundPill.findElement(By.className("badge")).getText()); + return Integer.parseInt(foundPill.findElement(By.className("badge")) + .getText()); } public int getMissingCount() { - return Integer.parseInt(missingPill.findElement(By.className("badge")).getText()); + return Integer.parseInt(missingPill.findElement(By.className("badge")) + .getText()); } - public List getNumberColumnValues() { + public List getValuesForColumnByName(String column) { // Get the text from the headers List headerText = headers.stream() - .map(WebElement::getText).collect(Collectors.toList()); + .map(WebElement::getText) + .collect(Collectors.toList()); // Find which columns is the numbers - int index = headerText.indexOf("Numbers"); - List numbers = rows.stream().map(row -> row.findElements(By.tagName("td")).get(index).getText()).collect( - Collectors.toList()); - return numbers; + int index = headerText.indexOf(column); + return rows.stream() + .map(row -> row.findElements(By.tagName("td")) + .get(index) + .getText()) + .collect(Collectors.toList()); } } diff --git a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectSampleMetadataImportPageIT.java b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectSampleMetadataImportPageIT.java index e2349779735..1de42872ca1 100644 --- a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectSampleMetadataImportPageIT.java +++ b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectSampleMetadataImportPageIT.java @@ -51,7 +51,7 @@ public void testGoodFileAndHeaders() { .setScale(2, RoundingMode.HALF_UP) .doubleValue()) .collect(Collectors.toList()); - List formattedNumbers = page.getNumberColumnValues(); + List formattedNumbers = page.getValuesForColumnByName("Numbers"); formattedNumbers.forEach(num -> assertTrue("Found " + num + " that was not formatted properly", values.contains(Double.valueOf(num)))); } From 088730bf26d9e7dfdf7e6ebb282a38cb93177568 Mon Sep 17 00:00:00 2001 From: Josh Adam Date: Tue, 11 Aug 2020 20:32:01 -0500 Subject: [PATCH 09/11] :white_check_mark: Collaborators cannot add members to projects with tests. --- .../project-members/ProjectMembersTable.jsx | 6 +++++- .../ria/integration/pages/ProjectMembersPage.java | 4 ++++ .../integration/projects/ProjectMembersPageIT.java | 13 ++++++++++--- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/resources/js/components/project-members/ProjectMembersTable.jsx b/src/main/webapp/resources/js/components/project-members/ProjectMembersTable.jsx index 3796deeb312..cd75b581171 100644 --- a/src/main/webapp/resources/js/components/project-members/ProjectMembersTable.jsx +++ b/src/main/webapp/resources/js/components/project-members/ProjectMembersTable.jsx @@ -69,7 +69,11 @@ export function ProjectMembersTable() { return ( ]} + buttons={[ + window.PAGE.canManage ? ( + + ) : null, + ]} columns={columns} /> ); diff --git a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/ProjectMembersPage.java b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/ProjectMembersPage.java index cbcdaf36feb..cfd8c066ae9 100644 --- a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/ProjectMembersPage.java +++ b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/ProjectMembersPage.java @@ -87,6 +87,10 @@ public void addUserToProject(String name) { addMemberButton.addMember(driver, name); } + public boolean isAddMemberBtnVisible() { + return driver.findElements(By.className("t-add-member-btn")).size() > 0; + } + public void updateUserRole(int row, String role) { WebElement roleSelect = roleSelects.get(row); roleSelect.click(); diff --git a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectMembersPageIT.java b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectMembersPageIT.java index a9a644aca92..d58c68123a5 100644 --- a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectMembersPageIT.java +++ b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectMembersPageIT.java @@ -14,8 +14,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; /** *

@@ -27,7 +26,7 @@ public class ProjectMembersPageIT extends AbstractIridaUIITChromeDriver { private static final ImmutableList COLLABORATORS_NAMES = ImmutableList.of("Mr. Manager", "test User"); - private List> BREADCRUMBS = ImmutableList.of( + private final List> BREADCRUMBS = ImmutableList.of( ImmutableMap.of("href", "/projects", "text", "Projects"), ImmutableMap.of("href", "/projects/1", "text", "project"), ImmutableMap.of("href", "/projects/1/settings", "text", "Settings")); @@ -38,6 +37,7 @@ public void testCanManagePageSetUp() { ProjectMembersPage page = ProjectMembersPage.goTo(driver()); assertEquals("Check for proper translation in title", "Members", page.getPageHeaderTitle()); assertEquals("Should be 2 members in the project", 2, page.getNumberOfMembers()); + assertTrue("Add Members button should be visible", page.isAddMemberBtnVisible()); // Test remove user from project page.removeUser(1); @@ -57,4 +57,11 @@ public void testCanManagePageSetUp() { page.updateUserRole(0, ProjectRole.PROJECT_OWNER.toString()); assertTrue(page.isUpdateMemberSuccessNotificationDisplayed()); } + + @Test + public void testCollaborator() { + LoginPage.loginAsUser(driver()); + ProjectMembersPage page = ProjectMembersPage.goTo(driver()); + assertFalse("Add Members button should not be visible", page.isAddMemberBtnVisible()); + } } From 5ad161d149c290727a0e6460e9f729391a581c5a Mon Sep 17 00:00:00 2001 From: Josh Adam Date: Tue, 11 Aug 2020 21:31:46 -0500 Subject: [PATCH 10/11] :white_check_mark: Collaborators should not be able to import metadata and test --- .../linelist/components/Toolbar/Toolbar.jsx | 34 +++++----- .../linelist/components/Tour/steps.js | 63 +++++++++++-------- .../pages/projects/ProjectLineListPage.java | 4 ++ .../projects/ProjectLineListPageIT.java | 6 +- 4 files changed, 64 insertions(+), 43 deletions(-) diff --git a/src/main/webapp/resources/js/pages/projects/linelist/components/Toolbar/Toolbar.jsx b/src/main/webapp/resources/js/pages/projects/linelist/components/Toolbar/Toolbar.jsx index fd9de65f311..9eb7b6e8cf4 100644 --- a/src/main/webapp/resources/js/pages/projects/linelist/components/Toolbar/Toolbar.jsx +++ b/src/main/webapp/resources/js/pages/projects/linelist/components/Toolbar/Toolbar.jsx @@ -8,7 +8,7 @@ import { AddSamplesToCartButton } from "../AddToCartButton/AddSamplesToCart"; import { Button, Form, Input, Popover } from "antd"; import { IconCloudUpload, - IconQuestion + IconQuestion, } from "../../../../../components/icons/Icons"; const LineListTour = React.lazy(() => import("../Tour/LineListTour")); @@ -72,20 +72,26 @@ export class ToolbarComponent extends Component {

- - - + {window.project.canManage ? ( + + + + ) : null} this.props.updateFilter(e.target.value)} + onKeyUp={(e) => this.props.updateFilter(e.target.value)} id="js-table-filter" className="table-filter t-table-filter" style={{ - width: 200 + width: 200, }} /> @@ -103,7 +109,7 @@ export class ToolbarComponent extends Component { @@ -136,13 +142,13 @@ ToolbarComponent.propTypes = { exportCSV: PropTypes.func.isRequired, exportXLSX: PropTypes.func.isRequired, scrollTableToTop: PropTypes.func.isRequired, - updateFilter: PropTypes.func.isRequired + updateFilter: PropTypes.func.isRequired, }; -const mapStateToProps = state => ({}); +const mapStateToProps = (state) => ({}); -const mapDispatchToProps = dispatch => ({ - updateFilter: value => dispatch(entryActions.setGlobalFilter(value)) +const mapDispatchToProps = (dispatch) => ({ + updateFilter: (value) => dispatch(entryActions.setGlobalFilter(value)), }); export const Toolbar = connect( diff --git a/src/main/webapp/resources/js/pages/projects/linelist/components/Tour/steps.js b/src/main/webapp/resources/js/pages/projects/linelist/components/Tour/steps.js index 1e908107b7a..9ac794fd0eb 100644 --- a/src/main/webapp/resources/js/pages/projects/linelist/components/Tour/steps.js +++ b/src/main/webapp/resources/js/pages/projects/linelist/components/Tour/steps.js @@ -10,7 +10,7 @@ export const steps = [

{i18n("linelist.tour.table.content")}

); - } + }, }, { selector: ".ag-header-cell:nth-of-type(2)", @@ -32,7 +32,7 @@ export const steps = [ ); - } + }, }, { selector: `[tour="tour-columns"]`, @@ -48,7 +48,7 @@ export const steps = [

{i18n("linelist.tour.columns.content.end")}

); - } + }, }, { selector: `.ag-body-viewport-wrapper .ag-row:nth-of-type(1) .ag-cell:nth-of-type(1)`, @@ -61,7 +61,7 @@ export const steps = [

{i18n("linelist.tour.edit.content.cancel")}

); - } + }, }, { selector: `[tour="tour-search"]`, @@ -72,7 +72,7 @@ export const steps = [

{i18n("linelist.tour.search.content")}

); - } + }, }, { selector: `[tour="tour-filter-counts"]`, @@ -84,7 +84,7 @@ export const steps = [

{i18n("linelist.tour.filterCounts.content.example")}

); - } + }, }, { selector: `[tour="tour-export"]`, @@ -95,23 +95,32 @@ export const steps = [

{i18n("linelist.tour.export.content")}

); - } + }, }, - { - selector: `[tour="tour-import"]`, - content() { - return ( -
- {i18n("linelist.tour.import.title")} -

{i18n("linelist.tour.import.content.intro")}

-
    -
  • {i18n("linelist.tour.import.content.li1")}
  • -
  • {i18n("linelist.tour.import.content.li2")}
  • -
-
- ); + (function () { + /* + Since only managers can import metadata, we need to hide this step if a collaborator + is viewing the tour. + */ + if (window.project.canManage) { + return { + selector: `[tour="tour-import"]`, + content() { + return ( +
+ {i18n("linelist.tour.import.title")} +

{i18n("linelist.tour.import.content.intro")}

+
    +
  • {i18n("linelist.tour.import.content.li1")}
  • +
  • {i18n("linelist.tour.import.content.li2")}
  • +
+
+ ); + }, + }; } - }, + return null; + })(), { selector: ".ag-row .ag-selection-checkbox:nth-of-type(1)", content() { @@ -121,7 +130,7 @@ export const steps = [

{i18n("linelist.tour.select.content")}

); - } + }, }, { selector: `[tour="tour-counts"]`, @@ -132,7 +141,7 @@ export const steps = [

{i18n("linelist.tour.selectCounts.content")}

); - } + }, }, { selector: `[tour="tour-cart"]`, @@ -143,7 +152,7 @@ export const steps = [

{i18n("linelist.tour.cart.content")}

); - } + }, }, { selector: ".js-tour-button", @@ -153,6 +162,6 @@ export const steps = [ {i18n("linelist.tour.end")} ); - } - } -]; + }, + }, +].filter((i) => i); // Need to filter out any nulled out values. diff --git a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/projects/ProjectLineListPage.java b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/projects/ProjectLineListPage.java index 9337f435aa8..b4b96075e13 100644 --- a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/projects/ProjectLineListPage.java +++ b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/projects/ProjectLineListPage.java @@ -188,4 +188,8 @@ public int getTourStep() { waitForTime(500); return Integer.parseInt(tourStepBadge.getText()); } + + public boolean isImportMetadataBtnVisible() { + return driver.findElements(By.className("t-import-metadata-btn")).size() > 0; + } } diff --git a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectLineListPageIT.java b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectLineListPageIT.java index 3ee353f4ead..b91dfa4f44f 100644 --- a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectLineListPageIT.java +++ b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectLineListPageIT.java @@ -23,12 +23,13 @@ public class ProjectLineListPageIT extends AbstractIridaUIITChromeDriver { private final String COLUMN_ID = "irida-4"; // This is is based on the id of the MetadataField. @Test - public void testTableEditAsCollaborator() { + public void testPageAsCollaborator() { LoginPage.loginAsUser(driver()); driver().manage() .window() .setSize(new Dimension(1800, 1200)); // Make sure we can see everything. ProjectLineListPage page = ProjectLineListPage.goToPage(driver(), 1); + assertFalse("Should not display import metadata button to collaborators", page.isImportMetadataBtnVisible()); String newValue = "FOOBAR"; page.editCellContents(0, COLUMN_ID, newValue); @@ -36,13 +37,14 @@ public void testTableEditAsCollaborator() { } @Test - public void testTableSetup() { + public void testPageAsManager() { LoginPage.loginAsManager(driver()); driver().manage() .window() .setSize(new Dimension(1800, 1200)); // Make sure we can see everything. ProjectLineListPage page = ProjectLineListPage.goToPage(driver(), 1); + assertTrue("Should display import metadata button", page.isImportMetadataBtnVisible()); // Ensure translations are loaded onto the page. assertTrue("Applications translations should be loaded", page.ensureTranslationsLoaded("app")); From 8c19c880e5e99f14e50da27022edc18ab440ab70 Mon Sep 17 00:00:00 2001 From: Josh Adam Date: Wed, 12 Aug 2020 06:27:21 -0500 Subject: [PATCH 11/11] :memo: Updated CHANGELOG.md and pom.xml --- CHANGELOG.md | 2 ++ pom.xml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7855e0acb4c..1b86ac6ecdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ Changes * [Developer]: Updated chromedriver to version `latest`. (20.05.2) * [UI]: Updated importing numbers through excel file. IRIDA will now check for excel formatted numeric cells and keep the formatting. (20.05.3); * [UI]: Updated sample details metadata so that long values will be broken up over multiple lines. (20.05.3); +* [UI]: Fixed bug where import bulk metadata button was displayed on linelist page for project collaborators. (20.05.04) +* [UI]: Fixed bug where add member to project button was displayed on project members page for project collaborators. (20.05.04) 20.01 to 20.05 -------------- diff --git a/pom.xml b/pom.xml index 9bc3c342191..a7aa7b005e3 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ ca.corefacility.bioinformatics irida war - 20.05.3 + 20.05.4 irida http://www.irida.ca