From d37285cb8d385d8c01bde9cf791f2189d39d4a5b Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 3 Jun 2024 22:39:03 +0200 Subject: [PATCH] fix requirements in tests --- src/lib/registration/autoyast_addons.rb | 4 ++++ test/abort_confirmation_spec.rb | 2 ++ test/addon_selection_dialog_test.rb | 1 + test/autoyast_addons_spec.rb | 2 ++ test/base_system_registration_dialog_test.rb | 4 ++++ test/migration_finish_workflow_spec.rb | 2 ++ test/migration_repos_selection_dialog_test.rb | 3 +++ test/migration_repos_workflow_spec.rb | 2 ++ test/migration_repositories_spec.rb | 2 ++ test/migration_selection_dialog_test.rb | 3 +++ test/offline_migration_workflow_test.rb | 2 ++ test/registration/clients/scc_auto_test.rb | 1 + test/registration_sync_workflow_spec.rb | 2 ++ test/registration_update_dialog_test.rb | 2 ++ 14 files changed, 32 insertions(+) diff --git a/src/lib/registration/autoyast_addons.rb b/src/lib/registration/autoyast_addons.rb index 6e94595d9..60489560c 100644 --- a/src/lib/registration/autoyast_addons.rb +++ b/src/lib/registration/autoyast_addons.rb @@ -13,6 +13,8 @@ require "yast" +require "registration/addon" + module Registration # This class handles the AutoYaST addons class AutoyastAddons @@ -132,6 +134,8 @@ def collect_reg_codes end def registration_ui + require "registration/registration_ui" + @registration_ui ||= RegistrationUI.new(registration) end end diff --git a/test/abort_confirmation_spec.rb b/test/abort_confirmation_spec.rb index a77a6eae7..e3b539663 100755 --- a/test/abort_confirmation_spec.rb +++ b/test/abort_confirmation_spec.rb @@ -2,6 +2,8 @@ require_relative "spec_helper" +require "registration/ui/abort_confirmation" + Yast.import "Popup" Yast.import "Mode" diff --git a/test/addon_selection_dialog_test.rb b/test/addon_selection_dialog_test.rb index ef7b27af7..82549eea7 100644 --- a/test/addon_selection_dialog_test.rb +++ b/test/addon_selection_dialog_test.rb @@ -1,4 +1,5 @@ require_relative "spec_helper" +require "registration/ui/addon_selection_registration_dialog" require "registration/addon" describe Registration::UI::AddonSelectionRegistrationDialog do diff --git a/test/autoyast_addons_spec.rb b/test/autoyast_addons_spec.rb index 4f02980ff..5d1090199 100755 --- a/test/autoyast_addons_spec.rb +++ b/test/autoyast_addons_spec.rb @@ -3,6 +3,8 @@ require_relative "spec_helper" require "yaml" +require "registration/autoyast_addons" + describe Registration::AutoyastAddons do let(:registration) { double("registration") } let(:unsorted_addons) do diff --git a/test/base_system_registration_dialog_test.rb b/test/base_system_registration_dialog_test.rb index f53fd9b8a..8936a926f 100755 --- a/test/base_system_registration_dialog_test.rb +++ b/test/base_system_registration_dialog_test.rb @@ -2,6 +2,10 @@ require_relative "spec_helper" +require "registration/ui/base_system_registration_dialog" + +Yast.import "Packages" + describe Registration::UI::BaseSystemRegistrationDialog do include Yast::UIShortcuts diff --git a/test/migration_finish_workflow_spec.rb b/test/migration_finish_workflow_spec.rb index 897261d40..76c53cbfa 100755 --- a/test/migration_finish_workflow_spec.rb +++ b/test/migration_finish_workflow_spec.rb @@ -2,6 +2,8 @@ require_relative "spec_helper" +require "registration/ui/migration_finish_workflow" + describe Registration::UI::MigrationFinishWorkflow do describe "#run_sequence" do it "restores the repository setup and returns :next" do diff --git a/test/migration_repos_selection_dialog_test.rb b/test/migration_repos_selection_dialog_test.rb index 2ab2df4d2..4af926168 100755 --- a/test/migration_repos_selection_dialog_test.rb +++ b/test/migration_repos_selection_dialog_test.rb @@ -2,6 +2,9 @@ require_relative "spec_helper" +require "registration/ui/migration_repos_selection_dialog" +require "registration/migration_repositories" + include Yast::UIShortcuts describe Registration::UI::MigrationReposSelectionDialog do diff --git a/test/migration_repos_workflow_spec.rb b/test/migration_repos_workflow_spec.rb index 19ccf2e32..b1752b41e 100755 --- a/test/migration_repos_workflow_spec.rb +++ b/test/migration_repos_workflow_spec.rb @@ -2,6 +2,8 @@ require_relative "spec_helper" +require "registration/ui/migration_repos_workflow" + describe Registration::UI::MigrationReposWorkflow do describe "#run_sequence" do before do diff --git a/test/migration_repositories_spec.rb b/test/migration_repositories_spec.rb index a3f812859..b4357d1a4 100755 --- a/test/migration_repositories_spec.rb +++ b/test/migration_repositories_spec.rb @@ -2,6 +2,8 @@ require_relative "spec_helper" +require "registration/migration_repositories" + describe Registration::MigrationRepositories do describe ".reset" do it "resets the selected packages" do diff --git a/test/migration_selection_dialog_test.rb b/test/migration_selection_dialog_test.rb index 30529465f..1b6c24eb6 100755 --- a/test/migration_selection_dialog_test.rb +++ b/test/migration_selection_dialog_test.rb @@ -1,6 +1,9 @@ #! /usr/bin/env rspec require_relative "spec_helper" + +require "registration/ui/migration_selection_dialog" + include Yast::UIShortcuts describe Registration::UI::MigrationSelectionDialog do diff --git a/test/offline_migration_workflow_test.rb b/test/offline_migration_workflow_test.rb index 9e2efb608..df03c2fb6 100755 --- a/test/offline_migration_workflow_test.rb +++ b/test/offline_migration_workflow_test.rb @@ -2,6 +2,8 @@ require_relative "spec_helper" +require "registration/ui/offline_migration_workflow" + describe Registration::UI::OfflineMigrationWorkflow do describe "#main" do before do diff --git a/test/registration/clients/scc_auto_test.rb b/test/registration/clients/scc_auto_test.rb index 3bd150a19..56ed94c3a 100755 --- a/test/registration/clients/scc_auto_test.rb +++ b/test/registration/clients/scc_auto_test.rb @@ -2,6 +2,7 @@ require_relative "../../spec_helper" require "y2packager/control_product_spec" +require "registration/clients/scc_auto" describe Registration::Clients::SCCAuto do let(:config) { ::Registration::Storage::Config.instance } diff --git a/test/registration_sync_workflow_spec.rb b/test/registration_sync_workflow_spec.rb index dbedbda64..ceddfc655 100755 --- a/test/registration_sync_workflow_spec.rb +++ b/test/registration_sync_workflow_spec.rb @@ -2,6 +2,8 @@ require_relative "spec_helper" +require "registration/ui/registration_sync_workflow" + describe Registration::UI::RegistrationSyncWorkflow do describe "#run_sequence" do let(:registration) { Registration::Registration.new } diff --git a/test/registration_update_dialog_test.rb b/test/registration_update_dialog_test.rb index f78707b05..11b76ae0d 100755 --- a/test/registration_update_dialog_test.rb +++ b/test/registration_update_dialog_test.rb @@ -2,6 +2,8 @@ require_relative "spec_helper" +require "registration/ui/registration_update_dialog" + describe Registration::UI::RegistrationUpdateDialog do subject { Registration::UI::RegistrationUpdateDialog }