Skip to content
Snippets Groups Projects
Verified Commit a43edc9b authored by Varac's avatar Varac
Browse files

Remove keycloak specific behave parts

parent 9404c0ef
No related branches found
No related tags found
No related merge requests found
......@@ -22,13 +22,6 @@ def save_screenshot(context, step):
def before_all(context):
"""Run at the very beginning."""
userdata = context.config.userdata
context.keycloak = {}
context.keycloak['admin'] = {}
context.keycloak['admin']['url'] = userdata.get('keycloak.admin.url')
context.keycloak['admin']['username'] = \
userdata.get('keycloak.admin.username', 'keycloak')
context.keycloak['admin']['password'] = \
userdata.get('keycloak.admin.password')
headless = userdata.get('headless', 'False')
......
Feature: Test keycloak admin login
As an OAS admin
I want to be able to login to the keycloak admin console
Scenario: Open keycloak admin console
Given the title is not "Log in to Keycloak"
When I open the keycloak admin console url
Then I wait on element "input#username" for 25000ms to be visible
And I expect that the title is "Log in to Keycloak"
Scenario: Login to keycloak
Given the title is "Log in to Keycloak"
When I enter the "keycloak" "admin" "username" in the inputfield "input#username"
When I enter the "keycloak" "admin" "password" in the inputfield "input#password"
And I click on the button "input#kc-login"
Then I wait on element "input#displayName" for 25000ms to be visible
......@@ -4,13 +4,6 @@ from behave import given, when
from behave_webdriver.steps import *
@when(u'I open the keycloak admin console url')
@given(u'I open the keycloak admin console url')
def step_impl(context):
"""Login to the keycloak admin console."""
context.behave_driver.get(context.keycloak['admin']['url'])
@when(u'I enter the "{section}" "{user}" "{cred_type}" in the inputfield "{element}"')
def step_impl(context, section, user, cred_type, element):
"""Enter username/password into login inputfields."""
......
......@@ -262,16 +262,9 @@ def write_behave_config(settings=None):
if settings is None:
with open(SETTINGS_FILE) as stream:
settings = yaml.safe_load(stream)
# with open('./secrets/keycloak_admin_password', 'r') as stream:
# keycloak_admin_password = yaml.safe_load(stream)
behave_config = configparser.ConfigParser()
behave_config['behave'] = {'stop': True}
behave_config['behave.userdata'] = {}
behave_config['behave.userdata']['keycloak.admin.url'] = \
'https://auth.{}/auth/admin/master/console/'.format(settings['domain'])
behave_config['behave.userdata']['keycloak.admin.username'] = 'keycloak'
# behave_config['behave.userdata']['keycloak.admin.password'] = \
# keycloak_admin_password
with open('./behave/behave.ini', 'w') as configfile:
behave_config.write(configfile)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment