foreman-env UI: Added many new boundary tests and converted to factory

a) added many new boundary tests to the foreman-env
b) converted foreman-env to factory.