K
K
kapai692014-11-13 13:13:26
symfony
kapai69, 2014-11-13 13:13:26

Symfony2 ajax qjuery and unit test?

I am writing functional tests, I ran into a problem, when choosing an ajax link and clicking on it, nothing happens.

$client = static::createClient();
$crawler = $client->request('GET', '/');
$link = $crawler->selectLink("I'm ajax link")->link();
$client->click($link);

Ajax implemented in jqery
$('#ajaxLink').on('click', function(){test();});
How to solve the problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2014-11-13
Protko @Fesor

Selenium and testing in chrome/firefox/phantomjs

A
Alex, 2014-11-13
@shoomyst

Symfony doesn't know ajax out of the box. Here you need to look somewhere in the direction of other tools like Mink or casperjs.

P
Pavel Solovyov, 2014-11-13
@pavel_salauyou

codeception + phantomjs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question