diff --git a/library/cwm/src/lib/cwm/multi_status_selector.rb b/library/cwm/src/lib/cwm/multi_status_selector.rb
index 829df5ea3..e0857d22a 100644
--- a/library/cwm/src/lib/cwm/multi_status_selector.rb
+++ b/library/cwm/src/lib/cwm/multi_status_selector.rb
@@ -121,6 +121,21 @@ def contents
HBox(content)
end
+ # Updates the content based on items list
+ def refresh
+ new_value = items.map do |item|
+ item_content = item.to_richtext
+
+ if Yast::UI.TextMode
+ "#{item_content}
"
+ else
+ "
#{item_content}
" + end + end + + content.value = new_value.join + end + # @macro seeAbstractWidget def handle(event) if event["ID"].to_s.include?(Item.event_id) @@ -173,11 +188,6 @@ def find_item(needle) items.find { |i| i.id.to_s == needle.to_s } end - # Updates the content based on items list - def refresh - content.value = items.map(&:to_richtext).join("tags" do + expect(content).to_not receive(:value=).with(/
/) + + subject.refresh + end + end + + context "when not running in text mode" do + let(:text_mode) { false } + + it "includes
tags" do + expect(content).to receive(:value=).with(/
/)
+
+ subject.refresh
+ end
+
+ it "does not include
tags" do
+ expect(content).to_not receive(:value=).with(/
/)
+
+ subject.refresh
+ end
+ end
+ end
+
describe "#init" do
it "renders all items" do
expect(subject.items).to all(receive(:to_richtext))
diff --git a/package/yast2.changes b/package/yast2.changes
index d7ee7ba44..6b83323ad 100644
--- a/package/yast2.changes
+++ b/package/yast2.changes
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+Fri Mar 13 01:54:58 UTC 2020 - David Diaz