Skip to content

Commit

Permalink
テストを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Tsukada committed Feb 1, 2022
1 parent 678e225 commit 122c058
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions test/system/product/unchecked_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class Product::UncheckedTest < ApplicationSystemTestCase
click_button 'コメントする'
visit_with_auth '/products/unchecked', 'komagata'
wait_for_vuejs
click_link '自分の担当'
assert_text product.practice.title
end

Expand Down Expand Up @@ -122,6 +123,7 @@ class Product::UncheckedTest < ApplicationSystemTestCase
click_button 'コメントする'
visit_with_auth '/products/unchecked?target=unchecked_all', 'komagata'
wait_for_vuejs
click_link '自分の担当'
assert_text product.practice.title
end

Expand Down
6 changes: 3 additions & 3 deletions test/system/products_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ class ProductsTest < ApplicationSystemTestCase
end

test 'display learning completion message when a user of the completed product visits show first time' do
visit_with_auth "/products/#{products(:product62).id}", 'kimura'
visit_with_auth "/products/#{products(:product65).id}", 'kimura'
assert_text '喜びを Tweet する!'
end

test 'not display learning completion message when a user of the completed product visits after the second time' do
visit_with_auth "/products/#{products(:product62).id}", 'kimura'
visit_with_auth "/products/#{products(:product65).id}", 'kimura'
find('label.card-main-actions__delete').click
visit current_path
assert_no_text '喜びを Tweet する!'
end

test 'not display learning completion message when a user whom the product does not belongs to visits show' do
visit_with_auth "/products/#{products(:product62).id}", 'yamada'
visit_with_auth "/products/#{products(:product65).id}", 'yamada'
assert_no_text '喜びを Tweet する!'
end

Expand Down

0 comments on commit 122c058

Please sign in to comment.