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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
adapt wiki specs
ulferts9bcaaafc1fe4
diff --git a/modules/meeting/app/views/meeting_contents/_show.html.erb b/modules/meeting/app/views/meeting_contents/_show.html.erbindex 56d1e18d5a5..8d43a499e83 100644--- a/modules/meeting/app/views/meeting_contents/_show.html.erb+++ b/modules/meeting/app/views/meeting_contents/_show.html.erb@@ -35,7 +35,7 @@ See COPYRIGHT and LICENSE files for more details.<div data-controller="meeting-content"data-application-target="dynamic"data-meeting-content-edit-state-value="<%= show_meeting_content_editor?(content, content_type) %>"->+ data-qa-selector="op-meeting--<%= content_type %>"><div><%= toolbar title: t(:"label_#{content_type}") do %><%=raw meeting_content_context_menu content, content_type %>diff --git a/modules/meeting/spec/features/meetings_show_spec.rb b/modules/meeting/spec/features/meetings_show_spec.rbindex cbea42f4996..a474cc6cc45 100644--- a/modules/meeting/spec/features/meetings_show_spec.rb+++ b/modules/meeting/spec/features/meetings_show_spec.rb@@ -39,9 +39,7 @@ describe 'Meetings', js: true dolet!(:meeting) { create(:meeting, project:, title: 'Awesome meeting!') }- before do- login_as(user)- end+ current_user { user }describe 'navigate to meeting page' dolet(:permissions) { %i[view_meetings] }@@ -52,7 +50,8 @@ describe 'Meetings', js: true dofind('.meeting a', text: 'Awesome meeting!', wait: 10).clickexpect(page).to have_selector('h2', text: 'Meeting: Awesome meeting!')- expect(page).to have_selector('.meeting_agenda', text: 'There is currently nothing to display')+ expect(page).to have_selector('[data-qa-selector="op-meeting--meeting_agenda"]',+ text: 'There is currently nothing to display')endcontext 'with an open agenda' do@@ -61,11 +60,13 @@ describe 'Meetings', js: true doit 'shows the agenda' dovisit meeting_path(meeting)- expect(page).to have_selector('#meeting_agenda-text', text: 'foo')+ expect(page).to have_selector('[data-qa-selector="op-meeting--meeting_agenda"]',+ text: 'foo')# May not edit- expect(page).not_to have_selector('#edit-meeting_agenda')- expect(page).not_to have_selector('.meeting_agenda', text: 'Edit')+ expect(page).not_to have_selector('.button--edit-agenda')+ expect(page).not_to have_selector('[data-qa-selector="op-meeting--meeting_agenda"]',+ text: 'Edit')endit 'can view history' do@@ -77,19 +78,23 @@ describe 'Meetings', js: true doSeleniumHubWaiter.waitfind_by_id('version-1').click- expect(page).to have_selector('.meeting_agenda', text: 'foo')+ expect(page).to have_selector('[data-qa-selector="op-meeting--meeting_agenda"]', text: 'foo')endcontext 'and edit permissions' dolet(:permissions) { %i[view_meetings create_meeting_agendas] }+ let(:field) do+ TextEditorField.new(page,+ '',+ selector: '[data-qa-selector="op-meeting--meeting_agenda"]')+ endit 'can edit the agenda' dovisit meeting_path(meeting)find('.toolbar-item', text: 'Edit').click- expect(page).to have_selector('.meeting_agenda', text: 'Edit')- expect(page).to have_selector('#edit-meeting_agenda')+ field.expect_value('foo')endend@@ -99,8 +104,9 @@ describe 'Meetings', js: true doit 'can not edit the minutes' dovisit meeting_path(meeting)click_link 'Minutes'- expect(page).not_to have_selector('.meeting_minutes', text: 'Edit')- expect(page).to have_selector('.meeting_minutes', text: 'There is currently nothing to display')+ expect(page).not_to have_selector('[data-qa-selector="op-meeting--meeting_minutes"]', text: 'Edit')+ expect(page).to have_selector('[data-qa-selector="op-meeting--meeting_minutes"]',+ text: 'There is currently nothing to display')endendend@@ -111,18 +117,28 @@ describe 'Meetings', js: true doit 'shows the minutes when visiting' dovisit meeting_path(meeting)expect(page).not_to have_selector('h2', text: 'Agenda')- expect(page).not_to have_selector('#edit-meeting_minutes')+ expect(page).not_to have_selector('#meeting_minutes_text')expect(page).to have_selector('h2', text: 'Minutes')endcontext 'and edit permissions' dolet(:permissions) { %i[view_meetings create_meeting_minutes] }+ let(:field) do+ TextEditorField.new(page,+ '',+ selector: '[data-qa-selector="op-meeting--meeting_minutes"]')+ endit 'can edit the minutes' dovisit meeting_path(meeting)- expect(page).to have_selector('#edit-meeting_minutes')- expect(page).to have_selector('.meeting_minutes', text: 'Edit')- expect(page).not_to have_selector('.button', text: 'Close the meeting to begin the Minutes')++ field.set_value('This is what we talked about')++ click_button 'Save'++ expect(page)+ .to have_selector('.op-uc-container',+ text: 'This is what we talked about')endendend