<commit_before>*** Settings ***
Documentation     INFUND-43 As an applicant and I am on the application form on an open application, I will receive feedback if I my input is invalid, so I know how I should enter the question
...
...               INFUND-4694 As an applicant I want to be able to provide details of my previous submission if I am allowed to resubmit my project in the current competition so that I comply with Innovate UK competition eligibility criteria
...
...               INFUND-6823 As an Applicant I want to be invited to select the primary 'Research area' for my project
...
...               IFS-2776 As an Portfolio manager I am able to set the min/max project duration for a competition
...
...               IFS-8751: Increase project duration in months
...
Suite Setup       Custom Suite Setup
Suite Teardown    The user closes the browser
Force Tags        Applicant
Resource          ../../../../resources/defaultResources.robot

*** Variables ***
${applicationTitle}  Robot test application

*** Test Cases ***
Title field client side
    [Documentation]    INFUND-43, INFUND-2843
    [Tags]
    Given the user should see the element        jQuery = h1:contains("Application details")
    When the user enters text to a text field    id = name  ${EMPTY}
    Then the user should see a field error       Please enter the full title of the project
    When the user enters text to a text field    id = name  ${applicationTitle}
    Then the applicant should not see the validation error any more

Day field client side
    [Documentation]  INFUND-43 INFUND-2843
    [Tags]
    [Setup]    The applicant inserts a valid date
    When the user enters text to a text field    id = startDate    32
    Then the user should see a field error       ${enter_a_valid_date}
    When the user enters text to a text field    id = startDate    0
    Then the user should see a field error       ${enter_a_valid_date}
    When the user enters text to a text field    id = startDate    -1
    Then the user should see a field error       ${enter_a_valid_date}
    When the user enters text to a text field    id = startDate    ${EMPTY}
    Then the user should see a field error       ${enter_a_valid_date}
    When the applicant inserts a valid date
    Then the applicant should not see the validation error any more

Month field client side
    [Documentation]  INFUND-43 INFUND-2843
    [Tags]
    [Setup]    The applicant inserts a valid date
    When the user enters text to a text field    id = application_details-startdate_month    0
    Then the user should see a field error       ${enter_a_valid_date}
    When the user enters text to a text field    id = application_details-startdate_month    13
    Then the user should see a field error       ${enter_a_valid_date}
    When the user enters text to a text field    id = application_details-startdate_month    -1
    Then the user should see a field error       ${enter_a_valid_date}
    When the user enters text to a text field    id = application_details-startdate_month    ${EMPTY}
    Then the user should see a field error       ${enter_a_valid_date}
    When the applicant inserts a valid date
    Then the applicant should not see the validation error any more

Year field client side
    [Documentation]  INFUND-43 INFUND-2843
    [Tags]
    Given the user enters text to a text field    id = durationInMonths  15
    When the applicant inserts an invalid date
    Then the user should see a field error        Please enter a future date.
    When the user enters text to a text field     id = application_details-startdate_year    ${EMPTY}
    Then the user should see a field error        Please enter a future date.
    When the applicant inserts a valid date
    Then the applicant should not see the validation error any more

Duration field client side
    [Documentation]  INFUND-43 INFUND-2843 IFS-2776 IFS-8751
    [Tags]
    When the user enters text to a text field  id = durationInMonths  0
    And the user clicks the button/link        id = application-question-complete
    Then the user should see a field and summary error  Enter the total number of months between 1 and 84.

    When the user enters text to a text field  id = durationInMonths  -1
    And the user clicks the button/link        id = application-question-complete
    Then the user should see a field and summary error  Enter the total number of months between 1 and 84.

    When the user enters text to a text field  id = durationInMonths  ${EMPTY}<commit_msg>IFS-8940 fix web test<commit_after>*** Settings ***
Documentation     INFUND-43 As an applicant and I am on the application form on an open application, I will receive feedback if I my input is invalid, so I know how I should enter the question
...
...               INFUND-4694 As an applicant I want to be able to provide details of my previous submission if I am allowed to resubmit my project in the current competition so that I comply with Innovate UK competition eligibility criteria
...
...               INFUND-6823 As an Applicant I want to be invited to select the primary 'Research area' for my project
...
...               IFS-2776 As an Portfolio manager I am able to set the min/max project duration for a competition
...
...               IFS-8751: Increase project duration in months
...
Suite Setup       Custom Suite Setup
Suite Teardown    The user closes the browser
Force Tags        Applicant
Resource          ../../../../resources/defaultResources.robot

*** Variables ***
${applicationTitle}  Robot test application

*** Test Cases ***
Title field client side
    [Documentation]    INFUND-43, INFUND-2843
    [Tags]
    Given the user should see the element        jQuery = h1:contains("Application details")
    When the user enters text to a text field    id = name  ${EMPTY}
    Then the user should see a field error       Please enter the full title of the project
    When the user enters text to a text field    id = name  ${applicationTitle}
    Then the applicant should not see the validation error any more

Day field client side
    [Documentation]  INFUND-43 INFUND-2843
    [Tags]
    [Setup]    The applicant inserts a valid date
    When the user enters text to a text field    id = startDate    32
    Then the user should see a field error       ${enter_a_valid_date}
    When the user enters text to a text field    id = startDate    0
    Then the user should see a field error       ${enter_a_valid_date}
    When the user enters text to a text field    id = startDate    -1
    Then the user should see a field error       ${enter_a_valid_date}
    When the user enters text to a text field    id = startDate    ${EMPTY}
    Then the user should see a field error       ${enter_a_valid_date}
    When the applicant inserts a valid date
    Then the applicant should not see the validation error any more

Month field client side
    [Documentation]  INFUND-43 INFUND-2843
    [Tags]
    [Setup]    The applicant inserts a valid date
    When the user enters text to a text field    id = application_details-startdate_month    0
    Then the user should see a field error       ${enter_a_valid_date}
    When the user enters text to a text field    id = application_details-startdate_month    13
    Then the user should see a field error       ${enter_a_valid_date}
    When the user enters text to a text field    id = application_details-startdate_month    -1
    Then the user should see a field error       ${enter_a_valid_date}
    When the user enters text to a text field    id = application_details-startdate_month    ${EMPTY}
    Then the user should see a field error       ${enter_a_valid_date}
    When the applicant inserts a valid date
    Then the applicant should not see the validation error any more

Year field client side
    [Documentation]  INFUND-43 INFUND-2843
    [Tags]
    Given the user enters text to a text field    id = durationInMonths  15
    When the applicant inserts an invalid date
    Then the user should see a field error        Please enter a future date.
    When the user enters text to a text field     id = application_details-startdate_year    ${EMPTY}
    Then the user should see a field error        Please enter a future date.
    When the applicant inserts a valid date
    Then the applicant should not see the validation error any more

Duration field client side
    [Documentation]  INFUND-43 INFUND-2843 IFS-2776 IFS-8751
    [Tags]
    When the user enters text to a text field  id = durationInMonths  0
    And the user clicks the button/link        id = application-question-complete
    Then the user should see a field and summary error  Enter the total number of months between 1 and 36.

    When the user enters text to a text field  id = durationInMonths  -1
    And the user clicks the button/link        id = application-question-complete
    Then the user should see a field and summary error  Enter the total number of months between 1 and 36.

    When the user enters text to a text field  id = durationInMonths  ${EMPTY}
{'fraction_non_alphanumeric': 0.043301013662406344, 'fraction_numerical': 0.016967827236668134, 'mean_word_length': 2.740008240626288, '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': '1226379', 'n_tokens_mistral': 2442, 'n_tokens_neox': 2314, 'n_words': 1258}