Add and fix some tests for routing.

It is linked to #2598.
Fix routing errors.

It should fix #2598.
Don't set format manually, bacause set in routing.
Adding sleep statements to allow sufficient time for the page to settle.
Merge pull request #3154 from hiroponz/fix-routing-error

Fix routing error