From b65f5d296d364223cb1e92976575be3dafc07f40 Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Tue, 12 Sep 2023 11:50:20 +0200 Subject: [PATCH] Fix tests --- test/system/annotations_test.rb | 14 +++++++------- test/system/questions_test.rb | 2 +- test/system/saved_annotation_test.rb | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/system/annotations_test.rb b/test/system/annotations_test.rb index 4c1c703e11..865c96f620 100644 --- a/test/system/annotations_test.rb +++ b/test/system/annotations_test.rb @@ -52,7 +52,7 @@ class AnnotationsTest < ApplicationSystemTestCase line = "tr#line-#{index}" find(line).hover - assert_css '.annotation-button button' + assert_css '.annotation-button a' end end end @@ -62,7 +62,7 @@ class AnnotationsTest < ApplicationSystemTestCase click_link 'Code' find('tr#line-1').hover - find('.annotation-button').click_button + find('.annotation-button a').click within '.code-listing' do @code_lines.each do |code_line| assert_text code_line @@ -77,7 +77,7 @@ class AnnotationsTest < ApplicationSystemTestCase click_link 'Code' find('tr#line-1').hover - find('.annotation-button').click_button + find('.annotation-button a').click initial = 'This is a single line comment' within 'form.annotation-submission' do @@ -97,7 +97,7 @@ class AnnotationsTest < ApplicationSystemTestCase click_link 'Code' find('tr#line-1').hover - find('.annotation-button').click_button + find('.annotation-button a').click initial = 'This is a single line comment' within 'form.annotation-submission' do @@ -114,7 +114,7 @@ class AnnotationsTest < ApplicationSystemTestCase click_link 'Code' find('tr#line-1').hover - find('.annotation-button').click_button + find('.annotation-button a').click within 'form.annotation-submission' do click_button 'Cancel' end @@ -268,7 +268,7 @@ class AnnotationsTest < ApplicationSystemTestCase click_link 'Code' find('tr#line-1').hover - find('.annotation-button').click_button + find('.annotation-button a').click initial = '' within 'form.annotation-submission' do @@ -295,7 +295,7 @@ class AnnotationsTest < ApplicationSystemTestCase click_link 'Code' find('tr#line-1').hover - find('.annotation-button').click_button + find('.annotation-button a').click initial = Faker::Lorem.characters(number: 10_010) within 'form.annotation-submission' do diff --git a/test/system/questions_test.rb b/test/system/questions_test.rb index 5d62a803d2..a6ab75629b 100644 --- a/test/system/questions_test.rb +++ b/test/system/questions_test.rb @@ -36,7 +36,7 @@ class QuestionsTest < ApplicationSystemTestCase line_element.hover within line_element do - button = find('.annotation-button button') + button = find('.annotation-button a') button.click assert_css 'form.annotation-submission' diff --git a/test/system/saved_annotation_test.rb b/test/system/saved_annotation_test.rb index 8aa78489d7..56f56819be 100644 --- a/test/system/saved_annotation_test.rb +++ b/test/system/saved_annotation_test.rb @@ -32,7 +32,7 @@ class SavedAnnotationsTest < ApplicationSystemTestCase click_link 'Code' find('tr#line-1').hover - find('.annotation-button').click_button + find('.annotation-button a').click initial = 'The first five words of this comment will be used as the title' within 'form.annotation-submission' do @@ -63,7 +63,7 @@ class SavedAnnotationsTest < ApplicationSystemTestCase click_link 'Code' find('tr#line-1').hover - find('.annotation-button').click_button + find('.annotation-button a').click initial = 'The first five words of this comment will be used as the title' within 'form.annotation-submission' do @@ -90,7 +90,7 @@ class SavedAnnotationsTest < ApplicationSystemTestCase click_link 'Code' find('tr#line-1').hover - find('.annotation-button').click_button + find('.annotation-button a').click within 'form.annotation-submission' do assert_css 'd-saved-annotation-input'