features.steps.common_steps

File for steps which are used more often across multiple feature files.

Attributes

Functions

step_tpc_web_running(context)

Verifies that the TPC_Web application is running.

step_domain_exists(context, domain_name)

commentary_step(context)

Provides annotation "@Commentary" inside feature files for additional text explanation.

step_admin_logged_in(context)

Logs the admin user into the TPC_Web interface.

step_confirmation_message(context, confirm_message)

Verifies that the system displays a success message after an action.

step_error_message(context, error_message)

Verifies that the system displays a specific error message.

step_api_client_authenticated(context)

Authenticates the API client to enable authorized interactions with the REST API.

step_verify_status_code(context, status_code)

Verifies the API response status code.

step_verify_error_message(context, error_message)

Verifies the response payload includes the specified error message.

step_when_admin_click_button(context, button_name)

Simulates click on given button.

step_navigate_add_device(context, page_name)

Navigates to the given page.

Module Contents

features.steps.common_steps.HTTP_OK = 200[source]
features.steps.common_steps.logger[source]
features.steps.common_steps.step_tpc_web_running(context)[source]

Verifies that the TPC_Web application is running.

This step checks that the TPC_Web application is running and accessible at the expected URL.

Parameters:

context (behave.runner.Context) – the behave context

Return type:

None

features.steps.common_steps.step_domain_exists(context, domain_name)[source]

.

Parameters:
  • context (behave.runner.Context) – the behave context

  • domain_name (str) – a domain name

Return type:

None

features.steps.common_steps.commentary_step(context)[source]

Provides annotation “@Commentary” inside feature files for additional text explanation.

Parameters:

context (behave.runner.Context) – the behave context

Return type:

None

features.steps.common_steps.step_admin_logged_in(context)[source]

Logs the admin user into the TPC_Web interface.

This step sets up the initial state for all scenarios, ensuring the admin is authenticated and on the TPC_Web dashboard.

Parameters:

context (behave.runner.Context) – the behave context

Return type:

None

features.steps.common_steps.step_confirmation_message(context, confirm_message)[source]

Verifies that the system displays a success message after an action.

Parameters:
  • context (behave.runner.Context) – the behave context

  • confirm_message (str)

Return type:

None

features.steps.common_steps.step_error_message(context, error_message)[source]

Verifies that the system displays a specific error message.

Parameters:
  • context (behave.runner.Context) – the behave context

  • error_message (str) – The expected error message text.

Return type:

None

features.steps.common_steps.step_api_client_authenticated(context)[source]

Authenticates the API client to enable authorized interactions with the REST API.

Parameters:

context (behave.runner.Context) – the behave context

Return type:

None

features.steps.common_steps.step_verify_status_code(context, status_code)[source]

Verifies the API response status code.

Parameters:
  • context (behave.runner.Context) – the behave context

  • status_code (str) – The expected status code.

Return type:

None

features.steps.common_steps.step_verify_error_message(context, error_message)[source]

Verifies the response payload includes the specified error message.

Parameters:
  • context (behave.runner.Context) – the behave context

  • error_message (str) – The expected error message text.

Return type:

None

features.steps.common_steps.step_when_admin_click_button(context, button_name)[source]

Simulates click on given button.

Parameters:
  • context (behave.runner.Context) – the behave context

  • error_message (str) – The expected error message text.

  • button_name (str)

Return type:

None

features.steps.common_steps.step_navigate_add_device(context, page_name)[source]

Navigates to the given page.

Parameters:
  • context (runner.Context) – Behave context.

  • page_name (str) – Page name.

Return type:

None