diff --git a/features/article_versioning.feature b/features/article_versioning.feature index 19255a5..e2f5a09 100644 --- a/features/article_versioning.feature +++ b/features/article_versioning.feature @@ -34,8 +34,8 @@ Feature: article versioning Given I am on article "Edited Article" When I follow "All versions" Then I should be on /joaosilva/edited-article/versions - And I should see "Version 1" within ".article-versions" - And I should see "Version 2" within ".article-versions" + And I should see "Version 1" within "#article-versions" + And I should see "Version 2" within "#article-versions" @selenium Scenario: see specific version @@ -51,13 +51,13 @@ Feature: article versioning Scenario: revert to a specific version generates a new version Given I go to article "Edited Article" When I follow "All versions" - Then I should not see "Version 3" within ".article-versions" + Then I should not see "Version 3" within "#article-versions" And I follow "Version 1" And I follow "Revert to this version" And I press "Save" Then I should see "Sample Article" within ".title" When I follow "All versions" - Then I should see "Version 3" within ".article-versions" + Then I should see "Version 3" within "#article-versions" Scenario: try to access versions of unexistent article Given I go to /joaosilva/unexistent-article/versions diff --git a/test/functional/content_viewer_controller_test.rb b/test/functional/content_viewer_controller_test.rb index 4baf4a8..217f016 100644 --- a/test/functional/content_viewer_controller_test.rb +++ b/test/functional/content_viewer_controller_test.rb @@ -372,10 +372,7 @@ class ContentViewerControllerTest < ActionController::TestCase page.body = 'test article edited'; page.save get :article_versions, :profile => profile.identifier, :page => [ 'myarticle' ] - assert_tag :tag => 'ul', :attributes => { :class => 'article-versions' }, :descendant => { - :tag => 'a', - :attributes => { :href => "http://#{profile.environment.default_hostname}/#{profile.identifier}/#{page.path}?version=1" } - } + assert_select "ul#article-versions a[href=http://#{profile.environment.default_hostname}/#{profile.identifier}/#{page.path}?version=1]" end should "fetch correct article version" do -- libgit2 0.21.2