Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Extending $ionicPopup with an id attribute

$
0
0

@steve_reach150 wrote:

I'm using Ionic 1.1, and my application uses confirmation popups. For test automation purposes (I'm using Appium), I'd like to add an id attribute to the confirmation and cancel buttons. I'd prefer to use an id attribute to keep things consistent and clean in my tests. i've already tried setting an id attribute in each button, but that doesn't seem to generate an id attribute on the popup buttons. I'm a bit of a noob to ionic and AngularJS so I need some guidance. In my controller i've defined the following function to trigger the pop-up;

    $scope.setPublished = function (item) {
        $scope.popover && $scope.popover.hide();
        var confirmPopup = $ionicPopup.confirm({
            title: 'Publish',
            template: 'Are you sure you want to publish?',
            buttons: [
                {
                    // adding id here doesn't seem to add an id to the generate an id tag
                    // id: 'publishConfirmationButton',
                    text: 'Publish',
                    type: 'button-balanced',
                    onTap: function (e) {
                        return 'publish';
                    }
                },
                {
                    // id: 'cancelConfirmationButton',
                    text: 'Cancel'
                }
            ]
        });

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>