Update Patternfly and Axios deps

This commit is contained in:
mabashian 2019-08-27 16:21:17 -04:00
parent 534c4e776a
commit 5f1f4bd109
60 changed files with 2881 additions and 1117 deletions

View File

@ -112,6 +112,12 @@
"minimist": "^1.2.0"
}
},
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true
},
"minimist": {
"version": "1.2.0",
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
@ -1180,16 +1186,16 @@
"integrity": "sha512-rLu3wcBWH4P5q1CGoSSH/i9hrXs7SlbRLkoq9IGuoPYNGQvDJ3pt/wmOM+XgYjIDRMVIdkUWt0RsfzF50JfnCw=="
},
"@fortawesome/fontawesome-common-types": {
"version": "0.2.18",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.18.tgz",
"integrity": "sha512-834DrzO2Ne3upCW+mJJPC/E6BsFcj+2Z1HmPIhbpbj8UaKmXWum4NClqLpUiMetugRlHuG4jbIHNdv2/lc3c1Q=="
"version": "0.2.22",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.22.tgz",
"integrity": "sha512-QmEuZsipX5/cR9JOg0fsTN4Yr/9lieYWM8AQpmRa0eIfeOcl/HLYoEa366BCGRSrgNJEexuvOgbq9jnJ22IY5g=="
},
"@fortawesome/free-brands-svg-icons": {
"version": "5.8.2",
"resolved": "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-5.8.2.tgz",
"integrity": "sha512-nhEWctDOP6f+Ka10LXAFoF+6mtWidC2iQgTBGRGgydmhBtcIEwyxWVx5wQHa86A1zAMi5TnipDAYQs2qn7DD6A==",
"version": "5.10.2",
"resolved": "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-5.10.2.tgz",
"integrity": "sha512-r5Dxr2h8f9bEI7F/gj/2v1OX9S6DMif9ZKR2VFQCSXHwahojLlOWnFILYsrjhzOISESkh6WDL9IOdkdbKM7KPw==",
"requires": {
"@fortawesome/fontawesome-common-types": "^0.2.18"
"@fortawesome/fontawesome-common-types": "^0.2.22"
}
},
"@jest/console": {
@ -1781,48 +1787,51 @@
"dev": true
},
"@patternfly/patternfly": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-2.7.0.tgz",
"integrity": "sha512-mewkgiqaQQTLabpOUCi9BrFJ6cQAvgNtOT7Z+LHS3PKIGFKkTfjAd+hm0TktbohNQJS8KvH5qcUV/WuLZ2/UbA=="
"version": "2.27.0",
"resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-2.27.0.tgz",
"integrity": "sha512-sYSKUG3PL1KNKVw6bhijur0fS2pgfxWFmLCedxXaECt4KdKcg6rGvInzQnyGiQhWMVZBbWxFCWvBxBIr7L8ilA=="
},
"@patternfly/react-core": {
"version": "3.16.14",
"resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-3.16.14.tgz",
"integrity": "sha512-JKBwXs6+YlmOSQGsKOraiioLIYysdHqMYWsTgLqomXouOyAk3q30/TKQudZbRs/Iw7Gg3W2Ub9ed3pDI7D+R6Q==",
"version": "3.87.3",
"resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-3.87.3.tgz",
"integrity": "sha512-5kcuOIucqtnmGKjV13gRHEcU31AbNXNiNX3yhEhdeuG4gH00gFyUAxim3fkbYnR4OtGdU2MLvVOjoMfYj62rBQ==",
"requires": {
"@patternfly/react-icons": "^3.9.1",
"@patternfly/react-styles": "^3.2.0",
"@patternfly/react-tokens": "^2.5.1",
"@tippy.js/react": "^1.1.1",
"@patternfly/react-icons": "^3.10.17",
"@patternfly/react-styles": "^3.5.13",
"@patternfly/react-tokens": "^2.6.16",
"emotion": "^9.2.9",
"exenv": "^1.2.2",
"focus-trap-react": "^4.0.1"
"focus-trap-react": "^4.0.1",
"tippy.js": "3.4.1"
},
"dependencies": {
"@patternfly/react-icons": {
"version": "3.9.2",
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-3.9.2.tgz",
"integrity": "sha512-EwPB+Nodd7zwiFh7R3Qq6Dif+xUR3WOwaJ+SRbP5NsxEAJf3CyYyrd7rbN8yFrFLTMKzknT2ez9XrP/5Lgr5LQ==",
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-3.12.0.tgz",
"integrity": "sha512-45nP1m4La/LusrKVQNwkyZV3mqAJWhYgMce2+0VewAJ5ts4ygUJYzXR1vZQk09E8gTBCHMEdq0Af1xywwluHFg==",
"requires": {
"@fortawesome/free-brands-svg-icons": "^5.8.1"
}
},
"@patternfly/react-tokens": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-2.5.1.tgz",
"integrity": "sha512-ZykUfWT4yCELXhGGwQxcNqnXwe3sqfSuoL6IlQRV6wtUKk+/et7NkVvrRwvci926+Usemr4IQVc8V9gbHqRN/A=="
"version": "2.6.16",
"resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-2.6.16.tgz",
"integrity": "sha512-dhr4ne4thSmSKBr4anV07KSzUXEs6KpCMDxxNiwrgFdZwNHtyNcaPc+F9pQZ5A0n4qYmMLpCrprb7m5o/83riQ=="
}
}
},
"@patternfly/react-icons": {
"version": "3.7.5",
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-3.7.5.tgz",
"integrity": "sha512-Bejd6GAWfcDgA7YxvIcrohcBPVZUG34E3LWaJSHLUf8XADf33q7UvQ4YQ1eWk477o/GjZA3AX/71Y6op71WdDA=="
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-3.12.0.tgz",
"integrity": "sha512-45nP1m4La/LusrKVQNwkyZV3mqAJWhYgMce2+0VewAJ5ts4ygUJYzXR1vZQk09E8gTBCHMEdq0Af1xywwluHFg==",
"requires": {
"@fortawesome/free-brands-svg-icons": "^5.8.1"
}
},
"@patternfly/react-styles": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-3.2.0.tgz",
"integrity": "sha512-8M7bo4kPvypHlbzuynV53xjk5176EktfEgZ283sfHmvUlU3Yvq2+m8hS9ERHE9gd91Ip4HiyucAVVACd2gtHNQ==",
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-3.5.13.tgz",
"integrity": "sha512-aiyOp/n4cMxWhNmokG9EAFt06YmWDi3EdGfa5gyjYRwABGLUhyHo2r7kBqT3xxw0bLcOYDTPU94SaH63uAaRag==",
"requires": {
"@babel/helper-plugin-utils": "^7.0.0-beta.48",
"camel-case": "^3.0.0",
@ -1833,24 +1842,174 @@
"emotion-server": "^9.2.9",
"fbjs-scripts": "^0.8.3",
"fs-extra": "^6.0.1",
"jsdom": "^11.11.0",
"jsdom": "^15.1.0",
"relative": "^3.0.2",
"resolve-from": "^4.0.0"
"resolve-from": "^4.0.0",
"typescript": "3.4.5"
},
"dependencies": {
"acorn": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz",
"integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA=="
},
"acorn-globals": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.3.tgz",
"integrity": "sha512-vkR40VwS2SYO98AIeFvzWWh+xyc2qi9s7OoXSFEGIP/rOJKzjnhykaZJNnHdoq4BL2gGxI5EZOU16z896EYnOQ==",
"requires": {
"acorn": "^6.0.1",
"acorn-walk": "^6.0.1"
}
},
"escodegen": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.12.0.tgz",
"integrity": "sha512-TuA+EhsanGcme5T3R0L80u4t8CpbXQjegRmf7+FPTJrtCTErXFeelblRgHQa1FofEzqYYJmJ/OqjTwREp9qgmg==",
"requires": {
"esprima": "^3.1.3",
"estraverse": "^4.2.0",
"esutils": "^2.0.2",
"optionator": "^0.8.1",
"source-map": "~0.6.1"
}
},
"esprima": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM="
},
"jsdom": {
"version": "15.1.1",
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-15.1.1.tgz",
"integrity": "sha512-cQZRBB33arrDAeCrAEWn1U3SvrvC8XysBua9Oqg1yWrsY/gYcusloJC3RZJXuY5eehSCmws8f2YeliCqGSkrtQ==",
"requires": {
"abab": "^2.0.0",
"acorn": "^6.1.1",
"acorn-globals": "^4.3.2",
"array-equal": "^1.0.0",
"cssom": "^0.3.6",
"cssstyle": "^1.2.2",
"data-urls": "^1.1.0",
"domexception": "^1.0.1",
"escodegen": "^1.11.1",
"html-encoding-sniffer": "^1.0.2",
"nwsapi": "^2.1.4",
"parse5": "5.1.0",
"pn": "^1.1.0",
"request": "^2.88.0",
"request-promise-native": "^1.0.7",
"saxes": "^3.1.9",
"symbol-tree": "^3.2.2",
"tough-cookie": "^3.0.1",
"w3c-hr-time": "^1.0.1",
"w3c-xmlserializer": "^1.1.2",
"webidl-conversions": "^4.0.2",
"whatwg-encoding": "^1.0.5",
"whatwg-mimetype": "^2.3.0",
"whatwg-url": "^7.0.0",
"ws": "^7.0.0",
"xml-name-validator": "^3.0.0"
},
"dependencies": {
"cssom": {
"version": "0.3.8",
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz",
"integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg=="
},
"cssstyle": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.4.0.tgz",
"integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==",
"requires": {
"cssom": "0.3.x"
}
}
}
},
"nwsapi": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.4.tgz",
"integrity": "sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw=="
},
"parse5": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz",
"integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ=="
},
"request-promise-core": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz",
"integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==",
"requires": {
"lodash": "^4.17.11"
}
},
"request-promise-native": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz",
"integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==",
"requires": {
"request-promise-core": "1.1.2",
"stealthy-require": "^1.1.1",
"tough-cookie": "^2.3.3"
},
"dependencies": {
"tough-cookie": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
"integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
"requires": {
"psl": "^1.1.28",
"punycode": "^2.1.1"
}
}
}
},
"tough-cookie": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz",
"integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==",
"requires": {
"ip-regex": "^2.1.0",
"psl": "^1.1.28",
"punycode": "^2.1.1"
}
},
"typescript": {
"version": "3.4.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz",
"integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw=="
},
"whatwg-mimetype": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz",
"integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g=="
},
"whatwg-url": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz",
"integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==",
"requires": {
"lodash.sortby": "^4.7.0",
"tr46": "^1.0.1",
"webidl-conversions": "^4.0.2"
}
},
"ws": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.1.2.tgz",
"integrity": "sha512-gftXq3XI81cJCgkUiAVixA0raD9IVmXqsylCrjRygw4+UOOGzPoxnQ6r/CnVL9i+mDncJo94tSkyrtuuQVBmrg==",
"requires": {
"async-limiter": "^1.0.0"
}
}
}
},
"@patternfly/react-tokens": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-2.3.3.tgz",
"integrity": "sha512-+2SSGvOV1rZr1l6+p2QzORVJhpOKjrHqCBfkp10La7O93+mVLYU0vugTp1elhxeh32IuLCJAPDLrCJPBAfmYKw=="
},
"@tippy.js/react": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@tippy.js/react/-/react-1.1.1.tgz",
"integrity": "sha512-TkL1VufxgUvTMouDoBGv2vTdtUxtLUaRpspI4Rv0DsoKe2Ex1E5bl/qISk434mhuAhEnXuemrcgTaPWrfDvmGw==",
"requires": {
"prop-types": "^15.6.2",
"tippy.js": "^3.2.0"
}
"version": "2.6.16",
"resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-2.6.16.tgz",
"integrity": "sha512-dhr4ne4thSmSKBr4anV07KSzUXEs6KpCMDxxNiwrgFdZwNHtyNcaPc+F9pQZ5A0n4qYmMLpCrprb7m5o/83riQ=="
},
"@types/babel__core": {
"version": "7.1.1",
@ -2137,7 +2296,8 @@
"acorn": {
"version": "5.7.3",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz",
"integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw=="
"integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==",
"dev": true
},
"acorn-dynamic-import": {
"version": "3.0.0",
@ -2152,6 +2312,7 @@
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.0.tgz",
"integrity": "sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw==",
"dev": true,
"requires": {
"acorn": "^6.0.1",
"acorn-walk": "^6.0.1"
@ -2160,7 +2321,8 @@
"acorn": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz",
"integrity": "sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg=="
"integrity": "sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg==",
"dev": true
}
}
},
@ -2933,12 +3095,35 @@
"integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ=="
},
"axios": {
"version": "0.18.0",
"resolved": "http://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"version": "0.18.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.1.tgz",
"integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==",
"requires": {
"follow-redirects": "^1.3.0",
"is-buffer": "^1.1.5"
"follow-redirects": "1.5.10",
"is-buffer": "^2.0.2"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"requires": {
"debug": "=3.1.0"
}
},
"is-buffer": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
}
}
},
"axobject-query": {
@ -5089,9 +5274,9 @@
}
},
"csstype": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.4.tgz",
"integrity": "sha512-lAJUJP3M6HxFXbqtGRc0iZrdyeN+WzOWeY0q/VnFzI+kqVrYIzC7bWlKqCW7oCIdzoPkvfp82EVvrTlQ8zsWQg=="
"version": "2.6.6",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.6.tgz",
"integrity": "sha512-RpFbQGUE74iyPgvr46U9t1xoQBM8T4BL8SxrN66Le2xYAPSaDJJKeztV3awugusb3g3G9iL8StmkBBXhcbbXhg=="
},
"currently-unhandled": {
"version": "0.4.1",
@ -5861,6 +6046,7 @@
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz",
"integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==",
"dev": true,
"requires": {
"esprima": "^3.1.3",
"estraverse": "^4.2.0",
@ -5872,7 +6058,8 @@
"esprima": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM="
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=",
"dev": true
}
}
},
@ -6306,10 +6493,13 @@
}
},
"eslint-utils": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz",
"integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==",
"dev": true
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz",
"integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==",
"dev": true,
"requires": {
"eslint-visitor-keys": "^1.0.0"
}
},
"eslint-visitor-keys": {
"version": "1.0.0",
@ -6852,9 +7042,9 @@
}
},
"xtend": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
}
}
},
@ -7024,9 +7214,9 @@
},
"dependencies": {
"xtend": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
}
}
},
@ -7042,6 +7232,7 @@
"version": "1.5.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.9.tgz",
"integrity": "sha512-Bh65EZI/RU8nx0wbYF9shkFZlqLP+6WT/5FnA3cE/djNSuKNHJEinGGZgu/cQEkeeb2GdFOgenAmn8qaqYke2w==",
"dev": true,
"requires": {
"debug": "=3.1.0"
},
@ -7050,6 +7241,7 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
@ -7204,8 +7396,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"aproba": {
"version": "1.2.0",
@ -7226,14 +7417,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -7248,20 +7437,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
@ -7378,8 +7564,7 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
@ -7391,7 +7576,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -7406,7 +7590,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -7414,14 +7597,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@ -7440,7 +7621,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -7521,8 +7701,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"object-assign": {
"version": "4.1.1",
@ -7534,7 +7713,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -7620,8 +7798,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
@ -7657,7 +7834,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -7677,7 +7853,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -7721,14 +7896,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},
@ -8872,8 +9045,7 @@
"ip-regex": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz",
"integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=",
"dev": true
"integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk="
},
"ipaddr.js": {
"version": "1.8.0",
@ -8940,7 +9112,8 @@
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
"dev": true
},
"is-builtin-module": {
"version": "1.0.0",
@ -10690,6 +10863,7 @@
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz",
"integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==",
"dev": true,
"requires": {
"abab": "^2.0.0",
"acorn": "^5.5.3",
@ -10723,6 +10897,7 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.1.1.tgz",
"integrity": "sha512-364AI1l/M5TYcFH83JnOH/pSqgaNnKmYgKrm0didZMGKWjQB60dymwWy1rKUgL3J1ffdq9xVi2yGLHdSjjSNog==",
"dev": true,
"requires": {
"cssom": "0.3.x"
}
@ -10828,7 +11003,8 @@
"left-pad": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz",
"integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA=="
"integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==",
"dev": true
},
"leven": {
"version": "2.1.0",
@ -10902,9 +11078,9 @@
}
},
"lodash": {
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
},
"lodash-es": {
"version": "4.17.11",
@ -11459,9 +11635,9 @@
}
},
"mixin-deep": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz",
"integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==",
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
"integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
"dev": true,
"requires": {
"for-in": "^1.0.2",
@ -11942,7 +12118,8 @@
"nwsapi": {
"version": "2.0.9",
"resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.0.9.tgz",
"integrity": "sha512-nlWFSCTYQcHk/6A9FFnfhKc14c3aFhfdNBXgo8Qgi9QTBu/qg3Ww+Uiz9wMzXd1T8GFxPc2QIHB6Qtf2XFryFQ=="
"integrity": "sha512-nlWFSCTYQcHk/6A9FFnfhKc14c3aFhfdNBXgo8Qgi9QTBu/qg3Ww+Uiz9wMzXd1T8GFxPc2QIHB6Qtf2XFryFQ==",
"dev": true
},
"oauth-sign": {
"version": "0.9.0",
@ -12522,7 +12699,8 @@
"parse5": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz",
"integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA=="
"integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==",
"dev": true
},
"parseurl": {
"version": "1.3.2",
@ -13847,6 +14025,7 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz",
"integrity": "sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=",
"dev": true,
"requires": {
"lodash": "^4.13.1"
}
@ -13855,6 +14034,7 @@
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.5.tgz",
"integrity": "sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU=",
"dev": true,
"requires": {
"request-promise-core": "1.1.1",
"stealthy-require": "^1.1.0",
@ -14186,7 +14366,16 @@
"sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"dev": true
},
"saxes": {
"version": "3.1.11",
"resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.11.tgz",
"integrity": "sha512-Ydydq3zC+WYDJK1+gRxRapLIED9PWeSuuS41wqyoRmzvhhh9nc+QQrVMKJYzJFULazeGhzSV0QleN2wD3boh2g==",
"requires": {
"xmlchars": "^2.1.1"
}
},
"schema-utils": {
"version": "1.0.0",
@ -14327,9 +14516,9 @@
"dev": true
},
"set-value": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz",
"integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
"integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
"dev": true,
"requires": {
"extend-shallow": "^2.0.1",
@ -15768,15 +15957,15 @@
"dev": true
},
"union-value": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
"integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
"integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
"dev": true,
"requires": {
"arr-union": "^3.1.0",
"get-value": "^2.0.6",
"is-extendable": "^0.1.1",
"set-value": "^0.4.3"
"set-value": "^2.0.1"
},
"dependencies": {
"arr-union": {
@ -15784,27 +15973,6 @@
"resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
"integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
"dev": true
},
"extend-shallow": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"dev": true,
"requires": {
"is-extendable": "^0.1.0"
}
},
"set-value": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz",
"integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=",
"dev": true,
"requires": {
"extend-shallow": "^2.0.1",
"is-extendable": "^0.1.1",
"is-plain-object": "^2.0.1",
"to-object-path": "^0.3.0"
}
}
}
},
@ -16037,6 +16205,16 @@
"browser-process-hrtime": "^0.1.2"
}
},
"w3c-xmlserializer": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz",
"integrity": "sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg==",
"requires": {
"domexception": "^1.0.1",
"webidl-conversions": "^4.0.2",
"xml-name-validator": "^3.0.0"
}
},
"walker": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz",
@ -17040,6 +17218,7 @@
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz",
"integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==",
"dev": true,
"requires": {
"lodash.sortby": "^4.7.0",
"tr46": "^1.0.1",
@ -17145,6 +17324,7 @@
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz",
"integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==",
"dev": true,
"requires": {
"async-limiter": "~1.0.0"
}
@ -17154,6 +17334,11 @@
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",
"integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw=="
},
"xmlchars": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.1.1.tgz",
"integrity": "sha512-7hew1RPJ1iIuje/Y01bGD/mXokXxegAgVS+e+E0wSi2ILHQkYAH1+JXARwTjZSM4Z4Z+c73aKspEcqj+zPPL/w=="
},
"xregexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz",

