Add guid test case to the spec

This commit is contained in:
boryslevytskyi
2017-06-06 22:10:32 +03:00
parent b15a4919d6
commit 790986e5e2
4 changed files with 11 additions and 7 deletions

View File

@@ -3,10 +3,10 @@ export default class AppState {
this.emphasizeBytes = persistData.emphasizeBytes || true;
this.commandResults = [];
this.handlers = [];
this.uiTheme = persistData.uiTheme || 'dark';
this.uiTheme = persistData.uiTheme || 'midnight';
this.debugMode = false;
this.version = 3;
this.version = 4;
this.persistedVersion = persistData.version || 0.1;
this.wasOldVersion = persistData.version && this.version > this.persistedVersion;
}
@@ -16,7 +16,7 @@ export default class AppState {
this.triggerChanged();
}
clearCommmandResults() {
clearCommandResults() {
this.commandResults = [];
this.triggerChanged();
}

View File

@@ -8,8 +8,6 @@ import StringResult from './models/StringResult';
import * as expression from './expression';
import uuid from 'uuid/v4';
console.log(uuid);
var cmdConfig = {};
export default {
@@ -20,7 +18,7 @@ export default {
appState.addCommandResult(new HelpResult(c.input));
},
'clear': function() {
appState.clearCommmandResults();
appState.clearCommandResults();
},
'em': function() {
appState.toggleEmphasizeBytes();

View File

@@ -5,7 +5,11 @@ export default class WhatsnewResultView extends React.Component {
render() {
return <div className="changelog">
<h3>Changelog</h3>
<div className="item item-new">
<div className="item item-new">
<p><span className="soft date">Jun 6th, 2017</span> <br/>
Added <code><CommandLink text="guid" /></code> command. Use it for generating v4 GUIDs </p>
</div>
<div className="item">
<p><span className="soft date">May 27th, 2017</span> <br/>
Added support of binary number notation (e.g. <code><CommandLink text="0b10101" /></code>). </p>
</div>

View File

@@ -40,6 +40,8 @@ describe('when application starts', function() {
.then(function() { return sutPage.executeExpression('1|2&3|5 |5')})
.then(function() { return sutPage.executeExpression('dark')})
.then(function() { return sutPage.executeExpression('light')})
.then(function() { return sutPage.executeExpression('midnight')})
.then(function() { return sutPage.executeExpression('guid')})
.then(function() { return sutPage.shouldHaveNoErrors(); });
});