Add test for sort pages by title

The test ensure the sort feature works for page titles.

Ref.: #1849, #2239, #2275