Commit d1dbd6d9 by Ivan Ivic Committed by GitHub

Merge pull request #833 from edx/iivic/SOL-1873

WIP [SOL-1873] Flaky JS tests for coupons
parents 57e63f58 5303a9ba
...@@ -112,7 +112,7 @@ define([ ...@@ -112,7 +112,7 @@ define([
expect(view.$el.find('.invoiced-amount > .value').text()).toEqual( expect(view.$el.find('.invoiced-amount > .value').text()).toEqual(
_s.sprintf('$%s', model.get('price')) _s.sprintf('$%s', model.get('price'))
); );
expect(view.$('.max-uses > .value').text()).toEqual(model.get('max_uses')); expect(parseInt(view.$('.max-uses > .value').text())).toEqual(parseInt(model.get('max_uses')));
expect(view.renderVoucherTable).toHaveBeenCalled(); expect(view.renderVoucherTable).toHaveBeenCalled();
expect(view.$el.find('.invoice-type > .value').text()).toEqual(model.get('invoice_type')); expect(view.$el.find('.invoice-type > .value').text()).toEqual(model.get('invoice_type'));
expect(view.$el.find('.invoice-number > .value').text()).toEqual(model.get('invoice_number')); expect(view.$el.find('.invoice-number > .value').text()).toEqual(model.get('invoice_number'));
......
...@@ -419,7 +419,7 @@ define([ ...@@ -419,7 +419,7 @@ define([
/** /**
* Fill seat type options from course ID. * Fill seat type options from course ID.
*/ */
fillFromCourse: _.debounce(function () { fillFromCourse: function () {
var courseId = this.$('[name=course_id]').val(), var courseId = this.$('[name=course_id]').val(),
course = Course.findOrCreate({id: courseId}), course = Course.findOrCreate({id: courseId}),
parseId = _.compose(parseInt, _.property('id')); parseId = _.compose(parseInt, _.property('id'));
...@@ -450,7 +450,7 @@ define([ ...@@ -450,7 +450,7 @@ define([
}, this)); }, this));
course.fetch({data: {include_products: true}}); course.fetch({data: {include_products: true}});
}, 100), },
/* /*
* Update price field and model.stockrecords * Update price field and model.stockrecords
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment