Skip to content

Commit 74681e9

Browse files
committed
remove obsolete mobxArray.prototype.peek
1 parent c769100 commit 74681e9

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default class TargetInput extends React.Component {
5252
<AutoComplete
5353
id={this.props.name}
5454
getItemValue={item => item[0]}
55-
items={this.props.targets.peek()}
55+
items={this.props.targets.slice()}
5656
renderDefaultStyledItem={item => (
5757
<TargetSuggestion locator={item[0]} strategy={item[1]} />
5858
)}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const collectTarget = connect => ({
122122
export default class Test extends React.Component {
123123
static propTypes = {
124124
className: PropTypes.string,
125-
callstack: PropTypes.object,
125+
callstack: PropTypes.array,
126126
test: PropTypes.object.isRequired,
127127
suite: PropTypes.object,
128128
menu: PropTypes.node,

packages/selenium-ide/src/neo/stores/view/PlaybackState.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ class PlaybackState {
312312
this.isPlayFromHere = true
313313

314314
// to determine if control flow commands exist in test commands
315-
const playbackTree = createPlaybackTree(test.commands.peek())
315+
const playbackTree = createPlaybackTree(test.commands.slice())
316316

317317
if (playbackTree.containsControlFlow) {
318318
const choseProceed = await ModalState.showAlert({
@@ -372,11 +372,11 @@ class PlaybackState {
372372
if (controls.playFromHere) {
373373
await this.initPlayFromHere(command, test)
374374
this.runningQueue = this.runningQueueFromIndex(
375-
test.commands.peek(),
375+
test.commands.slice(),
376376
currentPlayingIndex
377377
)
378378
} else {
379-
this.runningQueue = test.commands.peek()
379+
this.runningQueue = test.commands.slice()
380380
}
381381
const pluginsLogs = {}
382382
if (PluginManager.plugins.length)
@@ -476,7 +476,7 @@ class PlaybackState {
476476
this._testsToRun.shift()
477477
// pull the next test off the test queue for execution
478478
this.currentRunningTest = this._testsToRun.shift()
479-
this.runningQueue = this.currentRunningTest.commands.peek()
479+
this.runningQueue = this.currentRunningTest.commands.slice()
480480
this.clearStack()
481481
this.errors = 0
482482
this.forceTestCaseFailure = false
@@ -773,7 +773,7 @@ class PlaybackState {
773773
true
774774
)
775775
this.currentRunningTest = testCase
776-
this.runningQueue = testCase.commands.peek()
776+
this.runningQueue = testCase.commands.slice()
777777
let playbackTree = createPlaybackTree(this.runningQueue)
778778
this.setCurrentExecutingCommandNode(playbackTree.startingCommandNode)
779779
return playbackTree.startingCommandNode
@@ -784,7 +784,7 @@ class PlaybackState {
784784
const top = this.callstack.pop()
785785
this.currentRunningTest = top.caller
786786
this.setCurrentExecutingCommandNode(top.position.next)
787-
this.runningQueue = top.caller.commands.peek()
787+
this.runningQueue = top.caller.commands.slice()
788788
UiState.selectTest(
789789
this.stackCaller,
790790
this.currentRunningSuite,

0 commit comments

Comments
 (0)