@@ -59,16 +59,16 @@ describe('PAYPAL.apps.ButtonFactory.buttons', function () {
5959
6060 'use strict' ;
6161
62- it ( 'Should have two buy now buttons' , function ( ) {
62+ it ( 'Should have three buy now buttons' , function ( ) {
6363 var result = PAYPAL . apps . ButtonFactory . buttons . buynow ;
6464
65- result . should . equal ( 2 ) ;
65+ result . should . equal ( 3 ) ;
6666 } ) ;
6767
68- it ( 'Should have four cart buttons' , function ( ) {
68+ it ( 'Should have six cart buttons' , function ( ) {
6969 var result = PAYPAL . apps . ButtonFactory . buttons . cart ;
7070
71- result . should . equal ( 4 ) ;
71+ result . should . equal ( 6 ) ;
7272 } ) ;
7373
7474 it ( 'Should have one QR code' , function ( ) {
@@ -103,4 +103,31 @@ describe('Multi-language button images', function () {
103103
104104 germanImage . should . include ( 'de_DE' ) ;
105105 } ) ;
106+ } ) ;
107+
108+ // Test multiple button image sizes
109+ describe ( 'Multiple button image sizes' , function ( ) {
110+
111+ 'use strict' ;
112+
113+ it ( 'Should have a small version of Buy Now button' , function ( ) {
114+ var buynowSmallButton = document . getElementById ( 'buynowSmall' ) ,
115+ buynowSmallImg = buynowSmallButton . getElementsByTagName ( 'input' ) [ 0 ] . src ;
116+
117+ buynowSmallImg . should . include ( 'SM' ) ;
118+ } ) ;
119+
120+ it ( 'Should have a small version of Cart button' , function ( ) {
121+ var cartSmallButton = document . getElementById ( 'cartSmall' ) ,
122+ cartSmallImg = cartSmallButton . getElementsByTagName ( 'input' ) [ 0 ] . src ;
123+
124+ cartSmallImg . should . include ( 'SM' ) ;
125+ } ) ;
126+
127+ it ( 'Should have a small version of Hosted button' , function ( ) {
128+ var hostedSmallButton = document . getElementById ( 'hostedSmall' ) ,
129+ hostedSmallImg = hostedSmallButton . getElementsByTagName ( 'input' ) [ 0 ] . src ;
130+
131+ hostedSmallImg . should . include ( 'SM' ) ;
132+ } ) ;
106133} ) ;
0 commit comments