kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.7 KiB
78 lines
2.7 KiB
11 years ago
|
#-- copyright
|
||
11 years ago
|
# OpenProject Meeting Plugin
|
||
|
#
|
||
|
# Copyright (C) 2011-2014 the OpenProject Foundation (OPF)
|
||
11 years ago
|
#
|
||
|
# This program is free software; you can redistribute it and/or
|
||
|
# modify it under the terms of the GNU General Public License version 3.
|
||
|
#
|
||
11 years ago
|
# This program is distributed in the hope that it will be useful,
|
||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
# GNU General Public License for more details.
|
||
|
#
|
||
11 years ago
|
# You should have received a copy of the GNU General Public License
|
||
|
# along with this program; if not, write to the Free Software
|
||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
#
|
||
|
# See doc/COPYRIGHT.md for more details.
|
||
11 years ago
|
#++
|
||
|
|
||
10 years ago
|
Given /^there is (\d+) [Mm]eetings? in project "(.+)" created by "(.+)" with:$/ do |count, project, user, table|
|
||
13 years ago
|
count.to_i.times do
|
||
7 years ago
|
m = FactoryBot.build(:meeting)
|
||
13 years ago
|
m.project = Project.find_by_name(project)
|
||
|
m.author = User.find_by_login(user)
|
||
|
send_table_to_object(m, table)
|
||
|
end
|
||
|
end
|
||
|
|
||
10 years ago
|
Given /^the [Mm]eeting "(.+)" has 1 agenda with:$/ do |meeting, table|
|
||
14 years ago
|
m = Meeting.find_by_title(meeting)
|
||
7 years ago
|
ma = MeetingAgenda.find_by_meeting_id(m.id) || FactoryBot.build(:meeting_agenda, meeting: m)
|
||
13 years ago
|
send_table_to_object(ma, table)
|
||
14 years ago
|
end
|
||
|
|
||
13 years ago
|
Given /^the [Mm]eeting "(.+)" has 1 agenda$/ do |meeting|
|
||
|
m = Meeting.find_by_title(meeting)
|
||
7 years ago
|
m.agenda ||= FactoryBot.build(:meeting_agenda)
|
||
13 years ago
|
m.save!
|
||
|
end
|
||
|
|
||
10 years ago
|
Given /^the [Mm]eeting "(.+)" has minutes with:$/ do |meeting, table|
|
||
14 years ago
|
m = Meeting.find_by_title(meeting)
|
||
7 years ago
|
mm = MeetingMinutes.find_by_meeting_id(m.id) || FactoryBot.build(:meeting_minutes, meeting: m)
|
||
13 years ago
|
send_table_to_object(mm, table)
|
||
14 years ago
|
end
|
||
|
|
||
10 years ago
|
Given /^"(.+)" is invited to the [Mm]eeting "(.+)"$/ do |user, meeting|
|
||
14 years ago
|
m = Meeting.find_by_title(meeting)
|
||
7 years ago
|
p = m.participants.detect { |p| p.user_id = User.find_by_login(user).id } || FactoryBot.build(:meeting_participant, meeting: m)
|
||
14 years ago
|
p.invited = true
|
||
|
p.save
|
||
|
end
|
||
|
|
||
10 years ago
|
Given /^"(.+)" attended the [Mm]eeting "(.+)"$/ do |user, meeting|
|
||
14 years ago
|
m = Meeting.find_by_title(meeting)
|
||
7 years ago
|
p = m.participants.detect { |p| p.user_id = User.find_by_login(user).id } || FactoryBot.build(:meeting_participant, meeting: m)
|
||
14 years ago
|
p.attended = true
|
||
|
p.save
|
||
13 years ago
|
end
|
||
|
|
||
|
When /the agenda of the meeting "(.+)" changes meanwhile/ do |meeting|
|
||
|
m = Meeting.find_by_title(meeting)
|
||
10 years ago
|
m.agenda.text = 'oder oder?'
|
||
13 years ago
|
m.agenda.save!
|
||
|
end
|
||
12 years ago
|
|
||
|
Then /^the minutes should contain the following text:$/ do |table|
|
||
10 years ago
|
step %{I should see "#{table.raw.first.first}" within "#meeting_minutes-text"}
|
||
12 years ago
|
end
|
||
10 years ago
|
|
||
|
Then /^there should be a text edit toolbar for the "(.+)" field$/ do |field_id|
|
||
|
# second parent up
|
||
|
ancestor = find(:xpath, "//*[@id='#{field_id.gsub('#','')}']/../..")
|
||
|
|
||
|
expect(ancestor).to have_selector('.jstElements')
|
||
|
end
|