<commit_before>Feature: Venues
    In order to inform attendees where a LAN is taking place
    As an admin
    I need to be able to create, edit and delete venues

    Background:
        Given an admin with username "Lord Nikon" exists
        Given I am logged in as "<NAME>"

    Scenario: Creating a new venue
        When I go to the homepage
        And I follow "Venues"
        And I follow "Create"
        And I fill in "Name" with "Cyberdelia"
        And I fill in "Street Address" with "Clifden Road, Brentford, Greater London"
        And I fill in "Description" with "The ultimate cyberpunk club lounge"
        And I press "Submit"

        Then I should see "Cyberdelia"
        And I should see "Clifden Road, Brentford, Greater London"

    Scenario: Editing an existing venue's details
        Given The following venue exists:
            | name       | street_address                          | description                        |
            | Cyberdelia | Clifden Road, Brentford, Greater London | The ultimate cyberpunk club lounge |

        When I go to the homepage
        And I follow "Venues"
        And I follow "Cyberdelia"
        And I follow "Edit"
        And I fill in "Name" with "Ellingson Mineral Corporation HQ"
        And I fill in "Street Address" with "Lloyd's building, Lime Street, London, EC3M 7AW"
        And I fill in "Description" with "Together, Anything is Possible"
        And I press "Submit"

        Then I should see "Ellingson Mineral Corporation HQ"
        And I should see "Lloyd's building, Lime Street, London, EC3M 7AW"

#    Scenario: Deleting an existing venue
#        Given The following venue exists:
#            | name       | street_address                          | description                        |
#            | Cyberdelia | Clifden Road, Brentford, Greater London | The ultimate cyberpunk club lounge |
#
#        When I go to the homepage
#        And I follow "Venues"
#        And I follow "Cyberdelia"
#        And I follow "Delete" - currently uses javascript so cannot be tested by Goutte
#
#        Then the url should match "/venues"
#        And I should not see "Cyberdelia"

    Scenario: Attempting to create a venue with no name or street address
        When I go to the homepage
        And I follow "Venues"
        And I follow "Create"
        And I press "Submit"

        Then I should see "The name field is required"
        And I should see "The street address field is required"<commit_msg>Note a missing scenario in the venues feature<commit_after>Feature: Venues
    In order to inform attendees where a LAN is taking place
    As an admin
    I need to be able to create, edit and delete venues

    Background:
        Given an admin with username "Lord Nikon" exists
        Given I am logged in as "<NAME>"

    Scenario: Creating a new venue
        When I go to the homepage
        And I follow "Venues"
        And I follow "Create"
        And I fill in "Name" with "Cyberdelia"
        And I fill in "Street Address" with "Clifden Road, Brentford, Greater London"
        And I fill in "Description" with "The ultimate cyberpunk club lounge"
        And I press "Submit"

        Then I should see "Cyberdelia"
        And I should see "Clifden Road, Brentford, Greater London"

    Scenario: Editing an existing venue's details
        Given The following venue exists:
            | name       | street_address                          | description                        |
            | Cyberdelia | Clifden Road, Brentford, Greater London | The ultimate cyberpunk club lounge |

        When I go to the homepage
        And I follow "Venues"
        And I follow "Cyberdelia"
        And I follow "Edit"
        And I fill in "Name" with "Ellingson Mineral Corporation HQ"
        And I fill in "Street Address" with "Lloyd's building, Lime Street, London, EC3M 7AW"
        And I fill in "Description" with "Together, Anything is Possible"
        And I press "Submit"

        Then I should see "Ellingson Mineral Corporation HQ"
        And I should see "Lloyd's building, Lime Street, London, EC3M 7AW"

#    Scenario: Deleting an existing venue
#        Given The following venue exists:
#            | name       | street_address                          | description                        |
#            | Cyberdelia | Clifden Road, Brentford, Greater London | The ultimate cyberpunk club lounge |
#
#        When I go to the homepage
#        And I follow "Venues"
#        And I follow "Cyberdelia"
#        And I follow "Delete" - currently uses javascript so cannot be tested by Goutte
#
#        Then the url should match "/venues"
#        And I should not see "Cyberdelia"

    Scenario: Attempting to create a venue with no name or street address should show an error
        When I go to the homepage
        And I follow "Venues"
        And I follow "Create"
        And I press "Submit"

        Then I should see "The name field is required"
        And I should see "The street address field is required"

# TODO:
# Scenario: Attempting to create a venue with a name and street address that are too long should show an error
{'fraction_non_alphanumeric': 0.051767432876183114, 'fraction_numerical': 0.0015452965037666602, 'mean_word_length': 2.0931899641577063, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2450885', 'n_tokens_mistral': 1434, 'n_tokens_neox': 1307, 'n_words': 677}