add assigns_versions permission to spec

pull/7338/head
ulferts 6 years ago
parent a7ab3feeeb
commit 309a93c405
No known key found for this signature in database
GPG Key ID: A205708DE1284017
  1. 28
      spec/features/work_packages/details/inplace_editor/version_editor_spec.rb
  2. 2
      spec/features/work_packages/new/work_package_default_description_spec.rb

@ -9,33 +9,41 @@ describe 'subject inplace editor', js: true, selenium: true do
let(:subproject1) { FactoryBot.create :project_with_types, name: 'Child', parent: project }
let(:subproject2) { FactoryBot.create :project_with_types, name: 'Aunt', parent: project }
let!(:version) {
let!(:version) do
FactoryBot.create(:version,
status: 'open',
sharing: 'tree',
project: project)
}
let!(:version2) {
end
let!(:version2) do
FactoryBot.create(:version,
status: 'open',
sharing: 'tree',
project: subproject1)
}
let!(:version3) {
end
let!(:version3) do
FactoryBot.create(:version,
status: 'open',
sharing: 'tree',
project: subproject2)
}
end
let(:property_name) { :version }
let(:work_package) { FactoryBot.create :work_package, project: project }
let(:user) { FactoryBot.create :admin }
let(:second_user) { FactoryBot.create :user, member_in_project: project, member_through_role: role }
let(:role) { FactoryBot.create(:role, permissions: %i[view_work_packages edit_work_packages]) }
let(:user) do
FactoryBot.create :user,
member_in_project: project,
member_with_permissions: %i[view_work_packages edit_work_packages manage_versions assign_versions]
end
let(:second_user) do
FactoryBot.create :user,
member_in_project: project,
member_with_permissions: %i[view_work_packages edit_work_packages assign_versions]
end
let(:permissions) { %i[view_work_packages edit_work_packages assign_versions] }
let(:work_package_page) { Pages::FullWorkPackage.new(work_package) }
context 'with admin permissions' do
context 'with manage permissions' do
before do
login_as(user)
end

@ -21,7 +21,6 @@ describe 'new work package', js: true do
let(:notification) { PageObjects::Notifications.new(page) }
let(:wp_page) { Pages::FullWorkPackageCreate.new }
# Changing the type changes the description if it was empty or still the default.
# Changes in the description shall not be overridden.
def change_type_and_expect_description
@ -51,7 +50,6 @@ describe 'new work package', js: true do
expect(page).to have_selector('.wp-edit-field--display-field.description h1', text: 'New Bug template')
end
before do
login_as(user)
end

Loading…
Cancel
Save