<commit_before>*** Settings ***
Documentation     INFUND-6661 As a Competitions team member I want to be able to update Initial details throughout the life of the competition
...
...               INFUND-6937 As a Competitions team member I want to be able to view Application details throughout the life of the competition
...
...               INFUND-6938 As a Competitions team member I want to be able to view Project summary throughout the life of the competition
...
...               INFUND-6939 As a Competitions team member I want to be able to view Public description throughout the life of the competition
...
...               INFUND-6940 As a Competitions team member I want to be able to view Scope throughout the life of the competition
...
...               INFUND-6941 As a Competitions team member I want to be able to view Finances throughout the life of the competition
...
...               INFUND-6792 As a Competitions team member I want to be able to view Eligibility throughout the life of the competition
...
...               INFUND-7083 As a Competitions team member I want to be able to update PAF number, budget and activity codes throughout the life of the competition
...
...               INFUND-6695 As a Competitions team member I want to be able to update the number of Assessors required per applicationthroughout the life of the competition
...
...               INFUND-6694 As a Competitions team member I want to be able to update Milestones throughout the life of the competition
...
...               IFS-4982 Move Funding type selection from front door to Initial details
Suite Setup       Custom suite setup
Suite Teardown    Custom suite teardown
Force Tags        CompAdmin
Resource          ../../resources/defaultResources.robot
Resource          ../02__Competition_Setup/CompAdmin_Commons.robot

# ${ready_to_open_competition_name} is the 'Photonics for health'

*** Test Cases ***
Application details are editable (Ready to Open)
    [Documentation]    INFUND-6937
    [Tags]
    Given the user clicks the button/link    jQuery = a:contains(Upcoming)
    And the user clicks the button/link      link = ${ready_to_open_competition_name}
    And the user clicks the button/link      jQuery = a:contains(and update competition setup)
    And the user clicks the button/link      link = Application
    When the user clicks the button/link     link = Application details
    And the user should see the element      jQuery = .govuk-button:contains("Edit this question")
    And the user clicks the button/link      jQuery = .govuk-button:contains("Edit this question")
    Then the user is able to change the value of the fields
    [Teardown]    the user clicks the button/link    link = Application

Project summary is editable (Ready to Open)
    [Documentation]    INFUND-6938
    [Tags]
    When The user clicks the button/link         link = Project summary
    And the user should see the element          jquery = h1:contains("Project summary")
    When the user clicks the button/link         jQuery = .govuk-button:contains("Edit this question")
    Then The user enters text to a text field    id = question.maxWords    100
    And the user clicks the button/link          jQuery=button:contains("Done")

Public description should be editable (Ready to Open)
    [Documentation]    INFUND-6939
    [Tags]
    Given the user clicks the button/link        link = Public description
    When the user clicks the button/link         jQuery = .govuk-button:contains("Edit this question")
    Then The user enters text to a text field    id = question.maxWords    100
    And the user clicks the button/link          jQuery = button:contains("Done")

Scope is editable (Ready to Open)
    [Documentation]    INFUND-6940
    [Tags]
    Given The user clicks the button/link        link = Scope
    When the user clicks the button/link         jQuery = .govuk-button:contains("Edit this question")
    Then The user enters text to a text field    id = question.maxWords    100
    And the user clicks the button/link          jQuery = button:contains("Done")

Assessed Questions are editable (Ready to Open)
    [Documentation]    INFUND-6936
    [Tags]
    When the user clicks the button/link    jQuery = a:contains("Business opportunity")
    Then the user should see the element    jQuery = h1:contains("Business opportunity")
    And the user clicks the button/link     jQuery = .govuk-button:contains("Edit this question")
    And the user edits the assessed question information
    And the user clicks the button/link     jQuery = button:contains("Done")
    When the user clicks the button/link    jQuery = a:contains("Business opportunity")
    Then the user sees the correct read only view of the question
    And the user clicks the button/link     link = Return to application questions

Finances are editable (Ready to Open)
    [Documentation]  INFUND-6941
    [Tags]
    Given the user navigates to the page         ${server}/management/competition/setup/${READY_TO_OPEN_COMPETITION}/section/application/landing-page
    When The user clicks the button/link         link = Finances
    And the user should see the element          jQuery = h1:contains("Finances")
    When the user clicks the button/link         jQuery = a:contains("Edit this question")
    Then if textarea is empty the proper validation messages are shown
    And the user clicks the button/link          jQuery = button:contains("Done")
    [Teardown]  the user clicks the button/link  link = Competition setup

Eligibility is editable (Ready to Open)
    [Documentation]    INFUND-6792
    [Tags]
    When the user clicks the button/link    link = Eligibility
    Then the user should see the element    jquery = h1:contains("Eligibility")
    And The user clicks the button/link     jQuery = button:contains(Edit)
    And the user selects the radio button   singleOrCollaborative  single
    And The user clicks the button/link     jQuery = button:contains(Done)

