Commit 632dc3efb8c933fb7db39ab99d2152c7eaf1eb05
1 parent
c84e0cab
Exists in
master
and in
28 other branches
article-versioning: fix tests after html attribute change
Showing
2 changed files
with
5 additions
and
8 deletions
Show diff stats
features/article_versioning.feature
... | ... | @@ -34,8 +34,8 @@ Feature: article versioning |
34 | 34 | Given I am on article "Edited Article" |
35 | 35 | When I follow "All versions" |
36 | 36 | Then I should be on /joaosilva/edited-article/versions |
37 | - And I should see "Version 1" within ".article-versions" | |
38 | - And I should see "Version 2" within ".article-versions" | |
37 | + And I should see "Version 1" within "#article-versions" | |
38 | + And I should see "Version 2" within "#article-versions" | |
39 | 39 | |
40 | 40 | @selenium |
41 | 41 | Scenario: see specific version |
... | ... | @@ -51,13 +51,13 @@ Feature: article versioning |
51 | 51 | Scenario: revert to a specific version generates a new version |
52 | 52 | Given I go to article "Edited Article" |
53 | 53 | When I follow "All versions" |
54 | - Then I should not see "Version 3" within ".article-versions" | |
54 | + Then I should not see "Version 3" within "#article-versions" | |
55 | 55 | And I follow "Version 1" |
56 | 56 | And I follow "Revert to this version" |
57 | 57 | And I press "Save" |
58 | 58 | Then I should see "Sample Article" within ".title" |
59 | 59 | When I follow "All versions" |
60 | - Then I should see "Version 3" within ".article-versions" | |
60 | + Then I should see "Version 3" within "#article-versions" | |
61 | 61 | |
62 | 62 | Scenario: try to access versions of unexistent article |
63 | 63 | Given I go to /joaosilva/unexistent-article/versions | ... | ... |
test/functional/content_viewer_controller_test.rb
... | ... | @@ -372,10 +372,7 @@ class ContentViewerControllerTest < ActionController::TestCase |
372 | 372 | page.body = 'test article edited'; page.save |
373 | 373 | |
374 | 374 | get :article_versions, :profile => profile.identifier, :page => [ 'myarticle' ] |
375 | - assert_tag :tag => 'ul', :attributes => { :class => 'article-versions' }, :descendant => { | |
376 | - :tag => 'a', | |
377 | - :attributes => { :href => "http://#{profile.environment.default_hostname}/#{profile.identifier}/#{page.path}?version=1" } | |
378 | - } | |
375 | + assert_select "ul#article-versions a[href=http://#{profile.environment.default_hostname}/#{profile.identifier}/#{page.path}?version=1]" | |
379 | 376 | end |
380 | 377 | |
381 | 378 | should "fetch correct article version" do | ... | ... |