WASHINGTON — Over the past week, congressional Republicans have gotten a glimpse of the President Trump they hoped to never see.

On gun safety and, more significantly to many of them, trade, the president has loudly broken with longstanding party orthodoxy and reminded Republican leaders on Capitol Hill that they can never be 100 percent certain of what they are going to get with the onetime New York Democrat.

Despite such worries, Mr. Trump’s first-year actions on policy and personnel — particularly judicial nominees — provided substantial reassurance to congressional Republicans. They concluded that Mr. Trump was really one of them when it came to bedrock issues and that the anti-Washington, drain-the-swamp cries from the raucous campaign rallies were only so many applause lines.

In the chaos of the early weeks of his administration, Mr. Trump provoked a sigh of relief from Senator Mitch McConnell, Republican of Kentucky and the majority leader, that the president seemed to actually be conservative. “If you look at the steps that have been taken so far, looks good to me,” Mr. McConnell said.