Refactoring, more tests for forcedialogbutton directive