<commit_before>@mink:selenium2 @alice(Page) @alice(Template) @reset-schema
Feature: Create business entity pages

    Background:
        Given the following Jedis:
            | name     | side   | midiChlorians | slug     | author             |
            | Anakin   | dark   | 20000         | anakin   | <EMAIL> |
            | Yoda     | bright | 17500         | yoda     | <EMAIL>   |
            | <NAME> | Double | 20000         | kylo-ren | <EMAIL> |
        And I maximize the window
        And I am on homepage

    Scenario: I can create a new Business entity page pattern
        When I open the additional menu drop
        Then I should see "Business Template"
        When I follow "Business Template"
        Then I should see "Jedi"
        Then I should see "ADD A BUSINESS TEMPLATE"
        When I follow the tab "Jedi"
        And I should see "ADD A BUSINESS TEMPLATE"
        And I follow "ADD A BUSINESS TEMPLATE"
        Then I should see "Create a business template"
        When I fill in "Name" with "Jedi profile - {{item.name}}"
        And I fill in "URL" with "jedi-profile-{{item.slug}}"
        And I follow "Create"
        And I wait 2 seconds
        Then I should be on "/en/victoire-dcms/business-template/show/4"
        And I should see "The business template has been successfully created"

    Scenario: I can create a new API Business entity page pattern
        When I open the additional menu drop
        Then I should see "Business Template"
        When I follow "Business Template"
        Then I should see "Users"
        Then I should see "ADD A BUSINESS TEMPLATE"
        When I follow the tab "Users"
        And I should see "ADD A BUSINESS TEMPLATE"
        And I follow "ADD A BUSINESS TEMPLATE"
        Then I should see "Create a business template"
        When I fill in "Name" with "User profile - {{item.name}}"
        And I fill in "URL" with "user-profile-{{item.id}}"
        And I follow "Create"
        And I wait 2 seconds
        Then I should be on "/en/victoire-dcms/business-template/show/4"
        Then I switch to "layout" mode
        And I should see "New content"
        When I select "Plain Text" from the "1" select of "main_content" slot
        Then I should see "Create"
        Then I follow the tab "Entities"
        Then I should see "Users"
        Then I follow the drop anchor "Users"
        When I open the widget mode drop for entity "Users"
        And I should see "Current entity"
        And I follow the drop anchor "Current entity"
        And I select "name" from "users_a_businessEntity_widget_text[fields][content]"
        And I submit the widget
        Given I am on "/en/user-profile-1"
        Then I should see "<NAME>"
        Given I am on "/en/user-profile-2"
        Then I should see "<NAME>"

    Scenario: I can create some content in the pattern
        Given the following BusinessTemplate:
            | currentLocale | name                         | backendName  | slug                       | businessEntityId | parent | template |
            | en            | Jedi profile - {{item.name}} | Jedi profile | jedi-profile-{{item.slug}} | jedi             | home   | base     |
        And I wait 2 seconds
        When I am on "/en/victoire-dcms/business-template/show/4"
        And I switch to "layout" mode
        Then I should see "New content"
        When I select "Force" from the "1" select of "main_content" slot
        Then I should see "Create"
        Then I follow the tab "Entities"
        Then I should see "Jedi"
        Then I follow the drop anchor "Jedi"
        When I open the widget mode drop for entity "Jedi"
        And I should see "Current entity"
        And I follow the drop anchor "Current entity"
        And I select "side" from "jedi_a_businessEntity_widget_force[fields][side]"
        And I submit the widget
        Then I should see "The dark side of the force"
        Given I am on "/en/jedi-profile-anakin"
        Then I should see "The dark side of the force"
        Given I am on "/en/jedi-profile-yoda"
        Then I should see "The bright side of the force"
<commit_msg>Remove useless test after merging issue<commit_after>@mink:selenium2 @alice(Page) @alice(Template) @reset-schema
Feature: Create business entity pages

    Background:
        Given the following Jedis:
            | name     | side   | midiChlorians | slug     | author             |
            | Anakin   | dark   | 20000         | anakin   | <EMAIL> |
            | Yoda     | bright | 17500         | yoda     | <EMAIL>   |
            | <NAME> | Double | 20000         | kylo-ren | <EMAIL> |
        And I maximize the window
        And I am on homepage

    Scenario: I can create a new Business entity page pattern
        When I open the additional menu drop
        Then I should see "Business Template"
        When I follow "Business Template"
        Then I should see "Jedi"
        Then I should see "ADD A BUSINESS TEMPLATE"
        When I follow the tab "Jedi"
        And I should see "ADD A BUSINESS TEMPLATE"
        And I follow "ADD A BUSINESS TEMPLATE"
        Then I should see "Create a business template"
        When I fill in "Name" with "Jedi profile - {{item.name}}"
        And I fill in "URL" with "jedi-profile-{{item.slug}}"
        And I follow "Create"
        And I wait 2 seconds
        Then I should be on "/en/victoire-dcms/business-template/show/4"
        And I should see "The business template has been successfully created"

    Scenario: I can create some content in the pattern
        Given the following BusinessTemplate:
            | currentLocale | name                         | backendName  | slug                       | businessEntityId | parent | template |
            | en            | Jedi profile - {{item.name}} | Jedi profile | jedi-profile-{{item.slug}} | jedi             | home   | base     |
        And I wait 2 seconds
        When I am on "/en/victoire-dcms/business-template/show/4"
        And I switch to "layout" mode
        Then I should see "New content"
        When I select "Force" from the "1" select of "main_content" slot
        Then I should see "Create"
        Then I follow the tab "Entities"
        Then I should see "Jedi"
        Then I follow the drop anchor "Jedi"
        When I open the widget mode drop for entity "Jedi"
        And I should see "Current entity"
        And I follow the drop anchor "Current entity"
        And I select "side" from "jedi_a_businessEntity_widget_force[fields][side]"
        And I submit the widget
        Then I should see "The dark side of the force"
        Given I am on "/en/jedi-profile-anakin"
        Then I should see "The dark side of the force"
        Given I am on "/en/jedi-profile-yoda"
        Then I should see "The bright side of the force"

{'fraction_non_alphanumeric': 0.07034220532319392, 'fraction_numerical': 0.00687335478210003, 'mean_word_length': 1.9478448275862068, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6194843', 'n_tokens_mistral': 1930, 'n_tokens_neox': 1827, 'n_words': 843}