How to use the ariatemplates/utils/Json.setValue function in ariatemplates

To help you get started, we’ve selected a few ariatemplates examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ariatemplates / ariatemplates / test / aria / widgets / wai / textInputBased / TextInputTestCase.js View on Github external
checkField : function(inputId, data, notEmptyValue, callback) {

            var self = this;

            this.checkAttributes(inputId, data);

            jsonUtils.setValue(data, "mandatory", !data.mandatory);
            this.checkAttributes(inputId, data);

            var newValue = this.switchValue(data, notEmptyValue);
            this.clickAndType(inputId, newValue, function() {
                self.checkAttributes(inputId, data);

                jsonUtils.setValue(data, "mandatory", !data.mandatory);
                self.checkAttributes(inputId, data);

                var newValue = self.switchValue(data, notEmptyValue);
                self.clickAndType(inputId, newValue, function() {
                    callback.apply(self);
                }, true);

            }, true);
github ariatemplates / ariatemplates / test / aria / widgets / wai / textInputBased / TextInputNonWaiTestCase.js View on Github external
checkField : function(inputId, data, notEmptyValue, callback) {

            var self = this;

            this.checkAttributes(inputId, data);

            jsonUtils.setValue(data, "mandatory", !data.mandatory);
            this.checkAttributes(inputId, data);

            var newValue = this.switchValue(data, notEmptyValue);
            this.clickAndType(inputId, newValue, function() {
                self.checkAttributes(inputId, data);

                jsonUtils.setValue(data, "mandatory", !data.mandatory);
                self.checkAttributes(inputId, data);

                var newValue = self.switchValue(data, notEmptyValue);
                self.clickAndType(inputId, newValue, function() {
                    callback.apply(self);
                }, true);

            }, true);
github ariatemplates / ariatemplates / test / aria / widgets / calendar / rangeCalendar / RangeCalendar1RobotTestCase.js View on Github external
self.assertSelectedDates(17, fromDate, toDate, function () {
                    self.assertDateEquals(data.fromDate, fromDate);
                    self.assertDateEquals(data.toDate, toDate);

                    toDate = self.addDays(fromDate, 1);
                    jsonUtils.setValue(data, "toDate", self.addDays(toDate, 0));
                    step6();
                });
            }
github ariatemplates / ariatemplates / test / aria / templates / keyboardNavigation / actionWidgets / ActionWidgetsRobotTestCase.js View on Github external
add(this._createAsyncWrapper(function () {
                    ariaUtilsJson.setValue(data, 'actionDone', false);
                }));
            }, callback);
