Closed brian-c closed 9 years ago
I've been messing with this a bit, so I'll check it out
Thanks.
We all saw how good my review was last night.
Looks good to me.
Here's my torture test on the project builder:
function name() { return document.getElementsByName('display_name')[0]; }
function description() { return document.getElementsByName('description')[0]; }
function introduction() { return document.getElementsByName('introduction')[0]; }
function focus(el){ el.dispatchEvent(new FocusEvent('focus')); }
function blur(el){ el.dispatchEvent(new FocusEvent('blur')); }
function change(el){ el.dispatchEvent(new Event('input', { bubbles: true })); }
function setValues(value, delay) {
setTimeout(function() {
focus(name());
setTimeout(function() {
name().value = value;
change(name());
blur(name());
setTimeout(function() {
focus(description())
setTimeout(function() {
description().value = value;
change(description());
blur(description());
focus(introduction());
setTimeout(function() {
introduction().value = value;
change(introduction());
blur(introduction());
}, delay); // set introduction
}, delay); // set description
}, delay); // focus description
}, delay); // set name
}, delay); // focus name
}
function makeAMess(delay) {
for(var i = 0; i < 10; i++) {
setTimeout(function() {
setValues('test ' + this.i, delay / 5);
}.bind({ i: i }), i * delay)
}
}
makeAMess(1000);
Now tracks keys being saved. Changed or saving keys are not overwritten by responses.