[tests] fixed tests and simplified them
[dispatcher] don't dispatch if event propagation stopped + factorized code