diff --git a/packages/selenium-ide/src/neo/components/TestRow/index.jsx b/packages/selenium-ide/src/neo/components/TestRow/index.jsx
index c09933eb9..a3ff29a7c 100644
--- a/packages/selenium-ide/src/neo/components/TestRow/index.jsx
+++ b/packages/selenium-ide/src/neo/components/TestRow/index.jsx
@@ -106,6 +106,7 @@ class TestRow extends React.Component {
command: PropTypes.string.isRequired,
target: PropTypes.string,
value: PropTypes.string,
+ level: PropTypes.number,
isBreakpoint: PropTypes.bool,
toggleBreakpoint: PropTypes.func,
onClick: PropTypes.func,
@@ -200,6 +201,7 @@ class TestRow extends React.Component {
//setting component of context menu.
this.props.setContextMenu(listMenu);
+ const index = this.props.index >= 0 ? {this.props.index + 1}. : null;
const rendered =
{return(this.node = node || this.node);}}
className={classNames(this.props.className, {"selected": this.props.selected}, {"break-point": this.props.isBreakpoint}, {"dragging": this.props.dragInProgress})}
@@ -214,12 +216,12 @@ class TestRow extends React.Component {
}}>
{this.props.comment ?
- {this.props.index >= 0 ? {this.props.index + 1}. : null}
+ {index}
{this.props.comment}
| :
- {this.props.index >= 0 ? {this.props.index + 1}. : null}
+ {index}
{this.props.command}
|
{this.props.target} |
diff --git a/packages/selenium-ide/src/neo/components/TestTable/index.jsx b/packages/selenium-ide/src/neo/components/TestTable/index.jsx
index ea905b026..8762cfcd6 100644
--- a/packages/selenium-ide/src/neo/components/TestTable/index.jsx
+++ b/packages/selenium-ide/src/neo/components/TestTable/index.jsx
@@ -40,6 +40,7 @@ export default class TestTable extends React.Component {
clearAllCommands: PropTypes.func
};
render() {
+ let level = 0;
return ([
@@ -55,8 +56,9 @@ export default class TestTable extends React.Component {
- { this.props.commands ? this.props.commands.map((command, index) => (
- {
+ if (isBlockEnd(command.command) && level > 0) level--;
+ const row = { UiState.copyToClipboard(command); }}
clearAllCommands={this.props.clearAllCommands}
setSectionFocus={UiState.setSectionFocus}
- />
- )).concat(
+ />;
+ if (isBlock(command.command)) level++;
+ return row;
+ }).concat(