oro_behat_extension:
  elements:
    Printers:
      selector:
        type: xpath
        locator: '//li[contains(@class, "jstree-node")]/a[contains(., "All Products")]/parent::li/ul//li[contains(@class, "jstree-node")]/a[contains(., "Printers")]'

    Lighting Products:
      selector:
        type: xpath
        locator: '//li[contains(@class, "jstree-node")]/a[contains(., "All Products")]/parent::li/ul/li[contains(@class, "jstree-node")]/a[contains(., "Lighting Products")]'

    All Products:
      selector:
        type: xpath
        locator: '//li[contains(@class, "breadcrumbs__item")]/a[contains(., "All Products")]'

    Search:
      selector:
        type: xpath
        locator: '//button[@title="Search"]'

    VisibilityToAll:
      selector: 'select[name="oro_catalog_category[visibility][all]"]'

    Featured Item_0:
      selector:
        type: xpath
        locator: '//li[contains(@class, "jstree-node")]/a[contains(., "featured_menu")]/parent::li/ul//li[contains(@class, "jstree-node")]/a[contains(., "Featured Item_0")]'

    Featured Item_1:
      selector:
        type: xpath
        locator: '//li[contains(@class, "jstree-node")]/a[contains(., "featured_menu")]/parent::li/ul//li[contains(@class, "jstree-node")]/a[contains(., "Featured Item_1")]'

    Language Form:
      selector: 'form[name="oro_action_operation"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          Price List:
            type: 'xpath'
            locator: '//div[contains(@id,"s2id_oro_action_operation_language_code-uid")]//input'

    Title Fallback Status:
      selector:
        type: xpath
        locator: '//label[text()="Title"]/ancestor::div[contains(@class, "control-group-oro_locale_localized_fallback_value_collection")]//button[contains(@class, "fallback-status")]'

    URL Slug Fallback Status:
      selector:
        type: xpath
        locator: '//label[text()="URL Slug"]/ancestor::div[contains(@class, "control-group control-group-oro_redirect_localized_slug_with_redirect")]//button[contains(@class, "fallback-status")]'

    URL Slug Form:
      selector: 'form[name="oro_product"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          URL Slug default value: 'oro_product[slugPrototypesWithRedirect][slugPrototypes][values][default]'
          URL Slug English (United States) value:
            type: 'xpath'
            locator: '//label[text() = "URL Slug"]/ancestor::div[contains(@class, "control-group")]//div[text() = "English (United States)"]/following-sibling::div//input[contains(@class, "fallback-item-value-input")]'
          URL Slug English (United States) use fallback:
            type: 'xpath'
            locator: '//label[text() = "URL Slug"]/ancestor::div[contains(@class, "control-group")]//div[text() = "English (United States)"]/following-sibling::div//input[@type="checkbox"]'
          URL Slug French value:
            type: 'xpath'
            locator: '//label[text() = "URL Slug"]/ancestor::div[contains(@class, "control-group")]//div[text() = "French"]/following-sibling::div//input[contains(@class, "fallback-item-value-input")]'
          URL Slug French use fallback:
            type: 'xpath'
            locator: '//label[text() = "URL Slug"]/ancestor::div[contains(@class, "control-group")]//div[text() = "French"]/following-sibling::div//input[@type="checkbox"]'

    Category URL Slug Form:
      selector: 'form[name="oro_catalog_category"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          URL Slug default value: 'oro_catalog_category[slugPrototypesWithRedirect][slugPrototypes][values][default]'
          URL Slug English (United States) value:
            type: 'xpath'
            locator: '//label[text() = "URL Slug"]/ancestor::div[contains(@class, "control-group")]//div[text() = "English (United States)"]/following-sibling::div//input[contains(@class, "fallback-item-value-input")]'
          URL Slug English (United States) use fallback:
            type: 'xpath'
            locator: '//label[text() = "URL Slug"]/ancestor::div[contains(@class, "control-group")]//div[text() = "English (United States)"]/following-sibling::div//input[@type="checkbox"]'
          URL Slug French value:
            type: 'xpath'
            locator: '//label[text() = "URL Slug"]/ancestor::div[contains(@class, "control-group")]//div[text() = "French"]/following-sibling::div//input[contains(@class, "fallback-item-value-input")]'
          URL Slug French use fallback:
            type: 'xpath'
            locator: '//label[text() = "URL Slug"]/ancestor::div[contains(@class, "control-group")]//div[text() = "French"]/following-sibling::div//input[@type="checkbox"]'

    Product1:
      selector:
        type: xpath
        locator: '//a[@class="view-product" and contains (text(),"Product1")]'

    Localization dropdown:
      selector:
        type: xpath
        locator: '//div[contains(@class, "localization-switcher")]'


    Include SubCategories:
      selector: '.include-sub-categories-choice input[type="checkbox"]'

    Include Not Categorized Products:
      selector: '.include-not-categorized-product-choice input[type="checkbox"]'

    CategoryItem:
      selector: 'div.featured-categories [data-name="embedded-list-item"]'

    Category Long Description:
      selector: '.category-long-description'

    SubcategoriesFilter:
      selector:
        type: xpath
        locator: '//div[contains(@class,"filter-item")]/*[contains(@class,"filter-select")]/span[contains(text(),"Filter By Sub-Categories")]/..'
      class: Oro\Bundle\DataGridBundle\Tests\Behat\Element\MultipleChoice

    SubcategoriesFilterSelect:
      selector:
        type: xpath
        locator: '//div[contains(@class,"filter-item")]/*[contains(@class,"filter-select")]/span[ contains(text(),"Filter By Sub-Categories")]/../../select'

    Uploaded Featured Category Image:
      selector:
        type: xpath
        locator: '//a[contains(@class,"featured-category")]/picture/img[contains (@src,"/media/cache/attachment")]'

    Uploaded Featured Category Picture:
      selector:
        type: xpath
        locator: '//a[contains(@class,"featured-category")]/picture'

    Empty Featured Category Image:
      selector:
        type: xpath
        locator: '//a[contains(@class,"featured-category")]/picture/img[contains (@src,"no_image.png")]'

    Category Image Placeholder Config:
      selector: 'form[name="theme"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          Image: 'theme[oro_catalog___category_image_placeholder][value][file]'

    Category Form:
      selector: 'form[name="oro_catalog_category"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          Visibility To All: 'oro_catalog_category[visibility][all]'
          Visibility To Customers First:
            locator: '#CustomerCategoryVisibility tr:contains(first) .grid-body-cell-visibility select'
            type: css
          Visibility To Customers Second:
            locator: '#CustomerCategoryVisibility tr:contains(second) .grid-body-cell-visibility select'
            type: css
          Visibility To Customer First Group:
            locator: '#CustomerGroupCategoryVisibility tr:contains(first) .grid-body-cell-visibility select'
            type: css
          Title: 'oro_catalog_category[titles][values][default]'
          Title English (United States): 'oro_catalog_category[titles][values][localizations][1][value]'
          Title English (United States) fallback selector: 'oro_catalog_category[titles][values][localizations][1][use_fallback]'
          URL Slug: 'oro_catalog_category[slugPrototypesWithRedirect][slugPrototypes][values][default]'
          Inventory Threshold Use: 'oro_catalog_category[inventoryThreshold][useFallback]'
          Inventory Threshold: 'oro_catalog_category[inventoryThreshold][scalarValue]'
          Low Inventory Threshold: 'oro_catalog_category[lowInventoryThreshold][scalarValue]'
          Managed Inventory Fallback: 'oro_catalog_category[manageInventory][fallback]'
          Backorders Fallback: 'oro_catalog_category[backOrder][fallback]'
          Short Description: 'oro_catalog_category[shortDescriptions][values][default]'
          Short Description English (United States): 'oro_catalog_category[shortDescriptions][values][localizations][1][value]'
          Short Description English (United States) fallback selector: 'oro_catalog_category[shortDescriptions][values][localizations][1][fallback]'
          Long Description:
            type: 'css'
            locator: '[name="oro_catalog_category[longDescriptions][values][default][wysiwyg]"]'
            class: Oro\Bundle\CMSBundle\Tests\Behat\Element\WysiwygField
          Long Description English (United States):
            type: 'css'
            locator: '[name="oro_catalog_category[longDescriptions][values][localizations][1][value][wysiwyg]"]'
            class: Oro\Bundle\CMSBundle\Tests\Behat\Element\WysiwygField
          Long Description English (United States) fallback selector: 'oro_catalog_category[longDescriptions][values][localizations][1][fallback]'
          Long Description Localization 2:
            type: 'css'
            locator: '[name="oro_catalog_category[longDescriptions][values][localizations][2][value][wysiwyg]"]'
            class: Oro\Bundle\CMSBundle\Tests\Behat\Element\WysiwygField
          Long Description Localization 2 fallback selector: 'oro_catalog_category[longDescriptions][values][localizations][2][fallback]'
          PSKU1:
            locator: '//tbody/tr[.//td[contains(text(), "PSKU1")]]//input[contains (@name,"sortOrder_")]'
            type: xpath
          PSKU2:
            locator: '//tbody/tr[.//td[contains(text(), "PSKU2")]]//input[contains (@name,"sortOrder_")]'
            type: xpath
          PSKU3:
            locator: '//tbody/tr[.//td[contains(text(), "PSKU3")]]//input[contains (@name,"sortOrder_")]'
            type: xpath
          PSKU4:
            locator: '//tbody/tr[.//td[contains(text(), "PSKU4")]]//input[contains (@name,"sortOrder_")]'
            type: xpath
          PSKU5:
            locator: '//tbody/tr[.//td[contains(text(), "PSKU5")]]//input[contains (@name,"sortOrder_")]'
            type: xpath
          In category PSKU1:
            locator: '//tbody/tr[.//td[contains(text(), "PSKU1")]]//input[@type="checkbox"]'
            type: xpath
          In category PSKU2:
            locator: '//tbody/tr[.//td[contains(text(), "PSKU2")]]//input[@type="checkbox"]'
            type: xpath
          In category PSKU3:
            locator: '//tbody/tr[.//td[contains(text(), "PSKU3")]]//input[@type="checkbox"]'
            type: xpath
          In category PSKU4:
            locator: '//tbody/tr[.//td[contains(text(), "PSKU4")]]//input[@type="checkbox"]'
            type: xpath
          In category PSKU5:
            locator: '//tbody/tr[.//td[contains(text(), "PSKU5")]]//input[@type="checkbox"]'
            type: xpath

    Drop Zone Exclude from Category:
      selector: '.drop-zones-menu [data-zone="excludeFromCategory"]'

    CategoryProducts Grid:
      selector: 'div[data-page-component-name="category-products-grid"]'
      class: Oro\Bundle\DataGridBundle\Tests\Behat\Element\Grid

  pages:
    Category Update:
      class: Oro\Bundle\CatalogBundle\Tests\Behat\Page\CategoryUpdate
      route: 'oro_catalog_category_update'

  suites:
    OroCatalogBundle:
      contexts:
        - Oro\Bundle\TestFrameworkBundle\Tests\Behat\Context\OroMainContext
        - Oro\Bundle\TestFrameworkBundle\Tests\Behat\Context\BrowserTabContext
        - Oro\Bundle\FrontendBundle\Tests\Behat\Context\FrontendMenuContext
        - Oro\Bundle\FormBundle\Tests\Behat\Context\FormContext
        - Oro\Bundle\ApplicationBundle\Tests\Behat\Context\CommerceMainContext
        - Oro\Bundle\UIBundle\Tests\Behat\Context\BreadcrumbContext
        - Oro\Bundle\NavigationBundle\Tests\Behat\Context\ScrollspyContext
        - Oro\Bundle\ConfigBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\DataGridBundle\Tests\Behat\Context\GridContext
        - Oro\Bundle\CatalogBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\ProductBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\WebCatalogBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\RedirectBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\ImportExportBundle\Tests\Behat\Context\ImportExportContext
        - Oro\Bundle\EmailBundle\Tests\Behat\Context\EmailContext
        - Oro\Bundle\ProductBundle\Tests\Behat\Context\ProductImportExportContext
        - Oro\Bundle\LocaleBundle\Tests\Behat\Context\LocalizationContext
        - Oro\Bundle\FrontendLocalizationBundle\Tests\Behat\Context\LocalizationSwitcherContext
        - Oro\Bundle\AttachmentBundle\Tests\Behat\Context\AttachmentImageContext
        - Oro\Bundle\CustomerBundle\Tests\Behat\Context\ACLContext
        - Oro\Bundle\SearchBundle\Tests\Behat\Context\SearchContext
      paths:
        - '@OroCatalogBundle/Tests/Behat/Features'
