function testButtons (element,button,order) {
        it('Click on ' + button + ' button on ' + element, function () {
            if (order>2) {
                button1 = locator.createSmall(order);
            } else {
                button1 = locator.createBig(button, order);
            }

            // we have to use mousedown/mouseup methods for checking pressing button
            // via mousedown/mouseup we divide click on the 'click/unclick' operations
            // via click method isn't possible to check if button was pressed
            ST.play([
                // press button
                { type: "mousedown", target: button1, detail: 1 }
            ]);
            ST.button(button1)
                .and(function (button) {
                    expect(button.el.dom.className).toContain('x-pressing');
                });
            ST.play([
                // unpress button
                { type: "mouseup", target: button1, detail: 1 }
            ]);
        });
    }
// common function for testing buttons on widgets page
common function for testing buttons on widgets page
common function for testing buttons on widgets page
function testButtons (element,button,order) {
        it('Click on ' + button + ' button on ' + element, function () {
            if (order>2) {
                button1 = locator.createSmall(order);
            } else {
                button1 = locator.createBig(button, order);
            }
            ST.play([
                { type: "mousedown", target: button1, detail: 1 }
            ]);
            ST.button(button1)
                .and(function (button) {
                    expect(button.el.dom.className).toContain('x-pressing');
                });
            ST.play([
                { type: "mouseup", target: button1, detail: 1 }
            ]);
        });
    }
function testButtons ( element , button , order ) { it ( 'Click on ' + button + ' button on ' + element , function ( ) { if ( order > 2 ) { button1 = locator . createSmall ( order ) ; } else { button1 = locator . createBig ( button , order ) ; } ST . play ( [ { type : "mousedown" , target : button1 , detail : 1 } ] ) ; ST . button ( button1 ) . and ( function ( button ) { expect ( button . el . dom . className ) . toContain ( 'x-pressing' ) ; } ) ; ST . play ( [ { type : "mouseup" , target : button1 , detail : 1 } ] ) ; } ) ; }
common function for testing buttons on widgets page
common function for testing buttons on widgets page
// we have to use mousedown/mouseup methods for checking pressing button // via mousedown/mouseup we divide click on the 'click/unclick' operations // via click method isn't possible to check if button was pressed // press button // unpress button