withName($seg1)->create(); $segment2 = $segmentFactory->withName($seg2)->create(); $segment3 = $segmentFactory->withName($seg3)->create(); $formName = 'Multiple Lists Form'; $formFactory = new Form(); $form = $formFactory->withName($formName)->withSegments([$segment1, $segment2, $segment3])->create(); $settings = new Settings(); $settings ->withConfirmationEmailEnabled() ->withConfirmationEmailBody() ->withConfirmationEmailSubject('Subscribe to multiple test subject'); $formFactory->withDefaultSuccessMessage(); //Add this form to a widget $i->createFormAndSubscribe($form); //Subscribe via that form $i->amOnMailboxAppPage(); $i->click(Locator::contains('span.subject', 'Subscribe to multiple test subject')); $i->switchToIframe('#preview-html'); $i->click('I confirm my subscription!'); $i->switchToNextTab(); $i->see('You have subscribed'); $i->waitForText($seg1); $i->waitForText($seg2); $i->waitForText($seg3); $i->seeNoJSErrors(); } }