move reusable methods to common.js
initial doc attachment tests