Implement tests for view API command. Fix issue for pusblish command