Skip to content

Commit b879174

Browse files
committed
fix import elastic icons inside redisearch plugin for E2E testcafe
1 parent adcf253 commit b879174

File tree

14 files changed

+1034
-8
lines changed

14 files changed

+1034
-8
lines changed

redisinsight/ui/src/components/query-card/QueryCardCliPlugin/QueryCardCliPlugin.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const QueryCardCliPlugin = (props: Props) => {
115115
bodyClass: theme === Theme.Dark ? 'theme_DARK' : 'theme_LIGHT',
116116
modules
117117
})
118-
//pluginIframeRef.current.src = `data:text/html;charset=utf-8,${encodeURI(html)}`
118+
// pluginIframeRef.current.src = `data:text/html;charset=utf-8,${encodeURI(html)}`
119119
// @ts-ignore
120120
pluginIframeRef.current.srcdoc = html
121121
}
@@ -164,7 +164,7 @@ const QueryCardCliPlugin = (props: Props) => {
164164
title={id}
165165
ref={pluginIframeRef}
166166
referrerPolicy="no-referrer"
167-
sandbox="allow-same-origin allow-scripts allow-modals"
167+
sandbox="allow-same-origin allow-scripts"
168168
/>
169169
{!!error && (
170170
<div className={styles.container}>

redisinsight/ui/src/packages/redisearch/src/components/TableInfoResult/TableInfoResult.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ const TableInfoResult = React.memo((props: Props) => {
112112
<div className="content">
113113
{Header()}
114114
<EuiInMemoryTable
115-
pagination
116115
items={items ?? []}
117116
loading={!result}
118117
message={loadingMessage}

redisinsight/ui/src/packages/redisearch/src/icons/arrow_down.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ var EuiIconArrowDown = function EuiIconArrowDown(_ref) {
1111
titleId = _ref.titleId,
1212
props = _objectWithoutProperties(_ref, ["title", "titleId"]);
1313

14+
// For e2e tests. TestCafe is failing for default icons
15+
if(process.env.E2E) {
16+
return <span>&#8595;</span>
17+
}
1418
return /*#__PURE__*/React.createElement("svg", _extends({
1519
width: 16,
1620
height: 16,

redisinsight/ui/src/packages/redisearch/src/icons/arrow_left.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ var EuiIconArrowLeft = function EuiIconArrowLeft(_ref) {
1111
titleId = _ref.titleId,
1212
props = _objectWithoutProperties(_ref, ["title", "titleId"]);
1313

14+
// For e2e tests. TestCafe is failing for default icons
15+
if(process.env.E2E) {
16+
return <span>&#8592;</span>
17+
}
1418
return /*#__PURE__*/React.createElement("svg", _extends({
1519
width: 16,
1620
height: 16,

redisinsight/ui/src/packages/redisearch/src/icons/arrow_right.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ const EuiIconArrowRight = function EuiIconArrowRight(_ref) {
1717
const { titleId } = _ref
1818
const props = _objectWithoutProperties(_ref, ['title', 'titleId'])
1919

20+
// For e2e tests. TestCafe is failing for default icons
21+
if(process.env.E2E) {
22+
return <span>&#8594;</span>
23+
}
2024
return /* #__PURE__ */React.createElement('svg', { width: 16,
2125
height: 16,
2226
viewBox: '0 0 16 16',

redisinsight/ui/src/packages/redisearch/src/icons/check.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ var EuiIconCheck = function EuiIconCheck(_ref) {
1111
titleId = _ref.titleId,
1212
props = _objectWithoutProperties(_ref, ["title", "titleId"]);
1313

14+
// For e2e tests. TestCafe is failing for default icons
15+
if(process.env.E2E) {
16+
return <span>&#10004;</span>
17+
}
1418
return /*#__PURE__*/React.createElement("svg", _extends({
1519
width: 16,
1620
height: 16,

redisinsight/ui/src/packages/redisearch/src/icons/copy.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ var EuiIconCopy = function EuiIconCopy(_ref) {
1111
titleId = _ref.titleId,
1212
props = _objectWithoutProperties(_ref, ["title", "titleId"]);
1313

14+
// For e2e tests. TestCafe is failing for default icons
15+
if(process.env.E2E) {
16+
return <span>&#9751;</span>
17+
}
1418
return /*#__PURE__*/React.createElement("svg", _extends({
1519
width: 16,
1620
height: 16,

redisinsight/ui/src/packages/redisearch/src/icons/cross.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ var EuiIconCross = function EuiIconCross(_ref) {
1111
titleId = _ref.titleId,
1212
props = _objectWithoutProperties(_ref, ["title", "titleId"]);
1313

14+
// For e2e tests. TestCafe is failing for default icons
15+
if(process.env.E2E) {
16+
return <span>&#10539;</span>
17+
}
1418
return /*#__PURE__*/React.createElement("svg", _extends({
1519
width: 16,
1620
height: 16,

redisinsight/ui/src/packages/redisearch/src/icons/empty.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ var EuiIconEmpty = function EuiIconEmpty(_ref) {
1111
titleId = _ref.titleId,
1212
props = _objectWithoutProperties(_ref, ["title", "titleId"]);
1313

14+
// For e2e tests. TestCafe is failing for default icons
15+
if(process.env.E2E) {
16+
return <span>''</span>
17+
}
1418
return /*#__PURE__*/React.createElement("svg", _extends({
1519
width: 16,
1620
height: 16,

redisinsight/ui/src/packages/redisearch/src/main.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ interface Props {
1414

1515
const renderRediSearch = (props:Props) => {
1616
const { command = '', status = '', data: response = {} } = props
17-
alert('renderRediSearch')
1817
render(<App command={command} response={response} status={status} />,
1918
document.getElementById('app'))
2019
}

0 commit comments

Comments
 (0)