Commit 6ff761d4 authored by Georges Racinet's avatar Georges Racinet 🌳
Browse files

Minor UI changes for GitLab 13.11

parent 865c143a5f15
Pipeline #22751 passed with stage
in 45 minutes and 2 seconds
......@@ -384,11 +384,14 @@ def test_external_user_can_create_project(test_group, external_user):
# The default selected namespace is test_group
# (hoping its id won't change too much with GitLab versions)
default_namespace_id = 'select2-chosen-1'
namespace_select_id = 'project_namespace_id'
WebDriverWait(webdriver, 10).until(
lambda d: d.find_element_by_id(default_namespace_id).is_displayed)
default_namespace = webdriver.find_element_by_id(default_namespace_id)
assert default_namespace.text.strip() == test_group.path
lambda d: d.find_element_by_id(namespace_select_id).is_displayed)
namespace_select = webdriver.find_element_by_id(namespace_select_id)
selected = namespace_select.find_element_by_xpath(
'.//option[@selected="selected"]')
assert selected.get_attribute('data-name').strip() == test_group.path
project = None
try:
......
......@@ -95,12 +95,19 @@ def test_pipeline_pages_artifacts(test_project, tmpdir):
# visit pipeline list and page
webdriver = test_project.owner_webdriver
webdriver.get(test_project.url + '/-/pipelines')
# The Selenium webdriver is small enough to be considered mobile
# Because of that, the column with pipeline IDs is not displayed
# (even if the element is there, it is empty)
pipeline_url = test_project.url + '/-/pipelines/%s' % pipeline_id
wait = WebDriverWait(webdriver, 10)
span = wait.until(lambda d: d.find_element_by_css_selector(
'span.pipeline-id'))
assert span.text.strip() == '#%d' % pipeline_id
link = wait.until(
lambda d: d.find_element_by_css_selector('a.ci-status'))
assert link.get_attribute('href') == pipeline_url
link.click() # does not sent to the pipeline page
webdriver.get(pipeline_url)
webdriver = test_project.owner_webdriver
webdriver.get(test_project.url + '/-/pipelines/%s' % pipeline_id)
assert '(500)' not in webdriver.title
assert '(503)' not in webdriver.title
......@@ -525,13 +525,13 @@ class Project(object):
project_name=self.name,
qs=urlencode(compare_qs),
))
assert 'New Merge Request' in driver.title
assert 'new merge request' in driver.title.lower()
assert self.name in driver.title
wait = WebDriverWait(driver, 10)
wait.until(could_click_element(lambda d: d.find_element_by_xpath(
'//input[@type="submit" '
'and @value="Submit merge request"]')
'and @value="Create merge request"]')
))
split_url = driver.current_url.rsplit('/', 2)
......
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