Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add #50 Add BDD test for user records feature #56

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions test/gherkin/steps/user_records.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
from behave import *
import requests
import json

@when("the admin views the list of consent records")
def list_consent_records(context):
base_url = context.config.userdata.get("base_url")
headers = {"Authorization": f"Bearer {context.access_token}"}
url = base_url + "/audit/consent-records"
response = requests.get(url, verify=False, headers=headers)
context.response = response


@then("the admin should see a paginated list of consent records")
def is_list_of_consent_records(context):
assert context.response.status_code == 200


@when("the admin clicks the eye icon in the actions column of a consent record")
def step_impl(context):
pass


@then("the admin should be able to see the corresponding data agreement")
def step_impl(context):
pass


@when("the admin filters consent records to see all consent records")
def view_consent_records(context):
base_url = context.config.userdata.get("base_url")
headers = {"Authorization": f"Bearer {context.access_token}"}
url = base_url + "/audit/consent-records"
response = requests.get(url, verify=False, headers=headers)
context.response = response


@then("the admin should see a list of all consent records")
def is_list_of_consent_records(context):
assert context.response.status_code == 200


@when("the admin filters consent records by the purpose of the data agreement")
def step_impl(context):
pass


@then("the admin should see a filtered list of consent records")
def step_impl(context):
pass


@when("the admin filters consent records by lawful bases (GDPR)")
def step_impl(context):
pass


@when("the admin uses the free search bar to search for consent records by Data Agreement ID")
def step_impl(context):
pass

@then("the admin should see the relevant consent records")
def step_impl(context):
pass


@when("the admin uses the free search bar to search for consent records by Consent Record ID")
def step_impl(context):
pass


@when("the admin uses the free search bar to search for consent records by Individual ID")
def step_impl(context):
pass
Loading