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.13 test/javascripts/checkout_primary_payments_spec.js
workarea-storefront-3.4.12 test/javascripts/checkout_primary_payments_spec.js