function selectNodeAndHitEnter(field, id) {
  const dom = field.getEditableDomHelper();
  const cursor = dom.getElement(id);
  Range.createFromNodeContents(cursor).select();
  return testingEvents.fireKeySequence(cursor, KeyCodes.ENTER);
}
Selects the node at the given id, and simulates an ENTER keypress.
@param {Field} field The field with the node.
@param {string} id A DOM id.
@return {boolean} Whether preventDefault was called on the event.