tests: correctly detect if contact editor section needs expanding