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
Remove common shared_upsell and enterprise upsell page examples
Oliver Güntherd6b24d7e5d8c
diff --git a/modules/ldap_groups/spec/features/administration_spec.rb b/modules/ldap_groups/spec/features/administration_spec.rbindex 35a40a80a60..dcc2408deae 100644--- a/modules/ldap_groups/spec/features/administration_spec.rb+++ b/modules/ldap_groups/spec/features/administration_spec.rb@@ -20,7 +20,7 @@ RSpec.describe "LDAP group sync administration spec", :js dolet!(:auth_source) { create(:ldap_auth_source, name: "ldap") }it "allows synced group administration flow" do- expect(page).not_to have_enterprise_upsell_page+ expect(page).not_to have_enterprise_banner# Open create menupage.find_test_selector("op-admin-synchronized-groups--button-new", text: I18n.t(:button_add)).click# Create groupdiff --git a/modules/storages/spec/controllers/storages/admin/storages_controller_spec.rb b/modules/storages/spec/controllers/storages/admin/storages_controller_spec.rbindex 05c0f6c51c3..6e07a94a243 100644--- a/modules/storages/spec/controllers/storages/admin/storages_controller_spec.rb+++ b/modules/storages/spec/controllers/storages/admin/storages_controller_spec.rb@@ -29,7 +29,6 @@#++require "spec_helper"-require_relative "../../../../../../spec/controllers/shared_upsell_examples"RSpec.describe Storages::Admin::StoragesController dolet(:user) { build(:admin) }@@ -38,5 +37,9 @@ RSpec.describe Storages::Admin::StoragesController dologin_as userend- it_behaves_like "it has an upsell action"+ it "renders the upsell page" do+ get :upsell+ expect(response).to be_successful+ expect(response).to render_template "upsell"+ endenddiff --git a/spec/controllers/custom_styles_controller_spec.rb b/spec/controllers/custom_styles_controller_spec.rbindex 1e8ec5d54e8..26720bcef50 100644--- a/spec/controllers/custom_styles_controller_spec.rb+++ b/spec/controllers/custom_styles_controller_spec.rb@@ -29,7 +29,6 @@#++require "spec_helper"-require_relative "shared_upsell_examples"RSpec.describe CustomStylesController dobefore dodiff --git a/spec/controllers/shared_upsell_examples.rb b/spec/controllers/shared_upsell_examples.rbdeleted file mode 100644index d5edc595381..00000000000--- a/spec/controllers/shared_upsell_examples.rb+++ /dev/null@@ -1,40 +0,0 @@-# frozen_string_literal: true--#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) the OpenProject GmbH-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License version 3.-#-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-# Copyright (C) 2006-2013 Jean-Philippe Lang-# Copyright (C) 2010-2013 the ChiliProject Team-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License-# as published by the Free Software Foundation; either version 2-# of the License, or (at your option) any later version.-#-# 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.-#-# 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 COPYRIGHT and LICENSE files for more details.-#++--require "spec_helper"--RSpec.shared_examples_for "it has an upsell action" do- subject { get :upsell }-- it "renders the upsell page" do- expect(subject).to be_successful- expect(subject).to render_template "upsell"- end-enddiff --git a/spec/features/custom_styles/tabs_navigation_spec.rb b/spec/features/custom_styles/tabs_navigation_spec.rbindex f8c9943eb7e..788c0a744a8 100644--- a/spec/features/custom_styles/tabs_navigation_spec.rb+++ b/spec/features/custom_styles/tabs_navigation_spec.rb@@ -40,8 +40,7 @@ RSpec.describe "Tabs navigation and content switching on the admin/design page"endit "redirects to upsell page" do- expect(page).to have_enterprise_upsell_page- expect(page).to have_text "Available starting with the Basic enterprise plan"+ expect(page).to have_enterprise_banner(:basic)endenddiff --git a/spec/features/notifications/notification_center/notification_center_date_alerts_spec.rb b/spec/features/notifications/notification_center/notification_center_date_alerts_spec.rbindex 7eaa0fa338a..61b93027828 100644--- a/spec/features/notifications/notification_center/notification_center_date_alerts_spec.rb+++ b/spec/features/notifications/notification_center/notification_center_date_alerts_spec.rb@@ -197,13 +197,13 @@ RSpec.describe "Notification center date alerts", :js, with_settings: { journal_side_menu.click_item "Date alert"expect(page).to have_current_path(/notifications\/date_alerts/)- expect(page).to have_enterprise_upsell_page(:basic)+ expect(page).to have_enterprise_banner(:basic)# It does not allows direct url accessvisit notifications_center_path(filter: "reason", name: "dateAlert")expect(page).to have_current_path(/notifications\/date_alerts/)- expect(page).to have_enterprise_upsell_page(:basic)+ expect(page).to have_enterprise_banner(:basic)endenddiff --git a/spec/features/projects/persisted_lists_sharing_spec.rb b/spec/features/projects/persisted_lists_sharing_spec.rbindex 3ee4e34cc19..6b538f34dfe 100644--- a/spec/features/projects/persisted_lists_sharing_spec.rb+++ b/spec/features/projects/persisted_lists_sharing_spec.rb@@ -86,7 +86,7 @@ RSpec.describe "Project list sharing",projects_index_page.open_share_dialogshare_dialog.expect_open- share_dialog.expect_upsell_banner+ expect(page).to have_enterprise_banner(:premium)endenddiff --git a/spec/features/projects/settings/work_packages_settings_spec.rb b/spec/features/projects/settings/work_packages_settings_spec.rbindex d2aa98ad7de..a2d28086742 100644--- a/spec/features/projects/settings/work_packages_settings_spec.rb+++ b/spec/features/projects/settings/work_packages_settings_spec.rb@@ -91,7 +91,7 @@ RSpec.describe "Projects", "work packages settings menu", :js doit "shows the enterprise banner" dowork_packages_settings_page.visit!- expect(page).to have_test_selector("op-enterprise-upsell-page")+ expect(page).to have_enterprise_banner(:professional)endenddiff --git a/spec/support/components/sharing/project_queries/share_modal.rb b/spec/support/components/sharing/project_queries/share_modal.rbindex 1b97e118ef6..354cdc21d2c 100644--- a/spec/support/components/sharing/project_queries/share_modal.rb+++ b/spec/support/components/sharing/project_queries/share_modal.rb@@ -61,10 +61,6 @@ module Componentsexpect(find("button")).to be_disabledendend-- def expect_upsell_banner- expect(page).to have_css("[data-test-selector='op-share-dialog-upsell-block']")- endendendenddiff --git a/spec/support/matchers/has_enterprise_upsell_page.rb b/spec/support/matchers/has_enterprise_upsell_page.rbdeleted file mode 100644index 10d9a123d4d..00000000000--- a/spec/support/matchers/has_enterprise_upsell_page.rb+++ /dev/null@@ -1,60 +0,0 @@-# frozen_string_literal: true--#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) the OpenProject GmbH-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License version 3.-#-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-# Copyright (C) 2006-2013 Jean-Philippe Lang-# Copyright (C) 2010-2013 the ChiliProject Team-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License-# as published by the Free Software Foundation; either version 2-# of the License, or (at your option) any later version.-#-# 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.-#-# 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 COPYRIGHT and LICENSE files for more details.-#++--RSpec::Matchers.define :have_enterprise_upsell_page do |**args|- include TestSelectorFinders-- match do |page|- if args[:plan]- expected_text = I18n.t("ee.upsell.plan_text_html", plan: args[:plan].capitalize)- page.find(test_selector("op-enterprise-upsell-page"), **args, text: expected_text)- else- page.find(test_selector("op-enterprise-upsell-page"), **args)- end- end-- match_when_negated do |page|- page.has_no_selector?(test_selector("op-enterprise-upsell-page"), **args)- end-- failure_message do- <<~MESSAGE- Expected page to have Enterprise edition upsell page, but it does not:- #{@error}- MESSAGE- end-- failure_message_when_negated do- <<~MESSAGE- Expected page not to have Enterprise edition upsell page, but it does:- #{@error}- MESSAGE- end-end