This instance will be upgraded to Heptapod 0.26.0rc1 on 2021-10-25 at 14:00 UTC+2 (a few minutes of down time)

Commit ee54f3d8 authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Heptapod: removed the get_user_webdriver() method

It had become frankly redundant, removing it makes it
clearer that the `User.webdriver` property is what callers
should use.
parent bbbe50896671
Pipeline #18579 passed with stages
in 20 minutes and 9 seconds
......@@ -15,7 +15,7 @@ def assert_webdriver_get(webdriver, url):
def test_help_page(heptapod):
webdriver = heptapod.get_user_webdriver('test_basic')
webdriver = heptapod.get_user('test_basic').webdriver
webdriver.get(heptapod.url + '/help')
assert '500' not in webdriver.title
......@@ -43,7 +43,7 @@ def test_help_page_anonymous(heptapod):
def test_admin_views(heptapod):
webdriver = heptapod.get_user_webdriver('root')
webdriver = heptapod.get_user('root').webdriver
for slug in (
'application_settings/general',
'users',
......
......@@ -158,9 +158,6 @@ class Heptapod:
else:
return selenium.webdriver.Chrome(options=options)
def get_user_webdriver(self, user_name):
return self.users[user_name].webdriver
def wait_startup(self, first_response_timeout=INITIAL_TIMEOUT,
wait_after_first_response=None):
"""Wait for Heptapod to be ready after startup.
......
......@@ -182,7 +182,7 @@ class Project(object):
@property
def owner_webdriver(self):
return self.heptapod.get_user_webdriver(self.owner)
return self.owner_user.webdriver
@property
def relative_uri(self):
......@@ -935,7 +935,7 @@ class Project(object):
"""Create a new project with the webdriver for given user
"""
group = UserNameSpace(heptapod=heptapod, user_name=user_name)
driver = heptapod.get_user_webdriver(user_name)
driver = heptapod.get_user(user_name).webdriver
driver.get('{url}/projects/new'.format(url=heptapod.url))
cls.webdriver_new_project_submit(driver, project_name)
project = cls.api_retrieve(heptapod, user_name, group, project_name)
......
......@@ -314,7 +314,7 @@ class User(object):
heptapod = self.heptapod
start = time.time()
webdriver = heptapod.get_user_webdriver(self.name)
webdriver = self.webdriver
webdriver.get(heptapod.url + '/profile/personal_access_tokens')
name_elt = webdriver.find_element_by_xpath(
'//input[@name="personal_access_token[name]"]')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment