Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
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);
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();
});
}
add(this._createAsyncWrapper(function () {
ariaUtilsJson.setValue(data, 'actionDone', false);
}));
}, callback);
Dialog.prototype.open = function () {
var visibleBinding = this.visibleBinding;
ariaUtilsJson.setValue(visibleBinding.inside, visibleBinding.to, true);
};
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",
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),
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();
});
}
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);
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",