test: ErrorMessage components tests (#13358)

* Add tests for ErrorAlert

* Add BasicErrorAlert tests

* Add DatabaseErrorMessage tests

* Add useRedux property

* Finalize DatabaseErrorMessage tests

* Add ErrorMessageWithStackTrace tests

* Move getErrorMessageComponentRegistry test to dedicated directory

* Clean up getErrorMessageComponentRegistry

* Add IssueCode tests

* Add tests for ParameterErrorMessage

* Add tests for TimeoutErrorMessage

* Fix linting issue
This commit is contained in:
Geido
2021-03-03 02:34:10 +02:00
committed by GitHub
parent 694ae6f90e
commit 7d270bced6
11 changed files with 677 additions and 36 deletions

View File

@@ -46,7 +46,9 @@ function DatabaseErrorMessage({
{t('This may be triggered by:')}
<br />
{extra.issue_codes
.map<React.ReactNode>(issueCode => <IssueCode {...issueCode} />)
.map<React.ReactNode>(issueCode => (
<IssueCode {...issueCode} key={issueCode.code} />
))
.reduce((prev, curr) => [prev, <br />, curr])}
</p>
{isVisualization && extra.owners && (