/** * Create gift card account. * * @param GiftCardAccount $giftCardAccount * @return array */ public function test(GiftCardAccount $giftCardAccount) { // Steps $this->giftCardAccountIndex->open(); $this->giftCardAccountIndex->getMessagesBlock()->clickLinkInMessages('error', 'here'); $this->giftCardAccountIndex->getGridPageActions()->addNew(); $this->giftCardAccountNew->getGiftCardAccountForm()->fill($giftCardAccount); $this->giftCardAccountNew->getFormPageActions()->save(); $code = $this->giftCardAccountIndex->getGiftCardAccountGrid()->getCode(['balance' => $giftCardAccount->getBalance()], false); return ['code' => $code]; }