oro_behat_extension:
  elements:
    Login Form:
      selector: '#login-form'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          Username: '_username'
          Password: '_password'
          Remember me on this computer: '_remember_me'

    User Form:
      selector: 'form[name="oro_user_user_form"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          Username: 'oro_user_user_form[username]'
          Password: 'oro_user_user_form[plainPassword][first]'
          Re-Enter Password: 'oro_user_user_form[plainPassword][second]'
          First Name: 'oro_user_user_form[firstName]'
          Last Name: 'oro_user_user_form[lastName]'
          Primary Email: 'oro_user_user_form[email]'
          First Role:
            locator: '//label[contains(.,"First Role")]/../input[@type="checkbox"]'
            type: xpath
          Second Role:
            locator: '//label[contains(.,"Second Role")]/../input[@type="checkbox"]'
            type: xpath
          OroCRM Organization:
            locator: '(//div[contains(@class,"organization-structure")]//input[@type="checkbox"][@data-name="organization"])[1]'
            type: xpath
          Organization Business Units:
            locator: '//input[@name="oro_user_user_form[organizations][businessUnits]"]'
            type: xpath
            element: Select2Share
          Avatar: 'oro_user_user_form[avatar][file]'
          Birthday:
            locator: 'input[id^="oro_user_user_form_birthday-uid"]'
            type: css
            element: DateTimePicker

    UserMenu:
      selector: {type: 'xpath', locator: '//*[@id="user-menu"]'}
      class: Oro\Bundle\UserBundle\Tests\Behat\Element\UserMenu

    SidebarMenu:
      selector: {type: 'xpath', locator: '//ul[@id="sidebar-menu-tree"]'}

    UserRoleForm:
      selector: "form[id^='oro_user_role_form']"
      class: Oro\Bundle\UserBundle\Tests\Behat\Element\UserRoleForm

    User Config Form:
      selector: 'form[name="look_and_feel"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          Use parent scope for Position: 'look_and_feel[oro_ui___navbar_position][use_parent_scope_value]'

    User Reset Password Form:
      selector: 'form[name="oro_user_reset_form"]'
      class: Oro\Bundle\TestFrameworkBundle\Behat\Element\Form
      options:
        mapping:
          New password: 'oro_user_reset_form[plainPassword][first]'
          Repeat password: 'oro_user_reset_form[plainPassword][second]'

    Sided Main Menu:
      selector: 'div.main-menu-sided'

    UserRoleView:
      selector:
        type: 'xpath'
        locator: '//div[contains(@data-page-component-name,"role-permission-grid")]/..'
      class: Oro\Bundle\UserBundle\Tests\Behat\Element\UserRoleViewForm

    Edit Button:
      selector: 'a[title="Edit profile"]'

    Username or Email:
      selector: '.form-signin__fieldset input[name="username"]'

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

    Generate Key:
      selector: '#btn-apigen'

    Grid View All Users:
      selector: '.grid-views-item span.grid-views-choice:contains("All Users")'

    Grid View Active Users:
      selector: '.grid-views-item span.grid-views-choice:contains("Active Users")'

    Grid View Cannot Login:
      selector: '.grid-views-item span.grid-views-choice:contains("Cannot login")'

    Grid View Disabled Users:
      selector: '.grid-views-item span.grid-views-choice:contains("Disabled Users")'

    Email View Delete Audrey Hepburn Context:
      selector:
        type: xpath
        locator: '//div[@class="activity-context-activity-items"]//span[text()="Audrey Hepburn"]/parent::a/following-sibling::span'

  pages:
    Login:
      class: Oro\Bundle\UserBundle\Tests\Behat\Page\Login
      route: 'oro_user_security_login'

    User Forgot Password:
      class: Oro\Bundle\UserBundle\Tests\Behat\Page\UserForgotPassword
      route: 'oro_user_reset_request'

    User Password Reset:
      class: Oro\Bundle\UserBundle\Tests\Behat\Page\UserPasswordReset
      route: 'oro_user_reset_reset'

    User Profile View:
      class: Oro\Bundle\UserBundle\Tests\Behat\Page\UserProfileView
      route: 'oro_user_profile_view'

    User Profile Update:
      class: Oro\Bundle\UserBundle\Tests\Behat\Page\UserProfileUpdate
      route: 'oro_user_profile_update'

    User Profile Configuration:
      class: Oro\Bundle\UserBundle\Tests\Behat\Page\UserProfileConfiguration
      route: 'oro_user_profile_configuration'

    User Index:
      class: Oro\Bundle\UserBundle\Tests\Behat\Page\UserIndex
      route: 'oro_user_index'

    User Create:
      class: Oro\Bundle\UserBundle\Tests\Behat\Page\UserCreate
      route: 'oro_user_create'

    User View:
      class: Oro\Bundle\UserBundle\Tests\Behat\Page\UserView
      route: 'oro_user_view'

    User Edit:
      class: Oro\Bundle\UserBundle\Tests\Behat\Page\UserEdit
      route: 'oro_user_update'

    Role View:
      class: Oro\Bundle\UserBundle\Tests\Behat\Page\RoleView
      route: 'oro_user_role_view'

  suites:
    OroUserBundle:
      contexts:
        - Oro\Bundle\TestFrameworkBundle\Tests\Behat\Context\OroMainContext
        - Oro\Bundle\TestFrameworkBundle\Tests\Behat\Context\FixturesContext
        - Oro\Bundle\UserBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\UserBundle\Tests\Behat\Context\UserAttachmentContext
        - Oro\Bundle\AttachmentBundle\Tests\Behat\Context\AttachmentImageContext
        - Oro\Bundle\FormBundle\Tests\Behat\Context\FormContext
        - Oro\Bundle\ConfigBundle\Tests\Behat\Context\FeatureContext
        - Oro\Bundle\SecurityBundle\Tests\Behat\Context\ACLContext
        - Oro\Bundle\LocaleBundle\Tests\Behat\Context\LocalizationContext
        - Oro\Bundle\ActivityListBundle\Tests\Behat\Context\ActivityContext
        - Oro\Bundle\DataGridBundle\Tests\Behat\Context\GridContext
        - Oro\Bundle\EmailBundle\Tests\Behat\Context\EmailContext
        - Oro\Bundle\SearchBundle\Tests\Behat\Context\SearchContext
        - Oro\Bundle\ApiBundle\Tests\Behat\Context\ApiContext
      paths:
        - '@OroUserBundle/Tests/Behat/Features'
