-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #948 from yast/fix/desktop-modules-reading
Fix desktop modules reading
- Loading branch information
Showing
8 changed files
with
174 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
library/desktop/test/data/usr/share/applications/YaST2/org.opensuse.yast.AddOn.desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[Desktop Entry] | ||
Type=Application | ||
Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Software; | ||
|
||
X-KDE-ModuleType=Library | ||
X-KDE-HasReadOnlyMode=true | ||
X-SuSE-YaST-Call=add-on | ||
|
||
X-SuSE-YaST-Group=Software | ||
X-SuSE-YaST-Argument= | ||
X-SuSE-YaST-RootOnly=true | ||
X-SuSE-YaST-AutoInst=configure | ||
X-SuSE-YaST-Geometry= | ||
X-SuSE-YaST-SortKey= | ||
X-SuSE-YaST-AutoInstResource= | ||
X-SuSE-YaST-AutoInstPath=install | ||
X-SuSE-YaST-AutoInstSchema=add-on.rnc | ||
X-SuSE-YaST-AutoInstClonable=true | ||
X-SuSE-YaST-Keywords=update,packages,repositories,software | ||
|
||
Icon=yast-addon | ||
Exec=xdg-su -c "/sbin/yast2 add-on" | ||
|
||
Name=YaST Add-On Products | ||
GenericName=Add-On Products | ||
Comment=Install or remove add-on products | ||
StartupNotify=true |
27 changes: 27 additions & 0 deletions
27
library/desktop/test/data/usr/share/applications/YaST2/org.opensuse.yast.LAN.desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[Desktop Entry] | ||
Type=Application | ||
Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-System; | ||
|
||
X-KDE-ModuleType=Library | ||
X-KDE-HasReadOnlyMode=true | ||
X-SuSE-YaST-Call=lan | ||
|
||
X-SuSE-YaST-Group=System | ||
X-SuSE-YaST-Argument= | ||
X-SuSE-YaST-RootOnly=true | ||
X-SuSE-YaST-AutoInst=all | ||
X-SuSE-YaST-Geometry= | ||
X-SuSE-YaST-SortKey= | ||
X-SuSE-YaST-AutoInstResource=networking | ||
X-SuSE-YaST-AutoInstClonable=true | ||
X-SuSE-YaST-AutoInstSchema=networking.rnc | ||
X-SuSE-YaST-AutoInstRequires=host | ||
|
||
Icon=yast-lan | ||
Exec=xdg-su -c "/sbin/yast2 lan" | ||
|
||
Name=YaST Network | ||
GenericName=Network Settings | ||
Comment=Configure network cards, hostname and routing | ||
StartupNotify=true | ||
X-SuSE-YaST-Keywords=network,lan,dns,routing |
26 changes: 26 additions & 0 deletions
26
library/desktop/test/data/usr/share/applications/YaST2/services-manager.desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[Desktop Entry] | ||
Type=Application | ||
Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-System; | ||
|
||
X-KDE-ModuleType=Library | ||
X-KDE-HasReadOnlyMode=true | ||
X-SuSE-YaST-Call=services-manager | ||
|
||
X-SuSE-YaST-Group=System | ||
X-SuSE-YaST-Argument= | ||
X-SuSE-YaST-RootOnly=true | ||
X-SuSE-YaST-AutoInst=all | ||
X-SuSE-YaST-Geometry= | ||
X-SuSE-YaST-SortKey= | ||
X-SuSE-YaST-AutoInstClonable=true | ||
X-SuSE-YaST-AutoInstSchema=services-manager.rnc | ||
X-SuSE-YaST-AutoInstResourceAliases=runlevel | ||
X-SuSE-YaST-Keywords=systemd,system,background | ||
|
||
Icon=yast-services-manager | ||
Exec=xdg-su -c "/sbin/yast2 services-manager" | ||
|
||
Name=YaST Services Manager | ||
GenericName=Configure running services and the default target | ||
StartupNotify=true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright (c) [2019] SUSE LLC | ||
# | ||
# All Rights Reserved. | ||
# | ||
# This program is free software; you can redistribute it and/or modify it | ||
# under the terms of version 2 of the GNU General Public License as published | ||
# by the Free Software Foundation. | ||
# | ||
# 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, contact SUSE LLC. | ||
# | ||
# To contact SUSE LLC about this file by physical or electronic mail, you may | ||
# find current contact information at www.suse.com. | ||
|
||
require_relative "test_helper" | ||
|
||
Yast.import "Desktop" | ||
|
||
describe Yast::Desktop do | ||
describe "#Modules" do | ||
around { |e| change_scr_root(DESKTOP_DATA_PATH, &e) } | ||
|
||
before do | ||
Yast::Desktop.Read(["Name"]) | ||
end | ||
|
||
it "returns modules information using the short name as key" do | ||
expect(Yast::Desktop.Modules).to eq( | ||
"add-on" => { "Name" => "YaST Add-On Products" }, | ||
"lan" => { "Name" => "YaST Network" }, | ||
"services-manager" => { "Name" => "YaST Services Manager" } | ||
) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) [2019] SUSE LLC | ||
# | ||
# All Rights Reserved. | ||
# | ||
# This program is free software; you can redistribute it and/or modify it | ||
# under the terms of version 2 of the GNU General Public License as published | ||
# by the Free Software Foundation. | ||
# | ||
# 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, contact SUSE LLC. | ||
# | ||
# To contact SUSE LLC about this file by physical or electronic mail, you may | ||
# find current contact information at www.suse.com. | ||
require_relative "../../../test/test_helper.rb" | ||
|
||
DESKTOP_DATA_PATH = File.join(__dir__, "data") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters