diff --git a/kbase-extension/static/kbase/custom/custom.js b/kbase-extension/static/kbase/custom/custom.js index c3774cdeac..683e0ad528 100644 --- a/kbase-extension/static/kbase/custom/custom.js +++ b/kbase-extension/static/kbase/custom/custom.js @@ -135,8 +135,6 @@ define([ NarrativeRuntime, html ) => { - 'use strict'; - // Handlebars global configuration. Since these changes affect all usage of handlebars // in this app, they should be performed just once. Handlebars.registerHelper('numeral', (value, format, defaultValue, options) => { @@ -145,19 +143,8 @@ define([ options = defaultValue; defaultValue = undefined; } - let missing = false; - if (typeof value === 'string') { - if (value.trim().length === 0) { - missing = true; - } - } else if (typeof value !== 'number') { - missing = true; - } const numeralValue = numeral(value); - if (isNaN(numeralValue)) { - missing = true; - } - if (missing) { + if (numeralValue.value() === null) { return defaultValue || 'n/a'; } try { diff --git a/package-lock.json b/package-lock.json index 0b7619d029..4bdd679a78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -64,7 +64,7 @@ "axios": "^1.7.2", "bootstrap-sass": "^3.4.3", "chrome-launcher": "^1.1.2", - "chromedriver": "^127.0.0", + "chromedriver": "^128.0.0", "commander": "^12.1.0", "cssnano": "^7.0.2", "ejs": "^3.1.10", @@ -107,7 +107,7 @@ "postcss-scss": "^4.0.9", "postcss-unprefix": "^2.1.4", "prettier": "^3.3.2", - "puppeteer": "^22.11.0", + "puppeteer": "^23.2.1", "requirejs": "^2.3.6", "sass": "^1.77.5", "selenium-standalone": "^9.5.0", @@ -2925,11 +2925,10 @@ } }, "node_modules/axios": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", - "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.5.tgz", + "integrity": "sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==", "dev": true, - "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -3484,9 +3483,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001646", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001646.tgz", - "integrity": "sha512-dRg00gudiBDDTmUhClSdv3hqRfpbOnU28IpI1T6PBTLWa+kOj0681C8uML3PifYfREuBrVjDGhL3adYpBT6spw==", + "version": "1.0.30001657", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001657.tgz", + "integrity": "sha512-DPbJAlP8/BAXy3IgiWmZKItubb3TYGP0WscQQlVGIfT4s/YlFYVuJgyOsQNP7rJRChx/qdMeLJQJP0Sgg2yjNA==", "dev": true, "funding": [ { @@ -3584,14 +3583,14 @@ } }, "node_modules/chromedriver": { - "version": "127.0.0", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-127.0.0.tgz", - "integrity": "sha512-/Jla24iL0ly/EI7i/q0ukANkpAWvAkSHbvC7FtBZXFJXe6klH0n/XT56VSBcBYB1iMgWM8kPwqF8pb9gdqN9UA==", + "version": "128.0.0", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-128.0.0.tgz", + "integrity": "sha512-Ggo21z/dFQxTOTgU0vm0V59Mi79yyR+9AUk/KiVAsRfbDRdVZQYQWfgxnIvD/x8KOKn0oB7haRzDO/KfrKyvOA==", "dev": true, "hasInstallScript": true, "dependencies": { "@testim/chrome-version": "^1.1.4", - "axios": "^1.6.7", + "axios": "^1.7.4", "compare-versions": "^6.1.0", "extract-zip": "^2.0.1", "proxy-agent": "^6.4.0", @@ -3659,9 +3658,9 @@ } }, "node_modules/chromium-bidi": { - "version": "0.5.23", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.5.23.tgz", - "integrity": "sha512-1o/gLU9wDqbN5nL2MtfjykjOuighGXc3/hnWueO1haiEoFgX8h5vbvcA4tgdQfjw1mkZ1OEF4x/+HVeqEX6NoA==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.6.4.tgz", + "integrity": "sha512-8zoq6ogmhQQkAKZVKO2ObFTl4uOkqoX1PlKQX3hZQ5E9cbUotcAb7h4pTNVAGGv8Z36PF3CtdOriEp/Rz82JqQ==", "dev": true, "dependencies": { "mitt": "3.0.1", @@ -4950,9 +4949,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1299070", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1299070.tgz", - "integrity": "sha512-+qtL3eX50qsJ7c+qVyagqi7AWMoQCBGNfoyJZMwm/NSXVqLYbuitrWEEIzxfUmTNy7//Xe8yhMmQ+elj3uAqSg==", + "version": "0.0.1330662", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1330662.tgz", + "integrity": "sha512-pzh6YQ8zZfz3iKlCvgzVCu22NdpZ8hNmwU6WnQjNVquh0A9iVosPtNLWDwaWVGyrntQlltPFztTMK5Cg6lfCuw==", "dev": true }, "node_modules/di": { @@ -15361,55 +15360,57 @@ } }, "node_modules/puppeteer": { - "version": "22.11.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.11.0.tgz", - "integrity": "sha512-U5U0Dx5Tsd/ec39BmflhcSFIK9UnZxGQfyUzvQVHivt6gIi6RgJqYL9MJaU90OG6tTz65XqzN4wF0ZyDyY0NuA==", + "version": "23.2.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.2.1.tgz", + "integrity": "sha512-IvJOBP2APjcIR2k0xKYYpAs/hAa39e6sn7y+qMlSWJDRraEc4JLfgCKlkXopzD5jrSc1iTANHWw7Rrj/w7bgpw==", "dev": true, "hasInstallScript": true, - "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.2.3", - "cosmiconfig": "9.0.0", - "devtools-protocol": "0.0.1299070", - "puppeteer-core": "22.11.0" + "@puppeteer/browsers": "2.3.1", + "chromium-bidi": "0.6.4", + "cosmiconfig": "^9.0.0", + "devtools-protocol": "0.0.1330662", + "puppeteer-core": "23.2.1", + "typed-query-selector": "^2.12.0" }, "bin": { - "puppeteer": "lib/esm/puppeteer/node/cli.js" + "puppeteer": "lib/cjs/puppeteer/node/cli.js" }, "engines": { "node": ">=18" } }, "node_modules/puppeteer-core": { - "version": "22.11.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.11.0.tgz", - "integrity": "sha512-57YUjhRoSpZWg9lCssWsgzM1/X/1jQnkKbbspbeW0bhZTt3TD4WdNXEYI7KrFFnSvx21tyHhfWW0zlxzbwYSAA==", + "version": "23.2.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.2.1.tgz", + "integrity": "sha512-AIFWfQ4Sq+En+OgqIUy8VJmD8yJHMDyt+qEmEVKW07zu5DKDNqysO7fzBZp0W85ShJTUlUf+RleKl4XLwFpUPA==", "dev": true, "dependencies": { - "@puppeteer/browsers": "2.2.3", - "chromium-bidi": "0.5.23", - "debug": "4.3.5", - "devtools-protocol": "0.0.1299070", - "ws": "8.17.0" + "@puppeteer/browsers": "2.3.1", + "chromium-bidi": "0.6.4", + "debug": "^4.3.6", + "devtools-protocol": "0.0.1330662", + "typed-query-selector": "^2.12.0", + "ws": "^8.18.0" }, "engines": { "node": ">=18" } }, "node_modules/puppeteer-core/node_modules/@puppeteer/browsers": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.2.3.tgz", - "integrity": "sha512-bJ0UBsk0ESOs6RFcLXOt99a3yTDcOKlzfjad+rhFwdaG1Lu/Wzq58GHYCDTlZ9z6mldf4g+NTb+TXEfe0PpnsQ==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.3.1.tgz", + "integrity": "sha512-uK7o3hHkK+naEobMSJ+2ySYyXtQkBxIH8Gn4MK9ciePjNV+Pf+PgY/W7iPzn2MTjl3stcYB5AlcTmPYw7AXDwA==", "dev": true, "dependencies": { - "debug": "4.3.4", - "extract-zip": "2.0.1", - "progress": "2.0.3", - "proxy-agent": "6.4.0", - "semver": "7.6.0", - "tar-fs": "3.0.5", - "unbzip2-stream": "1.4.3", - "yargs": "17.7.2" + "debug": "^4.3.6", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.4.0", + "semver": "^7.6.3", + "tar-fs": "^3.0.6", + "unbzip2-stream": "^1.4.3", + "yargs": "^17.7.2" }, "bin": { "browsers": "lib/cjs/main-cli.js" @@ -15418,23 +15419,6 @@ "node": ">=18" } }, - "node_modules/puppeteer-core/node_modules/@puppeteer/browsers/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/puppeteer-core/node_modules/agent-base": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", @@ -15448,9 +15432,9 @@ } }, "node_modules/puppeteer-core/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -15465,9 +15449,9 @@ } }, "node_modules/puppeteer-core/node_modules/https-proxy-agent": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dev": true, "dependencies": { "agent-base": "^7.0.2", @@ -15506,13 +15490,10 @@ } }, "node_modules/puppeteer-core/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -15520,22 +15501,10 @@ "node": ">=10" } }, - "node_modules/puppeteer-core/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/puppeteer-core/node_modules/tar-fs": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.5.tgz", - "integrity": "sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", + "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", "dev": true, "dependencies": { "pump": "^3.0.0", @@ -15546,26 +15515,20 @@ "bare-path": "^2.1.0" } }, - "node_modules/puppeteer-core/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/puppeteer/node_modules/@puppeteer/browsers": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.2.3.tgz", - "integrity": "sha512-bJ0UBsk0ESOs6RFcLXOt99a3yTDcOKlzfjad+rhFwdaG1Lu/Wzq58GHYCDTlZ9z6mldf4g+NTb+TXEfe0PpnsQ==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.3.1.tgz", + "integrity": "sha512-uK7o3hHkK+naEobMSJ+2ySYyXtQkBxIH8Gn4MK9ciePjNV+Pf+PgY/W7iPzn2MTjl3stcYB5AlcTmPYw7AXDwA==", "dev": true, "dependencies": { - "debug": "4.3.4", - "extract-zip": "2.0.1", - "progress": "2.0.3", - "proxy-agent": "6.4.0", - "semver": "7.6.0", - "tar-fs": "3.0.5", - "unbzip2-stream": "1.4.3", - "yargs": "17.7.2" + "debug": "^4.3.6", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.4.0", + "semver": "^7.6.3", + "tar-fs": "^3.0.6", + "unbzip2-stream": "^1.4.3", + "yargs": "^17.7.2" }, "bin": { "browsers": "lib/cjs/main-cli.js" @@ -15586,10 +15549,27 @@ "node": ">= 14" } }, + "node_modules/puppeteer/node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/puppeteer/node_modules/https-proxy-agent": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dev": true, "dependencies": { "agent-base": "^7.0.2", @@ -15628,13 +15608,10 @@ } }, "node_modules/puppeteer/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -15642,22 +15619,10 @@ "node": ">=10" } }, - "node_modules/puppeteer/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/puppeteer/node_modules/tar-fs": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.5.tgz", - "integrity": "sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", + "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", "dev": true, "dependencies": { "pump": "^3.0.0", @@ -15668,12 +15633,6 @@ "bare-path": "^2.1.0" } }, - "node_modules/puppeteer/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/pure-uuid": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/pure-uuid/-/pure-uuid-1.8.1.tgz", @@ -16904,27 +16863,6 @@ "node": ">= 14.21.0" } }, - "node_modules/selenium-webdriver/node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", - "dev": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -19580,6 +19518,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/typed-query-selector": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", + "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==", + "dev": true + }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -20673,9 +20617,9 @@ } }, "node_modules/ws": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", - "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "dev": true, "engines": { "node": ">=10.0.0" diff --git a/package.json b/package.json index b644bd04d6..6e15464265 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "axios": "^1.7.2", "bootstrap-sass": "^3.4.3", "chrome-launcher": "^1.1.2", - "chromedriver": "^127.0.0", + "chromedriver": "^128.0.0", "commander": "^12.1.0", "cssnano": "^7.0.2", "ejs": "^3.1.10", @@ -65,7 +65,7 @@ "postcss-scss": "^4.0.9", "postcss-unprefix": "^2.1.4", "prettier": "^3.3.2", - "puppeteer": "^22.11.0", + "puppeteer": "^23.2.1", "requirejs": "^2.3.6", "sass": "^1.77.5", "selenium-standalone": "^9.5.0", diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index bdb73f1506..81c32b86f0 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -46,13 +46,13 @@ if [ "$run_docker" == 1 ]; then --template \ "/kb/dev_container/narrative/src/config.json.templ:/kb/dev_container/narrative/kbase-extension/static/kbase/config/config.json" \ kbase-narrative --no-browser --port=$JUPYTER_PORT 2>&1 | tee $OUTPUT_FILE & - bg_pid=$! + bg_pid=$(jobs -p) else echo "starting local narrative" rm -f $OUTPUT_FILE touch $OUTPUT_FILE kbase-narrative --no-browser --ServerApp.allow_origin="*" --ip=$IP_ADDRESS --port=$JUPYTER_PORT 2>&1 | tee $OUTPUT_FILE & - bg_pid=$! + bg_pid=$(jobs -p) fi while :; do @@ -92,7 +92,7 @@ fi if [ "${run_integration}" == 1 ]; then base_url=${BASE_URL:-"http://localhost:$JUPYTER_PORT"} - export BASE_URL=$BASE_URL + export BASE_URL=$base_url npx wdio test/integration/wdio.conf.js integration=$? fi @@ -112,20 +112,6 @@ do done echo "Killing server" - -kill_descendant_processes() { - local pid="$1" - local and_self="${2:-false}" - if children="$(pgrep -P "$pid")"; then - for child in $children; do - kill_descendant_processes "$child" true - done - fi - if [[ "$and_self" == true ]]; then - kill -9 "$pid" - fi -} - -kill_descendant_processes $bg_pid +pkill -P "$bg_pid" exit $exit_code diff --git a/test/integration/specs/kbaseFeatureSet_data.json b/test/integration/specs/kbaseFeatureSet_data.json index 6483c471d7..290d8c7e4b 100644 --- a/test/integration/specs/kbaseFeatureSet_data.json +++ b/test/integration/specs/kbaseFeatureSet_data.json @@ -6,13 +6,13 @@ "envs": { "ci": { "CASE_1": { - "narrativeId": 59136, + "narrativeId": 76687, "cells": [ { "cell": 3, - "description": "Genome Feature Set", + "description": "V. alginolyticus features", "title": "Vibrio_alginolyticus_feature_set", - "rowCount": 6, + "rowCount": 10, "row": 3, "cols": [ { @@ -20,7 +20,7 @@ "attrs": [ { "key": "href", - "regex": "^.*\\/#dataview\\/59134\\/6\\/1\\?sub=Feature&subid=SN13_RS00015$" + "regex": "^.*\\/#dataview\\/76687\\/3\\/1\\?sub=Feature&subid=SN13_RS00015$" }, { "key": "target", @@ -43,7 +43,7 @@ "attrs": [ { "key": "href", - "regex": "^.*\\/#dataview\\/59134\\/6\\/1$" + "regex": "^.*\\/#dataview\\/76687\\/3\\/1$" }, { "key": "target", @@ -57,140 +57,42 @@ } ] }, - { - "cell": 4, - "description": "BLASTp_Search filtered", - "title": "compost_hq_bins_blastp_output", - "rowCount": 7, - "row": 4, - "cols": [ - { - "selector": "a", - "attrs": [ - { - "key": "href", - "regex": "^.*\\/#dataview\\/59134\\/15\\/1\\?sub=Feature&subid=FLCBBPKP_13265$" - }, - { - "key": "target", - "value": "_blank" - } - ], - "text": "FLCBBPKP_13265" - }, - { - "text": "na" - }, - { - "text": "na" - }, - { - "text": "na" - }, - { - "selector": "a", - "attrs": [ - { - "key": "href", - "regex": "^.*\\/#dataview\\/59134\\/15\\/1$" - }, - { - "key": "target", - "value": "_blank" - } - ], - "text": "KBase_derived_mygenome.gff_edited.gff_metagenome" - }, - { - "text": "AnnotatedMetagenomeAssembly" - } - ] - }, { "cell": 5, - "description": "Merged Feature Sets", - "title": "merged_feature_sets", - "rowCount": 10, - "row": 4, - "cols": [ - { - "selector": "a", - "attrs": [ - { - "key": "href", - "regex": "^.*\\/#dataview\\/59134\\/15\\/1\\?sub=Feature&subid=FLCBBPKP_13265$" - }, - { - "key": "target", - "value": "_blank" - } - ], - "text": "FLCBBPKP_13265" - }, - { - "text": "na" - }, - { - "text": "na" - }, - { - "text": "na" - }, - { - "selector": "a", - "attrs": [ - { - "key": "href", - "regex": "^.*\\/#dataview\\/59134\\/15\\/1$" - }, - { - "key": "target", - "value": "_blank" - } - ], - "text": "KBase_derived_mygenome.gff_edited.gff_metagenome" - }, - { - "text": "AnnotatedMetagenomeAssembly" - } - ] - }, - { - "cell": 5, - "description": "Merged Feature Sets", - "title": "merged_feature_sets", - "rowCount": 10, - "row": 9, + "description": "BLASTp_Search filtered", + "title": "BLASTp_search_v_alginolyticus", + "rowCount": 1, + "row": 1, "cols": [ { "selector": "a", "attrs": [ { "key": "href", - "regex": "^.*\\/#dataview\\/59134\\/6\\/1\\?sub=Feature&subid=SN13_RS00010$" + "regex": "^.*\\/#dataview\\/76687\\/3\\/1\\?sub=Feature&subid=SN13_RS00160$" }, { "key": "target", "value": "_blank" } ], - "text": "SN13_RS00010" + "text": "SN13_RS00160" }, { "text": "gene" }, { - "text": "SN13_00010, SN13_RS00010, WP_042520711.1" + "text": "SN13_00160, WP_005376525.1, SN13_RS00160" }, { - "text": "hypothetical protein" + "text": "N-acetyltransferase" }, { "selector": "a", "attrs": [ { "key": "href", - "regex": "^.*\\/#dataview\\/59134\\/6\\/1$" + "regex": "^.*\\/#dataview\\/76687\\/3\\/1$" }, { "key": "target", diff --git a/test/integration/specs/kbaseFeatureSet_test.js b/test/integration/specs/kbaseFeatureSet_test.js index bd4e63bb0e..cdc5d8e488 100644 --- a/test/integration/specs/kbaseFeatureSet_test.js +++ b/test/integration/specs/kbaseFeatureSet_test.js @@ -1,4 +1,4 @@ -'use strict'; +/* global browser */ const { login } = require('../wdioUtils.js'); const { NarrativeTesting } = require('../NarrativeTesting'); @@ -26,8 +26,11 @@ describe('Test kbaseFeatureSet', () => { const cell = await t.waitForCell(notebookContainer, cellCase.cell); // Test description display. - const titleEl = await cell.$('.kb-cell-toolbar__title-container > [data-element="title"]'); + const titleEl = await cell.$( + '.kb-cell-toolbar__title-container > [data-element="title"]' + ); + // Wait until the expected title shows up, or a timeout. await browser.waitUntil(async () => { const title = await titleEl.getText(); return title === cellCase.title; @@ -36,13 +39,13 @@ describe('Test kbaseFeatureSet', () => { const description = await cell.$('[data-testid="description"] > [data-testid="value"]'); await expect(description).toHaveText(cellCase.description); - // Test the 3rd row of the table. + // Test the feature set table. const tableBody = await cell.$('table.dataTable > tbody'); const rows = await tableBody.$$('tr'); await expect(rows.length).toEqual(cellCase.rowCount); - const cols = await rows[cellCase.row - 1].$$('td'); + const cols = await rows[cellCase.row - 1].$$('td'); await expect(cols.length).toEqual(cellCase.cols.length); for (let colIndex = 0; colIndex < cols.length; colIndex += 1) {