I am writing an acceptance test for application written in angular. I use Codeception testing framework with selenium. The test writes some text into input field and submits form. It should add new task to db through ajax api call and add new <li>
element to the list of existing tasks.
How would I detect that the new element was added? Here's what I've got so far:
<?php
$I = new WebGuy($scenario);
$I->wantTo('add new story');
$I->amOnPage('/');
$I->fillField('input', 'asdf');
$I->pressKey('input[name=input]', '13');
// ensure that new <li> has been added?