Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Track saving keys #6

Merged
merged 2 commits into from
Jun 25, 2015
Merged

Track saving keys #6

merged 2 commits into from
Jun 25, 2015

Conversation

brian-c
Copy link
Contributor

@brian-c brian-c commented Jun 25, 2015

Now tracks keys being saved. Changed or saving keys are not overwritten by responses.

@parrish
Copy link
Contributor

parrish commented Jun 25, 2015

I've been messing with this a bit, so I'll check it out

@edpaget edpaget assigned parrish and unassigned edpaget Jun 25, 2015
@edpaget
Copy link
Contributor

edpaget commented Jun 25, 2015

Thanks.

@edpaget
Copy link
Contributor

edpaget commented Jun 25, 2015

We all saw how good my review was last night.

@parrish
Copy link
Contributor

parrish commented Jun 25, 2015

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);

edpaget added a commit that referenced this pull request Jun 25, 2015
@edpaget edpaget merged commit 6d5de43 into master Jun 25, 2015
@edpaget edpaget deleted the track-saving-keys branch June 25, 2015 19:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants