From: Tom Hughes Date: Sat, 2 Feb 2013 11:00:46 +0000 (+0000) Subject: Merge branch 'master' into notes X-Git-Tag: live~5791^2~48 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/56db9ca2b7e2475cd8025630049fb4a4b824f2d9?hp=-c Merge branch 'master' into notes --- 56db9ca2b7e2475cd8025630049fb4a4b824f2d9 diff --combined app/assets/javascripts/index.js index dc5c40bf2,e96ffbf02..7c80b0108 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@@ -2,10 -2,9 +2,10 @@@ //= require index/browse //= require index/export //= require index/key +//= require index/notes $(document).ready(function () { - var permalinks = $("#permalink").html(); + var permalinks = $("#permalink").detach().html(); var marker; var params = OSM.mapParams(); var map = createMap("map"); @@@ -66,10 -65,10 +66,10 @@@ }); function updateLocation() { - var center = map.getCenter(); + var center = map.getCenter().wrap(); var zoom = map.getZoom(); var layers = getMapLayers(); - var extents = map.getBounds(); + var extents = map.getBounds().wrap(); updatelinks(center.lng, center.lat, diff --combined app/assets/stylesheets/common.css.scss index dd9b3bbcb,e57db18ce..5fe4ec97b --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@@ -469,7 -469,7 +469,7 @@@ table .site-index #tabnav a#viewanchor, .site-edit #tabnav a#editanchor, - .changeset_list #tabnav a#historyanchor, + .changeset-list #tabnav a#historyanchor, .site-export #tabnav a#exportanchor { border-bottom: 1px solid #aaa; background: #9ed485; @@@ -537,12 -537,6 +537,12 @@@ background:#fff; } +.leaflet-control-attribution a.disabled { + color: #99c9dc; + cursor: default; + text-decoration: none; +} + .site-index .leaflet-top, .site-export .leaflet-top { top: 10px !important; @@@ -556,12 -550,6 +556,12 @@@ left: 10px !important; } +.leaflet-popup-scrolled { + padding-right: 20px; + border-bottom: 0px !important; + border-top: 0px !important; +} + /* Rules for edit menu */ .menuicon { @@@ -789,6 -777,15 +789,15 @@@ ul.results-list li { border-bottom: 1p top: 30px; } + #content.maximised { + top: 0; + left: 0; + right: 0; + bottom: 0; + border: 0; + z-index: 1000; + } + #slim_container { width: 100%; } @@@ -805,12 -802,16 +814,16 @@@ #slim_content { margin: 10px; - margin-top: 90px; + margin-top: 95px; max-width: 50em; + + .content-heading { + margin-bottom: 15px; + } } #slim_header { - margin: 10px; + margin: 30px 10px; position: absolute; top: 0px; margin-right: 5px; @@@ -891,7 -892,7 +904,7 @@@ } } .selected { - background-color: rgb(255, 255, 160); + background: #FFFFC0; } .date, .user { @@@ -927,10 -928,6 +940,10 @@@ p, ul, .bbox { margin-left: 33.3333%; } + ul p { + margin-left: 0; + margin-bottom: 0; + } h4 { width: 33.3333%; float: left; @@@ -1021,6 -1018,7 +1034,7 @@@ } .activity-block { + clear: left; border-bottom: 1px solid #ccc; padding-bottom: 20px; float: left; @@@ -1139,15 -1137,7 +1153,7 @@@ } ul, ol { - margin-bottom: 20px; font-style: italic; - margin-left: 20px; - } - ul li { - list-style: disc; - } - ol li { - list-style: decimal; } ul.secondary-actions { display: inline-block;} } @@@ -1436,8 -1426,8 +1442,8 @@@ textarea /* Rules for user images */ img.user_image { - width: 100px; - height: 100px; + max-width: 100px; + max-height: 100px; border: 1px solid #ccc; margin-bottom: 20px; float: left; @@@ -1445,8 -1435,8 +1451,8 @@@ } img.user_thumbnail { - width: 50px; - height: 50px; + max-width: 50px; + max-height: 50px; border: 1px solid #ccc; margin-right: 20px; } @@@ -1499,18 -1489,6 +1505,6 @@@ ul.secondary-actions padding-left: 0; } } - .hidden li, - .hide_unless_logged_in li, - .hide_unless_administrator li { - border-left: 1px solid #ccc; - padding-left: 5px; - } - .hidden:first-child li, - .hide_unless_logged_in:first-child li, - .hide_unless_administrator:first-child li { - border-left: 0; - padding-left: 0; - } } /* Utility for managing inner content areas */ @@@ -1548,6 -1526,7 +1542,7 @@@ a.button.submit background-color: #9ed485; } } + /* Rules for doing distinct colour of alternate table rows */ .table0, @@@ -1567,81 -1546,82 +1562,105 @@@ border: 0; } + /* Rules for rich text */ + + .richtext { + ul, + ol { + margin-bottom: 20px; + margin-left: 20px; + } + ul li { + list-style: disc; + } + + ol li { + list-style: decimal; + } + } + /* Rules for rich text editors */ .richtext_container { white-space: nowrap; + .richtext_content { display: inline-block; vertical-align: top; + .richtext_preview { display: inline-block; padding: 20px; background-color: #f4f4ff; white-space: normal; + &.loading { background-image: image-url("loading.gif"); background-repeat: no-repeat; background-position: center; } + > :first-child { margin-top: 0px; } } } + .richtext_help { display: inline-block; vertical-align: top; margin-left: 15px; background-color: #f8f8ff; padding: 20px; + p { margin: 0px; } + th { vertical-align: top; text-align: left; padding: 0px 15px 0px 0px !important; } - table > thead th { - font-weight: bold; - } + td { font-family: fixed; line-height: 16px; text-align: left; padding: 0px !important; } + input.richtext_doedit { margin-top: 5px !important; margin-right: 10px !important; } + input.richtext_dopreview { margin-top: 5px !important; margin-left: 10px !important; } } } + +/* Rules for the notes interface */ + +.note { + .comment_body { + margin-top: 4px; + margin-bottom: 4px; + + p { + margin-top: 0px; + margin-bottom: 0px; + } + } + + .comment { + width: 100%; + } + + .buttons { + margin-top: 5px; + text-align: right; + } +} diff --combined app/helpers/application_helper.rb index 7aae6b777,49608c4a0..9676e6ee1 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@@ -20,12 -20,12 +20,12 @@@ module ApplicationHelpe def style_rules css = "" - css << ".hidden { display: none }"; - css << ".hide_unless_logged_in { display: none }" unless @user; - css << ".hide_if_logged_in { display: none }" if @user; - css << ".hide_if_user_#{@user.id} { display: none }" if @user; - css << ".show_if_user_#{@user.id} { display: inline }" if @user; - css << ".hide_unless_administrator { display: none }" unless @user and @user.administrator?; + css << ".hidden { display: none !important }"; + css << ".hide_unless_logged_in { display: none !important }" unless @user; + css << ".hide_if_logged_in { display: none !important }" if @user; + css << ".hide_if_user_#{@user.id} { display: none !important }" if @user; + css << ".show_if_user_#{@user.id} { display: inline !important }" if @user; + css << ".hide_unless_administrator { display: none !important }" unless @user and @user.administrator?; return content_tag(:style, css, :type => "text/css") end @@@ -77,7 -77,7 +77,7 @@@ content_tag(:div, :id => "#{id}_container", :class => "richtext_container") do output_buffer << content_tag(:div, :id => "#{id}_content", :class => "richtext_content") do output_buffer << text_area(object_name, method, options.merge("data-preview-url" => preview_url(:format => format))) - output_buffer << content_tag(:div, "", :id => "#{id}_preview", :class => "richtext_preview") + output_buffer << content_tag(:div, "", :id => "#{id}_preview", :class => "richtext_preview richtext") end output_buffer << content_tag(:div, :id => "#{id}_help", :class => "richtext_help") do @@@ -95,16 -95,4 +95,16 @@@ I18n.t("html.dir") end end + + def friendly_date(date) + content_tag(:span, time_ago_in_words(date), :title => l(date, :format => :friendly)) + end + + def note_author(object, link_options = {}) + if object.author.nil? + "" + else + link_to h(object.author.display_name), link_options.merge({:controller => "user", :action => "view", :display_name => object.author.display_name}) + end + end end diff --combined app/views/browse/_map.html.erb index cf59a4679,c72040955..e0428b4ac --- a/app/views/browse/_map.html.erb +++ b/app/views/browse/_map.html.erb @@@ -2,7 -2,7 +2,7 @@@
- <% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible %> + <% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible? %> <% content_for :head do %> <%= javascript_include_tag "browse" %> @@@ -19,12 -19,6 +19,12 @@@ :maxlon => bbox.max_lon, :maxlat => bbox.max_lat } + elsif map.instance_of? Note + data = { + :type => "note", + :lon => map.lon, + :lat => map.lat + } else data = { :type => map.class.name.downcase, @@@ -39,20 -33,13 +39,20 @@@ - <% unless map.instance_of? Changeset %> + <% unless map.instance_of? Changeset or map.instance_of? Note %>
-
<%= @this_user.description.to_html %>
+
<%= @this_user.description.to_html %>
diff --combined config/locales/de.yml index 74f3cc499,4f018b59e..1aa59411e --- a/config/locales/de.yml +++ b/config/locales/de.yml @@@ -191,7 -191,7 +191,7 @@@ de way: Der Weg paging_nav: of: von - showing_page: Zeige Seite + showing_page: Seite redacted: message_html: "Version %{version} dieses %{type}s kann nicht angezeigt werden. Weitere Informationen sind hier angegeben: %{redaction_link}." redaction: Ausgabe %{id} @@@ -231,7 -231,7 +231,7 @@@ manually_select: Einen anderen Kartenausschnitt manuell auswählen object_list: api: Diesen Bereich von der API abfragen - back: Objektliste anzeigen + back: Zurück zur Objektliste details: Details heading: Objektliste history: @@@ -273,8 -273,8 +273,8 @@@ way_title: "Weg: %{way_name}" way_details: also_part_of: - one: Auch Teil des Wegs %{related_ways} - other: Auch Teil der Wege %{related_ways} + one: Teil des Wegs %{related_ways} + other: Teil der Wege %{related_ways} nodes: "Knoten:" part_of: "Teil von:" way_history: @@@ -302,7 -302,7 +302,7 @@@ saved_at: Gespeichert am user: Benutzer list: - description: Letzte Änderungen + description: Die letzten Beiträge an der Karte durchstöbern description_bbox: Letzte Änderungen in %{bbox} description_friend: Änderungssätze deiner Freunde description_nearby: Änderungssätze von Benutzern in der Nähe @@@ -376,7 -376,7 +376,7 @@@ newer_entries: Neuere no_entries: Dieser Benutzer hat noch kein Blog older_entries: Ältere - recent_entries: "Neuste Einträge:" + recent_entries: Neueste Einträge title: Blogs title_friends: Tagebücher meiner Freunde title_nearby: Tagebücher von Nutzern in der Nähe @@@ -951,22 -951,6 +951,22 @@@ history_disabled_tooltip: Reinzoomen um Änderungen für diesen Bereich anzuzeigen history_tooltip: Änderungen für diesen Bereich anzeigen history_zoom_alert: Du musst näher heranzoomen, um die Chronik zu sehen + osb: + Fixed Error: Behobener Fehler + Unresolved Error: Offener Fehler + Description: Beschreibung + Comment: Kommentar + Has been fixed: Der Fehler wurde bereits behoben. Es kann jedoch bis zu einigen Tagen dauern, bis die Kartenansicht aktualisiert wird. + Comment/Close: Kommentieren/Schließen + Nickname: Benutzername + Add comment: Kommentar hinzufügen + Mark as fixed: Als behoben markieren + Cancel: Abbrechen + Create OpenStreetBug: OpenStreetBug melden + Create bug: Bug anlegen + Bug description: Fehlerbeschreibung + Create: Anlegeeen + Permalink: Permalink layouts: community: Gemeinschaft community_blogs: Blogs @@@ -1026,7 -1010,6 +1026,6 @@@ user_diaries_tooltip: Benutzer-Blogs lesen view: Karte view_tooltip: Karte anzeigen - welcome_user: Willkommen, %{user_link} welcome_user_link_tooltip: Eigene Benutzerseite wiki: Wiki wiki_title: Wiki des Projekts @@@ -1040,7 -1023,7 +1039,7 @@@ attribution_example: alt: Beispiel, wie man auf OpenStreetMap auf einer Webseite hinweist title: Hinweisbeispiel - contributors_at_html: "Österreich: Enthält Daten der Stadt Wien (lizenziert gemäß CC BY AT), des Landes Vorarlberg und des Landes Tirol (beides lizenziert gemäß CC BY AT mit Anpassungen zur Lizenz)." + contributors_at_html: "Österreich: Enthält Daten der Stadt Wien (lizenziert gemäß CC BY AT), des Landes Vorarlberg und des Landes Tirol (lizenziert gemäß CC BY AT samt Erweiterungen zur Lizenz)." contributors_ca_html: "Kanada: Enthält Daten von GeoBase®, GeoGratis (© Department of Natural Resources Canada), CanVec (© Department of Natural Resources Canada) und StatCan (Geography Division, Statistics Canada)." contributors_footer_1_html: Für weitere diesbezügliche Einzelheiten sowie anderer Datenquellen, die zur Verbesserung von OpenStreetMap genutzt wurden, besuche bitte die Seite über die Mitwirkenden im Wiki von OpenStreetMap. contributors_footer_2_html: Die Einbeziehung von Daten bei OpenStreetMap impliziert nicht, dass der ursprüngliche Datenlieferant OpenStreetMap unterstützt, Gewährleistung gibt, noch Haftung übernimmt. @@@ -1461,6 -1444,7 +1460,7 @@@ visibility: "Sichtbarkeit:" visibility_help: Was heißt das? list: + description: Letzte GPS-Track-Uploads durchsuchen empty_html: Bislang ist hier noch nichts vorhanden. Lade eine neue Spur hoch oder informiere dich auf folgender Wikiseite über das Aufzeichnen von GPS-Spuren. public_traces: Öffentliche GPS-Tracks public_traces_from: Öffentliche GPS-Tracks von %{user} @@@ -1613,8 -1597,8 +1613,8 @@@ heading: Benutzer hide: Ausgewählte Benutzer ausblenden showing: - one: Anzeige von Seite %{page} (%{first_item} von %{items}) - other: Anzeige von Seite %{page} (%{first_item}-%{last_item} von %{items}) + one: Seite %{page} (%{first_item} von %{items}) + other: Seite %{page} (%{first_item}–%{last_item} von %{items}) summary: "%{name} erstellt von %{ip_address} am %{date}" summary_no_ip: "%{name} erstellt am %{date}" title: Benutzer @@@ -1676,7 -1660,7 +1676,7 @@@ button: Als Freund hinzufügen failed: Sorry, %{name} konnte nicht als dein Freund hinzugefügt werden. heading: "%{user} als Freund hinzufügen?" - success: "%{name} ist nun dein Freund." + success: "%{name} ist nun dein Freund!" new: confirm email address: "Bestätige deine E-Mail-Adresse:" confirm password: "Passwort bestätigen:" @@@ -1709,8 -1693,8 +1709,8 @@@ nearby mapper: Mapper in der Nähe your location: Eigener Standort remove_friend: - button: Als Freund entfernen - heading: "%{user} als Freund entfernen?" + button: Freund entfernen + heading: Freund %{user} entfernen? not_a_friend: "%{name} ist nicht dein Freund." success: "%{name} wurde als Freund entfernt." reset_password: @@@ -1745,7 -1729,7 +1745,7 @@@ you need to accept or decline: Bitte lese die neuen Bedingungen für Mitwirkende und nehme sie an oder lehne sie ab, bevor du weitermachst. view: activate_user: Benutzer aktivieren - add as friend: Als Freund hinzufügen + add as friend: Freund hinzufügen ago: (%{time_in_words_ago} her) block_history: Erhaltene Sperren blocks by me: Selbst vergebene Sperren @@@ -1765,10 -1749,10 +1765,10 @@@ diary: Blog edits: Bearbeitungen email address: "E-Mail-Adresse:" - friends_changesets: Alle Änderungssätze deiner Freunde durchsuchen - friends_diaries: Alle Tagebucheinträge von Freunden durchsuchen + friends_changesets: Änderungssätze deiner Freunde + friends_diaries: Tagebucheinträge von Freunden hide_user: Benutzer verstecken - if set location: Wenn du deinen Standort angegeben hast, erscheint eine Karte am Seitenende. Du kannst deinen Standort in deinen %{settings_link} ändern. + if set location: Lege in den %{settings_link} deinen Heimatort fest, um Benutzer in der Nähe anzuzeigen. km away: "%{count} km entfernt" latest edit: "Letzte Änderung %{ago}:" m away: "%{count} m entfernt" @@@ -1780,13 -1764,13 +1780,13 @@@ my settings: Eigene Einstellungen my traces: Eigene Tracks nearby users: Anwender in der Nähe - nearby_changesets: Alle Änderungssätze von Benutzern in der Nähe durchsuchen - nearby_diaries: Alle Tagebucheinträge von Benutzern in der Nähe durchsuchen + nearby_changesets: Änderungssätze von Benutzern in der Nähe + nearby_diaries: Tagebucheinträge von Benutzern in der Nähe new diary entry: Neuer Blogeintrag no friends: Du hast bis jetzt keine Freunde hinzugefügt. no nearby users: Es gibt bisher keine Benutzer, die einen Standort in deiner Nähe angegeben haben. oauth settings: OAuth-Einstellungen - remove as friend: Als Freund entfernen + remove as friend: Freund entfernen role: administrator: Dieser Benutzer ist ein Administrator grant: diff --combined config/locales/en.yml index 09d3ceae0,c13ca2c09..cfe0703e9 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@@ -120,8 -120,6 +120,8 @@@ en next_relation_tooltip: "Next relation" prev_changeset_tooltip: "Previous changeset" next_changeset_tooltip: "Next changeset" + prev_note_tooltip: "Previous note" + next_note_tooltip: "Next note" changeset_details: created_at: "Created at:" closed_at: "Closed at:" @@@ -222,7 -220,6 +222,7 @@@ download_xml: "Download XML" view_history: "View history" start_rjs: + notes_layer_name: "Browse Notes" data_layer_name: "Browse Map Data" data_frame_title: "Data" zoom_or_select: "Zoom in or select an area of the map to view" @@@ -269,8 -266,8 +269,8 @@@ nodes: "Nodes:" part_of: "Part of:" also_part_of: - one: "also part of way %{related_ways}" - other: "also part of ways %{related_ways}" + one: "part of way %{related_ways}" + other: "part of ways %{related_ways}" way_history: way_history: "Way History" way_history_title: "Way History: %{way_name}" @@@ -282,15 -279,6 +282,15 @@@ download_xml: "Download XML" view_history: "View history" edit: "Edit way" + note: + open_title: "Unresolved issue: %{note_name}" + closed_title: "Resolved issue: %{note_name}" + opened: "Opened:" + last_modified: "Last modified:" + closed: "Closed:" + at_by_html: "%{when} ago by %{user}" + description: "Description:" + comments: "Comments:" changeset: changeset_paging_nav: showing_page: "Page %{page}" @@@ -1201,14 -1189,6 +1201,14 @@@ greeting: "Hi," hopefully_you: "Someone (possibly you) has asked for the password to be reset on this email address's openstreetmap.org account." click_the_link: "If this is you, please click the link below to reset your password." + note_comment_notification: + anonymous: An anonymous user + subject_own: "[OpenStreetMap] %{commenter} has commented on one of your notes" + subject_other: "[OpenStreetMap] %{commenter} has commented on a note you are interested in" + greeting: "Hi," + your_note: "%{commenter} has left a comment on one of your map notes near %{place}." + commented_note: "%{commenter} has left a comment on a map note you have commented on. The note is near %{place}." + details: "More details about the note can be found at %{url}." message: inbox: title: "Inbox" @@@ -1285,7 -1265,6 +1285,7 @@@ js_2: "OpenStreetMap uses JavaScript for its slippy map." permalink: Permalink shortlink: Shortlink + createnote: Add a note license: copyright: "Copyright OpenStreetMap and contributors, under an open license" license_url: "http://openstreetmap.org/copyright" @@@ -1696,7 -1675,6 +1696,7 @@@ new diary entry: new diary entry my edits: my edits my traces: my traces + my notes: my map notes my settings: my settings my comments: my comments oauth settings: oauth settings @@@ -1706,7 -1684,6 +1706,7 @@@ diary: diary edits: edits traces: traces + notes: map notes remove as friend: unfriend add as friend: add friend mapper since: "Mapper since:" @@@ -1977,25 -1954,6 +1977,25 @@@ back: "View all blocks" revoker: "Revoker:" needs_view: "The user needs to log in before this block will be cleared." + note: + description: + opened_at_by: "Created %{when} ago by %{user}" + commented_at_by: "Updated %{when} ago by %{user}" + closed_at_by: "Resolved %{when} ago by %{user}" + reopened_at_by: "Reactivated %{when} ago by %{user}" + rss: + title: "OpenStreetMap Notes" + description_area: "A list of notes, reported, commented on or closed in your area [(%{min_lat}|%{min_lon}) -- (%{max_lat}|%{max_lon})]" + description_item: "An rss feed for note %{id}" + closed: "closed note (near %{place})" + new: "new note (near %{place})" + comment: "new comment (near %{place})" + mine: + title: "Notes submitted or commented on by %{user}" + heading: "%{user}'s notes" + description: "Notes submitted or commented on by %{user}" + id: "Id" + last_changed: "Last changed" javascripts: map: base: @@@ -2012,20 -1970,6 +2012,20 @@@ history_tooltip: View edits for this area history_disabled_tooltip: Zoom in to view edits for this area history_zoom_alert: You must zoom in to view edits for this area + createnote_tooltip: Add a note to the map + createnote_disabled_tooltip: Zoom in to add a note to the map + createnote_zoom_alert: You must zoom in to add a note to the map + notes: + new: + intro: "Move the marker to the correct position and add your comment in the box below:" + add: Add Note + show: + title: Note %{id} + event: "%{action} by %{user} at %{time}" + anonymous_event: "%{action} by anonymous at %{time}" + close: Close + comment_and_close: Comment & Close + comment: Comment redaction: edit: description: "Description" diff --combined test/functional/browse_controller_test.rb index 11f51ae5c,9ba8dd8f0..87a3e7489 --- a/test/functional/browse_controller_test.rb +++ b/test/functional/browse_controller_test.rb @@@ -39,10 -39,6 +39,10 @@@ class BrowseControllerTest < ActionCont { :path => "/browse/changeset/1", :method => :get }, { :controller => "browse", :action => "changeset", :id => "1" } ) + assert_routing( + { :path => "/browse/note/1", :method => :get }, + { :controller => "browse", :action => "note", :id => "1" } + ) end def test_start @@@ -92,9 -88,10 +92,10 @@@ assert_template 'node_history' # there are 2 revisions of the redacted node, but only one - # should be showing up here. - assert_select "body div[id=content] div[class=browse_details]", 1 - assert_select "body div[id=content] div[class=browse_details][id=1]", 0 + # should be showing details here. + assert_select "body div#content div.browse_details", 2 + assert_select "body div#content div.browse_details[id=1] div.common", 0 + assert_select "body div#content div.browse_details[id=2] div.common", 1 end def test_redacted_way_history @@@ -103,11 -100,12 +104,12 @@@ assert_template 'way_history' # there are 4 revisions of the redacted way, but only 2 - # should be showing up here. - assert_select "body div[id=content] div[class=browse_details]", 2 - # redacted revisions are 2 & 3 - assert_select "body div[id=content] div[class=browse_details][id=2]", 0 - assert_select "body div[id=content] div[class=browse_details][id=3]", 0 + # should be showing details here. + assert_select "body div#content div.browse_details", 4 + assert_select "body div#content div.browse_details[id=1] div.common", 1 + assert_select "body div#content div.browse_details[id=2] div.common", 0 + assert_select "body div#content div.browse_details[id=3] div.common", 0 + assert_select "body div#content div.browse_details[id=4] div.common", 1 end def test_redacted_relation_history @@@ -116,11 -114,12 +118,12 @@@ assert_template 'relation_history' # there are 4 revisions of the redacted relation, but only 2 - # should be showing up here. - assert_select "body div[id=content] div[class=browse_details]", 2 - # redacted revisions are 2 & 3 - assert_select "body div[id=content] div[class=browse_details][id=2]", 0 - assert_select "body div[id=content] div[class=browse_details][id=3]", 0 + # should be showing details here. + assert_select "body div#content div.browse_details", 4 + assert_select "body div#content div.browse_details[id=1] div.common", 1 + assert_select "body div#content div.browse_details[id=2] div.common", 0 + assert_select "body div#content div.browse_details[id=3] div.common", 0 + assert_select "body div#content div.browse_details[id=4] div.common", 1 end # This is a convenience method for most of the above checks