Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
Update choice edit view test
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBarnett committed Apr 22, 2015
1 parent fb145cd commit ced2827
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions go/base/static/js/test/apps/dialogue/states/choice.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ describe("go.apps.dialogue.states.choice", function() {
var ChoiceStateEditView = states.choice.ChoiceStateEditView;

var state,
editMode,
choice1,
choice2;
editMode;

beforeEach(function() {
state = diagram.states.get('state1');
Expand Down Expand Up @@ -219,16 +217,13 @@ describe("go.apps.dialogue.states.choice", function() {
it("should display the char count", function() {

assert.equal(state.$('.char-count').text().trim(), '44 characters used.');
var endpoints = state.model.get('choice_endpoints');
endpoints.at(0).set('label', 'A new label');
endpoints.at(1).set('label', 'Another new label');

choice1 = editMode.partials.body.partials.choices
.get('choice:endpoint1');
choice1.model.set('label', 'Longer label');
choice2 = editMode.partials.body.partials.choices
.get('choice:endpoint2');
choice2.model.set('label', 'Even longer labels');
state.model.set('text', 'Some text for testing char count');
state.render();
assert.equal(state.$('.char-count').text().trim(), '69 characters used.');
assert.equal(state.$('.char-count').text().trim(), '68 characters used.');
});
});
});
Expand Down

0 comments on commit ced2827

Please sign in to comment.