def remove_param_from_pytest_node_str_id(test_id, param_id_str):
    """
    Returns a new test id where the step parameter is not present anymore.

    :param test_id:
    :param param_id_str:
    :return:
    """
    new_id = test_id.replace('-' + param_id_str + '-', '-', 1)
    if len(new_id) == len(test_id):
        new_id = test_id.replace('[' + param_id_str + '-', '[', 1)
    if len(new_id) == len(test_id):
        new_id = test_id.replace('-' + param_id_str + ']', ']', 1)
    return new_id
