Setting the 'visibility' property to 'hidden' on a 'g' tag will affect its children, unless the children of the 'g' tag override the parent setting.
Have a 'g' tag with an red filled shape as a child. Set 'visibility: hidden' on the 'g' tag. Verify no red is on the page. Also, have a 'g' tag with a green filled shape as a child. Set 'visibility: hidden' on the 'g' tag. Set 'visibility: visible' on the child tag. Verify that the green 'rect' renders on the page.
Run the test. No interaction required.
The test is passed if there are two green squares visible on the page, and no red.