Skip to content

Commit

Permalink
Remove skip button on disk selection dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Nov 27, 2017
1 parent 1fad392 commit 1058c0e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
6 changes: 0 additions & 6 deletions src/lib/autoinstall/dialogs/disk_selector.rb
Expand Up @@ -95,11 +95,6 @@ def abort_handler
finish_dialog(:abort)
end

# Handler for the `Skip` button
def skip_handler
finish_dialog(:skip)
end

protected

# Returns a list of options containing available disks
Expand Down Expand Up @@ -130,7 +125,6 @@ def disks
def buttons
[
PushButton(Id(:ok), Opt(:okButton, :key_F10, :default), Yast::Label.ContinueButton),
PushButton(Id(:skip), Yast::Label.SkipButton),
abort_button
]
end
Expand Down
12 changes: 1 addition & 11 deletions test/lib/dialogs/disk_selector_test.rb
Expand Up @@ -49,9 +49,8 @@
dialog.dialog_content
end

it "displays ok, skip and abort buttons" do
it "displays ok and abort buttons" do
expect(dialog).to receive(:PushButton).with(Id(:ok), anything, anything)
expect(dialog).to receive(:PushButton).with(Id(:skip), anything)
expect(dialog).to receive(:PushButton).with(Id(:abort), anything, anything)
dialog.dialog_content
end
Expand All @@ -76,7 +75,6 @@

it "only shows the abort button" do
expect(dialog).to_not receive(:PushButton).with(Id(:ok), anything, anything)
expect(dialog).to_not receive(:PushButton).with(Id(:skip), anything)
expect(dialog).to receive(:PushButton).with(Id(:abort), anything, anything)
dialog.dialog_content
end
Expand Down Expand Up @@ -120,13 +118,5 @@
expect(dialog.run).to eq(:abort)
end
end

context "when the user presses 'Skip'" do
let(:button) { :skip }

it "returns :skip" do
expect(dialog.run).to eq(:skip)
end
end
end
end

0 comments on commit 1058c0e

Please sign in to comment.