<?xml version="1.0" encoding="UTF-8"?>
<!--
 /**
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
    <section name="AttributePropertiesSection">
        <element name="propertiesTab" type="button" selector="#product_attribute_tabs_main"/>
        <element name="DefaultLabel" type="input" selector="#attribute_label"/>
        <element name="InputType" type="select" selector="#frontend_input"/>
        <element name="ValueRequired" type="select" selector="#is_required"/>
        <element name="UpdateProductPreviewImage" type="select" selector="[name='update_product_preview_image']"/>
        <element name="AdvancedProperties" type="button" selector="#advanced_fieldset-wrapper"/>
        <element name="DefaultValue" type="input" selector="#default_value_text"/>
        <element name="Scope" type="select" selector="#is_global"/>
        <element name="Save" type="button" selector="#save" timeout="30"/>
        <element name="DeleteAttribute" type="button" selector="#delete" timeout="30"/>
        <element name="SaveAndEdit" type="button" selector="#save_and_edit_button" timeout="30"/>
        <element name="TinyMCE4" type="button" selector="//span[text()='Default Value']/parent::label/following-sibling::div//*[contains(@class,'mce-branding')]"/>
        <element name="checkIfTabOpen" selector="//div[@id='advanced_fieldset-wrapper' and not(contains(@class,'opened'))]" type="button"/>
        <element name="useInLayeredNavigation" type="select" selector="#is_filterable"/>
        <element name="addSwatch" type="button" selector="#add_new_swatch_text_option_button"/>
        <element name="dropdownAddOptions" type="button" selector="#add_new_option_button"/>
        <!-- Manage Options nth child-->
        <element name="dropdownNthOptionIsDefault" type="checkbox" selector="tbody[data-role='options-container'] tr:nth-child({{var}}) .input-radio" parameterized="true"/>
        <element name="dropdownNthOptionAdmin" type="textarea" selector="tbody[data-role='options-container'] tr:nth-child({{var}}) td:nth-child(3) input" parameterized="true"/>
        <element name="dropdownNthOptionDefaultStoreView" type="textarea" selector="tbody[data-role='options-container'] tr:nth-child({{var}}) td:nth-child(4) input" parameterized="true"/>
        <element name="dropdownNthOptionDelete" type="button" selector="tbody[data-role='options-container'] tr:nth-child({{var}}) button[title='Delete']" parameterized="true"/>
    </section>
    <section name="AttributeDeleteModalSection">
        <element name="confirm" type="button" selector=".modal-popup.confirm .action-accept"/>
        <element name="cancel" type="button" selector=".modal-popup.confirm .action-dismiss"/>
    </section>
    <section name="AttributeManageSwatchSection">
        <element name="swatchField" type="input" selector="//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Swatch']" parameterized="true"/>
        <element name="descriptionField" type="input" selector="//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Description']" parameterized="true"/>
    </section>
    <section name="AttributeOptionsSection">
        <element name="AddOption" type="button" selector="#add_new_option_button"/>
    </section>
    <section name="StorefrontPropertiesSection">
        <element name="PageTitle" type="text" selector="//span[text()='Storefront Properties']" />
        <element name="StoreFrontPropertiesTab" selector="#product_attribute_tabs_front" type="button"/>
        <element name="EnableWYSIWYG" type="select" selector="#enabled"/>
        <element name="useForPromoRuleConditions" type="select" selector="#is_used_for_promo_rules"/>
        <element name="StorefrontPropertiesSectionToggle" type="button" selector="#front_fieldset-wrapper"/>
        <element name="visibleOnCatalogPagesOnStorefront" type="select" selector="#is_visible_on_front"/>
    </section>
    <section name="WYSIWYGProductAttributeSection">
        <element name="ShowHideBtn" type="button" selector="#toggledefault_value_texteditor"/>
        <element name="InsertImageBtn" type="button" selector=".scalable.action-add-image.plugin"/>
        <element name="InsertImageIcon" type="button" selector=".mce-i-image"/>
        <element name="InsertWidgetBtn" type="button" selector=".action-add-widget"/>
        <element name="InsertWidgetIcon" type="button" selector="div[aria-label='Insert Widget']"/>
        <element name="InsertVariableBtn" type="button" selector=".scalable.add-variable.plugin"/>
        <element name="InsertVariableIcon" type="button" selector="div[aria-label='Insert Variable']"/>
        <element name="Browse" type="button" selector=".mce-i-browse"/>
        <element name="BrowseUploadImage" type="file" selector=".fileupload" />
        <element name="image" type="text" selector="//small[text()='{{var1}}']" parameterized="true"/>
        <element name="imageSelected" type="text" selector="//small[text()='{{var1}}']/parent::*[@class='filecnt selected']" parameterized="true"/>
        <element name="ImageSource" type="input" selector=".mce-combobox.mce-abs-layout-item.mce-last.mce-has-open" />
        <element name="ImageDescription" type="input" selector=".mce-textbox.mce-abs-layout-item.mce-last" />
        <element name="Height" type="input" selector=".mce-textbox.mce-abs-layout-item.mce-first" />
        <element name="UploadImage" type="file" selector=".fileupload" />
        <element name="OkBtn" type="button" selector="//span[text()='Ok']"/>
        <element name="InsertFile" type="text" selector="#insert_files"/>
        <element name="CreateFolder" type="button" selector="#new_folder" />
        <element name="DeleteSelectedBtn" type="text" selector="#delete_files"/>
        <element name="CancelBtn" type="button" selector="#cancel" />
        <element name="Style" type="button" selector=".mce-txt" />
        <element name="Bold" type="button" selector=".mce-i-bold" />
        <element name="Italic" type="button" selector=".mce-i-italic" />
        <element name="Underline" type="button" selector=".mce-i-underline" />
        <element name="AlignLeft" type="button" selector=".mce-i-alignleft" />
        <element name="AlignCenter" type="button" selector=".mce-i-aligncenter" />
        <element name="AlignRight" type="button" selector=".mce-i-alignright" />
        <element name="Bullet" type="button" selector=".mce-i-bullist" />
        <element name="Numlist" type="button" selector=".mce-i-numlist" />
        <element name="InsertLink" type="button" selector=".mce-i-link" />
        <element name="InsertImage" type="button" selector=".mce-i-image" />
        <element name="InsertTable" type="button" selector=".mce-i-table" />
        <element name="SpecialCharacter" type="button" selector=".mce-i-charmap" />
        <element name="TextArea" type="input" selector="#default_value_textarea" />
    </section>
    <section name="AdvancedAttributePropertiesSection">
        <element name="AdvancedAttributePropertiesSectionToggle"
                 type="button" selector="#advanced_fieldset-wrapper"/>
        <element name="AttributeCode" type="text" selector="#attribute_code"/>
        <element name="DefaultValueText" type="textarea" selector="#default_value_text"/>
        <element name="DefaultValueTextArea" type="textarea" selector="#default_value_textarea"/>
        <element name="DefaultValueDate" type="textarea" selector="#default_value_date"/>
        <element name="DefaultValueYesNo" type="textarea" selector="#default_value_yesno"/>
        <element name="Scope" type="select" selector="#is_global"/>
        <element name="UniqueValue" type="select" selector="#is_unique"/>
        <element name="AddToColumnOptions" type="select" selector="#is_used_in_grid"/>
        <element name="UseInFilterOptions" type="select" selector="#is_filterable_in_grid"/>
        <element name="UseInProductListing" type="select" selector="#used_in_product_listing"/>
        <element name="UseInSearch" type="select" selector="#is_searchable"/>
        <element name="VisibleInAdvancedSearch" type="select" selector="#is_visible_in_advanced_search"/>
    </section>
</sections>
