<commit_before>@backend
Feature: Check the post admin module

Scenario: Check comment admin pages when not connected
  When I go to "admin/sonata/news/post/list"
  Then the response status code should be 200
  And I should see "Username"

Scenario: Check post admin pages when connected
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  Then I should see "Filters"

Scenario: Add a new post with some errors
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/create?uniqid=4f155592a220e"
  And I press "Create"
  Then I should see "An error has occurred during item creation."

Scenario: Add a new post
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/create?uniqid=4f155592a220e"
  And I fill in "4f155592a220e_title" with "title"
  And I fill in "4f155592a220e_abstract" with "abstract"
  And I select "markdown" from "4f155592a220e_contentFormatter"
  And I fill in "4f155592a220e_rawContent" with "raw content"
  And I select "2" from "4f155592a220e_commentsDefaultStatus_2"
  And I press "Create"
  Then I should see "Item has been successfully created."

Scenario: Edit a post
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "title"
  And I press "Update"
  Then I should see "Item has been successfully updated."

Scenario: View revision of a post
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "title"
  And I follow "Revisions"
  Then the response status code should be 200

Scenario: View the last revision of a post
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "title"
  And I follow "Show"
  Then the response status code should be 200

Scenario: Filter posts
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I fill in "filter_title_value" with "title"
  And I press "Filter"
  Then I should see "title"

Scenario: Export JSON data
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "json"
  Then the response status code should be 200

Scenario: Export CSV data
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "csv"
  Then the response status code should be 200

Scenario: Export XML data
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "xml"
  Then the response status code should be 200

Scenario: Export XLS data
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "xls"
  Then the response status code should be 200

Scenario: Delete a post
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "title"
  And I follow "Delete"
  And I press "Yes, delete"
  Then I should see "Item has been deleted successfully."<commit_msg>Changing the name of the post created in features<commit_after>@backend
Feature: Check the post admin module

Scenario: Check comment admin pages when not connected
  When I go to "admin/sonata/news/post/list"
  Then the response status code should be 200
  And I should see "Username"

Scenario: Check post admin pages when connected
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  Then I should see "Filters"

Scenario: Add a new post with some errors
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/create?uniqid=4f155592a220e"
  And I press "Create"
  Then I should see "An error has occurred during item creation."

Scenario: Add a new post
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/create?uniqid=4f155592a220e"
  And I fill in "4f155592a220e_title" with "toto"
  And I fill in "4f155592a220e_abstract" with "abstract"
  And I select "markdown" from "4f155592a220e_contentFormatter"
  And I fill in "4f155592a220e_rawContent" with "raw content"
  And I select "2" from "4f155592a220e_commentsDefaultStatus_2"
  And I press "Create"
  Then I should see "Item has been successfully created."

Scenario: Edit a post
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "toto"
  And I press "Update"
  Then I should see "Item has been successfully updated."

Scenario: View revision of a post
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "toto"
  And I follow "Revisions"
  Then the response status code should be 200

Scenario: View the last revision of a post
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "toto"
  And I follow "Show"
  Then the response status code should be 200

Scenario: Filter posts
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I fill in "filter_title_value" with "toto"
  And I press "Filter"
  Then I should see "title"

Scenario: Export JSON data
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "json"
  Then the response status code should be 200

Scenario: Export CSV data
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "csv"
  Then the response status code should be 200

Scenario: Export XML data
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "xml"
  Then the response status code should be 200

Scenario: Export XLS data
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "xls"
  Then the response status code should be 200

Scenario: Delete a post
  When I am connected with "admin" and "admin" on "admin/sonata/news/post/list"
  And I follow "toto"
  And I follow "Delete"
  And I press "Yes, delete"
  Then I should see "Item has been deleted successfully."
{'fraction_non_alphanumeric': 0.07585034013605442, 'fraction_numerical': 0.03163265306122449, 'mean_word_length': 4.013640238704177, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1864307', 'n_tokens_mistral': 1984, 'n_tokens_neox': 1863, 'n_words': 839}