diff --git a/package.json b/package.json
index 85d1547339..2451f5ffc4 100644
--- a/package.json
+++ b/package.json
@@ -128,6 +128,8 @@
"babel-preset-react": "^6.24.1",
"chokidar": "^2.1.2",
"concurrently": "^4.0.1",
+ "enzyme": "^3.10.0",
+ "enzyme-adapter-react-16": "^1.15.1",
"eslint": "^5.12.0",
"eslint-config-google": "^0.7.1",
"eslint-plugin-babel": "^5.2.1",
diff --git a/src/HtmlUtils.js b/src/HtmlUtils.js
index 7cdff26a21..e2b7c61a12 100644
--- a/src/HtmlUtils.js
+++ b/src/HtmlUtils.js
@@ -377,6 +377,7 @@ class TextHighlighter extends BaseHighlighter {
* opts.stripReplyFallback: optional argument specifying the event is a reply and so fallback needs removing
* opts.returnString: return an HTML string rather than JSX elements
* opts.forComposerQuote: optional param to lessen the url rewriting done by sanitization, for quoting into composer
+ * opts.ref: React ref to attach to any React components returned (not compatible with opts.returnString)
*/
export function bodyToHtml(content, highlights, opts={}) {
const isHtmlMessage = content.format === "org.matrix.custom.html" && content.formatted_body;
@@ -459,8 +460,8 @@ export function bodyToHtml(content, highlights, opts={}) {
});
return isDisplayedWithHtml ?
- :
- { strippedBody };
+ :
+ { strippedBody };
}
/**
diff --git a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js
index 19720e077a..1095fb4aee 100644
--- a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js
+++ b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js
@@ -24,7 +24,7 @@ import MatrixClientPeg from '../../../../MatrixClientPeg';
import { scorePassword } from '../../../../utils/PasswordScorer';
import { _t } from '../../../../languageHandler';
import { accessSecretStorage } from '../../../../CrossSigningManager';
-import SettingsStore from '../../../../../lib/settings/SettingsStore';
+import SettingsStore from '../../../../settings/SettingsStore';
const PHASE_PASSPHRASE = 0;
const PHASE_PASSPHRASE_CONFIRM = 1;
diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js
index efbfc4322f..ef1822b555 100644
--- a/src/components/views/context_menus/MessageContextMenu.js
+++ b/src/components/views/context_menus/MessageContextMenu.js
@@ -422,7 +422,7 @@ module.exports = createReactClass({
);
- if (this.props.eventTileOps && this.props.eventTileOps.getInnerText) {
+ if (this.props.eventTileOps) { // this event is rendered using TextualBody
quoteButton = (