Commit 3923c0f9 authored by Swergas's avatar Swergas

edit DOM of another page, for better CSS selector in picking the election to administer

parent 8e4bb068
......@@ -102,7 +102,7 @@ let base ~title ?login_box ~content ?(footer = div []) ?uuid () =
| None ->
a ~service:admin [pcdata L.administer_elections] ()
| Some uuid ->
a ~service:election_admin [pcdata L.administer_this_election] uuid
a ~service:election_admin ~a:[a_id ("election_admin_" ^ (raw_string_of_uuid uuid))] [pcdata L.administer_this_election] uuid
in
let login_box = match login_box with
| None ->
......@@ -182,12 +182,12 @@ let privacy_notice cont =
let format_election (uuid, name) =
li [
a ~service:election_admin [pcdata name] uuid;
a ~service:election_admin ~a:[a_id ("election_admin_" ^ (raw_string_of_uuid uuid))] [pcdata name] uuid;
]
let format_draft_election (uuid, name) =
li [
a ~service:election_draft [pcdata name] uuid;
a ~service:election_draft ~a:[a_id ("election_draft_" ^ (raw_string_of_uuid uuid))] [pcdata name] uuid;
]
let admin ~elections () =
......
......@@ -221,7 +221,7 @@ pris en compte.
# She selects the election that she wants to edit
browser = self.browser
election_to_edit_css_selector = "#main li a[href^='election/admin?uuid=']"
election_to_edit_css_selector = "#election_admin_" + str(self.election_id)
election_to_edit_elements = wait_for_elements_exist(browser, election_to_edit_css_selector, settings.EXPLICIT_WAIT_TIMEOUT)
assert len(election_to_edit_elements) > 0
election_to_edit_elements[0].click()
......
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