Skip to content

Commit d98d25a

Browse files
committed
scroll the table while in playback to the played row
1 parent 831a914 commit d98d25a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/selenium-ide/src/neo/components/TestRow/index.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ class TestRow extends React.Component {
103103
index: PropTypes.number,
104104
selected: PropTypes.bool,
105105
className: PropTypes.string,
106+
status: PropTypes.string,
106107
command: PropTypes.object.isRequired,
107108
isPristine: PropTypes.bool,
108109
select: PropTypes.func,
@@ -135,6 +136,8 @@ class TestRow extends React.Component {
135136
this.props.setSectionFocus("editor", () => {
136137
this.node.focus();
137138
});
139+
} else if (this.props.status === "pending") {
140+
this.node.scrollIntoViewIfNeeded();
138141
}
139142
}
140143
componentWillUnmount() {
@@ -205,7 +208,7 @@ class TestRow extends React.Component {
205208

206209
const rendered = <tr
207210
ref={node => {return(this.node = node || this.node);}}
208-
className={classNames(this.props.className, {"selected": this.props.selected}, {"break-point": this.props.command.isBreakpoint})}
211+
className={classNames(this.props.className, this.props.status, {"selected": this.props.selected}, {"break-point": this.props.command.isBreakpoint})}
209212
tabIndex={this.props.selected ? "0" : "-1"}
210213
onContextMenu={this.props.swapCommands ? this.props.onContextMenu : null}
211214
onClick={this.select}

packages/selenium-ide/src/neo/components/TestTable/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default class TestTable extends React.Component {
5858
{ this.props.commands ? this.props.commands.map((command, index) => (
5959
<TestRow
6060
key={command.id}
61-
className={classNames(PlaybackState.commandState.get(command.id) ? PlaybackState.commandState.get(command.id).state : "")}
61+
status={classNames(PlaybackState.commandState.get(command.id) ? PlaybackState.commandState.get(command.id).state : "")}
6262
selected={this.props.selectedCommand === command.id}
6363
index={index}
6464
command={command}

0 commit comments

Comments
 (0)