added javascript documentation section and mocking UI tests