[fix] resolve inside optimize not .on as its optional
[test] move resolve view test