Sha256: 6ce30ce286de78940c19df9cdb2cd1ab8452563e0cf9b22280f19c410be541bd

Contents?: true

Size: 1.13 KB

Versions: 62

Compression:

Stored size: 1.13 KB

Contents

(function () {
    'use strict';

    describe('WORKAREA.checkoutPrimaryPayments', function () {
        describe('activatePaymentMethod', function () {
            it('selects only one payment method', function () {
                var $newCard,
                    $savedCard,
                    $scope = fixture.load('checkout_primary_payments.html'),
                    selected = 'checkout-payment__primary-method--selected';

                WORKAREA.checkoutPrimaryPayments.init($scope);

                $newCard = $('#new_card');
                $savedCard = $('#saved_card');

                expect($newCard.length).to.equal(1);
                expect($savedCard.length).to.equal(1);

                expect($newCard.hasClass(selected)).to.equal(true);
                expect($savedCard.hasClass(selected)).to.equal(false);

                $savedCard.trigger('click');
                $newCard = $('#new_card');
                $savedCard = $('#saved_card');

                expect($newCard.hasClass(selected)).to.equal(false);
                expect($savedCard.hasClass(selected)).to.equal(true);
            });
        });
    });
}());

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-storefront-3.5.27 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.26 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.45 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.25 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.23 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.44 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.22 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.43 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.21 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.42 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.20 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.41 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.19 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.40 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.18 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.39 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.17 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.38 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.16 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.37 test/javascripts/checkout_primary_payments_spec.js