[33130] Don't prepend BCF component to WP in core edition

https://community.openproject.com/wp/33130
pull/8311/head
Oliver Günther 5 years ago
parent 3478cb8a8b
commit 3d2997c449
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 4
      frontend/src/app/modules/bim/bcf/openproject-bcf.module.ts
  2. 5
      modules/bim/spec/features/bcf/api_authorization_spec.rb
  3. 6
      modules/bim/spec/features/bcf/bcf_snapshot_column_spec.rb
  4. 6
      modules/bim/spec/features/bcf/create_spec.rb
  5. 5
      modules/bim/spec/features/bcf/export_spec.rb
  6. 5
      modules/bim/spec/features/bim_filter_spec.rb
  7. 5
      modules/bim/spec/features/bim_navigation_spec.rb
  8. 5
      modules/bim/spec/features/model_management_spec.rb
  9. 5
      modules/bim/spec/features/model_viewer_spec.rb
  10. 5
      modules/bim/spec/features/show_default_spec.rb
  11. 5
      modules/bim/spec/features/viewer/create_viewpoint_spec.rb
  12. 5
      modules/bim/spec/features/viewer/delete_viewpoint_spec.rb
  13. 5
      modules/bim/spec/features/viewer/show_viewpoint_spec.rb

@ -111,6 +111,10 @@ export class OpenprojectBcfModule {
const hookService = injector.get(HookService);
hookService.register('prependedAttributeGroups', (workPackage:WorkPackageResource) => {
if (!window.OpenProject.isBimEdition) {
return;
}
if (workPackage.isNew) {
return BcfNewWpAttributeGroupComponent;
} else {

@ -28,7 +28,10 @@
require 'spec_helper'
describe 'authorization for BCF api', type: :feature, js: true do
describe 'authorization for BCF api',
with_config: { edition: 'bim' },
type: :feature,
js: true do
let!(:user) { FactoryBot.create(:admin) }
let(:client_secret) { app.plaintext_secret }
let(:scope) { 'bcf_v2_1' }

@ -1,6 +1,10 @@
require 'spec_helper'
describe 'BCF snapshot column', type: :feature, js: true, with_mail: false do
describe 'BCF snapshot column',
type: :feature,
js: true,
with_config: { edition: 'bim' },
with_mail: false do
let(:project) { FactoryBot.create(:project, enabled_module_names: %w[bim work_package_tracking]) }
let(:wp_table) { Pages::WorkPackagesTable.new(project) }
let(:permissions) { %i[add_work_packages view_work_packages view_linked_issues] }

@ -1,6 +1,10 @@
require_relative '../../spec_helper'
describe 'Create BCF', type: :feature, js: true, with_mail: false do
describe 'Create BCF',
type: :feature,
js: true,
with_config: { edition: 'bim' },
with_mail: false do
let(:project) do
FactoryBot.create(:project,
types: [type, type_with_cf],

@ -28,7 +28,10 @@
require 'spec_helper'
require_relative '../../support/pages/ifc_models/show_default'
describe 'bcf export', type: :feature, js: true do
describe 'bcf export',
type: :feature,
js: true,
with_config: { edition: 'bim' } do
let(:status) { FactoryBot.create(:status, name: 'New', is_default: true) }
let(:closed_status) { FactoryBot.create(:closed_status, name: 'Closed') }
let(:project) { FactoryBot.create :project, enabled_module_names: %i[bim work_package_tracking] }

@ -31,7 +31,10 @@ require 'spec_helper'
require_relative '../support/pages/ifc_models/show'
require_relative '../support/pages/ifc_models/show_default'
describe 'BIM filter spec', type: :feature, js: true do
describe 'BIM filter spec',
with_config: { edition: 'bim' },
type: :feature,
js: true do
let(:project) { FactoryBot.create :project, enabled_module_names: %w(bim work_package_tracking) }
let(:open_status) { FactoryBot.create(:status, is_closed: false) }
let(:closed_status) { FactoryBot.create(:status, is_closed: true) }

@ -28,7 +28,10 @@
require_relative '../spec_helper'
describe 'BIM navigation spec', type: :feature, js: true do
describe 'BIM navigation spec',
type: :feature,
with_config: { edition: 'bim' },
js: true do
let(:project) { FactoryBot.create :project, enabled_module_names: [:bim, :work_package_tracking] }
let!(:work_package) { FactoryBot.create(:work_package, project: project) }
let(:role) { FactoryBot.create(:role, permissions: %i[view_ifc_models manage_ifc_models view_work_packages]) }

@ -30,7 +30,10 @@ require 'spec_helper'
require_relative '../support/pages/ifc_models/index'
describe 'model management', type: :feature, js: true do
describe 'model management',
with_config: { edition: 'bim' },
type: :feature,
js: true do
let(:project) { FactoryBot.create :project, enabled_module_names: %i[bim work_package_tracking] }
let(:index_page) { Pages::IfcModels::Index.new(project) }
let(:role) { FactoryBot.create(:role, permissions: %i[view_ifc_models manage_bcf manage_ifc_models view_work_packages]) }

@ -28,7 +28,10 @@
require_relative '../spec_helper'
describe 'model viewer', type: :feature, js: true do
describe 'model viewer',
with_config: { edition: 'bim' },
type: :feature,
js: true do
let(:project) { FactoryBot.create :project, enabled_module_names: [:bim, :work_package_tracking] }
# TODO: Add empty viewpoint and stub method to load viewpoints once defined
let(:work_package) { FactoryBot.create(:work_package, project: project) }

@ -28,7 +28,10 @@
require_relative '../spec_helper'
describe 'show default model', type: :feature, js: true do
describe 'show default model',
with_config: { edition: 'bim' },
type: :feature,
js: true do
let(:project) { FactoryBot.create :project, enabled_module_names: %i[bim work_package_tracking] }
let(:index_page) { Pages::IfcModels::Index.new(project) }
let(:show_default_page) { Pages::IfcModels::ShowDefault.new(project) }

@ -28,7 +28,10 @@
require_relative '../../spec_helper'
describe 'Create viewpoint from BCF details page', type: :feature, js: true do
describe 'Create viewpoint from BCF details page',
type: :feature,
with_config: { edition: 'bim' },
js: true do
let(:project) { FactoryBot.create :project, enabled_module_names: [:bim, :work_package_tracking] }
let(:user) { FactoryBot.create :admin }

@ -28,7 +28,10 @@
require_relative '../../spec_helper'
describe 'Delete viewpoint in model viewer', type: :feature, js: true do
describe 'Delete viewpoint in model viewer',
with_config: { edition: 'bim' },
type: :feature,
js: true do
let(:project) { FactoryBot.create :project, enabled_module_names: [:bim, :work_package_tracking] }
let(:user) { FactoryBot.create :admin }

@ -28,7 +28,10 @@
require_relative '../../spec_helper'
describe 'Show viewpoint in model viewer', type: :feature, js: true do
describe 'Show viewpoint in model viewer',
with_config: { edition: 'bim' },
type: :feature,
js: true do
let(:project) { FactoryBot.create :project, enabled_module_names: [:bim, :work_package_tracking] }
let(:user) { FactoryBot.create :admin }

Loading…
Cancel
Save