<commit_before>*** Settings ***
Documentation     INFUND-1683 As a user of IFS application, if I attempt to perform an action that I am not authorised perform, I am redirected to authorisation failure page with appropriate message
Test Teardown     TestTeardown User closes the browser
Resource          ../../../resources/GLOBAL_LIBRARIES.robot
Resource          ../../../resources/variables/GLOBAL_VARIABLES.robot
Resource          ../../../resources/variables/User_credentials.robot
Resource          ../../../resources/keywords/Login_actions.robot
Resource          ../../../resources/keywords/Applicant_actions.robot

*** Variables ***
${ASSESSOR_DASHBOARD}    ${SERVER}/assessor/dashboard
${ASSESSOR_COPMETITIONS_DETAILS}    ${SERVER}/assessor/competitions/1/applications
${ASSESSOR_REVIEW_APPLICATION}    ${SERVER}/assessor/competitions/1/applications/4
${ASSESSOR_DETAILS_PAGE}    ${SERVER}/assessor/competitions/1/applications/3

*** Test Cases ***
Guest user can't access the Assessor's dashboard page
    [Documentation]    INFUND-1683
    Given the guest user opens the browser
    #When the user enters the url of the assessors dashboard page
    When User navigates to the page    ${ASSESSOR_DASHBOARD}
    #Then the user should get the log-in page
    Then user should be redirected to the correct page    ${LOGIN_URL}

Guest user can't access the competitions details page
    [Documentation]    INFUND-1683
    Given the guest user opens the browser
    #When the user enters the url of the competitions details page
    When User navigates to the page    ${ASSESSOR_COPMETITIONS_DETAILS}
    #Then the user should get the log-in page
    Then user should be redirected to the correct page    ${LOGIN_URL}

Guest user can't access assessor's review application page
    [Documentation]    INFUND-1683
    Given the guest user opens the browser
    #When the user enters the url of the assessors review application page
    When User navigates to the page    ${ASSESSOR_REVIEW_APPLICATION}
    #Then the user should get the log-in page
    Then user should be redirected to the correct page    ${LOGIN_URL}

Guest user can't access the Assessors details page
    [Documentation]    INFUND-1683
    Given the guest user opens the browser
    #When the user enters the url of the Assessors details page
    When User navigates to the page    ${ASSESSOR_DETAILS_PAGE}
    #Then the user should get the log-in page
    Then user should be redirected to the correct page    ${LOGIN_URL}

Applicant can't access Assessor's dashboard page
    [Documentation]    INFUND-1683
    [Tags]    Pending
    #Pending infund-1753
    #Given the user is logged in as applicant
    Given guest user log-in    &{collaborator2_credentials}
    #When the user enters the url of the assessors dashboard page
    When User navigates to the page    ${ASSESSOR_DASHBOARD}
    Then User should get an error page    Oops, something went wrong

Applicant can't access the competitions details page
    [Documentation]    INFUND-1683
    [Tags]    Pending
    #Pending infund-1753
    #Given the user is logged in as applicant
    Given guest user log-in    &{collaborator2_credentials}
    #When the user enters the url of the competitions details page
    When User navigates to the page    ${ASSESSOR_COPMETITIONS_DETAILS}
    Then User should get an error page    Oops, something went wrong

Applicant can't access the Assessor's review application page
    [Documentation]    INFUND-1683
    #Given the user is logged in as applicant
    Given guest user log-in    &{collaborator2_credentials}
    #When the user enters the url of the assessors review application page
    When User navigates to the page    ${ASSESSOR_REVIEW_APPLICATION}
    Then User should get an error page    Oops, something went wrong

Applicant can't access the Assessor's details page
    [Documentation]    INFUND-1683
    #Given the user is logged in as applicant
    Given guest user log-in    &{collaborator2_credentials}
    #When the user enters the url of the Assessors details page
    When User navigates to the page    ${ASSESSOR_DETAILS_PAGE}
    Then User should get an error page    Oops, something went wrong

