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

Extend spec to test submit by keyboard

Oliver Günther022d614642aa
diff --git a/modules/meeting/spec/features/meetings_show_spec.rb b/modules/meeting/spec/features/meetings_show_spec.rb
index 1474048eb96..8bac19650f0 100644
--- a/modules/meeting/spec/features/meetings_show_spec.rb
+++ b/modules/meeting/spec/features/meetings_show_spec.rb
@@ -27,6 +27,8 @@
#++
require 'spec_helper'
+require_relative '../support/pages/meetings/show'
+
RSpec.describe 'Meetings', js: true do
let(:project) { create(:project, enabled_module_names: %w[meetings]) }
@@ -38,6 +40,7 @@ RSpec.describe 'Meetings', js: true do
end
let!(:meeting) { create(:meeting, project:, title: 'Awesome meeting!') }
+ let(:show_page) { Pages::Meetings::Show.new(meeting) }
current_user { user }
@@ -94,6 +97,16 @@ RSpec.describe 'Meetings', js: true do
find('.toolbar-item', text: 'Edit').click
field.expect_value('foo')
+
+ field.set_value('My new meeting text')
+
+ field.submit_by_enter
+
+ show_page.expect_and_dismiss_toaster message: 'Successful update'
+
+ meeting.reload
+
+ expect(meeting.agenda.text).to eq 'My new meeting text'
end
end