Funding Information is editable (Open)
    [Documentation]    INFUND-7083
    [Tags]
    [Setup]    The user clicks the button/link  jQuery = a:contains(Dashboard)
    Given the user clicks the button/link       link = ${openCompetitionBusinessRTO_name}
    And the user clicks the button/link         link = View and update competition setup
    When the user clicks the button/link        link = Funding information
    And the user should see the element         jquery = h1:contains("Funding information")
    And the user clicks the button/link         jQuery = .govuk-button:contains("Edit")
    And the user enters text to an autocomplete field  id = funders[0].funder   Aerospace Technology Institute (ATI)
    And the user clicks the button/link         id = funders[0].funder
    And click element                           id = funders[0].funder__option--0
    And the user should see the element         id = funders[0].funderBudget
    And the user should see the element         id = pafNumber
    And the user should see the element         id = budgetCode
    And the user should see the element         id = activityCode
    And the user clicks the button/link         jQuery = button:contains("Done")
    Then The user should see the element        jQuery = button:contains("Edit")
    And The user should see the element         jQuery = td:contains("Aerospace Technology Institute (ATI)")
    [Teardown]    the user clicks the button/link  link = Competition setup

Milestones are editable (Open)
    [Documentation]    INFUND-6694
    [Tags]
    When the user clicks the button/link                     link = Milestones
    And the user clicks the button/link                      jQuery = a:contains("Next")
    And the user clicks the button/link                      jQuery = button:contains(Edit)
    Then the user should see that the element is disabled    css = tr:nth-child(1) .year input
    And the user should see that the element is disabled     css = tr:nth-child(2) .year input
    And the user fills in the milestone data with valid information
    And the user clicks the button/link                      jQuery = button:contains(Done)
    And the user clicks the button/link                      jQuery = .govuk-button:contains("Edit")
    And the user resets the milestone data
    And the user clicks the button/link                      jQuery = button:contains(Done)
    [Teardown]    the user clicks the button/link            link = Competition setup

Application details are not editable (Open)
    [Documentation]    INFUND-6937
    [Tags]
    When the user clicks the button/link             link = Application
    And the user clicks the button/link              link = Application details<commit_msg>fix-dev update AT's<commit_after>*** Settings ***
Documentation     INFUND-6661 As a Competitions team member I want to be able to update Initial details throughout the life of the competition
...
...               INFUND-6937 As a Competitions team member I want to be able to view Application details throughout the life of the competition
...
...               INFUND-6938 As a Competitions team member I want to be able to view Project summary throughout the life of the competition
...
...               INFUND-6939 As a Competitions team member I want to be able to view Public description throughout the life of the competition
...
...               INFUND-6940 As a Competitions team member I want to be able to view Scope throughout the life of the competition
...
...               INFUND-6941 As a Competitions team member I want to be able to view Finances throughout the life of the competition
...
...               INFUND-6792 As a Competitions team member I want to be able to view Eligibility throughout the life of the competition
...
...               INFUND-7083 As a Competitions team member I want to be able to update PAF number, budget and activity codes throughout the life of the competition
...
...               INFUND-6695 As a Competitions team member I want to be able to update the number of Assessors required per applicationthroughout the life of the competition
...
...               INFUND-6694 As a Competitions team member I want to be able to update Milestones throughout the life of the competition
...
...               IFS-4982 Move Funding type selection from front door to Initial details
Suite Setup       Custom suite setup
Suite Teardown    Custom suite teardown
Force Tags        CompAdmin
Resource          ../../resources/defaultResources.robot
Resource          ../02__Competition_Setup/CompAdmin_Commons.robot

# ${ready_to_open_competition_name} is the 'Photonics for health'

*** Test Cases ***
Application details are editable (Ready to Open)
    [Documentation]    INFUND-6937
    [Tags]
    Given the user clicks the button/link    jQuery = a:contains(Upcoming)
    And the user clicks the button/link      link = ${ready_to_open_competition_name}
    And the user clicks the button/link      jQuery = a:contains(and update competition setup)
    And the user clicks the button/link      link = Application
    When the user clicks the button/link     link = Application details
    And the user should see the element      jQuery = .govuk-button:contains("Edit this question")
    And the user clicks the button/link      jQuery = .govuk-button:contains("Edit this question")
    Then the user is able to change the value of the fields
    [Teardown]    the user clicks the button/link    link = Application

Project summary is editable (Ready to Open)
    [Documentation]    INFUND-6938
    [Tags]
    When The user clicks the button/link         link = Project summary
    And the user should see the element          jquery = h1:contains("Project summary")
    When the user clicks the button/link         jQuery = .govuk-button:contains("Edit this question")
    Then The user enters text to a text field    id = question.maxWords    100
    And the user clicks the button/link          jQuery=button:contains("Done")

