Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dragging create annotation button for padding pixels #4959

Merged
merged 2 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ export class CreateAnnotationButton extends ShadowlessLitElement {
@pointerover=${() => userAnnotationState.isCreateButtonExpanded = true}
@pointerout=${() => userAnnotationState.isCreateButtonExpanded = false}
>
<button class="btn btn-fab-small-flex"
<a class="btn btn-fab-small-flex"
@pointerup=${() => this.openForm()}>
<span class="text">${this.buttonText}</span>
<i class="mdi mdi-comment-plus-outline "></i>
</button>
</a>
</div>
</div>`;
}
Expand Down
14 changes: 7 additions & 7 deletions test/system/annotations_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/system/questions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 3 additions & 3 deletions test/system/saved_annotation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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'
Expand Down
Loading