These were separate attacks, but from the same source, Satan.
America has always been recognized as a Christian nation and satan hates that. But now there's a multi pronged attack to destroy it. Homosexuals granted divine status. Christian businesses refused the luxury of their convictions. The potus bringing in the enemies of America by the hundreds of thousands.
These are not coincidences, and it's no accident that they're happening at about the same time.
Just a theory. More like a notion. But something's going on, that's for certain.
For the faithful, it is testing as you suggest. For the unfaithful, it is judgment. See Romans 1 for the judgment portion. In many ways even the faithful have been negligent in their civic duties and in their allowing themselves to be tainted with worldly ways. I guess that doesn’t make them exactly faithful, but I mean faithful to the core gospel, not necessarily to the entire revelation of God.