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

        Clearance:
            selector:
                type: xpath
                locator: '//li[contains(@class, "jstree-node")]/a[contains(., "Default Web Catalog")]/parent::li/ul/li[contains(@class, "jstree-node")]/a[contains(., "Clearance")]'

        By Brand:
            selector:
                type: xpath
                locator: '//li[contains(@class, "jstree-node")]/a[contains(., "Default Web Catalog")]/parent::li/ul//li[contains(@class, "jstree-node")]/a[contains(., "By Brand")]'

        On Sale:
            selector:
                type: xpath
                locator: '//li[contains(@class, "jstree-node")]/a[contains(., "Additional Web Catalog")]/parent::li/ul//li[contains(@class, "jstree-node")]/a[contains(., "On Sale")]'

        Headlamps:
            selector:
                type: xpath
                locator: '//li[contains(@class, "jstree-node")]/a[contains(., "Default Web Catalog")]/parent::li/ul//li[contains(@class, "jstree-node")]/a[contains(., "Headlamps")]'

        New Arrivals:
            selector:
                type: xpath
                locator: '//li[contains(@class, "jstree-node")]/a[contains(., "Default Web Catalog")]/parent::li/ul//li[contains(@class, "jstree-node")]/a[contains(., "New Arrivals")]'

        Default Web Catalog:
            selector:
                type: xpath
                locator: '//li[contains(@class, "jstree-node")]/a[contains(., "Default Web Catalog")]'

        Additional Web Catalog:
            selector:
                type: xpath
                locator: '//li[contains(@class, "jstree-node")]/a[contains(., "Additional Web Catalog")]'

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

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

        Content Node Form Titles Fallbacks:
            selector:
                type: xpath
                locator: '//label[text()="Titles"]/../..//button[contains(@class, "fallback-status")]'

        Content Node Form Url Slug Fallbacks:
            selector:
                type: xpath
                locator: '//label[text()="URL Slug"]/../..//button[contains(@class, "fallback-status")]'

        Content Node:
            selector: 'form[name="oro_web_catalog_content_node"]'
            class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
            options:
                mapping:
                    Title: 'oro_web_catalog_content_node[titles][values][default]'
                    Title English (United States) value:
                        type: 'xpath'
                        locator: '//label[text() = "Titles"]/ancestor::div[contains(@class, "control-group")]//div[text() = "English (United States)"]/following-sibling::div//input[contains(@class, "fallback-item-value-input")]'
                    Title English (United States) use fallback:
                        type: 'xpath'
                        locator: '//label[text() = "Titles"]/ancestor::div[contains(@class, "control-group")]//div[text() = "English (United States)"]/following-sibling::div//input[@type="checkbox"]'
                    URL Slugs 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 Slugs 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 Slugs 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 Slugs 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"]'
                    Slug: 'oro_web_catalog_content_node[slugPrototypesWithRedirect][slugPrototypes][values][default]'
                    Meta Title: 'oro_web_catalog_content_node[metaTitles][values][default]'
                    Meta Description: 'oro_web_catalog_content_node[metaDescriptions][values][default]'
                    Meta Keywords: 'oro_web_catalog_content_node[metaKeywords][values][default]'
                    Restriction1 Customer:
                        type: 'css'
                        locator: 'div[id^="oro_web_catalog_content_node_scopes_0_customer-"]'
                        element: Select2Entity
                    Restriction1 CustomerGroup:
                        type: 'css'
                        locator: 'div[id^="oro_web_catalog_content_node_scopes_0_customerGroup-"]'
                        element: Select2Entity
                    Restriction1 Website:
                        type: 'css'
                        locator: 'div[id^="oro_web_catalog_content_node_scopes_0_website-"]'
                        element: Select2Entity
                    Restriction1 Localization:
                        type: 'css'
                        locator: 'div[id^="oro_web_catalog_content_node_scopes_0_localization-"]'
                        element: Select2Entity
                    Restriction2 Customer:
                        type: 'css'
                        locator: 'div[id^="oro_web_catalog_content_node_scopes_1_customer-"]'
                        element: Select2Entity
                    Restriction2 CustomerGroup:
                        type: 'css'
                        locator: 'div[id^="oro_web_catalog_content_node_scopes_1_customerGroup-"]'
                        element: Select2Entity
                    Restriction2 Website:
                        type: 'css'
                        locator: 'div[id^="oro_web_catalog_content_node_scopes_1_website-"]'
                        element: Select2Entity
                    Restriction2 Localization:
                        type: 'css'
                        locator: 'div[id^="oro_web_catalog_content_node_scopes_1_localization-"]'
                        element: Select2Entity
                    Product:
                        type: css
                        locator: 'div[id^="oro_web_catalog_content_node_contentVariants_0_productPageProduct-"]'
                        element: Select2Entity

        Content Variant:
            class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
            selector:
                type: xpath
                locator: '//form[@name="oro_web_catalog_content_node"]//div[contains(concat(" ", normalize-space(@class), " "), " content-variant-item ") and position()=1]'
            options:
                mapping:
                    Product:
                        type: 'css'
                        locator: 'input[name="oro_web_catalog_content_node[contentVariants][0][productPageProduct]"]'
                        element: Select2Entity

        First Content Variant Remove First Restriction:
            selector: '[data-ftid="oro_web_catalog_content_node_contentVariants_1_scopes"] .removeRow'

        Content Node Remove First Restriction:
            selector: '[data-content="oro_web_catalog_content_node[scopes][0]"] .removeRow'

        Content Node Remove Second Restriction:
            selector: '[data-content="oro_web_catalog_content_node[scopes][1]"] .removeRow'

        Override Product Variant Configuration:
            selector: '[name="oro_web_catalog_content_node[contentVariants][0][overrideVariantConfiguration]"]'

        Content Node Default Second Content Variant:
            selector: '[data-ftid="oro_web_catalog_content_node_contentVariants_1_default"]'

        Headlamps category:
            selector:
                type: xpath
                locator: '//div[contains(@class, "embedded-list")]//a//dt[contains(text(),"Headlamps")]'

        WebCatalogSystemConfigSelect:
            selector: '[name="routing[oro_web_catalog___web_catalog][value]"]'
            class: Oro\Bundle\FormBundle\Tests\Behat\Element\Select2Entity

        Clearance menu item:
            selector:
                type: xpath
                locator: '//span[contains(@class, "main-menu__text-label")][text()="Clearance"]'

        Inherit Parent:
            selector: '[name="oro_web_catalog_content_node[parentScopeUsed]"]'

        NewCategory2 category:
            selector:
                type: xpath
                locator: '//div[contains(@class, "embedded-list")]//a//dt[contains(text(),"NewCategory2")]'

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

        First Content Variant Expand Button:
            selector: '[data-content="oro_web_catalog_content_node[contentVariants][0]"] .btn-toggle-variant'

        Second Content Variant Expand Button:
            selector: '[data-content="oro_web_catalog_content_node[contentVariants][1]"] .btn-toggle-variant'

        Content Variant Collection:
            selector: "div.variant-collection"

        Add Content Variant Restriction:
            selector: ".variant-collection .add-list-item"

        Content Variant Restriction Validation Error:
            selector: ".variant-collection .validation-failed"

        Default Content Variant Expand Button:
            selector:
                type: xpath
                locator: '//div[contains(@class,"content-variant-item-default") and @data-role="content-variant-item"]//*[contains(@class, "btn-toggle-variant")]'

        Non Default Content Variant Expand Button:
            selector:
                type: xpath
                locator: '//div[not(contains(@class,"content-variant-item-default")) and @data-role="content-variant-item"]//*[contains(@class, "btn-toggle-variant")]'

        Non Default Content Variant Remove First Restriction:
            selector:
                type: xpath
                locator: '//div[not(contains(@class,"content-variant-item-default")) and @data-role="content-variant-item"]//*[contains(@class, "removeRow")][1]'

        Sub Categories Tooltip Icon:
            selector:
                type: xpath
                locator: '//label[contains(., "Sub-Categories")]//i[contains(@class, "fa-info-circle") and contains(@class, "tooltip-icon")]'
        Delete Current Content Node Button:
            selector: '.navigation button[data-action-name="oro_web_catalog_delete_content_node"]'

        Search Term Web Catalog Select Field:
            selector: '[name="search_term[redirectWebCatalog]"]'
            class: Oro\Bundle\FormBundle\Tests\Behat\Element\Select2Entity

        Search Term Content Node Select Field:
            selector:
                locator: '//input[@name="search_term[redirectContentNode]"]'
                type: xpath

        Search Term With Target Content Node Form:
            class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
            selector: 'form[name="search_term"]'
            options:
                mapping:
                    Web Catalog:
                        type: 'xpath'
                        locator: '//input[@name="search_term[redirectWebCatalog]"]'
                        element: Select2Entity

        Empty Search Result Page System Configuration Form:
            class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
            selector: 'form[name="website_search_terms"]'
            options:
                mapping:
                    Web Catalog:
                        type: 'xpath'
                        locator: '//input[@name="website_search_terms[oro_web_catalog___empty_search_result_page][value][webCatalog]"]'
                        element: Select2Entity
                    Content Node:
                        type: 'xpath'
                        locator: '//input[@name="website_search_terms[oro_web_catalog___empty_search_result_page][value][contentNode]"]'

    pages:
        Content Node Update:
            class: Oro\Bundle\WebCatalogBundle\Tests\Behat\Page\ContentNodeUpdate
            route: 'oro_content_node_update'

    suites:
        OroWebCatalogBundle:
            contexts:
                - Oro\Bundle\TestFrameworkBundle\Tests\Behat\Context\BrowserTabContext
                - Oro\Bundle\SecurityBundle\Tests\Behat\Context\ACLContext
                - Oro\Bundle\ApplicationBundle\Tests\Behat\Context\CommerceMainContext
                - Oro\Bundle\ProductBundle\Tests\Behat\Context\FeatureContext
                - Oro\Bundle\AttachmentBundle\Tests\Behat\Context\AttachmentImageContext
                - Oro\Bundle\ConfigBundle\Tests\Behat\Context\FeatureContext
                - Oro\Bundle\DataGridBundle\Tests\Behat\Context\GridContext
                - Oro\Bundle\FormBundle\Tests\Behat\Context\FormContext
                - Oro\Bundle\WebCatalogBundle\Tests\Behat\Context\FeatureContext
                - Oro\Bundle\CustomerBundle\Tests\Behat\Context\FrontendGridContext
                - Oro\Bundle\FrontendBundle\Tests\Behat\Context\FrontendMenuContext
                - Oro\Bundle\TestFrameworkBundle\Tests\Behat\Context\OroMainContext
                - Oro\Bundle\CheckoutBundle\Tests\Behat\Context\FeatureContext
            paths:
                - '@OroWebCatalogBundle/Tests/Behat/Features'
