Fix tests that depended on the exact API output

Rather than asserting the whole body of the API response matches our
expectations we instead just check subsets of the body to see if
elements are visible/hidden appropriately.