wantTo('Successfully search for an existing notification'); $newsletter_title = 'Search Test Notification'; $failure_condition_newsletter = 'Not Actually Real'; // step 1 - Prepare newsletter data $newsletterFactory = new Newsletter(); $newsletterFactory->withSubject($newsletter_title) ->withPostNotificationsType() ->create(); // step 2 - Search $I->login(); $I->amOnMailpoetPage('Emails'); $I->click('Post Notifications', '[data-automation-id="newsletters_listing_tabs"]'); $I->waitForText('Post notification', 5); $I->fillField('#search_input', $failure_condition_newsletter); $I->click('Search'); $I->wait(5); $I->waitForElement('tr.no-items', 10); $I->fillField('#search_input', $newsletter_title); $I->click('Search'); $I->waitForText($newsletter_title, 10); } }