oro_behat_extension:
  suites:
    OroTaxBundle:
      contexts:
        - Oro\Bundle\TestFrameworkBundle\Tests\Behat\Context\OroMainContext
        - Oro\Bundle\FormBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\ConfigBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\FormBundle\Tests\Behat\Context\FormContext
        - Oro\Bundle\DataGridBundle\Tests\Behat\Context\GridContext
        - Oro\Bundle\ApplicationBundle\Tests\Behat\Context\CommerceMainContext
        - Oro\Bundle\SearchBundle\Tests\Behat\Context\SearchContext
        - Oro\Bundle\CustomerBundle\Tests\Behat\Context\CustomerUserContext
        - Oro\Bundle\CustomerBundle\Tests\Behat\Context\ACLContext
        - Oro\Bundle\LocaleBundle\Tests\Behat\Context\LocalizationContext
        - Oro\Bundle\FrontendLocalizationBundle\Tests\Behat\Context\LocalizationSwitcherContext
        - Oro\Bundle\ProductBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\AttachmentBundle\Tests\Behat\Context\AttachmentImageContext
        - Oro\Bundle\ShoppingListBundle\Tests\Behat\Context\ShoppingListContext
        - Oro\Bundle\CheckoutBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\TaxBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\ProductBundle\Tests\Behat\Context\QuickOrderFormContext
      paths:
        - '@OroTaxBundle/Tests/Behat/Features'

  elements:
    Tax Jurisdiction Form:
      selector: 'form[name="oro_tax_jurisdiction_type"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form

    Tax Rule Form:
      selector: 'form[name="oro_tax_rule_type"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          Customer Tax Code:
            locator: '//div[contains(@id,"s2id_oro_tax_rule_type_customerTaxCode-uid")]/input'
            type: xpath
          Product Tax Code:
            locator: '//div[contains(@id,"s2id_oro_tax_rule_type_productTaxCode-uid")]/input'
            type: xpath
          Tax Jurisdiction:
            locator: '//div[contains(@id,"s2id_oro_tax_rule_type_taxJurisdiction-uid")]/input'
            type: xpath
          Tax:
            locator: '//div[contains(@id,"s2id_oro_tax_rule_type_tax-uid")]/input'
            type: xpath

    Tax Jurisdiction create new:
      selector:
        locator: '//label[text()="Tax Jurisdiction"]/../..//button[contains(@class,"entity-create-btn")]'
        type: xpath

    Tax Jurisdiction hamburger:
      selector:
        locator: '//label[text()="Tax Jurisdiction"]/../..//button[contains(@class,"entity-select-btn")]'
        type: xpath

    Tax Product Code hamburger:
      selector:
        locator: '//label[text()="Product Tax Code"]/../..//button[contains(@class,"entity-select-btn")]'
        type: xpath

    Select Product Tax Code Grid:
      selector: 'div[data-page-component-name="products-tax-code-select-grid"] div.oro-datagrid'
      class: Oro\Bundle\DataGridBundle\Tests\Behat\Element\Grid

    Tax US Sales Tax Form:
      selector: 'form[name="us_sales_tax"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          Digital Products Tax Codes:
            locator: '//input[contains(@class, "select2-input")]'
            type: xpath
            element: Select2Entities

    Tax EU Vat Tax Form:
      selector: 'form[name="eu_vat_tax"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          Digital Products Tax Codes:
            locator: '//input[contains(@class, "select2-input")]'
            type: xpath
            element: Select2Entities

    TaxBackendOrder:
      class: Oro\Bundle\TaxBundle\Tests\Behat\Element\TaxBackendOrder
      selector: 'div.layout-content'

    TaxBackendOrderLineItem:
      class: Oro\Bundle\TaxBundle\Tests\Behat\Element\TaxBackendOrderLineItem
      selector: 'tbody > tr.order-line-item'

    BackendLineItemTaxTable:
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Table
      selector: 'table.tax-result-grid'

    Backend Order Taxes Totals Table:
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Table
      selector:
        locator: '//div[contains(@data-role, "order-taxes-totals")]//descendant::table[contains(@class, "tax-result-grid")][1]'
        type: xpath

    Backend Order Taxes Results Table:
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Table
      selector:
        locator: '//div[contains(@data-role, "order-taxes-totals")]//descendant::table[contains(@class, "tax-result-grid")][2]'
        type: xpath

    Tax Shipping Form:
      selector: 'form[name="tax_shipping"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          Tax Code:
            locator: '//input[contains(@class, "select2-input")]'
            type: xpath
            element: Select2Entities

    Tax Code Form:
      selector: 'form[name="oro_entity_config_type"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          Other, Show On Form: 'oro_entity_config_type[form][is_enabled]'
