Merge branch 'develop' into timeout-mute

This commit is contained in:
picklesrus 2020-12-14 13:27:12 -05:00 committed by GitHub
commit a39244ea6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 233 additions and 166 deletions

247
package-lock.json generated
View file

@ -16,9 +16,9 @@
} }
}, },
"@babel/cli": { "@babel/cli": {
"version": "7.12.8", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.12.8.tgz", "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.12.10.tgz",
"integrity": "sha512-/6nQj11oaGhLmZiuRUfxsujiPDc9BBReemiXgIbxc+M5W+MIiFKYwvNDJvBfnGKNsJTKbUfEheKc9cwoPHAVQA==", "integrity": "sha512-+y4ZnePpvWs1fc/LhZRTHkTesbXkyBYuOB+5CyodZqrEuETXi3zOVfpAQIdgC3lXbHLTDG9dQosxR9BhvLKDLQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents", "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents",
@ -226,25 +226,24 @@
} }
}, },
"@babel/core": { "@babel/core": {
"version": "7.12.9", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.10.tgz",
"integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==", "integrity": "sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.10.4", "@babel/code-frame": "^7.10.4",
"@babel/generator": "^7.12.5", "@babel/generator": "^7.12.10",
"@babel/helper-module-transforms": "^7.12.1", "@babel/helper-module-transforms": "^7.12.1",
"@babel/helpers": "^7.12.5", "@babel/helpers": "^7.12.5",
"@babel/parser": "^7.12.7", "@babel/parser": "^7.12.10",
"@babel/template": "^7.12.7", "@babel/template": "^7.12.7",
"@babel/traverse": "^7.12.9", "@babel/traverse": "^7.12.10",
"@babel/types": "^7.12.7", "@babel/types": "^7.12.10",
"convert-source-map": "^1.7.0", "convert-source-map": "^1.7.0",
"debug": "^4.1.0", "debug": "^4.1.0",
"gensync": "^1.0.0-beta.1", "gensync": "^1.0.0-beta.1",
"json5": "^2.1.2", "json5": "^2.1.2",
"lodash": "^4.17.19", "lodash": "^4.17.19",
"resolve": "^1.3.2",
"semver": "^5.4.1", "semver": "^5.4.1",
"source-map": "^0.5.0" "source-map": "^0.5.0"
}, },
@ -259,12 +258,12 @@
} }
}, },
"@babel/generator": { "@babel/generator": {
"version": "7.12.5", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.10.tgz",
"integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", "integrity": "sha512-6mCdfhWgmqLdtTkhXjnIz0LcdVCd26wS2JXRtj2XY0u5klDsXBREA/pG5NVOuVnF2LUrBGNFtQkIqqTbblg0ww==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/types": "^7.12.5", "@babel/types": "^7.12.10",
"jsesc": "^2.5.1", "jsesc": "^2.5.1",
"source-map": "^0.5.0" "source-map": "^0.5.0"
} }
@ -281,12 +280,12 @@
} }
}, },
"@babel/helper-get-function-arity": { "@babel/helper-get-function-arity": {
"version": "7.10.4", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz",
"integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "integrity": "sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/types": "^7.10.4" "@babel/types": "^7.12.10"
} }
}, },
"@babel/helper-split-export-declaration": { "@babel/helper-split-export-declaration": {
@ -310,9 +309,9 @@
} }
}, },
"@babel/parser": { "@babel/parser": {
"version": "7.12.7", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.10.tgz",
"integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==", "integrity": "sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA==",
"dev": true "dev": true
}, },
"@babel/template": { "@babel/template": {
@ -327,26 +326,26 @@
} }
}, },
"@babel/traverse": { "@babel/traverse": {
"version": "7.12.9", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.9.tgz", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.10.tgz",
"integrity": "sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw==", "integrity": "sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.10.4", "@babel/code-frame": "^7.10.4",
"@babel/generator": "^7.12.5", "@babel/generator": "^7.12.10",
"@babel/helper-function-name": "^7.10.4", "@babel/helper-function-name": "^7.10.4",
"@babel/helper-split-export-declaration": "^7.11.0", "@babel/helper-split-export-declaration": "^7.11.0",
"@babel/parser": "^7.12.7", "@babel/parser": "^7.12.10",
"@babel/types": "^7.12.7", "@babel/types": "^7.12.10",
"debug": "^4.1.0", "debug": "^4.1.0",
"globals": "^11.1.0", "globals": "^11.1.0",
"lodash": "^4.17.19" "lodash": "^4.17.19"
} }
}, },
"@babel/types": { "@babel/types": {
"version": "7.12.7", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==", "integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/helper-validator-identifier": "^7.10.4", "@babel/helper-validator-identifier": "^7.10.4",
@ -517,9 +516,9 @@
}, },
"dependencies": { "dependencies": {
"@babel/types": { "@babel/types": {
"version": "7.12.7", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==", "integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/helper-validator-identifier": "^7.10.4", "@babel/helper-validator-identifier": "^7.10.4",
@ -551,9 +550,9 @@
}, },
"dependencies": { "dependencies": {
"@babel/types": { "@babel/types": {
"version": "7.12.7", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==", "integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/helper-validator-identifier": "^7.10.4", "@babel/helper-validator-identifier": "^7.10.4",
@ -602,12 +601,12 @@
} }
}, },
"@babel/generator": { "@babel/generator": {
"version": "7.12.5", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.10.tgz",
"integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", "integrity": "sha512-6mCdfhWgmqLdtTkhXjnIz0LcdVCd26wS2JXRtj2XY0u5klDsXBREA/pG5NVOuVnF2LUrBGNFtQkIqqTbblg0ww==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/types": "^7.12.5", "@babel/types": "^7.12.10",
"jsesc": "^2.5.1", "jsesc": "^2.5.1",
"source-map": "^0.5.0" "source-map": "^0.5.0"
} }
@ -624,12 +623,12 @@
} }
}, },
"@babel/helper-get-function-arity": { "@babel/helper-get-function-arity": {
"version": "7.10.4", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz",
"integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "integrity": "sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/types": "^7.10.4" "@babel/types": "^7.12.10"
} }
}, },
"@babel/helper-split-export-declaration": { "@babel/helper-split-export-declaration": {
@ -653,9 +652,9 @@
} }
}, },
"@babel/parser": { "@babel/parser": {
"version": "7.12.7", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.10.tgz",
"integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==", "integrity": "sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA==",
"dev": true "dev": true
}, },
"@babel/template": { "@babel/template": {
@ -670,26 +669,26 @@
} }
}, },
"@babel/traverse": { "@babel/traverse": {
"version": "7.12.9", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.9.tgz", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.10.tgz",
"integrity": "sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw==", "integrity": "sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.10.4", "@babel/code-frame": "^7.10.4",
"@babel/generator": "^7.12.5", "@babel/generator": "^7.12.10",
"@babel/helper-function-name": "^7.10.4", "@babel/helper-function-name": "^7.10.4",
"@babel/helper-split-export-declaration": "^7.11.0", "@babel/helper-split-export-declaration": "^7.11.0",
"@babel/parser": "^7.12.7", "@babel/parser": "^7.12.10",
"@babel/types": "^7.12.7", "@babel/types": "^7.12.10",
"debug": "^4.1.0", "debug": "^4.1.0",
"globals": "^11.1.0", "globals": "^11.1.0",
"lodash": "^4.17.19" "lodash": "^4.17.19"
} }
}, },
"@babel/types": { "@babel/types": {
"version": "7.12.7", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==", "integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/helper-validator-identifier": "^7.10.4", "@babel/helper-validator-identifier": "^7.10.4",
@ -780,18 +779,18 @@
} }
}, },
"@babel/helper-optimise-call-expression": { "@babel/helper-optimise-call-expression": {
"version": "7.12.7", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.7.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz",
"integrity": "sha512-I5xc9oSJ2h59OwyUqjv95HRyzxj53DAubUERgQMrpcCEYQyToeHA+NEcUEsVWB4j53RDeskeBJ0SgRAYHDBckw==", "integrity": "sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/types": "^7.12.7" "@babel/types": "^7.12.10"
}, },
"dependencies": { "dependencies": {
"@babel/types": { "@babel/types": {
"version": "7.12.7", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==", "integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/helper-validator-identifier": "^7.10.4", "@babel/helper-validator-identifier": "^7.10.4",
@ -841,12 +840,12 @@
} }
}, },
"@babel/generator": { "@babel/generator": {
"version": "7.12.5", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.10.tgz",
"integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", "integrity": "sha512-6mCdfhWgmqLdtTkhXjnIz0LcdVCd26wS2JXRtj2XY0u5klDsXBREA/pG5NVOuVnF2LUrBGNFtQkIqqTbblg0ww==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/types": "^7.12.5", "@babel/types": "^7.12.10",
"jsesc": "^2.5.1", "jsesc": "^2.5.1",
"source-map": "^0.5.0" "source-map": "^0.5.0"
} }
@ -863,12 +862,12 @@
} }
}, },
"@babel/helper-get-function-arity": { "@babel/helper-get-function-arity": {
"version": "7.10.4", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz",
"integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "integrity": "sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/types": "^7.10.4" "@babel/types": "^7.12.10"
} }
}, },
"@babel/helper-split-export-declaration": { "@babel/helper-split-export-declaration": {
@ -892,9 +891,9 @@
} }
}, },
"@babel/parser": { "@babel/parser": {
"version": "7.12.7", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.10.tgz",
"integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==", "integrity": "sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA==",
"dev": true "dev": true
}, },
"@babel/template": { "@babel/template": {
@ -909,26 +908,26 @@
} }
}, },
"@babel/traverse": { "@babel/traverse": {
"version": "7.12.9", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.9.tgz", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.10.tgz",
"integrity": "sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw==", "integrity": "sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.10.4", "@babel/code-frame": "^7.10.4",
"@babel/generator": "^7.12.5", "@babel/generator": "^7.12.10",
"@babel/helper-function-name": "^7.10.4", "@babel/helper-function-name": "^7.10.4",
"@babel/helper-split-export-declaration": "^7.11.0", "@babel/helper-split-export-declaration": "^7.11.0",
"@babel/parser": "^7.12.7", "@babel/parser": "^7.12.10",
"@babel/types": "^7.12.7", "@babel/types": "^7.12.10",
"debug": "^4.1.0", "debug": "^4.1.0",
"globals": "^11.1.0", "globals": "^11.1.0",
"lodash": "^4.17.19" "lodash": "^4.17.19"
} }
}, },
"@babel/types": { "@babel/types": {
"version": "7.12.7", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==", "integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/helper-validator-identifier": "^7.10.4", "@babel/helper-validator-identifier": "^7.10.4",
@ -1028,9 +1027,9 @@
}, },
"dependencies": { "dependencies": {
"@babel/types": { "@babel/types": {
"version": "7.12.7", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==", "integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/helper-validator-identifier": "^7.10.4", "@babel/helper-validator-identifier": "^7.10.4",
@ -1088,12 +1087,12 @@
} }
}, },
"@babel/generator": { "@babel/generator": {
"version": "7.12.5", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.10.tgz",
"integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", "integrity": "sha512-6mCdfhWgmqLdtTkhXjnIz0LcdVCd26wS2JXRtj2XY0u5klDsXBREA/pG5NVOuVnF2LUrBGNFtQkIqqTbblg0ww==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/types": "^7.12.5", "@babel/types": "^7.12.10",
"jsesc": "^2.5.1", "jsesc": "^2.5.1",
"source-map": "^0.5.0" "source-map": "^0.5.0"
} }
@ -1110,12 +1109,12 @@
} }
}, },
"@babel/helper-get-function-arity": { "@babel/helper-get-function-arity": {
"version": "7.10.4", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz",
"integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "integrity": "sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/types": "^7.10.4" "@babel/types": "^7.12.10"
} }
}, },
"@babel/helper-split-export-declaration": { "@babel/helper-split-export-declaration": {
@ -1139,9 +1138,9 @@
} }
}, },
"@babel/parser": { "@babel/parser": {
"version": "7.12.7", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.10.tgz",
"integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==", "integrity": "sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA==",
"dev": true "dev": true
}, },
"@babel/template": { "@babel/template": {
@ -1156,26 +1155,26 @@
} }
}, },
"@babel/traverse": { "@babel/traverse": {
"version": "7.12.9", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.9.tgz", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.10.tgz",
"integrity": "sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw==", "integrity": "sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.10.4", "@babel/code-frame": "^7.10.4",
"@babel/generator": "^7.12.5", "@babel/generator": "^7.12.10",
"@babel/helper-function-name": "^7.10.4", "@babel/helper-function-name": "^7.10.4",
"@babel/helper-split-export-declaration": "^7.11.0", "@babel/helper-split-export-declaration": "^7.11.0",
"@babel/parser": "^7.12.7", "@babel/parser": "^7.12.10",
"@babel/types": "^7.12.7", "@babel/types": "^7.12.10",
"debug": "^4.1.0", "debug": "^4.1.0",
"globals": "^11.1.0", "globals": "^11.1.0",
"lodash": "^4.17.19" "lodash": "^4.17.19"
} }
}, },
"@babel/types": { "@babel/types": {
"version": "7.12.7", "version": "7.12.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.10.tgz",
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==", "integrity": "sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/helper-validator-identifier": "^7.10.4", "@babel/helper-validator-identifier": "^7.10.4",
@ -4610,9 +4609,9 @@
"dev": true "dev": true
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001165", "version": "1.0.30001166",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001165.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001166.tgz",
"integrity": "sha512-8cEsSMwXfx7lWSUMA2s08z9dIgsnR5NAqjXP23stdsU3AUWkCr/rr4s4OFtHXn5XXr6+7kam3QFVoYyXNPdJPA==", "integrity": "sha512-nCL4LzYK7F4mL0TjEMeYavafOGnBa98vTudH5c8lW9izUjnB99InG6pmC1ElAI1p0GlyZajv4ltUdFXvOHIl1A==",
"dev": true "dev": true
}, },
"canvas-fit": { "canvas-fit": {
@ -20528,9 +20527,9 @@
} }
}, },
"scratch-blocks": { "scratch-blocks": {
"version": "0.1.0-prerelease.20201208044427", "version": "0.1.0-prerelease.20201214034449",
"resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20201208044427.tgz", "resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20201214034449.tgz",
"integrity": "sha512-e32h0VW2Qf+xreb0LC1gT3cErFqohoBilURjhZ17XlrOrlj2GuriA6Ce19nhMKGSV7DgYmDIuvhNet0dCJPWvg==", "integrity": "sha512-GtXqEZWfu+e1LBYamg5TAYPWI1b8O+be3RcK5+EW6piO7Ptf6hwzCJApHt/cqxXjnTGyHH2A31ldQBpwuUhOtQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"exports-loader": "0.6.3", "exports-loader": "0.6.3",
@ -20538,9 +20537,9 @@
} }
}, },
"scratch-gui": { "scratch-gui": {
"version": "0.1.0-prerelease.20201209232508", "version": "0.1.0-prerelease.20201214041238",
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20201209232508.tgz", "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20201214041238.tgz",
"integrity": "sha512-w6hr5H93fXPXwzt6gsFPaV6I5q/4GH9+rqXZmWhaDS1wgluD+bkhA0vF6ponEnosSav6NPBKsRpBKYzTUUgiBQ==", "integrity": "sha512-8Q7vJmt2NveYGhP5GkuiCZc0tjypy6vqhBdbieas1+H+rLaWM4/FH2tPGTPZhM7PC2SVLm01bqO6RfJTyb+lHQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"arraybuffer-loader": "^1.0.6", "arraybuffer-loader": "^1.0.6",
@ -20591,8 +20590,8 @@
"redux": "3.7.2", "redux": "3.7.2",
"redux-throttle": "0.1.1", "redux-throttle": "0.1.1",
"scratch-audio": "0.1.0-prerelease.20200528195344", "scratch-audio": "0.1.0-prerelease.20200528195344",
"scratch-blocks": "0.1.0-prerelease.20201208044427", "scratch-blocks": "0.1.0-prerelease.20201214034449",
"scratch-l10n": "3.10.20201209031543", "scratch-l10n": "3.10.20201214031518",
"scratch-paint": "0.2.0-prerelease.20201020103914", "scratch-paint": "0.2.0-prerelease.20201020103914",
"scratch-render": "0.1.0-prerelease.20201113223804", "scratch-render": "0.1.0-prerelease.20201113223804",
"scratch-storage": "1.3.3", "scratch-storage": "1.3.3",
@ -20776,9 +20775,9 @@
"dev": true "dev": true
}, },
"electron-to-chromium": { "electron-to-chromium": {
"version": "1.3.621", "version": "1.3.625",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.621.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.625.tgz",
"integrity": "sha512-FeIuBzArONbAmKmZIsZIFGu/Gc9AVGlVeVbhCq+G2YIl6QkT0TDn2HKN/FMf1btXEB9kEmIuQf3/lBTVAbmFOg==", "integrity": "sha512-CsLk/r0C9dAzVPa9QF74HIXduxaucsaRfqiOYvIv2PRhvyC6EOqc/KbpgToQuDVgPf3sNAFZi3iBu4vpGOwGag==",
"dev": true "dev": true
}, },
"file-loader": { "file-loader": {
@ -21081,9 +21080,9 @@
} }
}, },
"scratch-l10n": { "scratch-l10n": {
"version": "3.10.20201209031543", "version": "3.10.20201214031518",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.10.20201209031543.tgz", "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.10.20201214031518.tgz",
"integrity": "sha512-N4y6BUrdBkspgtiT5UOsPuG5oAL4SR80SRgNuAh0JumrnquHGQ1DBygj4ajRpWkFv9mIJjW59n4Nu+qb+dYu3w==", "integrity": "sha512-hLEN9IxNSGuJd8W2mVxiuqwFdNeayXNKGjcdgXVSVrgcoX1xL8C20izxRuOxfdxk7azCCICc9ihsQlanNge1/Q==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/cli": "^7.1.2", "@babel/cli": "^7.1.2",

View file

@ -129,7 +129,7 @@
"redux-mock-store": "^1.2.3", "redux-mock-store": "^1.2.3",
"redux-thunk": "2.0.1", "redux-thunk": "2.0.1",
"sass-loader": "6.0.6", "sass-loader": "6.0.6",
"scratch-gui": "0.1.0-prerelease.20201209232508", "scratch-gui": "0.1.0-prerelease.20201214041238",
"scratch-l10n": "latest", "scratch-l10n": "latest",
"selenium-webdriver": "3.6.0", "selenium-webdriver": "3.6.0",
"slick-carousel": "1.6.0", "slick-carousel": "1.6.0",

View file

@ -1,6 +1,9 @@
const bindAll = require('lodash.bindall'); const bindAll = require('lodash.bindall');
const PropTypes = require('prop-types'); const PropTypes = require('prop-types');
const React = require('react'); const React = require('react');
const FormattedMessage = require('react-intl').FormattedMessage;
const injectIntl = require('react-intl').injectIntl;
const intlShape = require('react-intl').intlShape;
const Modal = require('../base/modal.jsx'); const Modal = require('../base/modal.jsx');
const ModalInnerContent = require('../base/modal-inner-content.jsx'); const ModalInnerContent = require('../base/modal-inner-content.jsx');
const Button = require('../../forms/button.jsx'); const Button = require('../../forms/button.jsx');
@ -48,25 +51,35 @@ class MuteModal extends React.Component {
<MuteStep <MuteStep
bottomImg="/svgs/commenting/comment_feedback.svg" bottomImg="/svgs/commenting/comment_feedback.svg"
bottomImgClass="bottom-img" bottomImgClass="bottom-img"
header="Make sure to be respectful to others when commenting on Scratch." header={this.props.intl.formatMessage({id: this.props.muteModalMessages.muteStepHeader})}
> >
<p> {this.props.muteModalMessages.muteStepContent.map(message => (
The Scratch comment filter thinks that your comment was disrespectful. Remember <p key={message}>
that there is a person behind this Scratch account, and sometimes, a mean comment <FormattedMessage id={message} />
can really hurt someone&apos;s feelings. </p>
</p> ))}
</MuteStep> </MuteStep>
<MuteStep <MuteStep
header={`You will be able to comment again ${this.props.timeMuted}.`} header={this.props.intl.formatMessage(
{id: 'comments.muted.duration'},
{inDuration: this.props.timeMuted}
)}
sideImg="/svgs/commenting/mute_time.svg" sideImg="/svgs/commenting/mute_time.svg"
sideImgClass="side-img" sideImgClass="side-img"
> >
<p> <p>
Your account has been paused from commenting until then. <FormattedMessage id="comments.muted.commentingPaused" />
</p> </p>
<p> <p>
If you would like more information, you can read <FormattedMessage
the <a href="/community_guidelines"> Scratch community guidelines</a>. id="comments.muted.moreInfoGuidelines"
values={{CommunityGuidelinesLink: (
<a href="/community_guidelines">
<FormattedMessage id="report.CommunityGuidelinesLinkText" />
</a>
)}}
/>
</p> </p>
</MuteStep> </MuteStep>
</Progression> </Progression>
@ -80,7 +93,7 @@ class MuteModal extends React.Component {
onClick={this.handlePrevious} onClick={this.handlePrevious}
> >
<div className="action-button-text"> <div className="action-button-text">
Back <FormattedMessage id="general.back" />
</div> </div>
</Button> </Button>
) : null } ) : null }
@ -90,7 +103,7 @@ class MuteModal extends React.Component {
onClick={this.props.onRequestClose} onClick={this.props.onRequestClose}
> >
<div className="action-button-text"> <div className="action-button-text">
Close <FormattedMessage id="general.close" />
</div> </div>
</Button> </Button>
) : ( ) : (
@ -99,7 +112,7 @@ class MuteModal extends React.Component {
onClick={this.handleNext} onClick={this.handleNext}
> >
<div className="action-button-text"> <div className="action-button-text">
Next <FormattedMessage id="general.next" />
</div> </div>
</Button> </Button>
)} )}
@ -111,8 +124,14 @@ class MuteModal extends React.Component {
} }
MuteModal.propTypes = { MuteModal.propTypes = {
intl: intlShape,
muteModalMessages: PropTypes.shape({
commentType: PropTypes.string,
muteStepHeader: PropTypes.string,
muteStepContent: PropTypes.string
}),
onRequestClose: PropTypes.func, onRequestClose: PropTypes.func,
timeMuted: PropTypes.string timeMuted: PropTypes.string
}; };
module.exports = MuteModal; module.exports = injectIntl(MuteModal);

