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.4.27 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.4 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.26 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.3 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.25 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.2 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.24 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.1 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.23 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.22 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.0 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.21 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.5.0.beta.1 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.20 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.19 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.18 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.17 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.16 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.15 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.14 test/javascripts/checkout_primary_payments_spec.js