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.15 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.36 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.14 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.35 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.13 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.34 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.12 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.33 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.11 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.10 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.32 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.9 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.31 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.8 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.30 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.7 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.29 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.6 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.28 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.5 test/javascripts/checkout_primary_payments_spec.js