View File

@ -57,12 +57,12 @@
},
"dependencies": {
"@lingui/react": "^2.7.2",
"@patternfly/patternfly": "^2.7.0",
"@patternfly/react-core": "^3.16.14",
"@patternfly/react-icons": "^3.7.5",
"@patternfly/react-tokens": "^2.3.3",
"@patternfly/patternfly": "^2.27.0",
"@patternfly/react-core": "^3.87.3",
"@patternfly/react-icons": "^3.12.0",
"@patternfly/react-tokens": "^2.6.16",
"ansi-to-html": "^0.6.11",
"axios": "^0.18.0",
"axios": "^0.18.1",
"codemirror": "^5.47.0",
"formik": "^1.5.1",
"has-ansi": "^3.0.0",

View File

@ -11,6 +11,13 @@ const NotificationsMixin = parent =>
);
}
readNotificationTemplatesStarted(id, params) {
return this.http.get(
`${this.baseUrl}${id}/notification_templates_started/`,
{ params }
);
}
readNotificationTemplatesSuccess(id, params) {
return this.http.get(
`${this.baseUrl}${id}/notification_templates_success/`,
@ -25,6 +32,20 @@ const NotificationsMixin = parent =>
);
}
associateNotificationTemplatesStarted(resourceId, notificationId) {
return this.http.post(
`${this.baseUrl}${resourceId}/notification_templates_started/`,
{ id: notificationId }
);
}
disassociateNotificationTemplatesStarted(resourceId, notificationId) {
return this.http.post(
`${this.baseUrl}${resourceId}/notification_templates_started/`,
{ id: notificationId, disassociate: true }
);
}
associateNotificationTemplatesSuccess(resourceId, notificationId) {
return this.http.post(
`${this.baseUrl}${resourceId}/notification_templates_success/`,
@ -66,6 +87,13 @@ const NotificationsMixin = parent =>
notificationId,
notificationType
) {
if (notificationType === 'started') {
return this.associateNotificationTemplatesStarted(
resourceId,
notificationId
);
}
if (notificationType === 'success') {
return this.associateNotificationTemplatesSuccess(
resourceId,
@ -98,6 +126,13 @@ const NotificationsMixin = parent =>
notificationId,
notificationType
) {
if (notificationType === 'started') {
return this.disassociateNotificationTemplatesStarted(
resourceId,
notificationId
);
}
if (notificationType === 'success') {
return this.disassociateNotificationTemplatesSuccess(
resourceId,

View File

@ -15,7 +15,7 @@ class CheckboxCard extends Component {
}}
>
<Checkbox
checked={isSelected}
isChecked={isSelected}
onChange={onSelect}
aria-label={name}
id={`checkbox-card-${itemId}`}

View File

@ -34,6 +34,7 @@ function NotificationListItem(props) {
canToggleNotifications,
notification,
detailUrl,
startedTurnedOn,
successTurnedOn,
errorTurnedOn,
toggleNotification,
@ -65,9 +66,25 @@ function NotificationListItem(props) {
{typeLabels[notification.notification_type]}
</DataListCell>,
<DataListCell righthalf="true" key="toggles">
<Switch
id={`notification-${notification.id}-started-toggle`}
label={i18n._(t`Start`)}
labelOff={i18n._(t`Start`)}
isChecked={startedTurnedOn}
isDisabled={!canToggleNotifications}
onChange={() =>
toggleNotification(
notification.id,
startedTurnedOn,
'started'
)
}
aria-label={i18n._(t`Toggle notification start`)}
/>
<Switch
id={`notification-${notification.id}-success-toggle`}
label={i18n._(t`Successful`)}
label={i18n._(t`Success`)}
labelOff={i18n._(t`Success`)}
isChecked={successTurnedOn}
isDisabled={!canToggleNotifications}
onChange={() =>
@ -82,6 +99,7 @@ function NotificationListItem(props) {
<Switch
id={`notification-${notification.id}-error-toggle`}
label={i18n._(t`Failure`)}
labelOff={i18n._(t`Failure`)}
isChecked={errorTurnedOn}
isDisabled={!canToggleNotifications}
onChange={() =>
@ -106,6 +124,7 @@ NotificationListItem.propTypes = {
canToggleNotifications: bool.isRequired,
detailUrl: string.isRequired,
errorTurnedOn: bool,
startedTurnedOn: bool,
successTurnedOn: bool,
toggleNotification: func.isRequired,
typeLabels: shape().isRequired,

View File

@ -58,7 +58,45 @@ describe('<NotificationListItem canToggleNotifications />', () => {
expect(typeCell.text()).toBe('Slack');
});
test('handles success click when toggle is on', () => {
test('handles start click when toggle is on', () => {
wrapper = mountWithContexts(
<NotificationListItem
notification={mockNotif}
startedTurnedOn
toggleNotification={toggleNotification}
detailUrl="/foo"
canToggleNotifications
typeLabels={typeLabels}
/>
);
wrapper
.find('Switch')
.first()
.find('input')
.simulate('change');
expect(toggleNotification).toHaveBeenCalledWith(9000, true, 'started');
});
test('handles start click when toggle is off', () => {
wrapper = mountWithContexts(
<NotificationListItem
notification={mockNotif}
startedTurnedOn={false}
toggleNotification={toggleNotification}
detailUrl="/foo"
canToggleNotifications
typeLabels={typeLabels}
/>
);
wrapper
.find('Switch')
.first()
.find('input')
.simulate('change');
expect(toggleNotification).toHaveBeenCalledWith(9000, false, 'started');
});
test('handles error click when toggle is on', () => {
wrapper = mountWithContexts(
<NotificationListItem
notification={mockNotif}
@ -71,13 +109,13 @@ describe('<NotificationListItem canToggleNotifications />', () => {
);
wrapper
.find('Switch')
.first()
.at(1)
.find('input')
.simulate('change');
expect(toggleNotification).toHaveBeenCalledWith(9000, true, 'success');
});
test('handles success click when toggle is off', () => {
test('handles error click when toggle is off', () => {
wrapper = mountWithContexts(
<NotificationListItem
notification={mockNotif}
@ -90,7 +128,7 @@ describe('<NotificationListItem canToggleNotifications />', () => {
);
wrapper
.find('Switch')
.first()
.at(1)
.find('input')
.simulate('change');
expect(toggleNotification).toHaveBeenCalledWith(9000, false, 'success');
@ -109,7 +147,7 @@ describe('<NotificationListItem canToggleNotifications />', () => {
);
wrapper
.find('Switch')
.at(1)
.at(2)
.find('input')
.simulate('change');
expect(toggleNotification).toHaveBeenCalledWith(9000, true, 'error');
@ -128,7 +166,7 @@ describe('<NotificationListItem canToggleNotifications />', () => {
);
wrapper
.find('Switch')
.at(1)
.at(2)
.find('input')
.simulate('change');
expect(toggleNotification).toHaveBeenCalledWith(9000, false, 'error');

View File

@ -23,8 +23,6 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
>
<DataListItem
aria-labelledby="items-list-item-9000"
className=""
isExpanded={false}
key="9000"
>
<li
@ -32,7 +30,6 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
className="pf-c-data-list__item"
>
<DataListItemRow
className=""
key=".0"
rowid="items-list-item-9000"
>
@ -40,7 +37,6 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
className="pf-c-data-list__item-row"
>
<DataListItemCells
className=""
dataListCells={
Array [
<ForwardRef>
@ -64,12 +60,21 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
<ForwardRef
righthalf="true"
>
<ForwardRef
aria-label="Toggle notification start"
id="notification-9000-started-toggle"
isDisabled={false}
label="Start"
labelOff="Start"
onChange={[Function]}
/>
<ForwardRef
aria-label="Toggle notification success"
id="notification-9000-success-toggle"
isChecked={false}
isDisabled={false}
label="Successful"
label="Success"
labelOff="Success"
onChange={[Function]}
/>
<ForwardRef
@ -78,6 +83,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
isChecked={false}
isDisabled={false}
label="Failure"
labelOff="Failure"
onChange={[Function]}
/>
</ForwardRef>,
@ -124,11 +130,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
forwardedRef={null}
>
<DataListCell
alignRight={false}
className="NotificationListItem__DataListCell-j7c411-0 kIdLtz"
isFilled={true}
isIcon={false}
width={1}
>
<div
className="pf-c-data-list__cell NotificationListItem__DataListCell-j7c411-0 kIdLtz"
@ -231,11 +233,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
forwardedRef={null}
>
<DataListCell
alignRight={false}
className="NotificationListItem__DataListCell-j7c411-0 kIdLtz"
isFilled={true}
isIcon={false}
width={1}
>
<div
className="pf-c-data-list__cell NotificationListItem__DataListCell-j7c411-0 kIdLtz"
@ -282,23 +280,137 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
righthalf="true"
>
<DataListCell
alignRight={false}
className="NotificationListItem__DataListCell-j7c411-0 hoXOpW"
isFilled={true}
isIcon={false}
righthalf="true"
width={1}
>
<div
className="pf-c-data-list__cell NotificationListItem__DataListCell-j7c411-0 hoXOpW"
righthalf="true"
>
<NotificationListItem__Switch
aria-label="Toggle notification start"
id="notification-9000-started-toggle"
isDisabled={false}
label="Start"
labelOff="Start"
onChange={[Function]}
>
<StyledComponent
aria-label="Toggle notification start"
forwardedComponent={
Object {
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
"componentId": "NotificationListItem__Switch-j7c411-1",
"isStatic": true,
"lastClassName": "ceuHGn",
"rules": Array [
"display:flex;flex-wrap:no-wrap;",
],
},
"displayName": "NotificationListItem__Switch",
"foldedComponentIds": Array [],
"render": [Function],
"styledComponentId": "NotificationListItem__Switch-j7c411-1",
"target": [Function],
"toString": [Function],
"warnTooManyClasses": [Function],
"withComponent": [Function],
}
}
forwardedRef={null}
id="notification-9000-started-toggle"
isDisabled={false}
label="Start"
labelOff="Start"
onChange={[Function]}
>
<Component
aria-label="Toggle notification start"
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
id="notification-9000-started-toggle"
isDisabled={false}
label="Start"
labelOff="Start"
onChange={[Function]}
>
<ComponentWithOuia
component={[Function]}
componentProps={
Object {
"aria-label": "Toggle notification start",
"className": "NotificationListItem__Switch-j7c411-1 ceuHGn",
"id": "notification-9000-started-toggle",
"isChecked": undefined,
"isDisabled": false,
"label": "Start",
"labelOff": "Start",
"onChange": [Function],
}
}
consumerContext={null}
>
<Switch
aria-label="Toggle notification start"
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
id="notification-9000-started-toggle"
isChecked={true}
isDisabled={false}
label="Start"
labelOff="Start"
onChange={[Function]}
ouiaContext={
Object {
"isOuia": false,
"ouiaId": null,
}
}
>
<label
className="pf-c-switch NotificationListItem__Switch-j7c411-1 ceuHGn"
htmlFor="notification-9000-started-toggle"
>
<input
aria-label="Toggle notification start"
aria-labelledby={null}
checked={true}
className="pf-c-switch__input"
disabled={false}
id="notification-9000-started-toggle"
onChange={[Function]}
type="checkbox"
/>
<span
className="pf-c-switch__toggle"
/>
<span
aria-hidden="true"
className="pf-c-switch__label pf-m-on"
id={null}
>
Start
</span>
<span
aria-hidden="true"
className="pf-c-switch__label pf-m-off"
id={null}
>
Start
</span>
</label>
</Switch>
</ComponentWithOuia>
</Component>
</StyledComponent>
</NotificationListItem__Switch>
<NotificationListItem__Switch
aria-label="Toggle notification success"
id="notification-9000-success-toggle"
isChecked={false}
isDisabled={false}
label="Successful"
label="Success"
labelOff="Success"
onChange={[Function]}
>
<StyledComponent
@ -329,48 +441,87 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
id="notification-9000-success-toggle"
isChecked={false}
isDisabled={false}
label="Successful"
label="Success"
labelOff="Success"
onChange={[Function]}
>
<Switch
<Component
aria-label="Toggle notification success"
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
id="notification-9000-success-toggle"
isChecked={false}
isDisabled={false}
label="Successful"
label="Success"
labelOff="Success"
onChange={[Function]}
>
<label
className="pf-c-switch NotificationListItem__Switch-j7c411-1 ceuHGn"
htmlFor="notification-9000-success-toggle"
<ComponentWithOuia
component={[Function]}
componentProps={
Object {
"aria-label": "Toggle notification success",
"className": "NotificationListItem__Switch-j7c411-1 ceuHGn",
"id": "notification-9000-success-toggle",
"isChecked": false,
"isDisabled": false,
"label": "Success",
"labelOff": "Success",
"onChange": [Function],
}
}
consumerContext={null}
>
<input
<Switch
aria-label="Toggle notification success"
checked={false}
className="pf-c-switch__input"
disabled={false}
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
id="notification-9000-success-toggle"
isChecked={false}
isDisabled={false}
label="Success"
labelOff="Success"
onChange={[Function]}
type="checkbox"
/>
<span
className="pf-c-switch__toggle"
/>
<span
aria-hidden="true"
className="pf-c-switch__label pf-m-on"
ouiaContext={
Object {
"isOuia": false,
"ouiaId": null,
}
}
>
Successful
</span>
<span
aria-hidden="true"
className="pf-c-switch__label pf-m-off"
>
Successful
</span>
</label>
</Switch>
<label
className="pf-c-switch NotificationListItem__Switch-j7c411-1 ceuHGn"
htmlFor="notification-9000-success-toggle"
>
<input
aria-label="Toggle notification success"
aria-labelledby={null}
checked={false}
className="pf-c-switch__input"
disabled={false}
id="notification-9000-success-toggle"
onChange={[Function]}
type="checkbox"
/>
<span
className="pf-c-switch__toggle"
/>
<span
aria-hidden="true"
className="pf-c-switch__label pf-m-on"
id={null}
>
Success
</span>
<span
aria-hidden="true"
className="pf-c-switch__label pf-m-off"
id={null}
>
Success
</span>
</label>
</Switch>
</ComponentWithOuia>
</Component>
</StyledComponent>
</NotificationListItem__Switch>
<NotificationListItem__Switch
@ -379,6 +530,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
isChecked={false}
isDisabled={false}
label="Failure"
labelOff="Failure"
onChange={[Function]}
>
<StyledComponent
@ -410,47 +562,86 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
isChecked={false}
isDisabled={false}
label="Failure"
labelOff="Failure"
onChange={[Function]}
>
<Switch
<Component
aria-label="Toggle notification failure"
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
id="notification-9000-error-toggle"
isChecked={false}
isDisabled={false}
label="Failure"
labelOff="Failure"
onChange={[Function]}
>
<label
className="pf-c-switch NotificationListItem__Switch-j7c411-1 ceuHGn"
htmlFor="notification-9000-error-toggle"
<ComponentWithOuia
component={[Function]}
componentProps={
Object {
"aria-label": "Toggle notification failure",
"className": "NotificationListItem__Switch-j7c411-1 ceuHGn",
"id": "notification-9000-error-toggle",
"isChecked": false,
"isDisabled": false,
"label": "Failure",
"labelOff": "Failure",
"onChange": [Function],
}
}
consumerContext={null}
>
<input
<Switch
aria-label="Toggle notification failure"
checked={false}
className="pf-c-switch__input"
disabled={false}
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
id="notification-9000-error-toggle"
isChecked={false}
isDisabled={false}
label="Failure"
labelOff="Failure"
onChange={[Function]}
type="checkbox"
/>
<span
className="pf-c-switch__toggle"
/>
<span
aria-hidden="true"
className="pf-c-switch__label pf-m-on"
ouiaContext={
Object {
"isOuia": false,
"ouiaId": null,
}
}
>
Failure
</span>
<span
aria-hidden="true"
className="pf-c-switch__label pf-m-off"
>
Failure
</span>
</label>
</Switch>
<label
className="pf-c-switch NotificationListItem__Switch-j7c411-1 ceuHGn"
htmlFor="notification-9000-error-toggle"
>
<input
aria-label="Toggle notification failure"
aria-labelledby={null}
checked={false}
className="pf-c-switch__input"
disabled={false}
id="notification-9000-error-toggle"
onChange={[Function]}
type="checkbox"
/>
<span
className="pf-c-switch__toggle"
/>
<span
aria-hidden="true"
className="pf-c-switch__label pf-m-on"
id={null}
>
Failure
</span>
<span
aria-hidden="true"
className="pf-c-switch__label pf-m-off"
id={null}
>
Failure
</span>
</label>
</Switch>
</ComponentWithOuia>
</Component>
</StyledComponent>
</NotificationListItem__Switch>
</div>

View File

@ -38,6 +38,7 @@ describe('<ToolbarDeleteButton />', () => {
<ToolbarDeleteButton onDelete={onDelete} itemsToDelete={[itemA]} />
);
wrapper.find('ToolbarDeleteButton').setState({ isModalOpen: true });
wrapper.update();
wrapper.find('button.pf-m-danger').simulate('click');
expect(onDelete).toHaveBeenCalled();
expect(wrapper.find('ToolbarDeleteButton').state('isModalOpen')).toBe(

View File

@ -9,30 +9,43 @@ exports[`<ToolbarDeleteButton /> should render button 1`] = `
>
<Tooltip
appendTo={[Function]}
className={null}
aria="describedby"
boundary="window"
className=""
content="Select a row to delete"
distance={15}
enableFlip={true}
entryDelay={500}
exitDelay={500}
flipBehavior={
Array [
"top",
"right",
"bottom",
"left",
"top",
"right",
"bottom",
]
}
isAppLauncher={false}
maxWidth="18.75rem"
position="top"
trigger="mouseenter focus"
zIndex={9999}
>
<Tippy
<PopoverBase
animateFill={false}
appendTo={[Function]}
aria="describedby"
arrow={true}
boundary="window"
content={
<div
className="pf-c-tooltip"
className=""
role="tooltip"
>
<TooltipArrow
className={null}
/>
<TooltipContent
className={null}
>
<TooltipContent>
Select a row to delete
</TooltipContent>
</div>
@ -45,6 +58,17 @@ exports[`<ToolbarDeleteButton /> should render button 1`] = `
}
distance={15}
flip={true}
flipBehavior={
Array [
"top",
"right",
"bottom",
"left",
"top",
"right",
"bottom",
]
}
lazy={true}
maxWidth="18.75rem"
onCreate={[Function]}
@ -62,7 +86,7 @@ exports[`<ToolbarDeleteButton /> should render button 1`] = `
},
}
}
theme="pf-tippy"
theme="pf-tooltip"
trigger="mouseenter focus"
zIndex={9999}
>
@ -105,15 +129,8 @@ exports[`<ToolbarDeleteButton /> should render button 1`] = `
<Button
aria-label="Delete"
className="ToolbarDeleteButton__DeleteButton-sc-1e3r0eg-0 bQjfFG"
component="button"
isActive={false}
isBlock={false}
isDisabled={true}
isFocus={false}
isHover={false}
isInline={false}
onClick={[Function]}
type="button"
variant="plain"
>
<button
@ -127,6 +144,7 @@ exports[`<ToolbarDeleteButton /> should render button 1`] = `
>
<TrashAltIcon
color="currentColor"
noVerticalAlign={false}
size="sm"
title={null}
>
@ -159,12 +177,9 @@ exports[`<ToolbarDeleteButton /> should render button 1`] = `
containerInfo={
<div>
<div
class="pf-c-tooltip"
class=""
role="tooltip"
>
<div
class="pf-c-tooltip__arrow"
/>
<div
class="pf-c-tooltip__content"
>
@ -175,19 +190,10 @@ exports[`<ToolbarDeleteButton /> should render button 1`] = `
}
>
<div
className="pf-c-tooltip"
className=""
role="tooltip"
>
<TooltipArrow
className={null}
>
<div
className="pf-c-tooltip__arrow"
/>
</TooltipArrow>
<TooltipContent
className={null}
>
<TooltipContent>
<div
className="pf-c-tooltip__content"
>
@ -196,7 +202,7 @@ exports[`<ToolbarDeleteButton /> should render button 1`] = `
</TooltipContent>
</div>
</Portal>
</Tippy>
</PopoverBase>
</Tooltip>
</ToolbarDeleteButton>
`;

View File

@ -30,6 +30,12 @@ const Tabs = styled(PFTabs)`
border-width: var(--pf-c-tabs__item--BorderWidth) 0
var(--pf-c-tabs__item--BorderWidth) 0;
}
// The above pseudo element is being applied to the tab items as well
// I couldn't figure out how to only apply it to .pf-c-tabs
.pf-c-tabs__item::before {
content: none;
}
`;
function RoutedTabs(props) {
@ -54,7 +60,6 @@ function RoutedTabs(props) {
<Tabs activeKey={getActiveTabId()} onSelect={handleTabSelect}>
{tabsArray.map(tab => (
<Tab
className={`${tab.name}`}
aria-label={`${tab.name}`}
eventKey={tab.id}
key={tab.id}

View File

@ -55,6 +55,7 @@ const NoOptionDropdown = styled.div`
align-self: stretch;
border: 1px solid grey;
padding: 3px 7px;
white-space: nowrap;
`;
const InputFormGroup = styled(FormGroup)`
@ -161,6 +162,8 @@ class Search extends React.Component {
{i18n._(t`Search value text input`)}
</span>
}
style={{ width: '100%' }}
suppressClassNameWarning
>
<TextInput
type="search"

View File

@ -10,14 +10,14 @@ import {
class Applications extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Applications`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<Applications />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class AuthSettings extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Authentication Settings`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<AuthSettings />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class Credentials extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Credentials`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<Credentials />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class CredentialTypes extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Credential Types`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<CredentialTypes />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class Dashboard extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Dashboard`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<Dashboard />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class InstanceGroups extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Instance Groups`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<InstanceGroups />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class Inventories extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Inventories`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<Inventories />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class InventoryScripts extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Inventory Scripts`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<InventoryScripts />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -154,7 +154,7 @@ class JobList extends Component {
const isAllSelected = selected.length === jobs.length;
const itemName = i18n._(t`Job`);
return (
<PageSection variant={medium}>
<PageSection>
<Card>
<PaginatedDataList
contentError={contentError}

View File

@ -10,14 +10,14 @@ import {
class JobsSettings extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Jobs Settings`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<JobsSettings />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class License extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`License`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<License />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class ManagementJobs extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Management Jobs`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<ManagementJobs />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -24,8 +24,6 @@ describe('<NotificationTemplates />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class NotificationTemplates extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Notification Templates`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -22,32 +22,13 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
Array [
<Button
aria-label="Confirm delete"
className=""
component="button"
isActive={false}
isBlock={false}
isDisabled={false}
isFocus={false}
isHover={false}
isInline={false}
onClick={[Function]}
type="button"
variant="danger"
>
Delete
</Button>,
<Button
aria-label={null}
className=""
component="button"
isActive={false}
isBlock={false}
isDisabled={false}
isFocus={false}
isHover={false}
isInline={false}
onClick={[Function]}
type="button"
variant="secondary"
>
Cancel
@ -64,32 +45,13 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
Array [
<Button
aria-label="Confirm delete"
className=""
component="button"
isActive={false}
isBlock={false}
isDisabled={false}
isFocus={false}
isHover={false}
isInline={false}
onClick={[Function]}
type="button"
variant="danger"
>
Delete
</Button>,
<Button
aria-label={null}
className=""
component="button"
isActive={false}
isBlock={false}
isDisabled={false}
isFocus={false}
isHover={false}
isInline={false}
onClick={[Function]}
type="button"
variant="secondary"
>
Cancel
@ -103,8 +65,8 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
isOpen={true}
isSmall={false}
onClose={[Function]}
showClose={true}
title="Remove {0} Access"
width={null}
>
<Portal
containerInfo={
@ -142,13 +104,13 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
/>
</svg>
</button>
<h3
<h1
class="pf-c-title pf-m-2xl"
>
Remove {0} Access
</h3>
</h1>
<div
class="pf-c-modal-box__body"
id="pf-modal-0"
@ -176,7 +138,6 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
<div
class="pf-c-modal-box__footer"
>
<button
aria-label="Confirm delete"
class="pf-c-button pf-m-danger"
@ -190,7 +151,6 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
>
Cancel
</button>
</div>
</div>
</div>
@ -203,32 +163,13 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
Array [
<Button
aria-label="Confirm delete"
className=""
component="button"
isActive={false}
isBlock={false}
isDisabled={false}
isFocus={false}
isHover={false}
isInline={false}
onClick={[Function]}
type="button"
variant="danger"
>
Delete
</Button>,
<Button
aria-label={null}
className=""
component="button"
isActive={false}
isBlock={false}
isDisabled={false}
isFocus={false}
isHover={false}
isInline={false}
onClick={[Function]}
type="button"
variant="secondary"
>
Cancel
@ -243,12 +184,10 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
isOpen={true}
isSmall={false}
onClose={[Function]}
showClose={true}
title="Remove {0} Access"
width={null}
>
<Backdrop
className=""
>
<Backdrop>
<div
className="pf-c-backdrop"
>
@ -272,11 +211,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
id="pf-modal-0"
isLarge={false}
isSmall={false}
style={
Object {
"width": null,
}
}
style={Object {}}
title="Remove {0} Access"
>
<div
@ -285,28 +220,15 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
aria-modal="true"
className="pf-c-modal-box awx-c-modal at-c-alertModal at-c-alertModal--danger"
role="dialog"
style={
Object {
"width": null,
}
}
style={Object {}}
>
<ModalBoxCloseButton
className=""
onClose={[Function]}
>
<Button
aria-label="Close"
className=""
component="button"
isActive={false}
isBlock={false}
isDisabled={false}
isFocus={false}
isHover={false}
isInline={false}
onClick={[Function]}
type="button"
variant="plain"
>
<button
@ -320,6 +242,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
>
<TimesIcon
color="currentColor"
noVerticalAlign={false}
size="sm"
title={null}
>
@ -347,25 +270,23 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
</Button>
</ModalBoxCloseButton>
<ModalBoxHeader
className=""
hideTitle={false}
>
<Title
className=""
headingLevel="h3"
headingLevel="h1"
size="2xl"
>
<h3
<h1
className="pf-c-title pf-m-2xl"
>
Remove {0} Access
</h3>
</h1>
</Title>
</ModalBoxHeader>
<ModalBoxBody
className=""
id="pf-modal-0"
>
<div
@ -379,6 +300,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
<ExclamationCircleIcon
className="at-c-alertModal__icon"
color="currentColor"
noVerticalAlign={false}
size="sm"
title={null}
>
@ -405,26 +327,14 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
</ExclamationCircleIcon>
</div>
</ModalBoxBody>
<ModalBoxFooter
className=""
>
<ModalBoxFooter>
<div
className="pf-c-modal-box__footer"
>
<Button
aria-label="Confirm delete"
className=""
component="button"
isActive={false}
isBlock={false}
isDisabled={false}
isFocus={false}
isHover={false}
isInline={false}
key="delete"
onClick={[Function]}
type="button"
variant="danger"
>
<button
@ -440,18 +350,8 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
</button>
</Button>
<Button
aria-label={null}
className=""
component="button"
isActive={false}
isBlock={false}
isDisabled={false}
isFocus={false}
isHover={false}
isInline={false}
key="cancel"
onClick={[Function]}
type="button"
variant="secondary"
>
<button
@ -466,7 +366,6 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
Cancel
</button>
</Button>
</div>
</ModalBoxFooter>
</div>

View File

@ -419,21 +419,16 @@ exports[`<OrganizationAccess /> initially renders succesfully 1`] = `
<ContentLoading
i18n={"/i18n/"}
>
<EmptyState
className=""
variant="large"
>
<EmptyState>
<div
className="pf-c-empty-state pf-m-lg"
className="pf-c-empty-state styles.modifiers.lg"
>
<EmptyStateBody
className=""
>
<p
<EmptyStateBody>
<div
className="pf-c-empty-state__body"
>
Loading...
</p>
</div>
</EmptyStateBody>
</div>
</EmptyState>
@ -460,8 +455,8 @@ exports[`<OrganizationAccess /> initially renders succesfully 1`] = `
isOpen={false}
isSmall={false}
onClose={[Function]}
showClose={true}
title="Error!"
width={null}
>
<Portal
containerInfo={<div />}
@ -476,8 +471,8 @@ exports[`<OrganizationAccess /> initially renders succesfully 1`] = `
isOpen={false}
isSmall={false}
onClose={[Function]}
showClose={true}
title="Error!"
width={null}
/>
</Portal>
</Modal>

View File

@ -34,8 +34,6 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
>
<DataListItem
aria-labelledby="access-list-item"
className=""
isExpanded={false}
key="2"
>
<li
@ -43,7 +41,6 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
className="pf-c-data-list__item"
>
<DataListItemRow
className=""
key=".0"
rowid="access-list-item"
>
@ -53,18 +50,9 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
<OrganizationAccessItem__DataListItemCells
dataListCells={
Array [
<DataListCell
alignRight={false}
className=""
isFilled={true}
isIcon={false}
width={1}
>
<TextContent
className=""
>
<DataListCell>
<TextContent>
<Text
className=""
component="h6"
>
<ForwardRef
@ -88,13 +76,7 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
/>
</ForwardRef>
</DataListCell>,
<DataListCell
alignRight={false}
className=""
isFilled={true}
isIcon={false}
width={1}
>
<DataListCell>
<ForwardRef
stacked={true}
>
@ -122,18 +104,9 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
<StyledComponent
dataListCells={
Array [
<DataListCell
alignRight={false}
className=""
isFilled={true}
isIcon={false}
width={1}
>
<TextContent
className=""
>
<DataListCell>
<TextContent>
<Text
className=""
component="h6"
>
<ForwardRef
@ -157,13 +130,7 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
/>
</ForwardRef>
</DataListCell>,
<DataListCell
alignRight={false}
className=""
isFilled={true}
isIcon={false}
width={1}
>
<DataListCell>
<ForwardRef
stacked={true}
>
@ -214,18 +181,9 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
className="OrganizationAccessItem__DataListItemCells-sc-1b9e0ad-0 QeteT"
dataListCells={
Array [
<DataListCell
alignRight={false}
className=""
isFilled={true}
isIcon={false}
width={1}
>
<TextContent
className=""
>
<DataListCell>
<TextContent>
<Text
className=""
component="h6"
>
<ForwardRef
@ -249,13 +207,7 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
/>
</ForwardRef>
</DataListCell>,
<DataListCell
alignRight={false}
className=""
isFilled={true}
isIcon={false}
width={1}
>
<DataListCell>
<ForwardRef
stacked={true}
>
@ -283,24 +235,16 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
className="pf-c-data-list__item-content OrganizationAccessItem__DataListItemCells-sc-1b9e0ad-0 QeteT"
>
<DataListCell
alignRight={false}
className=""
isFilled={true}
isIcon={false}
key="name"
width={1}
>
<div
className="pf-c-data-list__cell"
>
<TextContent
className=""
>
<TextContent>
<div
className="pf-c-content"
>
<Text
className=""
component="h6"
>
<h6
@ -524,12 +468,7 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
</div>
</DataListCell>
<DataListCell
alignRight={false}
className=""
isFilled={true}
isIcon={false}
key="roles"
width={1}
>
<div
className="pf-c-data-list__cell"
@ -778,7 +717,6 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
<ChipButton
aria-labelledby="remove_pf-random-id-0 pf-random-id-0"
ariaLabel="close"
className=""
id="remove_pf-random-id-0"
onClick={[Function]}
>
@ -786,16 +724,8 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
aria-label="close"
aria-labelledby="remove_pf-random-id-0 pf-random-id-0"
className=""
component="button"
id="remove_pf-random-id-0"
isActive={false}
isBlock={false}
isDisabled={false}
isFocus={false}
isHover={false}
isInline={false}
onClick={[Function]}
type="button"
variant="plain"
>
<button
@ -812,6 +742,7 @@ exports[`<OrganizationAccessItem /> initially renders succesfully 1`] = `
<TimesCircleIcon
aria-hidden="true"
color="currentColor"
noVerticalAlign={false}
size="sm"
title={null}
>

View File

@ -147,7 +147,7 @@ class OrganizationsList extends Component {
return (
<Fragment>
<PageSection variant={medium}>
<PageSection>
<Card>
<PaginatedDataList
contentError={contentError}

View File

@ -33,6 +33,7 @@ class OrganizationNotifications extends Component {
toggleLoading: false,
itemCount: 0,
notifications: [],
startedTemplateIds: [],
successTemplateIds: [],
errorTemplateIds: [],
typeLabels: null,
@ -85,9 +86,11 @@ class OrganizationNotifications extends Component {
}
const [
{ data: startedTemplates },
{ data: successTemplates },
{ data: errorTemplates },
] = await Promise.all([
OrganizationsAPI.readNotificationTemplatesStarted(id, idMatchParams),
OrganizationsAPI.readNotificationTemplatesSuccess(id, idMatchParams),
OrganizationsAPI.readNotificationTemplatesError(id, idMatchParams),
]);
@ -95,7 +98,8 @@ class OrganizationNotifications extends Component {
const stateToUpdate = {
itemCount,
notifications,
successTemplateIds: successTemplates.results.map(s => s.id),
startedTemplateIds: startedTemplates.results.map(st => st.id),
successTemplateIds: successTemplates.results.map(su => su.id),
errorTemplateIds: errorTemplates.results.map(e => e.id),
};
@ -130,8 +134,10 @@ class OrganizationNotifications extends Component {
let stateArrayName;
if (status === 'success') {
stateArrayName = 'successTemplateIds';
} else {
} else if (status === 'error') {
stateArrayName = 'errorTemplateIds';
} else if (status === 'started') {
stateArrayName = 'startedTemplateIds';
}
let stateUpdateFunction;
@ -185,6 +191,7 @@ class OrganizationNotifications extends Component {
toggleLoading,
itemCount,
notifications,
startedTemplateIds,
successTemplateIds,
errorTemplateIds,
typeLabels,
@ -208,6 +215,7 @@ class OrganizationNotifications extends Component {
canToggleNotifications={canToggleNotifications && !toggleLoading}
toggleNotification={this.handleNotificationToggle}
errorTurnedOn={errorTemplateIds.includes(notification.id)}
startedTurnedOn={startedTemplateIds.includes(notification.id)}
successTurnedOn={successTemplateIds.includes(notification.id)}
typeLabels={typeLabels}
/>

View File

@ -23,6 +23,12 @@ describe('<OrganizationNotifications />', () => {
url: '/api/v2/notification_templates/2/',
notification_type: 'email',
},
{
id: 3,
name: 'Notification three',
url: '/api/v2/notification_templates/3/',
notification_type: 'email',
},
],
};
@ -46,6 +52,9 @@ describe('<OrganizationNotifications />', () => {
OrganizationsAPI.readNotificationTemplatesError.mockReturnValue({
data: { results: [{ id: 2 }] },
});
OrganizationsAPI.readNotificationTemplatesStarted.mockReturnValue({
data: { results: [{ id: 3 }] },
});
});
afterEach(() => {
@ -73,11 +82,16 @@ describe('<OrganizationNotifications />', () => {
wrapper.find('OrganizationNotifications').state('notifications')
).toEqual(data.results);
const items = wrapper.find('NotificationListItem');
expect(items).toHaveLength(2);
expect(items).toHaveLength(3);
expect(items.at(0).prop('successTurnedOn')).toEqual(true);
expect(items.at(0).prop('errorTurnedOn')).toEqual(false);
expect(items.at(0).prop('startedTurnedOn')).toEqual(false);
expect(items.at(1).prop('successTurnedOn')).toEqual(false);
expect(items.at(1).prop('errorTurnedOn')).toEqual(true);
expect(items.at(1).prop('startedTurnedOn')).toEqual(false);
expect(items.at(2).prop('successTurnedOn')).toEqual(false);
expect(items.at(2).prop('errorTurnedOn')).toEqual(false);
expect(items.at(2).prop('startedTurnedOn')).toEqual(true);
});
test('should enable success notification', async () => {
@ -94,7 +108,7 @@ describe('<OrganizationNotifications />', () => {
items
.at(1)
.find('Switch')
.at(0)
.at(1)
.prop('onChange')();
expect(OrganizationsAPI.associateNotificationTemplate).toHaveBeenCalledWith(
1,
@ -122,7 +136,7 @@ describe('<OrganizationNotifications />', () => {
items
.at(0)
.find('Switch')
.at(1)
.at(2)
.prop('onChange')();
expect(OrganizationsAPI.associateNotificationTemplate).toHaveBeenCalledWith(
1,
@ -136,6 +150,34 @@ describe('<OrganizationNotifications />', () => {
).toEqual([2, 1]);
});
test('should enable start notification', async () => {
const wrapper = mountWithContexts(
<OrganizationNotifications id={1} canToggleNotifications />
);
await sleep(0);
wrapper.update();
expect(
wrapper.find('OrganizationNotifications').state('startedTemplateIds')
).toEqual([3]);
const items = wrapper.find('NotificationListItem');
items
.at(0)
.find('Switch')
.at(0)
.prop('onChange')();
expect(OrganizationsAPI.associateNotificationTemplate).toHaveBeenCalledWith(
1,
1,
'started'
);
await sleep(0);
wrapper.update();
expect(
wrapper.find('OrganizationNotifications').state('startedTemplateIds')
).toEqual([3, 1]);
});
test('should disable success notification', async () => {
const wrapper = mountWithContexts(
<OrganizationNotifications id={1} canToggleNotifications />
@ -150,7 +192,7 @@ describe('<OrganizationNotifications />', () => {
items
.at(0)
.find('Switch')
.at(0)
.at(1)
.prop('onChange')();
expect(
OrganizationsAPI.disassociateNotificationTemplate
@ -176,7 +218,7 @@ describe('<OrganizationNotifications />', () => {
items
.at(1)
.find('Switch')
.at(1)
.at(2)
.prop('onChange')();
expect(
OrganizationsAPI.disassociateNotificationTemplate
@ -187,4 +229,30 @@ describe('<OrganizationNotifications />', () => {
wrapper.find('OrganizationNotifications').state('errorTemplateIds')
).toEqual([]);
});
test('should disable start notification', async () => {
const wrapper = mountWithContexts(
<OrganizationNotifications id={1} canToggleNotifications />
);
await sleep(0);
wrapper.update();
expect(
wrapper.find('OrganizationNotifications').state('startedTemplateIds')
).toEqual([3]);
const items = wrapper.find('NotificationListItem');
items
.at(2)
.find('Switch')
.at(0)
.prop('onChange')();
expect(
OrganizationsAPI.disassociateNotificationTemplate
).toHaveBeenCalledWith(1, 3, 'started');
await sleep(0);
wrapper.update();
expect(
wrapper.find('OrganizationNotifications').state('startedTemplateIds')
).toEqual([]);
});
});

View File

@ -10,14 +10,14 @@ import {
class Portal extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`My View`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<Portal />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class Projects extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Projects`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<Projects />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class Schedules extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Schedules`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<Schedules />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class SystemSettings extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`System Settings`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<SystemSettings />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class Teams extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Teams`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<Teams />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -169,21 +169,16 @@ exports[`<JobTemplateDetail /> initially renders succesfully 1`] = `
<ContentLoading
i18n={"/i18n/"}
>
<EmptyState
className=""
variant="large"
>
<EmptyState>
<div
className="pf-c-empty-state pf-m-lg"
className="pf-c-empty-state styles.modifiers.lg"
>
<EmptyStateBody
className=""
>
<p
<EmptyStateBody>
<div
className="pf-c-empty-state__body"
>
Loading...
</p>
</div>
</EmptyStateBody>
</div>
</EmptyState>

View File

@ -173,7 +173,7 @@ class TemplatesList extends Component {
const isAllSelected = selected.length === templates.length;
const { medium } = PageSectionVariants;
return (
<PageSection variant={medium}>
<PageSection>
<Card>
<PaginatedDataList
contentError={contentError}

View File

@ -8,6 +8,7 @@ describe('<TemplatesListItem />', () => {
test('launch button shown to users with start capabilities', () => {
const wrapper = mountWithContexts(
<TemplatesListItem
isSelected={false}
template={{
id: 1,
name: 'Template 1',
@ -26,6 +27,7 @@ describe('<TemplatesListItem />', () => {
test('launch button hidden from users without start capabilities', () => {
const wrapper = mountWithContexts(
<TemplatesListItem
isSelected={false}
template={{
id: 1,
name: 'Template 1',

View File

@ -10,14 +10,14 @@ import {
class UISettings extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`User Interface Settings`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<UISettings />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});

View File

@ -10,14 +10,14 @@ import {
class Users extends Component {
render() {
const { i18n } = this.props;
const { light, medium } = PageSectionVariants;
const { light } = PageSectionVariants;
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl">{i18n._(t`Users`)}</Title>
</PageSection>
<PageSection variant={medium} />
<PageSection />
</Fragment>
);
}

View File

@ -24,8 +24,6 @@ describe('<Users />', () => {
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
expect(pageSections.first().props().variant).toBe('light');
});
});