message: added a dialog before playing if recording is turned on
diff: @@ -19,6 +19,7 @@ import uuidv4 from "uuid/v4";
  import browser from "webextension-polyfill";
  import { action, computed, observable } from "mobx";
  import UiState from "./UiState";
  +import ModalState from "./ModalState";
  import PluginManager from "../../../plugin/manager";
  import NoResponseError from "../../../errors/no-response";
  import logger from "./Logs";
  @@ -54,7 +55,26 @@ class PlaybackState {
  ));
  }
  + beforePlaying(play) {
  + if (UiState.isRecording) {
  + ModalState.showAlert({
  + title: "Stop recording",
  + description: "Are you sure you would like to stop recording, and start playing?",
  + confirmLabel: "Playback",
  + cancelLabel: "cancel"
  + }, (chosePlay) => {
  + if (chosePlay) {
  + UiState.stopRecording();
  + play();
  + }
  + });
  + } else {
  + play();
  + }
  + }
  +
  @action.bound startPlayingSuite() {
  + const playSuite = action(() => {
  const { suite } = UiState.selectedTest;
  this.resetState();
  this.runId = uuidv4();
  @@ -62,9 +82,12 @@ class PlaybackState {
  this._testsToRun = [...suite.tests];
  this.testsCount = this._testsToRun.length;
  this.playNext();
  + });
  + this.beforePlaying(playSuite);
  }
  @action.bound startPlaying(command) {
  + const playTest = action(() => {
  const { test } = UiState.selectedTest;
  this.resetState();
  this.runId = uuidv4();
  @@ -88,9 +111,12 @@ class PlaybackState {
  }).then(action(() => {
  this.isPlaying = true;
  }));
  + });
  + this.beforePlaying(playTest);
  }
  @action.bound playCommand(command, jumpToNext) {
  + const playCommand = action(() => {
  this.runId = "";
  this.noStatisticsEffects = true;
  this.jumpToNextCommand = jumpToNext;
  @@ -102,6 +128,8 @@ class PlaybackState {
  this.currentRunningTest = UiState.selectedTest.test;
  this.runningQueue = [command];
  this.isPlaying = true;
  + });
  + this.beforePlaying(playCommand);
  }
  @action.bound playNext() {
  @@ -236,7 +264,6 @@ class PlaybackState {
  }
  @action.bound resetState() {
  - UiState.stopRecording();
  this.clearCommandStates();
  this.currentPlayingIndex = 0;
  this.finishedTestsCount = 0;
  