Added a test for hide function

    also fix the test in mac env