How to make Behat wait for an AJAX call?

前端 未结 3 779
被撕碎了的回忆
被撕碎了的回忆 2020-12-14 12:15

Scenario: Modify and save an incomplete change to a Campaign

Given I click on the Campaign section folder
And I press Save in the selected Campaign
Then I sh         


        
3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-14 12:58

    In case you are using Prototypejs (e.g Magento), the equivalent code is:

    public function iShouldSeeAnErrorBalloon($title)
    {
        $this->getSession()->wait($duration, '(0 === Ajax.activeRequestCount)');
        // asserts below
    }
    

提交回复
热议问题