/**
  * Assert that locale options can be changed and checks new text on index page.
  *
  * @param SystemConfig $systemConfig
  * @param Store $store
  * @param CmsIndex $cmsIndex
  * @param string $locale
  * @param string $welcomeText
  * @return void
  */
 public function processAssert(SystemConfig $systemConfig, Store $store, CmsIndex $cmsIndex, $locale, $welcomeText)
 {
     // Set locale options
     $systemConfig->open();
     $systemConfig->getPageActions()->selectStore($store->getGroupId() . "/" . $store->getName());
     $configGroup = $systemConfig->getForm()->getGroup('Locale Options');
     $configGroup->open();
     $configGroup->setValue('select-groups-locale-fields-code-value', $locale);
     $systemConfig->getPageActions()->save();
     $systemConfig->getMessagesBlock()->waitSuccessMessage();
     // Check presents income text on index page
     $cmsIndex->open();
     $cmsIndex->getStoreSwitcherBlock()->selectStoreView($store->getName());
     \PHPUnit_Framework_Assert::assertTrue($cmsIndex->getSearchBlock()->isPlaceholderContains($welcomeText), "Locale not applied.");
 }
 /**
  * Assert that locale options can be changed and checks new text on index page.
  *
  * @param SystemConfig $systemConfig
  * @param Store $store
  * @param CmsIndex $cmsIndex
  * @param AdminCache $adminCache
  * @param string $locale
  * @param string $welcomeText
  */
 public function processAssert(SystemConfig $systemConfig, Store $store, CmsIndex $cmsIndex, AdminCache $adminCache, $locale, $welcomeText)
 {
     // Set locale options
     $systemConfig->open();
     $systemConfig->getPageActions()->selectStore($store->getGroupId() . "/" . $store->getName());
     $systemConfig->getModalBlock()->acceptAlert();
     $configGroup = $systemConfig->getForm()->getGroup('general', 'locale', 'code');
     $configGroup->setValue('general', 'locale', 'code', $locale);
     $systemConfig->getPageActions()->save();
     $systemConfig->getMessagesBlock()->waitSuccessMessage();
     // Flush cache
     $adminCache->open();
     $adminCache->getActionsBlock()->flushMagentoCache();
     $adminCache->getMessagesBlock()->waitSuccessMessage();
     // Check presents income text on index page
     $cmsIndex->open();
     if ($cmsIndex->getFooterBlock()->isStoreGroupSwitcherVisible() && $cmsIndex->getFooterBlock()->isStoreGroupVisible($store)) {
         $cmsIndex->getFooterBlock()->selectStoreGroup($store);
     }
     $cmsIndex->getStoreSwitcherBlock()->selectStoreView($store->getName());
     \PHPUnit_Framework_Assert::assertTrue($cmsIndex->getSearchBlock()->isPlaceholderContains($welcomeText), "Locale not applied.");
 }
 /**
  * Assert that created store view displays in backend configuration (Stores > Configuration > "Scope" dropdown)
  *
  * @param Store $store
  * @param SystemConfig $systemConfig
  * @return void
  */
 public function processAssert(Store $store, SystemConfig $systemConfig)
 {
     $systemConfig->open();
     $isStoreVisible = $systemConfig->getPageActions()->isStoreVisible($store);
     \PHPUnit_Framework_Assert::assertTrue($isStoreVisible, "Store view is not visible in dropdown on config page");
 }