zombie.js 테스트 프레임 워크 및 Google Maps API에 문제가 있습니다.zombie.js 및 Google Maps API
간단한 zombie.js로 홈페이지를로드하고 로그인 링크를 클릭하려고합니다. 내가합니다 (zombie.js 브라우저 객체의 관점에서) 홈 페이지 HTML 다시 오는 것을 볼 때, 나는 몸 부분 만이 참조 :
<body>
<script src="https://maps.gstatic.com/intl/en_us/mapfiles/api-3/9/12/main.js" type="text/javascript"></script>
</body>
내가 Google지도 자바 스크립트를 제거하는 경우 원본 페이지에서 모든 것이 잘 작동하고 전체 섹션을 가져옵니다. 지도 API를 사용하지 않는 다른 페이지를 요청하면 정상적으로 작동합니다.
나는 여기에 관련 질문을 볼 수 있지만 해결 방법은 완전히 설명되지 않은 : https://github.com/assaf/zombie/issues/250는사람이에 대한 전체 해결 방법으로 나를 도와 드릴까요? 당신은 비동기 API를로드 할 필요 -
suite('Zombie Sign In', function() {
test('Home page should have sign-in link', function(done) {
var browser = new Browser();
browser.debug = true;
browser.authenticate().basic(conf.basicAuth.username, conf.basicAuth.password);
browser.visit(conf.baseURL, function(e, browser) {
console.log(browser.html()); // here is where I get the empty body section
browser.clickLink("Sign In", function() {
browser.text("title").should.eql('my title');
done();
});
});
});
});