Public description should be editable (Ready to Open)
    [Documentation]    INFUND-6939
    [Tags]
    Given the user clicks the button/link        link = Public description
    When the user clicks the button/link         jQuery = .govuk-button:contains("Edit this question")
    Then The user enters text to a text field    id = question.maxWords    100
    And the user clicks the button/link          jQuery = button:contains("Done")

Scope is editable (Ready to Open)
    [Documentation]    INFUND-6940
    [Tags]
    Given The user clicks the button/link        link = Scope
    When the user clicks the button/link         jQuery = .govuk-button:contains("Edit this question")
    Then The user enters text to a text field    id = question.maxWords    100
    And the user clicks the button/link          jQuery = button:contains("Done")

Assessed Questions are editable (Ready to Open)
    [Documentation]    INFUND-6936
    [Tags]
    When the user clicks the button/link    jQuery = a:contains("Business opportunity")
    Then the user should see the element    jQuery = h1:contains("Business opportunity")
    And the user clicks the button/link     jQuery = .govuk-button:contains("Edit this question")
    And the user edits the assessed question information
    And the user clicks the button/link     jQuery = button:contains("Done")
    When the user clicks the button/link    jQuery = a:contains("Business opportunity")
    Then the user sees the correct read only view of the question
    And the user clicks the button/link     link = Return to application questions

Finances are editable (Ready to Open)
    [Documentation]  INFUND-6941
    [Tags]
    Given the user navigates to the page         ${server}/management/competition/setup/${READY_TO_OPEN_COMPETITION}/section/application/landing-page
    When The user clicks the button/link         link = Finances
    And the user should see the element          jQuery = h1:contains("Finances")
    When the user clicks the button/link         jQuery = a:contains("Edit this question")
    Then if textarea is empty the proper validation messages are shown
    And the user clicks the button/link          jQuery = button:contains("Done")
    [Teardown]  the user clicks the button/link  link = Competition setup

Eligibility is editable (Ready to Open)
    [Documentation]    INFUND-6792
    [Tags]
    When the user clicks the button/link    link = Eligibility
    Then the user should see the element    jquery = h1:contains("Eligibility")
    And The user clicks the button/link     jQuery = button:contains(Edit)
    And the user selects the radio button   singleOrCollaborative  single
    And The user clicks the button/link     jQuery = button:contains(Done)

Funding Information is editable (Open)
    [Documentation]    INFUND-7083
    [Tags]
    [Setup]    The user clicks the button/link  jQuery = a:contains(Dashboard)
    Given the user clicks the button/link       link = ${openCompetitionBusinessRTO_name}
    And the user clicks the button/link         link = View and update competition setup
    When the user clicks the button/link        link = Funding information
    And the user should see the element         jquery = h1:contains("Funding information")
    And the user clicks the button/link         jQuery = .govuk-button:contains("Edit")
    click element       id = funders[0].funder
    Input text          id = funders[0].funder    Aerospace Technology Institute (ATI)
    click element    jQuery = li:contains("Aerospace Technology Institute (ATI)")
    Mouse Out        id = funders[0].funder
    And the user should see the element         id = funders[0].funderBudget
    And the user should see the element         id = pafNumber
    And the user should see the element         id = budgetCode
    And the user should see the element         id = activityCode
    And the user clicks the button/link         jQuery = button:contains("Done")
    Then The user should see the element        jQuery = button:contains("Edit")
    And The user should see the element         jQuery = td:contains("Aerospace Technology Institute (ATI)")
    [Teardown]    the user clicks the button/link  link = Competition setup

Milestones are editable (Open)
    [Documentation]    INFUND-6694
    [Tags]
    When the user clicks the button/link                     link = Milestones
    And the user clicks the button/link                      jQuery = a:contains("Next")
    And the user clicks the button/link                      jQuery = button:contains(Edit)
    Then the user should see that the element is disabled    css = tr:nth-child(1) .year input
    And the user should see that the element is disabled     css = tr:nth-child(2) .year input
    And the user fills in the milestone data with valid information
    And the user clicks the button/link                      jQuery = button:contains(Done)
    And the user clicks the button/link                      jQuery = .govuk-button:contains("Edit")
    And the user resets the milestone data
    And the user clicks the button/link                      jQuery = button:contains(Done)
    [Teardown]    the user clicks the button/link            link = Competition setup

Application details are not editable (Open)
    [Documentation]    INFUND-6937
    [Tags]
    When the user clicks the button/link             link = Application
    And the user clicks the button/link              link = Application details
{'fraction_non_alphanumeric': 0.0588, 'fraction_numerical': 0.012171428571428571, 'mean_word_length': 2.668972746331237, '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': '1468997', 'n_tokens_mistral': 4570, 'n_tokens_neox': 4308, 'n_words': 2024}