working integration test with Javascript