View file

@ -349,6 +349,11 @@
"comments.status.acctdel": "Account deleted", "comments.status.acctdel": "Account deleted",
"comments.status.deleted": "Deleted", "comments.status.deleted": "Deleted",
"comments.status.reported": "Reported", "comments.status.reported": "Reported",
"comments.muted.duration": "You will be able to comment again {inDuration}.",
"comments.muted.commentingPaused": "Your account has been paused from commenting until then.",
"comments.muted.moreInfoGuidelines": "If you would like more information, you can read the {CommunityGuidelinesLink}.",
"comments.muted.moreInfoModal": "For more information, {clickHereLink}.",
"comments.muted.clickHereLinkText": "click here",
"social.embedLabel": "Embed", "social.embedLabel": "Embed",
"social.copyEmbedLinkText": "Copy embed", "social.copyEmbedLinkText": "Copy embed",

View file

@ -157,6 +157,17 @@ class ComposeComment extends React.Component {
return creationTimeMinutesAgo < 2 && numOffenses === 1; return creationTimeMinutesAgo < 2 && numOffenses === 1;
} }
getMuteMessageInfo () {
// return the ids for the messages that are shown for this mute type
// Note, it will probably be passed a 'type', but right now there's only one
// If mute modals have more than one unique "step" we could pass an array of steps
return {
commentType: 'comment.type.disrespectful',
muteStepHeader: 'comment.disrespectful.header',
muteStepContent: ['comment.disrespectful.content1', 'comment.disrespectful.content2']
};
}
handleCancel () { handleCancel () {
this.setState({ this.setState({
message: '', message: '',
@ -172,17 +183,29 @@ class ComposeComment extends React.Component {
{this.isMuted() ? ( {this.isMuted() ? (
<FlexRow className="comment"> <FlexRow className="comment">
<CommentingStatus> <CommentingStatus>
<p>Scratch thinks your comment was disrespectful.</p> <p><FormattedMessage id={this.getMuteMessageInfo().commentType} /></p>
<p> You will be able to comment <p>
again {formatTime.formatRelativeTime(this.state.muteExpiresAtMs, window._locale)}. <FormattedMessage
Your account has been paused from commenting until then. id="comments.muted.duration"
values={{
inDuration:
formatTime.formatRelativeTime(this.state.muteExpiresAtMs, window._locale)
}}
/> <FormattedMessage id="comments.muted.commentingPaused" />
</p>
<p className="bottom-text">
<FormattedMessage
id="comments.muted.moreInfoModal"
values={{clickHereLink: (
<a
href="#comment"
onClick={this.handleMuteOpen}
>
<FormattedMessage id="comments.muted.clickHereLinkText" />
</a>
)}}
/>
</p> </p>
<p className="bottom-text">For more information,
<a
href="#comment"
onClick={this.handleMuteOpen}
> click here</a>.</p>
</CommentingStatus> </CommentingStatus>
</FlexRow> </FlexRow>
) : null } ) : null }
@ -262,6 +285,7 @@ class ComposeComment extends React.Component {
showCloseButton showCloseButton
useStandardSizes useStandardSizes
className="mod-mute" className="mod-mute"
muteModalMessages={this.getMuteMessageInfo()}
shouldCloseOnOverlayClick={false} shouldCloseOnOverlayClick={false}
timeMuted={formatTime.formatRelativeTime(this.state.muteExpiresAtMs, window._locale)} timeMuted={formatTime.formatRelativeTime(this.state.muteExpiresAtMs, window._locale)}
onRequestClose={this.handleMuteClose} onRequestClose={this.handleMuteClose}

View file

@ -45,5 +45,9 @@
"project.cloudVariables": "Cloud Variables", "project.cloudVariables": "Cloud Variables",
"project.cloudDataLink": "See Data", "project.cloudDataLink": "See Data",
"project.usernameBlockAlert": "This project can detect who is using it, through the \"username\" block. To hide your identity, sign out before using the project.", "project.usernameBlockAlert": "This project can detect who is using it, through the \"username\" block. To hide your identity, sign out before using the project.",
"project.inappropriateUpdate": "Hmm...the bad word detector thinks there is a problem with your text. Please change it and remember to be respectful." "project.inappropriateUpdate": "Hmm...the bad word detector thinks there is a problem with your text. Please change it and remember to be respectful.",
"comment.type.disrespectful": "Scratch thinks your most recent comment was disrespectful.",
"comment.disrespectful.header": "Make sure to be friendly and respectful when using Scratch.",
"comment.disrespectful.content1": "The Scratch comment filter thinks your comment was disrespectful.",
"comment.disrespectful.content2": "Remember: There is a person behind every Scratch account and unfriendly comments can really hurt someone's feelings."
} }

View file

@ -1,5 +1,6 @@
const React = require('react'); const React = require('react');
const {shallowWithIntl} = require('../../helpers/intl-helpers.jsx'); const {shallowWithIntl} = require('../../helpers/intl-helpers.jsx');
import {mountWithIntl} from '../../helpers/intl-helpers.jsx';
const ComposeComment = require('../../../src/views/preview/comment/compose-comment.jsx'); const ComposeComment = require('../../../src/views/preview/comment/compose-comment.jsx');
import configureStore from 'redux-mock-store'; import configureStore from 'redux-mock-store';
@ -169,8 +170,14 @@ describe('Compose Comment test', () => {
test('Mute Modal shows when muteOpen is true ', () => { test('Mute Modal shows when muteOpen is true ', () => {
const realDateNow = Date.now.bind(global.Date); const realDateNow = Date.now.bind(global.Date);
global.Date.now = () => 0; global.Date.now = () => 0;
const component = getComposeCommentWrapper({}); const component = mountWithIntl(
const commentInstance = component.instance(); <ComposeComment
{...defaultProps()}
/>
, {context: {store}}
);
// set state on the ComposeComment component, not the wrapper
const commentInstance = component.find('ComposeComment').instance();
commentInstance.setState({muteOpen: true}); commentInstance.setState({muteOpen: true});
component.update(); component.update();
expect(component.find('MuteModal').exists()).toEqual(true); expect(component.find('MuteModal').exists()).toEqual(true);

View file

@ -6,52 +6,60 @@ import Modal from '../../../src/components/modal/base/modal';
describe('MuteModalTest', () => { describe('MuteModalTest', () => {
const defaultMessages = {
commentType: 'comment.type.disrespectful',
muteStepHeader: 'comment.disrespectful.header',
muteStepContent: ['comment.disrespectful.content1', 'comment.disrespectful.content2']
};
test('Mute Modal rendering', () => { test('Mute Modal rendering', () => {
const component = shallowWithIntl( const component = shallowWithIntl(
<MuteModal /> <MuteModal muteModalMessages={defaultMessages} />
); ).dive();
expect(component.find('div.mute-modal-header').exists()).toEqual(true); expect(component.find('div.mute-modal-header').exists()).toEqual(true);
}); });
test('Mute Modal only shows next button on initial step', () => { test('Mute Modal only shows next button on initial step', () => {
const component = mountWithIntl( const component = mountWithIntl(
<MuteModal /> <MuteModal muteModalMessages={defaultMessages} />
); );
expect(component.find('div.mute-nav').exists()).toEqual(true); expect(component.find('div.mute-nav').exists()).toEqual(true);
expect(component.find('button.next-button').exists()).toEqual(true); expect(component.find('button.next-button').exists()).toEqual(true);
expect(component.find('button.next-button').getElements()[0].props.onClick) expect(component.find('button.next-button').getElements()[0].props.onClick)
.toEqual(component.instance().handleNext); .toEqual(component.find('MuteModal').instance().handleNext);
expect(component.find('button.close-button').exists()).toEqual(false); expect(component.find('button.close-button').exists()).toEqual(false);
expect(component.find('button.back-button').exists()).toEqual(false); expect(component.find('button.back-button').exists()).toEqual(false);
}); });
test('Mute Modal shows back & close button on last step', () => { test('Mute Modal shows back & close button on last step', () => {
const component = mountWithIntl( const component = mountWithIntl(
<MuteModal /> <MuteModal muteModalMessages={defaultMessages} />
); );
// Step 1 is the last step. // Step 1 is the last step.
component.instance().setState({step: 1}); component.find('MuteModal').instance()
.setState({step: 1});
component.update(); component.update();
expect(component.find('div.mute-nav').exists()).toEqual(true); expect(component.find('div.mute-nav').exists()).toEqual(true);
expect(component.find('button.next-button').exists()).toEqual(false); expect(component.find('button.next-button').exists()).toEqual(false);
expect(component.find('button.back-button').exists()).toEqual(true); expect(component.find('button.back-button').exists()).toEqual(true);
expect(component.find('button.back-button').getElements()[0].props.onClick) expect(component.find('button.back-button').getElements()[0].props.onClick)
.toEqual(component.instance().handlePrevious); .toEqual(component.find('MuteModal').instance().handlePrevious);
expect(component.find('button.close-button').exists()).toEqual(true); expect(component.find('button.close-button').exists()).toEqual(true);
expect(component.find('button.close-button').getElements()[0].props.onClick) expect(component.find('button.close-button').getElements()[0].props.onClick)
.toEqual(component.instance().props.onRequestClose); .toEqual(component.find('MuteModal').instance().props.onRequestClose);
}); });
test('Mute modal sends correct props to Modal', () => { test('Mute modal sends correct props to Modal', () => {
const closeFn = jest.fn(); const closeFn = jest.fn();
const component = shallowWithIntl( const component = shallowWithIntl(
<MuteModal <MuteModal
muteModalMessages={defaultMessages}
onRequestClose={closeFn} onRequestClose={closeFn}
/> />
); ).dive();
const modal = component.find(Modal); const modal = component.find(Modal);
expect(modal).toHaveLength(1); expect(modal).toHaveLength(1);
expect(modal.props().showCloseButton).toBe(false); expect(modal.props().showCloseButton).toBe(false);
@ -64,9 +72,10 @@ describe('MuteModalTest', () => {
const closeFn = jest.fn(); const closeFn = jest.fn();
const component = shallowWithIntl( const component = shallowWithIntl(
<MuteModal <MuteModal
muteModalMessages={defaultMessages}
onRequestClose={closeFn} onRequestClose={closeFn}
/> />
); ).dive();
expect(component.instance().state.step).toBe(0); expect(component.instance().state.step).toBe(0);
component.instance().handleNext(); component.instance().handleNext();
expect(component.instance().state.step).toBe(1); expect(component.instance().state.step).toBe(1);
@ -74,8 +83,8 @@ describe('MuteModalTest', () => {
test('Mute modal handle previous step', () => { test('Mute modal handle previous step', () => {
const component = shallowWithIntl( const component = shallowWithIntl(
<MuteModal /> <MuteModal muteModalMessages={defaultMessages} />
); ).dive();
component.instance().setState({step: 1}); component.instance().setState({step: 1});
component.instance().handlePrevious(); component.instance().handlePrevious();
@ -84,8 +93,8 @@ describe('MuteModalTest', () => {
test('Mute modal handle previous step stops at 0', () => { test('Mute modal handle previous step stops at 0', () => {
const component = shallowWithIntl( const component = shallowWithIntl(
<MuteModal /> <MuteModal muteModalMessages={defaultMessages} />
); ).dive();
component.instance().setState({step: 0}); component.instance().setState({step: 0});
component.instance().handlePrevious(); component.instance().handlePrevious();
expect(component.instance().state.step).toBe(0); expect(component.instance().state.step).toBe(0);