<commit_before>Feature: Create programs

  As a admin
  When I log in
  So that I can create programs

Background: admin in database

  Given the following users exist:
  | email           | password | role           |
  | <EMAIL> | 1234abcd | Admin          |
  | <EMAIL>       | 1234abcd | Funding Source |
  | <EMAIL>     | 1234abcd | Applicant      |

  Given the following programs exist:
  | name   |
  | Sample |

Scenario: create programs
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to create program page
  And I create a program with name "Program X" and form url ""
  Then a program with name "Program X" should exist

Scenario: add form url
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to create program page
  And I create a program with name "Program Y" and form url "http://www.google.com"
  And I go to programs page
  And I click "Program Y"
  Then I should see a link with "View Form" to "http://www.google.com"

Scenario: edit program
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to create program page
  And I create a program with name "Program X" and form url "http://www.google.com"
  And I go to programs page
  And I click "Program X"
  And I click "Edit Program"
  And I fill form for "program_name" with "Program Super X"
  And I fill form for "program_form_url" with "http://www.bing.com"
  Then I click "Submit"
  Then a program with name "Program Super X" should exist

Scenario: delete program
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to create program page
  And I create a program with name "Program X" and form url "http://www.google.com"
  And I go to programs page
  And I click "Program X"
  And I click "Edit Program"
  And I click "Delete Program"
  Then a program with name "Program X" should not exist

Scenario: funding source cannot create programs
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to create program page
  Then I should be on programs page

Scenario: applicants cannot create programs
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to create program page
  Then I should be on programs page

Scenario: applicants cannot edit programs
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to programs page
  And I click "Sample"
  Then I should not see a link with "Edit Program"<commit_msg>Added reviewer cannot create program cucumber<commit_after>Feature: Create programs

  As a admin
  When I log in
  So that I can create programs

Background: admin in database

  Given the following users exist:
  | email           | password | role           |
  | <EMAIL> | 1234abcd | Admin          |
  | <EMAIL>       | 1234abcd | Funding Source |
  | <EMAIL>   | 1234abcd | Reviewer       |
  | <EMAIL>     | 1234abcd | Applicant      |

  Given the following programs exist:
  | name   |
  | Sample |

Scenario: create programs
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to create program page
  And I create a program with name "Program X" and form url ""
  Then a program with name "Program X" should exist

Scenario: add form url
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to create program page
  And I create a program with name "Program Y" and form url "http://www.google.com"
  And I go to programs page
  And I click "Program Y"
  Then I should see a link with "View Form" to "http://www.google.com"

Scenario: edit program
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to create program page
  And I create a program with name "Program X" and form url "http://www.google.com"
  And I go to programs page
  And I click "Program X"
  And I click "Edit Program"
  And I fill form for "program_name" with "Program Super X"
  And I fill form for "program_form_url" with "http://www.bing.com"
  Then I click "Submit"
  Then a program with name "Program Super X" should exist

Scenario: delete program
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to create program page
  And I create a program with name "Program X" and form url "http://www.google.com"
  And I go to programs page
  And I click "Program X"
  And I click "Edit Program"
  And I click "Delete Program"
  Then a program with name "Program X" should not exist

Scenario: funding source cannot create programs
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to create program page
  Then I should be on programs page

Scenario: reviewer cannot create programs
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to create program page
  Then I should be on programs page

Scenario: applicant cannot create programs
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to create program page
  Then I should be on programs page

Scenario: applicants cannot edit programs
  When I go to the user log in page
  And I log in as a user with email "<EMAIL>" and password "<PASSWORD>"
  And I go to programs page
  And I click "Sample"
  Then I should not see a link with "Edit Program"
{'fraction_non_alphanumeric': 0.062112869924294566, 'fraction_numerical': 0.004817618719889883, 'mean_word_length': 3.090781140042224, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 10, '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': '4206085', 'n_tokens_mistral': 1710, 'n_tokens_neox': 1671, 'n_words': 986}