github ariatemplates / ariatemplates / test / aria / widgets / wai / popup / dialog / modal / Model.js View on Github external
Dialog.prototype.open = function () {
    var visibleBinding = this.visibleBinding;
    ariaUtilsJson.setValue(visibleBinding.inside, visibleBinding.to, true);
};
github ariatemplates / ariatemplates / test / aria / widgets / wai / input / actionWidget / buttonFocusableWhenDisabled / FocusableDisabledButtonJawsTestCase.js View on Github external
fn: function () {
                    this.assertEquals(Aria.$window.document.activeElement, this.getElementById("tf2"));
                    this.assertFalsy(data.firstButtonNbClicks),
                    this.assertEquals(data.secondButtonNbClicks, 1),
                    this.assertFalsy(data.thirdButtonNbClicks),
                    this.assertEquals(data.fourthButtonNbClicks, 1),
                    ariaUtilsJson.setValue(data, "firstButtonDisabled", false);
                    ariaUtilsJson.setValue(data, "secondButtonDisabled", true);
                    ariaUtilsJson.setValue(data, "thirdButtonDisabled", false);
                    ariaUtilsJson.setValue(data, "fourthButtonDisabled", true);
                    this.execute([
                        ["click", this.getElementById("tf1")], ["pause", 100],
                        ["type", null, "[tab]"], ["pause", 200], ["type", null, "[space]"], ["pause", 200],
                        ["type", null, "[tab]"], ["pause", 200], ["type", null, "[space]"], ["pause", 200],
                        ["type", null, "[tab]"], ["pause", 200], ["type", null, "[space]"], ["pause", 200],
                        ["type", null, "[tab]"], ["pause", 200]
                    ], {
                        fn: function () {
                            this.assertEquals(Aria.$window.document.activeElement, this.getElementById("tf2"));
                            this.assertEquals(data.firstButtonNbClicks, 1),
                            this.assertEquals(data.secondButtonNbClicks, 1),
                            this.assertEquals(data.thirdButtonNbClicks, 1),
                            this.assertEquals(data.fourthButtonNbClicks, 1),
                            this.assertJawsHistoryEquals([
                                "First field Edit",
github ariatemplates / ariatemplates / test / aria / widgets / wai / input / actionWidget / buttonFocusableWhenDisabled / FocusableDisabledButtonJawsTestCase.js View on Github external
fn: function () {
                    this.assertEquals(Aria.$window.document.activeElement, this.getElementById("tf2"));
                    this.assertFalsy(data.firstButtonNbClicks),
                    this.assertEquals(data.secondButtonNbClicks, 1),
                    this.assertFalsy(data.thirdButtonNbClicks),
                    this.assertEquals(data.fourthButtonNbClicks, 1),
                    ariaUtilsJson.setValue(data, "firstButtonDisabled", false);
                    ariaUtilsJson.setValue(data, "secondButtonDisabled", true);
                    ariaUtilsJson.setValue(data, "thirdButtonDisabled", false);
                    ariaUtilsJson.setValue(data, "fourthButtonDisabled", true);
                    this.execute([
                        ["click", this.getElementById("tf1")], ["pause", 100],
                        ["type", null, "[tab]"], ["pause", 200], ["type", null, "[space]"], ["pause", 200],
                        ["type", null, "[tab]"], ["pause", 200], ["type", null, "[space]"], ["pause", 200],
                        ["type", null, "[tab]"], ["pause", 200], ["type", null, "[space]"], ["pause", 200],
                        ["type", null, "[tab]"], ["pause", 200]
                    ], {
                        fn: function () {
                            this.assertEquals(Aria.$window.document.activeElement, this.getElementById("tf2"));
                            this.assertEquals(data.firstButtonNbClicks, 1),
                            this.assertEquals(data.secondButtonNbClicks, 1),
                            this.assertEquals(data.thirdButtonNbClicks, 1),
                            this.assertEquals(data.fourthButtonNbClicks, 1),
github ariatemplates / ariatemplates / test / aria / widgets / calendar / rangeCalendar / RangeCalendar1.js View on Github external
self.assertSelectedDates(17, fromDate, toDate, function () {
                    self.assertDateEquals(data.fromDate, fromDate);
                    self.assertDateEquals(data.toDate, toDate);

                    toDate = self.addDays(fromDate, 1);
                    jsonUtils.setValue(data, "toDate", self.addDays(toDate, 0));
                    step6();
                });
            }
github ariatemplates / ariatemplates / test / aria / widgets / wai / icon / IconRobotTestCase.js View on Github external
function check(next) {
                this.assertTrue(
                    data.calledCounter === 1,
                    'Icon action was not properly triggered when pressing action key while focused.'
                );

                ariaUtilsJson.setValue(data, 'calledCounter', 0);
            }
            this._createAsyncWrapper(check);
github ariatemplates / ariatemplates / test / aria / widgets / wai / input / actionWidget / buttonFocusableWhenDisabled / FocusableDisabledButtonJawsTestCase.js View on Github external
fn: function () {
                    this.assertEquals(Aria.$window.document.activeElement, this.getElementById("tf2"));
                    this.assertFalsy(data.firstButtonNbClicks),
                    this.assertEquals(data.secondButtonNbClicks, 1),
                    this.assertFalsy(data.thirdButtonNbClicks),
                    this.assertEquals(data.fourthButtonNbClicks, 1),
                    ariaUtilsJson.setValue(data, "firstButtonDisabled", false);
                    ariaUtilsJson.setValue(data, "secondButtonDisabled", true);
                    ariaUtilsJson.setValue(data, "thirdButtonDisabled", false);
                    ariaUtilsJson.setValue(data, "fourthButtonDisabled", true);
                    this.execute([
                        ["click", this.getElementById("tf1")], ["pause", 100],
                        ["type", null, "[tab]"], ["pause", 200], ["type", null, "[space]"], ["pause", 200],
                        ["type", null, "[tab]"], ["pause", 200], ["type", null, "[space]"], ["pause", 200],
                        ["type", null, "[tab]"], ["pause", 200], ["type", null, "[space]"], ["pause", 200],
                        ["type", null, "[tab]"], ["pause", 200]
                    ], {
                        fn: function () {
                            this.assertEquals(Aria.$window.document.activeElement, this.getElementById("tf2"));
                            this.assertEquals(data.firstButtonNbClicks, 1),
                            this.assertEquals(data.secondButtonNbClicks, 1),
                            this.assertEquals(data.thirdButtonNbClicks, 1),
                            this.assertEquals(data.fourthButtonNbClicks, 1),
                            this.assertJawsHistoryEquals([
                                "First field Edit",
                                "First button Button Unavailable",