I am using Laravel 5.2 and I have page that have button with id new-item
, and when I click on it, javascript code loads a remote bootstrap modal with a form, and show the modal.
I want to test the functionality with the PHPUnit with Laravel. I have write this test:
$this->visit('/');
->click('new-item');
->seeElement('.modal');
The page is working fine, but the test fails. I gets error that the page have no .modal
element, and it's also shows me the html of the page. But the html looks like the original page before the remote modal was inserted to the page.
So how can I force the test to refresh the page content after the javascript changes the DOM?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire