modify subpage switch events and add testcases