<commit_before>Feature: Browse products

  So that a customer can buy something
  They need to be able to browse our products

    Background: Log in as admin
      Given a category named "Notebooks" exists
      Given there is a user with e-mail address "<EMAIL>" and password "<PASSWORD>"
      And the user group "Admins" exists
      And the user group "Admins" has admin permissions
      And the user is member of the group "Admins"
      And I log in with e-mail address "<EMAIL>" and password "<PASSWORD>"
      
    @javascript      
    Scenario: Create product
      Given a tax class named "MwSt 7.6%" with the percentage 7.6%
      When I create a product called "Lenovo T400"
      And I wait for a fancybox to appear
      And fill in the product description "Some laptop"
      And I fill in the purchase price 100.0
      And I fill in the margin percentage 5.0
      And I fill in the weight 5.0
      And I select the tax class "MwSt 7.6%"
      And I click the create button
      Then there should be a product called "Lenovo T400"

    Scenario: Assign product to category
      And a product named "Lenovo T400"
      When I assign the product to the category "Notebooks"
      Then the category "Notebooks" should contain a product named "Lenovo T400"
      
    @javascript 
    Scenario: Forget assigning a tax class when creating a product
      When I create a product called "Lenovo T400"
      And I wait for a fancybox to appear
      And fill in the product description "Some laptop"
      And I fill in the purchase price 100.0
      And I fill in the weight 5.0
      And I fill in the margin percentage 5.0
      And I click the create button
      Then I should see an error message inside the fancybox
      
    Scenario: Browse all products
      Given a product named "Foobar 2000" in the category "Metasyntactic Variables"
      And a product named "Fish" in the category "Animals"
      And a product named "Defender" in the category "Arcade games"
      When I view the product list
      Then I should see a product named "Foobar 2000"
      And I should see a product named "Fish"
      And I should see a product named "Defender"

    Scenario: Browse products in a category
      Given a product named "Foobar 2000" in the category "Metasyntactic Variables"
      And a product named "Fish" in the category "Animals"
      And a product named "Defender" in the category "Arcade games"
      When I view the category "Animals"
      Then I should see a product named "Fish"
      And I should not see a product named "Defender"

    Scenario: View single product<commit_msg>Moving more things around, now tests should pass 100% even on databases that are not yet complete when the tests are run for the first time.<commit_after>Feature: Browse products

  So that a customer can buy something
  They need to be able to browse our products

    Background: Set up some necessary things
      Given a category named "Notebooks" exists
      And there is a user with e-mail address "<EMAIL>" and password "<PASSWORD>"
      And a tax class named "MwSt 7.6%" with the percentage 7.6%
      And the user group "Admins" exists
      And the user group "Admins" has admin permissions
      And the user is member of the group "Admins"
      And I log in with e-mail address "<EMAIL>" and password "<PASSWORD>"
      
    @javascript      
    Scenario: Create product
      When I create a product called "Lenovo T400"
      And I wait for a fancybox to appear
      And fill in the product description "Some laptop"
      And I fill in the purchase price 100.0
      And I fill in the margin percentage 5.0
      And I fill in the weight 5.0
      And I select the tax class "MwSt 7.6%"
      And I click the create button
      Then there should be a product called "Lenovo T400"

    Scenario: Assign product to category
      Given a product named "Lenovo T400"
      When I assign the product to the category "Notebooks"
      Then the category "Notebooks" should contain a product named "Lenovo T400"
      
    @javascript 
    Scenario: Forget assigning a tax class when creating a product
      When I create a product called "Lenovo T400"
      And I wait for a fancybox to appear
      And fill in the product description "Some laptop"
      And I fill in the purchase price 100.0
      And I fill in the weight 5.0
      And I fill in the margin percentage 5.0
      And I click the create button
      Then I should see an error message inside the fancybox
      
    Scenario: Browse all products
      Given a product named "Foobar 2000" in the category "Metasyntactic Variables"
      And a product named "Fish" in the category "Animals"
      And a product named "Defender" in the category "Arcade games"
      When I view the product list
      Then I should see a product named "Foobar 2000"
      And I should see a product named "Fish"
      And I should see a product named "Defender"

    Scenario: Browse products in a category
      Given a product named "Foobar 2000" in the category "Metasyntactic Variables"
      And a product named "Fish" in the category "Animals"
      And a product named "Defender" in the category "Arcade games"
      When I view the category "Animals"
      Then I should see a product named "Fish"
      And I should not see a product named "Defender"

    Scenario: View single product
{'fraction_non_alphanumeric': 0.04109334325027891, 'fraction_numerical': 0.01878021569356638, 'mean_word_length': 2.679206566347469, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '7036475', 'n_tokens_mistral': 1508, 'n_tokens_neox': 1386, 'n_words': 813}