Bug 1017496 - user and group typeaheads do not work when web UI is mounted at /bkr prefix (404 for /users/+typeahead)
user and group typeaheads do not work when web UI is mounted at /bkr prefix (...
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: web UI (Show other bugs)
0.15
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 0.15.1
: ---
Assigned To: Dan Callaghan
tools-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-09 23:34 EDT by Dan Callaghan
Modified: 2013-10-23 02:59 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-23 02:59:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dan Callaghan 2013-10-09 23:34:20 EDT
Description of problem:
The user and group typeaheads use hardcoded URLs of /users/+typeahead and /groups/+typeahead respectively, ignoring any server.webpath prefix for the web UI (by default this is /bkr).

Version-Release number of selected component (if applicable):
0.15.0

How reproducible:
on new installs and in dogfood jobs

Steps to Reproduce:
1. Install Beaker at the default prefix of /bkr
2. Go to the Access Policy tab for a system, type a username or group name

Actual results:
No typeahead suggestions appear, user/group cannot be added to the policy.

Expected results:
Typeaheads appear, user/group can be added to the policy.

Additional info:
This has been failing in the dogfood jobs the entire time but for some reason I had written the failure off as a timing issue:

======================================================================
ERROR: test_add_rule_for_new_user (bkr.inttest.server.selenium.test_system_access_policies.SystemAccessPolicyWebUITest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/bkr/inttest/server/selenium/test_system_access_policies.py", line 152, in test_add_rule_for_new_user
    self.find_checkbox('marple', 'Edit this policy').click()
  File "/usr/lib/python2.6/site-packages/bkr/inttest/server/selenium/test_system_access_policies.py", line 59, in find_checkbox
    row_elem = pane.find_element_by_xpath('.//table/tbody/tr[./*[1]/text()="%s"]' % row)
  File "/usr/lib64/python2.6/site-packages/selenium/webdriver/remote/webelement.py", line 120, in find_element_by_xpath
    return self.find_element(by=By.XPATH, value=xpath)
  File "/usr/lib64/python2.6/site-packages/selenium/webdriver/remote/webelement.py", line 235, in find_element
    {"using": by, "value": value})['value']
  File "/usr/lib64/python2.6/site-packages/selenium/webdriver/remote/webelement.py", line 228, in _execute
    return self._parent.execute(command, params)
  File "/usr/lib64/python2.6/site-packages/selenium/webdriver/remote/webdriver.py", line 165, in execute
    self.error_handler.check_response(response)
  File "/usr/lib64/python2.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 164, in check_response
    raise exception_class(message, screen, stacktrace)
NoSuchElementException: Message: u'Unable to locate element: {"method":"xpath","selector":".//table/tbody/tr[./*[1]/text()=\\"marple\\"]"}' ; Stacktrace: 
    at <anonymous> (file:///tmp/tmpheUZxO/extensions/fxdriver@googlecode.com/components/driver_component.js:8880)
    at <anonymous> (file:///tmp/tmpheUZxO/extensions/fxdriver@googlecode.com/components/driver_component.js:396)
Comment 1 Dan Callaghan 2013-10-10 00:30:04 EDT
On Gerrit: http://gerrit.beaker-project.org/2344
Comment 6 wangjing 2013-10-15 03:30:28 EDT
verified on beaker-qe env(beaker-server-0.15.0-1.git.23.4a69b21.el6eng)-->pass

Steps:
1. Install Beaker at the default prefix of /bkr
2. Go to the Access Policy tab for a system, type a username or group name

Actual results:
same as expected results.

Expected results:
Typeaheads appear, user/group can be added to the policy.
Comment 7 Raymond Mancy 2013-10-23 02:59:47 EDT
beaker 0.15.1 has been released.

Note You need to log in before you can comment on or make changes to this bug.