Updated test cases for directives. Corrected bug where it was not applying directive properly