-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add #50 Add BDD test for user records feature
- Loading branch information
1 parent
a75b38f
commit c63f244
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |