The idea that God chooses beforehand which trials we will face implies that he must know everything about our future.
صَحِيحٌ أَنَّ ٱللهَ قَادِرٌ أَنْ يَعْرِفَ ٱلْمُسْتَقْبَلَ ،‏ إِلَّا أَنَّ مَعْرِفَتَهُ هٰذِهِ ٱنْتِقَائِيَّةٌ .‏