oro_behat_extension:
  suites:
    OroSaleBundle:
      contexts:
        - Oro\Bundle\TestFrameworkBundle\Tests\Behat\Context\OroMainContext
        - Oro\Bundle\TestFrameworkBundle\Tests\Behat\Context\BrowserTabContext
        - Oro\Bundle\FormBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\FormBundle\Tests\Behat\Context\FormContext
        - Oro\Bundle\ConfigBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\DataGridBundle\Tests\Behat\Context\GridContext
        - Oro\Bundle\CustomerBundle\Tests\Behat\Context\FrontendGridContext
        - Oro\Bundle\ActivityListBundle\Tests\Behat\Context\ActivityContext
        - Oro\Bundle\ApplicationBundle\Tests\Behat\Context\CommerceMainContext
        - Oro\Bundle\ShoppingListBundle\Tests\Behat\Context\ShoppingListContext
        - Oro\Bundle\SecurityBundle\Tests\Behat\Context\ACLContext
        - Oro\Bundle\SaleBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\LocaleBundle\Tests\Behat\Context\LocalizationContext
        - Oro\Bundle\FrontendLocalizationBundle\Tests\Behat\Context\LocalizationSwitcherContext
        - Oro\Bundle\CheckoutBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\ShippingBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\ProductBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\AttachmentBundle\Tests\Behat\Context\AttachmentImageContext
        - Oro\Bundle\RFPBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\WorkflowBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\ProductBundle\Tests\Behat\Context\QuickOrderFormContext
        - Oro\Bundle\EmailBundle\Tests\Behat\Context\EmailContext
        - Oro\Bundle\EntityExtendBundle\Tests\Behat\Context\EntityExtendContext
        - Oro\Bundle\ActionBundle\Tests\Behat\Context\OroActionContext
        - Oro\Bundle\NavigationBundle\Tests\Behat\Context\TabContext
        - Oro\Bundle\QueryDesignerBundle\Tests\Behat\Context\QueryDesignerContext
        - Oro\Bundle\NavigationBundle\Tests\Behat\Context\FeatureContext
      paths:
        - '@OroSaleBundle/Tests/Behat/Features'

  elements:
    Quote Frontend Page:
      class: Oro\Bundle\SaleBundle\Tests\Behat\Element\QuoteFrontendPage
      selector: '.quote'

    Quote Shipping Address Select:
      selector: '[name="oro_sale_quote[shippingAddress][customerAddress]"]'

    Quote Form:
      selector: 'form[name^="oro_sale_quote"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          Customer:
            type: 'css'
            locator: 'input[name="oro_sale_quote[customer]"]'
            element: Select2Entity
          Customer User:
              type: 'css'
              locator: 'input[name="oro_sale_quote[customerUser]"]'
              element: Select2Entity
          LineItemProduct:
              type: 'css'
              locator: 'input[name="oro_sale_quote[quoteProducts][0][product]"]'
              element: Select2Entity
          LineItemFreeFormSku: 'oro_sale_quote[quoteProducts][0][productSku]'
          LineItemFreeFormProduct: 'oro_sale_quote[quoteProducts][0][freeFormProduct]'
          LineItemPrice: 'oro_sale_quote[quoteProducts][0][quoteProductOffers][0][price][value]'
          LineItemCurrency: 'oro_sale_quote[quoteProducts][0][quoteProductOffers][0][price][currency]'
          LineItemQuantity: 'oro_sale_quote[quoteProducts][0][quoteProductOffers][0][quantity]'
          LineItemFreeFormSku2: 'oro_sale_quote[quoteProducts][1][productSku]'
          LineItemFreeFormProduct2: 'oro_sale_quote[quoteProducts][1][freeFormProduct]'
          LineItemPrice2: 'oro_sale_quote[quoteProducts][1][quoteProductOffers][0][price][value]'
          LineItemQuantity2: 'oro_sale_quote[quoteProducts][1][quoteProductOffers][0][quantity]'
          LineItemPrice3: 'oro_sale_quote[quoteProducts][2][quoteProductOffers][0][price][value]'
          Overridden shipping cost amount: 'oro_sale_quote[overriddenShippingCostAmount][value]'
          Shipping Address:
            locator: '//h4[text()="Shipping Address"]/..//div[contains(@id,"s2id_oro_sale_quote")]/input'
            type: xpath
          Do Not Ship Later Than:
              type: 'css'
              locator: 'input[name^="oro_sale_quote_shipUntil"]'
          Valid Until: 'oro_sale_quote[validUntil]'
          Price of Line Item Secondary Offer: 'oro_sale_quote[quoteProducts][0][quoteProductOffers][1][price][value]'
          Quantity of Line Item Secondary Offer: 'oro_sale_quote[quoteProducts][0][quoteProductOffers][1][quantity]'
          Unit of Line Item Secondary Offer: 'oro_sale_quote[quoteProducts][0][quoteProductOffers][1][productUnit]'
          Line Item 1 Unit: 'oro_sale_quote[quoteProducts][0][quoteProductOffers][0][productUnit]'
          Line Item 1 Quantity: 'oro_sale_quote[quoteProducts][0][quoteProductOffers][0][quantity]'
          Line Item 1 Price: 'oro_sale_quote[quoteProducts][0][quoteProductOffers][0][price][value]'
          Line Item 1 Item 1 Product:
            locator: '//tr[@data-content="oro_sale_quote[quoteProducts][0]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][1]/td//div[contains(@class, "oro-select2") and contains(@id, "product")]/input'
            type: xpath
          Line Item 1 Item 1 Quantity:
            locator: '//tr[@data-content="oro_sale_quote[quoteProducts][0]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][1]/td//input[@data-name="field__quantity"]'
            type: xpath
          Line Item 1 Item 2 Product:
            locator: '//tr[@data-content="oro_sale_quote[quoteProducts][0]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][2]/td//div[contains(@class, "oro-select2") and contains(@id, "product")]/input'
            type: xpath
          Line Item 1 Item 2 Quantity:
            locator: '//tr[@data-content="oro_sale_quote[quoteProducts][0]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][2]/td//input[@data-name="field__quantity"]'
            type: xpath
          Line Item 1 Item 3 Product:
            locator: '//tr[@data-content="oro_sale_quote[quoteProducts][0]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][3]/td//div[contains(@class, "oro-select2") and contains(@id, "product")]/input'
            type: xpath
          Line Item 1 Item 3 Quantity:
            locator: '//tr[@data-content="oro_sale_quote[quoteProducts][0]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][3]/td//input[@data-name="field__quantity"]'
            type: xpath
          Line Item 2 Product Dropdown:
            element: Select2Entity
            locator: '//div[contains(@id,"oro_sale_quote_quoteProducts_1_product-uid")]/input'
            type: xpath
          Line Item 2 Product:
            locator: '//div[contains(@id,"s2id_oro_sale_quote_quoteProducts_1_product-uid")]//input'
            type: xpath
          Line Item 2 Unit: 'oro_sale_quote[quoteProducts][1][quoteProductOffers][0][productUnit]'
          Line Item 2 Quantity: 'oro_sale_quote[quoteProducts][1][quoteProductOffers][0][quantity]'
          Line Item 2 Price: 'oro_sale_quote[quoteProducts][1][quoteProductOffers][0][price][value]'
          Line Item 2 Item 1 Product:
            locator: '//tr[@data-content="oro_sale_quote[quoteProducts][1]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][1]/td//div[contains(@class, "oro-select2") and contains(@id, "product")]/input'
            type: xpath
          Line Item 2 Item 1 Quantity:
            locator: '//tr[@data-content="oro_sale_quote[quoteProducts][1]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][1]/td//input[@data-name="field__quantity"]'
            type: xpath
          Line Item 2 Item 2 Product:
            locator: '//tr[@data-content="oro_sale_quote[quoteProducts][1]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][2]/td//div[contains(@class, "oro-select2") and contains(@id, "product")]/input'
            type: xpath
          Line Item 2 Item 2 Quantity:
            locator: '//tr[@data-content="oro_sale_quote[quoteProducts][1]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][2]/td//input[@data-name="field__quantity"]'
            type: xpath
          Line Item 3 Product:
            locator: '//div[contains(@id,"s2id_oro_sale_quote_quoteProducts_2_product-uid")]//input'
            type: xpath
          Line Item 3 Product Dropdown:
            element: Select2Entity
            locator: '//div[contains(@id,"oro_sale_quote_quoteProducts_2_product-uid")]/input'
            type: xpath
          Line Item 3 Unit: 'oro_sale_quote[quoteProducts][2][quoteProductOffers][0][productUnit]'
          Line Item 3 Quantity: 'oro_sale_quote[quoteProducts][2][quoteProductOffers][0][quantity]'
          Line Item 3 Price: 'oro_sale_quote[quoteProducts][2][quoteProductOffers][0][price][value]'
          Line Item 3 Item 1 Product:
            locator: '//tr[@data-content="oro_sale_quote[quoteProducts][2]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][1]/td//div[contains(@class, "oro-select2") and contains(@id, "product")]/input'
            type: xpath
          Line Item 3 Item 1 Quantity:
            locator: '//tr[@data-content="oro_sale_quote[quoteProducts][2]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][1]/td//input[@data-name="field__quantity"]'
            type: xpath
          Line Item 3 Item 2 Product:
            locator: '//tr[@data-content="oro_sale_quote[quoteProducts][2]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][2]/td//div[contains(@class, "oro-select2") and contains(@id, "product")]/input'
            type: xpath
          Line Item 3 Item 2 Quantity:
            locator: '//tr[@data-content="oro_sale_quote[quoteProducts][2]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][2]/td//input[@data-name="field__quantity"]'
            type: xpath

    Quote Shipping Address State Selector:
      selector:
        locator: '//div[contains(@id,"s2id_oro_sale_quote_shippingAddress_region-uid")]'
        type: xpath

    Quote Shipping Address State Text Field:
      selector:
        locator: '//input[contains(@id,"oro_sale_quote_shippingAddress_region_text-uid")]'
        type: xpath

    Send to Customer Form:
      selector: "form[name='oro_workflow_transition'][action*='send_to_customer']"
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          Apply template:
            type: 'xpath'
            locator: '//select[contains(@id, "oro_workflow_transition_email_template")]'
            element: Select2Entity

    Free-form_line_item2:
      selector:
        locator: '//tr[@data-content="oro_sale_quote[quoteProducts][1]"]//div[@class="quote-lineitem-product-select quote-lineitem-product-form"]//a[text()="Free-form entry"]'
        type: xpath

    Free-form_line_item3_order:
      selector:
        locator: '//tr[@data-content="oro_order_type[lineItems][2]"]//div[@class="order-line-item-type-product"]//a[text()="Free-form entry"]'
        type: xpath

    Add Offer line item2:
      selector:
        locator: '//tr[@data-content="oro_sale_quote[quoteProducts][1]"]//button[text()="Add Offer"]'
        type: xpath

    Select Shipping Address element:
      selector:
        locator: '//div[contains(@id,"s2id_oro_workflow_transition_shipping_address_customerAddress-uid")]'
        type: xpath

    LineItemPrice:
      selector: 'input[name="oro_sale_quote[quoteProducts][0][quoteProductOffers][0][price][value]"]'

    LineItemNote:
      selector: 'textarea[name="oro_sale_quote[quoteProducts][0][comment]"]'

    Tier prices button:
      selector: '.product-tier-prices'

    Disabled price overridden button:
      selector: '.product-tier-prices.disabled'

    Price overridden button:
      selector: '.product-price-overridden'

    Sales Representative Info:
      selector:
        locator: '#sales-contact-info'
        type: css

    AllQuotes:
      selector: 'div[data-page-component-name="frontend-quotes-grid"]'
      class: Oro\Bundle\FrontendBundle\Tests\Behat\Element\Grid

    First Product Quantity on Quote:
      selector: 'input[name="oro_sale_quote_demand[demandProducts][0][quantity]"]'

    First Product Second Offer:
      selector:
        locator: '//input[@name="oro_sale_quote_demand[demandProducts][0][quoteProductOffer]" and @data-value="2"]'
        type: xpath

    Quote Flat Rate:
      selector:
        locator: '//label[contains(text(),"Flat Rate")]'
        type: xpath

    Quote DPD Classic:
      selector:
        locator: '//td[contains(text(),"DPD Classic")]/../td/label[contains(text(),"DPD")]'
        type: xpath

    Quote Flat Rate 2:
      selector:
        locator: '//label[contains(text(),"Flat Rate 2")]'
        type: xpath

    Quote Line Item Grid:
      selector: '.quote-line-items'
      class: Oro\Bundle\DataGridBundle\Tests\Behat\Element\FrontendTableGrid

    Page Sidebar:
      selector: '.page-sidebar'

    Breadcrumbs:
      selector: '.breadcrumbs'

    Apply template:
      selector: 'select[name="oro_workflow_transition[email][template]"]'
      class: Oro\Bundle\FormBundle\Tests\Behat\Element\Select2Entity

    Quote Form Line Item 1 Kit Item 1 Label:
      selector:
        locator: '//tr[@data-content="oro_sale_quote[quoteProducts][0]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][1]/td[contains(@class, "line-item-label")]/label'
        type: xpath

    Quote Form Line Item 1 Kit Item 1 Quantity Label Tooltip:
      selector:
        locator: '//tr[@data-content="oro_sale_quote[quoteProducts][0]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][1]/td[contains(@class, "line-item-quantity-label")]//i[contains(@class, "tooltip-icon")]'
        type: xpath

    Quote Form Line Item 1 Kit Item 2 Label:
      selector:
        locator: '//tr[@data-content="oro_sale_quote[quoteProducts][0]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][2]/td[contains(@class, "line-item-label")]/label'
        type: xpath

    Quote Form Line Item 1 Kit Item 2 Quantity Label Tooltip:
      selector:
        locator: '//tr[@data-content="oro_sale_quote[quoteProducts][0]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][2]/td[contains(@class, "line-item-quantity-label")]//i[contains(@class, "tooltip-icon")]'
        type: xpath

    Quote Form Line Item 1 Kit Item 3 Label:
      selector:
        locator: '//tr[@data-content="oro_sale_quote[quoteProducts][0]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][3]/td[contains(@class, "line-item-label")]/label'
        type: xpath

    Quote Form Line Item 2 Kit Item 1 Label:
      selector:
        locator: '//tr[@data-content="oro_sale_quote[quoteProducts][1]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][1]/td[contains(@class, "line-item-label")]/label'
        type: xpath

    Quote Form Line Item 2 Kit Item 2 Label:
      selector:
        locator: '//tr[@data-content="oro_sale_quote[quoteProducts][1]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][2]/td[contains(@class, "line-item-label")]/label'
        type: xpath

    Quote Form Line Item 3 Kit Item 2 Label:
      selector:
        locator: '//tr[@data-content="oro_sale_quote[quoteProducts][2]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][2]/td[contains(@class, "line-item-label")]/label'
        type: xpath

    Quote Form Line Item 2 Kit Item 1 Quantity Label Tooltip:
      selector:
        locator: '//tr[@data-content="oro_sale_quote[quoteProducts][1]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][1]/td[contains(@class, "line-item-quantity-label")]//i[contains(@class, "tooltip-icon")]'
        type: xpath

    Quote Form Line Item 2 Kit Item 2 Quantity Label Tooltip:
      selector:
        locator: '//tr[@data-content="oro_sale_quote[quoteProducts][1]"]//tr[contains(@class, "sale-quote-product-kit-item-line-item")][2]/td[contains(@class, "line-item-quantity-label")]//i[contains(@class, "tooltip-icon")]'
        type: xpath

    Quote Line Items Table:
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Table
      selector:
        type: 'xpath'
        locator: '//table[contains(@class,"quote-line-items")]'

    Quote Form Line Item 3 Remove:
      selector:
        locator: '//tr[@data-content="oro_sale_quote[quoteProducts][2]"]//td[contains(@class, "quote-lineitem-remove")]/button'
        type: xpath

    Quote Product Kit Item Line Item Product Ghost Option 1:
      selector:
        locator: '//li[1][contains(@class, "select2-result") and contains(@class, "ghost-option")]'
        type: xpath

    Backend Quote Add Product Button:
      selector:
        locator: '//div[@class="quote-lineitems"]//button[contains(@class, "add-list-item") and text()="Add Product"]'
        type: xpath

    Storefront Quote Demand Form:
      selector: 'form[name="oro_sale_quote_demand"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          Line Item 1 Quantity To Order: 'oro_sale_quote_demand[demandProducts][0][quantity]'
          Line Item 2 Quantity To Order: 'oro_sale_quote_demand[demandProducts][1][quantity]'
          Line Item 3 Quantity To Order: 'oro_sale_quote_demand[demandProducts][2][quantity]'

    Line Item 1 Offer 1:
      selector:
        locator: '//input[@name="oro_sale_quote_demand[demandProducts][0][quoteProductOffer]" and @value="0"]'
        type: xpath

    Line Item 1 Offer 2:
      selector:
        locator: '//input[@name="oro_sale_quote_demand[demandProducts][0][quoteProductOffer]" and @value="1"]'
        type: xpath

    Line Item 2 Offer 1:
      selector:
        locator: '//input[@name="oro_sale_quote_demand[demandProducts][1][quoteProductOffer]" and @value="0"]'
        type: xpath

    Line Item 2 Offer 2:
      selector:
        locator: '//input[@name="oro_sale_quote_demand[demandProducts][1][quoteProductOffer]" and @value="1"]'
        type: xpath
