From 05f8c69fe6159920811ab3b6157463574b085e1a Mon Sep 17 00:00:00 2001 From: Leonard Kim Date: Tue, 29 Aug 2017 16:38:13 -0700 Subject: [PATCH] ref(toolbar): add wrapper around buttons for torture tests The torture tests were looking for the anchor tag within each button. However, that anchor could get blown away from a react re-render. So instead, expose a way for the torture tests to find the root node of the button. --- react/features/toolbox/components/ToolbarButton.web.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/react/features/toolbox/components/ToolbarButton.web.js b/react/features/toolbox/components/ToolbarButton.web.js index 897cbfdb3..90ad79151 100644 --- a/react/features/toolbox/components/ToolbarButton.web.js +++ b/react/features/toolbox/components/ToolbarButton.web.js @@ -156,13 +156,14 @@ class ToolbarButton extends Component { ); + let children = buttonComponent; const popupConfig = this._getPopupDisplayConfiguration(); if (popupConfig) { const { dataAttr, dataInterpolate, position } = popupConfig; - return ( + children = ( // eslint-disable-line no-extra-parens + { children } + + ); } /**