<commit_before>Feature: html generation

  @javascript
  Scenario: json schema gets generated into html preview
    Given an empty directory named "lurker"
    And an empty directory named "html"
    And a file named "lurker/api/v1/users-POST.json.yml" with:
      """yml
      ---
      prefix: 'Users'
      description: 'User creation'
      responseCodes:
      - status: 200
        successful: true
        description: ''
      requestParameters:
        properties:
          name:
            description: ''
            type: string
            example: Bob
        required: []
      responseParameters:
        properties:
          id:
            description: ''
            type: integer
            example: 1
          name:
            description: ''
            type: string
            example: Bob
        required: []
      extensions:
        action: create
        controller: api/v1/users
        path_info: "/api/v1/users"
        method: POST
        suffix: ''
      """

  When I successfully run `bin/lurker convert`
  And I run `find html`
  Then the output should contain:
    """
    html
    html/api
    html/api/v1
    html/api/v1/users-POST.html
    html/index.html
    html/public
    html/public/application.css
    html/public/application.js
    """
  When I go to "/lurker"
  Then I should see "Users"
  When I click on "Users"<commit_msg>maek specs pass<commit_after>Feature: html generation

  @javascript
  Scenario: json schema gets generated into html preview
    Given an empty directory named "lurker"
    And an empty directory named "html"
    And a file named "lurker/api/v1/users-POST.json.yml" with:
      """yml
      ---
      prefix: 'Users'
      description: 'User creation'
      responseCodes:
      - status: 200
        successful: true
        description: ''
      requestParameters:
        properties:
          name:
            description: ''
            type: string
            example: Bob
        required: []
      responseParameters:
        properties:
          id:
            description: ''
            type: integer
            example: 1
          name:
            description: ''
            type: string
            example: Bob
        required: []
      extensions:
        action: create
        controller: api/v1/users
        path_info: "/api/v1/users"
        method: POST
        suffix: ''
      """

  When I successfully run `bin/lurker convert`
  Then the output should contain:
    """
    Converting lurker to html
    """
  When I run `find html`
  Then the output should contain:
    """
    html/api/v1/users-POST.html
    """
  When I go to "/lurker"
  Then I should see "Users"
  When I click on "Users"
{'fraction_non_alphanumeric': 0.08677991137370754, 'fraction_numerical': 0.006277695716395864, 'mean_word_length': 1.6742349457058243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5556183', 'n_tokens_mistral': 752, 'n_tokens_neox': 735, 'n_words': 233}