Skip to content

Commit

Permalink
Add #32 Add BDD test for login
Browse files Browse the repository at this point in the history
  • Loading branch information
albinpa authored and georgepadayatti committed Nov 2, 2023
1 parent b701f2c commit f22a206
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/gherkin/behave.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[behave]
paths = features/


2 changes: 2 additions & 0 deletions test/gherkin/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
behave
requests
23 changes: 23 additions & 0 deletions test/gherkin/steps/login.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from behave import *
import requests


@given("an organization admin for Data4Diabetes organization")
def step_impl(context):
pass


@when("the admin logs into the Admin dashboard")
def step_impl(context):
data = {
"username": "[email protected]",
"password": "qwerty123",
}
url = "https://staging-consent-bb-api.igrant.io/v2" + "/onboard/admin/login"
response = requests.post(url, json=data)
context.response = response


@then("the admin should be able to access pages in the admin dashboard")
def step_impl(context):
assert context.response.status_code == 200

0 comments on commit f22a206

Please sign in to comment.