Source code for features.steps.f_001_steps

"""Python steps for F_001."""

from behave import given, runner, then, when


@given('the user is an NTEU with username {username} and password {password}')
[docs] def step_given_nteu_credentials(context: runner.Context, username: str, password: str) -> None: # noqa: ARG001 """Sets up NTEU login credentials. Args: context (runner.Context): The Behave context. username (str): The NTEU username. password (str): The NTEU password. Returns: None """ msg = f'STEP: Given the user is an NTEU with username {username} and password {password}' raise AssertionError(msg)
@when('the user attempts to log in')
[docs] def step_when_user_attempts_login(context: runner.Context) -> None: # noqa: ARG001 """Simulates an NTEU attempting to log in. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: When the user attempts to log in' raise AssertionError(msg)
@then('login should be {login_outcome}')
[docs] def step_then_login_outcome(context: runner.Context, login_outcome: str) -> None: # noqa: ARG001 """Verifies the login outcome. Args: context (runner.Context): The Behave context. login_outcome (str): The expected login outcome. Returns: None """ msg = f'STEP: Then login should be {login_outcome}' raise AssertionError(msg)
@given('the NTEU is logged in')
[docs] def step_given_nteu_logged_in(context: runner.Context) -> None: # noqa: ARG001 """Ensures the NTEU is logged into the system. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: Given the NTEU is logged in' raise AssertionError(msg)
@when('the NTEU navigates to the identity creation page')
[docs] def step_when_nteu_navigates_to_identity_creation(context: runner.Context) -> None: # noqa: ARG001 """Simulates NTEU navigating to the identity creation page. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: When the NTEU navigates to the identity creation page' raise AssertionError(msg)
@when('the NTEU enters valid identity details')
[docs] def step_when_nteu_enters_identity_details(context: runner.Context) -> None: # noqa: ARG001 """Simulates NTEU entering valid identity details. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: When the NTEU enters valid identity details' raise AssertionError(msg)
@when('submits the form')
[docs] def step_when_nteu_submits_form(context: runner.Context) -> None: # noqa: ARG001 """Simulates NTEU submitting a form. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: When submits the form' raise AssertionError(msg)
@then('the identity should be successfully created')
[docs] def step_then_identity_created(context: runner.Context) -> None: # noqa: ARG001 """Verifies that the identity was created successfully. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: Then the identity should be successfully created' raise AssertionError(msg)
@when('the NTEU navigates to the identity list')
[docs] def step_when_nteu_navigates_to_identity_list(context: runner.Context) -> None: # noqa: ARG001 """Simulates NTEU navigating to the identity list. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: When the NTEU navigates to the identity list' raise AssertionError(msg)
@when('selects an identity')
[docs] def step_when_nteu_selects_identity(context: runner.Context) -> None: # noqa: ARG001 """Simulates NTEU selecting an identity. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: When selects an identity' raise AssertionError(msg)
@then('the identity details should be displayed')
[docs] def step_then_identity_details_displayed(context: runner.Context) -> None: # noqa: ARG001 """Verifies that identity details are displayed. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: Then the identity details should be displayed' raise AssertionError(msg)
@when('the NTEU edits the identity details')
[docs] def step_when_nteu_edits_identity(context: runner.Context) -> None: # noqa: ARG001 """Simulates NTEU editing identity details. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: When the NTEU edits the identity details' raise AssertionError(msg)
@then('the identity should be updated successfully')
[docs] def step_then_identity_updated(context: runner.Context) -> None: # noqa: ARG001 """Verifies that the identity was updated successfully. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: Then the identity should be updated successfully' raise AssertionError(msg)
@when('the NTEU deletes the identity')
[docs] def step_when_nteu_deletes_identity(context: runner.Context) -> None: # noqa: ARG001 """Simulates NTEU deleting an identity. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: When the NTEU deletes the identity' raise AssertionError(msg)
@then('the identity should be removed')
[docs] def step_then_identity_removed(context: runner.Context) -> None: # noqa: ARG001 """Verifies that the identity was removed. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: Then the identity should be removed' raise AssertionError(msg)
@when('the NTEU starts the device onboarding process')
[docs] def step_when_nteu_starts_onboarding(context: runner.Context) -> None: # noqa: ARG001 """Simulates NTEU initiating device onboarding. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: When the NTEU starts the device onboarding process' raise AssertionError(msg)
@then('the system should automatically use a zero-touch onboarding protocol')
[docs] def step_then_system_uses_zto_protocol(context: runner.Context) -> None: # noqa: ARG001 """Verifies that the system uses a zero-touch onboarding protocol. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: Then the system should automatically use a zero-touch onboarding protocol' raise AssertionError(msg)
@then('the onboarding process should complete successfully')
[docs] def step_then_onboarding_successful(context: runner.Context) -> None: # noqa: ARG001 """Verifies that the onboarding process completes successfully. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: Then the onboarding process should complete successfully' raise AssertionError(msg)
@given('a digital identity exists')
[docs] def step_given_digital_identity_exists(context: runner.Context) -> None: # noqa: ARG001 """Assesses whether a digital identity exists. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: Given a digital identity exists' raise AssertionError(msg)
@given('the NTEU is on any action page')
[docs] def step_given_nteu_is_on_any_action_page(context: runner.Context) -> None: # noqa: ARG001 """Verifies that the NTEU is on any action page. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: Given the NTEU is on any action page' raise AssertionError(msg)
@when('the NTEU enters invalid information')
[docs] def step_when_nteu_enters_invalid_information(context: runner.Context) -> None: # noqa: ARG001 """Simulates NTEU entering invalid information. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: When the NTEU enters invalid information' raise AssertionError(msg)
@then('the system should display a clear error message')
[docs] def step_then_system_should_display_clear_error_msg(context: runner.Context) -> None: # noqa: ARG001 """Verifies that the system displays a clear error message. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: Then the system should display a clear error message' raise AssertionError(msg)
@then('provide guidance for correction')
[docs] def step_then_provide_guidance_for_correction(context: runner.Context) -> None: # noqa: ARG001 """Verifies that the system provides guidance for correction. Args: context (runner.Context): The Behave context. Returns: None """ msg = 'STEP: Then provide guidance for correction' raise AssertionError(msg)