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

adapt specs to altered button labels

ulferts9b6e6819063d
diff --git a/spec/features/wysiwyg/tables_spec.rb b/spec/features/wysiwyg/tables_spec.rb
index 374485d7650..c25605d01f4 100644
--- a/spec/features/wysiwyg/tables_spec.rb
+++ b/spec/features/wysiwyg/tables_spec.rb
@@ -80,7 +80,6 @@ describe 'Wysiwyg tables',
it 'can add tables with headers' do
editor.in_editor do |container, editable|
- # strangely, we need visible: :all here
editor.click_toolbar_button 'Insert table'
# 2x2
container.find('.ck-insert-table-dropdown-grid-box:nth-of-type(12)').click
@@ -101,7 +100,7 @@ describe 'Wysiwyg tables',
tds.first.send_keys :tab
# Click row toolbar
- editor.click_hover_toolbar_button 'RowRow'
+ editor.click_hover_toolbar_button 'Row'
# Enable header row
header_button = find('.ck-switchbutton', text: 'Header row')
diff --git a/spec/support/components/wysiwyg/wysiwyg_editor.rb b/spec/support/components/wysiwyg/wysiwyg_editor.rb
index 802cbcc46e6..7f50d5e929c 100644
--- a/spec/support/components/wysiwyg/wysiwyg_editor.rb
+++ b/spec/support/components/wysiwyg/wysiwyg_editor.rb
@@ -107,10 +107,6 @@ module Components
figure = image.find(:xpath, '../..')
retry_block do
- # Click the figure
- figure.click
- sleep(0.2)
-
# Toggle caption with button since newer version of ckeditor
click_hover_toolbar_button 'Toggle caption on'
@@ -142,7 +138,7 @@ module Components
end
def insert_link(link)
- click_toolbar_button /Link \([^)]+\)/
+ click_toolbar_button "Link"
page.find('.ck-input-text').set link
page.find('.ck-button-save').click
end