*** Keywords ***
#the user enters the url of the assessors dashboard page
#   go to    ${ASSESSOR_DASHBOARD}<commit_msg>Modified acceptance tests for new error messages<commit_after>*** Settings ***
Documentation     INFUND-1683 As a user of IFS application, if I attempt to perform an action that I am not authorised perform, I am redirected to authorisation failure page with appropriate message
Test Teardown     TestTeardown User closes the browser
Resource          ../../../resources/GLOBAL_LIBRARIES.robot
Resource          ../../../resources/variables/GLOBAL_VARIABLES.robot
Resource          ../../../resources/variables/User_credentials.robot
Resource          ../../../resources/keywords/Login_actions.robot
Resource          ../../../resources/keywords/Applicant_actions.robot

*** Variables ***
${ASSESSOR_DASHBOARD}    ${SERVER}/assessor/dashboard
${ASSESSOR_COPMETITIONS_DETAILS}    ${SERVER}/assessor/competitions/1/applications
${ASSESSOR_REVIEW_APPLICATION}    ${SERVER}/assessor/competitions/1/applications/4
${ASSESSOR_DETAILS_PAGE}    ${SERVER}/assessor/competitions/1/applications/3
${404_error_messsage}    Page or resource not found

*** Test Cases ***
Guest user can't access the Assessor's dashboard page
    [Documentation]    INFUND-1683
    Given the guest user opens the browser
    #When the user enters the url of the assessors dashboard page
    When User navigates to the page    ${ASSESSOR_DASHBOARD}
    #Then the user should get the log-in page
    Then user should be redirected to the correct page    ${LOGIN_URL}

Guest user can't access the competitions details page
    [Documentation]    INFUND-1683
    Given the guest user opens the browser
    #When the user enters the url of the competitions details page
    When User navigates to the page    ${ASSESSOR_COPMETITIONS_DETAILS}
    #Then the user should get the log-in page
    Then user should be redirected to the correct page    ${LOGIN_URL}

Guest user can't access assessor's review application page
    [Documentation]    INFUND-1683
    Given the guest user opens the browser
    #When the user enters the url of the assessors review application page
    When User navigates to the page    ${ASSESSOR_REVIEW_APPLICATION}
    #Then the user should get the log-in page
    Then user should be redirected to the correct page    ${LOGIN_URL}

Guest user can't access the Assessors details page
    [Documentation]    INFUND-1683
    Given the guest user opens the browser
    #When the user enters the url of the Assessors details page
    When User navigates to the page    ${ASSESSOR_DETAILS_PAGE}
    #Then the user should get the log-in page
    Then user should be redirected to the correct page    ${LOGIN_URL}

Applicant can't access Assessor's dashboard page
    [Documentation]    INFUND-1683
    [Tags]    Pending
    #Pending infund-1753
    #Given the user is logged in as applicant
    Given guest user log-in    &{collaborator2_credentials}
    #When the user enters the url of the assessors dashboard page
    When User navigates to the page    ${ASSESSOR_DASHBOARD}
    Then User should get an error page    Oops, something went wrong

Applicant can't access the competitions details page
    [Documentation]    INFUND-1683
    [Tags]    Pending
    #Pending infund-1753
    #Given the user is logged in as applicant
    Given guest user log-in    &{collaborator2_credentials}
    #When the user enters the url of the competitions details page
    When User navigates to the page    ${ASSESSOR_COPMETITIONS_DETAILS}
    Then User should get an error page    Oops, something went wrong

Applicant can't access the Assessor's review application page
    [Documentation]    INFUND-1683
    #Given the user is logged in as applicant
    Given guest user log-in    &{collaborator2_credentials}
    #When the user enters the url of the assessors review application page
    When User navigates to the page    ${ASSESSOR_REVIEW_APPLICATION}
    # Then User should get an error page    Oops, something went wrong
    Then the user can see a custom error message

Applicant can't access the Assessor's details page
    [Documentation]    INFUND-1683
    #Given the user is logged in as applicant
    Given guest user log-in    &{collaborator2_credentials}
    #When the user enters the url of the Assessors details page
    When User navigates to the page    ${ASSESSOR_DETAILS_PAGE}
    Then the user can see a custom error message

*** Keywords ***

the user can see a custom error message
    Page Should Contain         ${404_error_messsage}
#the user enters the url of the assessors dashboard page
#   go to    ${ASSESSOR_DASHBOARD}
{'fraction_non_alphanumeric': 0.05840407470288625, 'fraction_numerical': 0.012676853423882287, 'mean_word_length': 3.3960199004975125, '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': '426349', 'n_tokens_mistral': 2626, 'n_tokens_neox': 2454, 'n_words': 1032}