Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix broken tests due to chromedriver update

Oliver Günther59bc26a7d4db
diff --git a/app/assets/stylesheets/content/_context_menu.sass b/app/assets/stylesheets/content/_context_menu.sass
index 17384c20d0c..d95f34dd98b 100644
--- a/app/assets/stylesheets/content/_context_menu.sass
+++ b/app/assets/stylesheets/content/_context_menu.sass
@@ -112,3 +112,4 @@ html:not(.-browser-mobile)
&:hover, &:focus
.context-menu--icon
opacity: 100
+
diff --git a/app/assets/stylesheets/layout/_base_mobile.sass b/app/assets/stylesheets/layout/_base_mobile.sass
index 7bd1e7be3f9..5928fcfc6ab 100644
--- a/app/assets/stylesheets/layout/_base_mobile.sass
+++ b/app/assets/stylesheets/layout/_base_mobile.sass
@@ -27,10 +27,11 @@
//++
@include breakpoint(680px down)
- body
- overflow: auto !important
- overflow-y: scroll /* has to be scroll, not auto */
+ body, html
+ position: relative
+ overflow: hidden
-webkit-overflow-scrolling: touch
+ height: 100%
#main-menu ~ #content-wrapper
padding: 15px
diff --git a/spec/features/work_packages/details/inplace_editor/shared_examples.rb b/spec/features/work_packages/details/inplace_editor/shared_examples.rb
index 2337b292989..7ec13aaceac 100644
--- a/spec/features/work_packages/details/inplace_editor/shared_examples.rb
+++ b/spec/features/work_packages/details/inplace_editor/shared_examples.rb
@@ -150,6 +150,9 @@ shared_examples 'a principal autocomplete field' do
expect(page).to have_selector('.mention-list-item', text: mentioned_group.name)
expect(page).not_to have_selector('.mention-list-item', text: user.name)
+ # Close the autocompleter
+ field.input_element.send_keys :escape
+
field.input_element.set('', fill_options: { clear: :backspace })
field.input_element.send_keys(" @Laura Fo")
expect(page).to have_selector('.mention-list-item', text: mentioned_user.name)
diff --git a/spec/features/wysiwyg/non_breaking_spaces_spec.rb b/spec/features/wysiwyg/non_breaking_spaces_spec.rb
index f08ee1511e7..4ad8cc36ad1 100644
--- a/spec/features/wysiwyg/non_breaking_spaces_spec.rb
+++ b/spec/features/wysiwyg/non_breaking_spaces_spec.rb
@@ -45,13 +45,7 @@ describe 'Wysiwyg   behavior',
end
it 'can insert strong formatting with nbsp' do
- editor.in_editor do |container, editable|
-
- editor.click_and_type_slowly 'some text '
- container.find('.ck-button', visible: :all, text: 'Bold').click
-
- editor.click_and_type_slowly 'with bold '
- end
+ editor.click_and_type_slowly 'some text ', [:control, 'b'], 'with bold'
# Save wiki page
click_on 'Save'
diff --git a/spec/support/components/wysiwyg/wysiwyg_editor.rb b/spec/support/components/wysiwyg/wysiwyg_editor.rb
index 0376b342afb..2144552eb26 100644
--- a/spec/support/components/wysiwyg/wysiwyg_editor.rb
+++ b/spec/support/components/wysiwyg/wysiwyg_editor.rb
@@ -87,15 +87,25 @@ module Components
editable.all('figure').each do |figure|
# Locate image within figure
# Click on image to show figcaption
- img = figure.find('img')
- img.click
- sleep 0.5
-
- # Locate figcaption to create comment
- figcaption = figure.find('figcaption')
- figcaption.click
- figcaption.send_keys(caption)
- sleep 0.5
+ figure.find('img')
+
+ # Click the figure
+ retry_block do
+ figure.click
+ sleep 1
+
+ # Locate figcaption to create comment
+ figcaption = figure.find('figcaption')
+
+ # Insert the caption with JS to circumvent chrome error
+ script = <<-JS
+ arguments[0].textContent = '' + arguments[1]
+ JS
+ page.execute_script(script, figcaption.native, caption)
+
+ # Expect caption set
+ figure.find('figcaption', text: caption)
+ end
end
end
end