MDL-38703 course: backport visibility tests from MDL-36417