The two parties agreed to a coalition deal Monday under which Ms. Merkel will become the new chancellor while the Social Democrats control a majority of cabinet posts .