Sha256: 0e98dbe54e84dae5ce7a245ac21da0dc20536d2f251af36ca49260980e5a0e2c

Contents?: true

Size: 1.2 KB

Versions: 21

Compression:

Stored size: 1.2 KB

Contents

//= require workarea/core/modules/url
//= require workarea/core/modules/form_submitting_controls

(function () {
    'use strict';

    describe('WORKAREA.formSubmittingControls', function () {
        describe( 'init', function () {
            it('submits a form on change', function (done) {
                this.fixture = fixture.load('form_submitting_controls.html');

                WORKAREA.formSubmittingControls.init($(this.fixture));

                $('select[data-form-submitting-control]').val('3').trigger('change');

                $('#form-submitting-controls').on('submit', function (event) {
                    event.preventDefault();
                    done();
                });
            });

            it('submits a form on input', function (done) {
                this.fixture = fixture.load('form_submitting_controls.html');

                WORKAREA.formSubmittingControls.init($(this.fixture));

                $('input[data-form-submitting-control]').val('foo').trigger('input');

                $('#form-submitting-controls').on('submit', function (event) {
                    event.preventDefault();
                    done();
                });
            });
        });
    });
}());

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
workarea-core-3.5.4 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.4.26 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.5.3 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.4.25 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.5.2 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.4.24 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.5.1 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.4.23 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.4.22 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.5.0 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.4.21 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.5.0.beta.1 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.4.20 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.4.19 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.4.18 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.4.17 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.4.16 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.4.15 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.4.14 test/javascripts/form_submitting_controls_spec.js
workarea-core-3.4.13 test/javascripts/form_submitting_controls_spec.js