<?xml version="1.0" encoding="UTF-8"?>
<!--
 /**
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
  <actionGroup name="DisableYotpoPlugin">
    <waitForPageLoad stepKey="waitForYotpoPageToLoad"/>
    <amOnPage url="admin/admin/system_config/edit/section/yotpo/store/1/" stepKey="navigateToYotpoConfigurationOnDefaultStoreView" />

    <!-- disable Yotpo plugin -->
    <selectOption userInput="0" selector="{{AdminLoginToYotpo.YotpoEnabled}}" stepKey="DisableYotpoPlugin"/>

    <!-- save Yotpo configuration -->
    <click selector="{{AdminLoginToYotpo.SaveConfiguration}}" stepKey="ClickOnSaveConfig"/>

    <!-- Check that configuraion was saved -->
    <waitForPageLoad stepKey="waitForSaveConfig"/>
    <seeElement selector="{{AdminLoginToYotpo.SavedConfiguration}}" stepKey="checkConfigurationSaved"/>
  </actionGroup>
</actionGroups>


