Revert "Simplify JS tests."

This reverts commit 2c01f1df31e56d157645a8dbcd3b198ec53d12e5.
Revert "Update JS tests to rely on visibility_state."

This reverts commit 2261074cee457ed2f9154c516435d9efcb265ccb.
replace one more needsAttention with isPublishable