Skip to content

Commit

Permalink
changes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Dec 12, 2016
1 parent b510654 commit 9241b58
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doc/control-file.md
Expand Up @@ -859,7 +859,7 @@ and they will affect the proposed configuration of Partitioning and Software.
A role can also define additional dialogs that are shown when a given role is
selected. It is a common installation dialog with *Abort*, *Cancel* and *Next*
buttons. It supports and uses all parameters from the **GetInstArgs** module.
When going back, it will first shown the last additional dialog and when going
When going back, it will first show the last additional dialog and when going
back through all additional dialogs, it will show again the roles selection.

They were requested in FATE#317481 and they are an evolution of the earlier
Expand Down
1 change: 1 addition & 0 deletions src/lib/installation/select_system_role.rb
Expand Up @@ -108,6 +108,7 @@ def next_handler

private

# gets array of clients to run for given role
def additional_clients_for(role_id)
clients = raw_roles.find { |r| r["id"] == role_id }["additional_dialogs"]
clients ||= ""
Expand Down
6 changes: 3 additions & 3 deletions test/select_system_role_test.rb
Expand Up @@ -73,8 +73,8 @@
expect(subject.run).to eq(:back)
end

context "when role contain additional dialogs" do
it "show first dialog when going forward" do
context "when a role contains additional dialogs" do
it "shows the first dialog when going forward" do
allow(Yast::Wizard).to receive(:SetContents)
allow(Yast::UI).to receive(:UserInput)
.and_return(:next)
Expand All @@ -87,7 +87,7 @@
expect(subject.run).to eq(:next)
end

it "shows last dialog when going back" do
it "shows the last dialog when going back" do
subject.class.original_role_id = "bar"
allow(Yast::GetInstArgs).to receive(:going_back).and_return(true)
expect(Yast::Wizard).to_not receive(:SetContents)
Expand Down

0 comments on commit 9241b58

Please sign in to comment.