[tests] add web api test for directories
[tests] add the rest of web api test