Merge "Port preferences test from /qa repo"