Why does the zombie.js browser return empty HTML when using Bootstrap?

后端 未结 1 1075
南笙
南笙 2021-02-08 03:11

I\'m trying to test my Node.js/Express.js application using Mocha and Zombie. I can get simple tests to pass, but as soon as I add the script tags for Twitter Bootstrap to my vi

1条回答
  •  不思量自难忘°
    2021-02-08 03:42

    It does sound like timing might be an issue. On the other hand, Zombie is good about giving you control only after JavaScript events have stopped when using visit.

    A good strategy to use is to browser.wait for a certain DOM element to appear before proceeding with your tests. That way you know e.g. Bootstrap has loaded and shown element #widget-view.

    Might want to adjust maxWait/waitFor as well.

    At least then you could rule out the timing issue.

    0 讨论(0)
提交回复
热议问题