Sha256: 14140a279e9b54b62f2da8074edce26834cb7111aef7a975a05073d672366e8e
Contents?: true
Size: 1.26 KB
Versions: 17
Compression:
Stored size: 1.26 KB
Contents
require 'spec_helper' describe "MsUia::Functions", :if => SpecHelper.adapter == :ms_uia do context "working with expandable / collapsable items" do let(:tree_view) { RAutomation::Window.new(:title => "MainFormWindow").select_list(:id => "treeView") } def options tree_view.options.map &:text end it "can be expanded by value" do options.should eq ["Parent One", "Parent Two"] tree_view.expand "Parent One" options.should eq ["Parent One", "Child 1", "Child 2", "Parent Two"] end it "can be expanded by index" do options.should eq ["Parent One", "Parent Two"] tree_view.expand 0 tree_view.expand 2 options.should eq ["Parent One", "Child 1", "Child 2", "Grandchild 1", "Parent Two"] end it "can be collapsed by value" do tree_view.expand "Parent One" options.should eq ["Parent One", "Child 1", "Child 2", "Parent Two"] tree_view.collapse "Parent One" options.should eq ["Parent One", "Parent Two"] end it "can be collapsed by index" do tree_view.expand 0 options.should eq ["Parent One", "Child 1", "Child 2", "Parent Two"] tree_view.collapse 0 options.should eq ["Parent One", "Parent Two"] end end end
Version data entries
17 entries across 17 versions & 1 rubygems