Skip to content

Commit

Permalink
test if test will fail
Browse files Browse the repository at this point in the history
  • Loading branch information
RuthNjeri committed Feb 18, 2021
1 parent 38aaf2a commit 06e9f07
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions test/system/dashboard_v2_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
class DashboardV2Test < ApplicationSystemTestCase
Capybara.default_max_wait_time = 60

test 'view trending topics' do
user = users(:bob)
subscribed_tags = TagSelection.where(user_id: user.id).pluck(:tid)
# Return the name of a subscribed tag at random
tag_name = Tag.where(tid: subscribed_tags).pluck(:name).sample
# test 'view trending topics' do
# user = users(:bob)
# subscribed_tags = TagSelection.where(user_id: user.id).pluck(:tid)
# # Return the name of a subscribed tag at random
# tag_name = Tag.where(tid: subscribed_tags).pluck(:name).sample

visit '/'
click_on 'Login'
fill_in("username-login", with: "Bob")
fill_in("password-signup", with: "secretive")
click_on 'Log in'
visit '/v1/dashboard'
# Ensure that a subscribed tag is not present on the trending and follow section
assert_selector("div > div.other-topics > span a[href='/tag/#{tag_name}']", count: 0)
assert_selector("div#moreTopics div > div > div a[href='/tag/#{tag_name}']", count: 0)
end
# visit '/'
# click_on 'Login'
# fill_in("username-login", with: "Bob")
# fill_in("password-signup", with: "secretive")
# click_on 'Log in'
# visit '/v1/dashboard'
# # Ensure that a subscribed tag is not present on the trending and follow section
# assert_selector("div > div.other-topics > span a[href='/tag/#{tag_name}']", count: 0)
# assert_selector("div#moreTopics div > div > div a[href='/tag/#{tag_name}']", count: 0)
# end

test 'trending tags are returned when a user has not subscribed to any topics' do
visit '/'
Expand Down

0 comments on commit 06e9f07

Please sign in to comment.