Added e2e tests for api