druid-ts 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +6 -7
- data/Gemfile +0 -5
- data/druid.gemspec +2 -1
- data/features/area.feature +0 -1
- data/features/audio.feature +0 -2
- data/features/bold.feature +0 -1
- data/features/canvas.feature +0 -2
- data/features/div.feature +0 -2
- data/features/heading.feature +0 -10
- data/features/italic.feature +0 -1
- data/features/label.feature +0 -2
- data/features/link.feature +0 -2
- data/features/list_item.feature +0 -2
- data/features/ordered_list.feature +0 -2
- data/features/paragraph.feature +0 -2
- data/features/span.feature +0 -2
- data/features/step_definations/element_steps.rb +2 -2
- data/features/step_definations/section_steps.rb +1 -1
- data/features/table.feature +0 -2
- data/features/table_cell.feature +0 -2
- data/features/unordered_list.feature +0 -3
- data/features/video.feature +0 -11
- data/lib/druid.rb +1 -5
- data/lib/druid/accessors.rb +2 -296
- data/lib/druid/assist.rb +1 -9
- data/lib/druid/elements/button.rb +0 -4
- data/lib/druid/elements/check_box.rb +0 -4
- data/lib/druid/elements/div.rb +0 -3
- data/lib/druid/elements/element.rb +3 -266
- data/lib/druid/elements/file_field.rb +0 -3
- data/lib/druid/elements/form.rb +0 -9
- data/lib/druid/elements/hidden_field.rb +0 -4
- data/lib/druid/elements/image.rb +0 -4
- data/lib/druid/elements/label.rb +0 -3
- data/lib/druid/elements/link.rb +0 -16
- data/lib/druid/elements/list_item.rb +0 -4
- data/lib/druid/elements/option.rb +0 -6
- data/lib/druid/elements/ordered_list.rb +0 -4
- data/lib/druid/elements/radio_button.rb +0 -3
- data/lib/druid/elements/select_list.rb +0 -26
- data/lib/druid/elements/span.rb +0 -4
- data/lib/druid/elements/table_cell.rb +0 -3
- data/lib/druid/elements/table_row.rb +4 -0
- data/lib/druid/elements/text_area.rb +0 -17
- data/lib/druid/elements/text_field.rb +0 -7
- data/lib/druid/elements/unordered_list.rb +0 -4
- data/lib/druid/page_populator.rb +15 -0
- data/lib/druid/version.rb +1 -1
- data/spec/druid/druid_spec.rb +1 -21
- data/spec/druid/elements/area_spec.rb +0 -8
- data/spec/druid/elements/bold_spec.rb +0 -9
- data/spec/druid/elements/button_spec.rb +0 -8
- data/spec/druid/elements/canvas_spec.rb +0 -9
- data/spec/druid/elements/check_box_spec.rb +0 -9
- data/spec/druid/elements/div_spec.rb +0 -9
- data/spec/druid/elements/element_spec.rb +6 -18
- data/spec/druid/elements/file_field_spec.rb +0 -9
- data/spec/druid/elements/form_spec.rb +0 -9
- data/spec/druid/elements/heading_spec.rb +0 -9
- data/spec/druid/elements/hidden_field_spec.rb +0 -9
- data/spec/druid/elements/image_spec.rb +0 -9
- data/spec/druid/elements/itatic_spec.rb +1 -10
- data/spec/druid/elements/label_spec.rb +0 -9
- data/spec/druid/elements/link_spec.rb +0 -16
- data/spec/druid/elements/list_item_spec.rb +0 -9
- data/spec/druid/elements/ordered_list_spec.rb +0 -9
- data/spec/druid/elements/paragraph_spec.rb +0 -9
- data/spec/druid/elements/radio_button_spec.rb +0 -9
- data/spec/druid/elements/select_list_spec.rb +0 -9
- data/spec/druid/elements/span_spec.rb +0 -9
- data/spec/druid/elements/table_cell_spec.rb +0 -9
- data/spec/druid/elements/table_row_spec.rb +0 -8
- data/spec/druid/elements/table_spec.rb +0 -9
- data/spec/druid/elements/text_area_spec.rb +0 -9
- data/spec/druid/elements/text_field_spec.rb +0 -9
- data/spec/druid/elements/unordered_list_spec.rb +0 -9
- data/spec/druid/page_populator_spec.rb +5 -3
- metadata +15 -15
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::FileField do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :index, :name, :xpath, :title].each do |t|
|
8
|
-
identifier = Druid::Elements::FileField.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
let(:element) { double 'element' }
|
16
7
|
let(:file_field) { Druid::Elements::FileField.new(element) }
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::Form do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :index, :name, :xpath, :action].each do |t|
|
8
|
-
identifier = Druid::Elements::Form.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
let(:element) { double 'element' }
|
16
7
|
let(:form) { Druid::Elements::Form.new(element) }
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::Heading do
|
5
|
-
describe "When mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :index, :name, :xpath].each do |t|
|
8
|
-
identifier = Druid::Elements::Heading.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
it "should register with tag :h1" do
|
16
7
|
expect(Druid::Elements.element_class_for(:h1)).to be Druid::Elements::Heading
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::HiddenField do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :index, :name, :xpath, :value].each do |t|
|
8
|
-
identifier = Druid::Elements::HiddenField.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
it "should register with type :hidden" do
|
16
7
|
expect(Druid::Elements.element_class_for(:input, :hidden)).to be Druid::Elements::HiddenField
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::Image do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :index, :name, :xpath, :alt].each do |t|
|
8
|
-
identifier = Druid::Elements::Image.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
let(:element) { 'element' }
|
16
7
|
let(:image) { Druid::Elements::Image.new(element) }
|
@@ -2,16 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Druid::Elements::Italic do
|
4
4
|
let(:italic) { Druid::Elements::Italic}
|
5
|
-
|
6
|
-
describe "when mapping how to find an element" do
|
7
|
-
it "should map watir types to same" do
|
8
|
-
[:class, :id, :idenx, :name, :xpath, :css].each do |t|
|
9
|
-
identifier = italic.identifier_for t => 'value'
|
10
|
-
expect(identifier.keys.first).to eql t
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
5
|
+
|
15
6
|
describe "interface" do
|
16
7
|
it "should register with tag :i" do
|
17
8
|
expect(Druid::Elements.element_class_for(:i)).to eql Druid::Elements::Italic
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::Label do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :text, :index, :xpath].each do |t|
|
8
|
-
identifier = Druid::Elements::Label.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
it "should register with tag :label" do
|
16
7
|
expect(Druid::Elements.element_class_for(:label)).to be Druid::Elements::Label
|
@@ -2,22 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::Link do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :href, :id, :index, :name, :text, :xpath, :css, :title].each do |t|
|
8
|
-
identifier = Druid::Elements::Link.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
it "should map selenium types to watir" do
|
14
|
-
[:link, :link_text].each do |t|
|
15
|
-
identifier = Druid::Elements::Link.identifier_for t => 'value'
|
16
|
-
expect(identifier.keys.first).to eql :text
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
5
|
describe "interface" do
|
22
6
|
it "should register with tag :a" do
|
23
7
|
expect(Druid::Elements.element_class_for(:a)).to be Druid::Elements::Link
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::ListItem do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :index, :name, :xpath, :text].each do |t|
|
8
|
-
identifier = Druid::Elements::ListItem.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
it "should register as tag_name :li" do
|
16
7
|
expect(Druid::Elements.element_class_for(:li)).to be Druid::Elements::ListItem
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::OrderedList do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :index, :xpath].each do |t|
|
8
|
-
identifier = Druid::Elements::OrderedList.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
let(:element) { double 'element' }
|
16
7
|
let(:ol) { Druid::Elements::OrderedList.new(element) }
|
@@ -4,15 +4,6 @@ require 'druid/elements'
|
|
4
4
|
describe Druid::Elements::Paragraph do
|
5
5
|
let(:paragraph) { Druid::Elements::Paragraph }
|
6
6
|
|
7
|
-
describe "when mapping how to find an element" do
|
8
|
-
it "should map watir types to same" do
|
9
|
-
[:class, :id, :index, :name, :xpath].each do |t|
|
10
|
-
identifier = paragraph.identifier_for t => 'value'
|
11
|
-
expect(identifier.keys.first).to eql t
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
7
|
describe "interface" do
|
17
8
|
it "should register with type :checkbox" do
|
18
9
|
expect(Druid::Elements.element_class_for(:p)).to be Druid::Elements::Paragraph
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::RadioButton do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :index, :name, :xpath, :value].each do |t|
|
8
|
-
identifier = Druid::Elements::RadioButton.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
let(:element) { double("element") }
|
16
7
|
let(:driver) { double("driver") }
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::SelectList do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :index, :name, :xpath, :text, :value].each do |t|
|
8
|
-
identifier = Druid::Elements::SelectList.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
let(:element) { double 'element' }
|
16
7
|
let(:opts) { [element, element] }
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::Span do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :index, :title, :xpath, :text].each do |t|
|
8
|
-
identifier = Druid::Elements::Span.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
it "should register with tag_name :span" do
|
16
7
|
expect(Druid::Elements.element_class_for(:span)).to be Druid::Elements::Span
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::TableCell do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :index, :xpath, :name, :text].each do |t|
|
8
|
-
identifier = Druid::Elements::TableCell.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
it "should register with tag_name :td" do
|
16
7
|
expect(Druid::Elements.element_class_for(:td)).to be Druid::Elements::TableCell
|
@@ -2,14 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::TableRow do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :name, :xpath, :index].each do |t|
|
8
|
-
identifier = Druid::Elements::TableRow.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
5
|
describe "interface" do
|
14
6
|
let(:element) { double 'element' }
|
15
7
|
let(:table_row) { Druid::Elements::TableRow.new(element) }
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::Table do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :name, :index, :xpath].each do |t|
|
8
|
-
identifier = Druid::Elements::Table.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
let(:element) { double('element')}
|
16
7
|
let(:table) { Druid::Elements::Table.new(element) }
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::TextArea do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :index, :name, :xpath].each do |t|
|
8
|
-
identifier = Druid::Elements::TextArea.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
let(:element) { double "element" }
|
16
7
|
let(:text_area) { Druid::Elements::TextArea.new(element) }
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::TextField do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :index, :name, :text, :xpath, :title, :label].each do |t|
|
8
|
-
identifier = Druid::Elements::TextField.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
let(:element) { double 'element' }
|
16
7
|
let(:text_field) { Druid::Elements::TextField.new(element) }
|
@@ -2,15 +2,6 @@ require 'spec_helper'
|
|
2
2
|
require 'druid/elements'
|
3
3
|
|
4
4
|
describe Druid::Elements::UnOrderedList do
|
5
|
-
describe "when mapping how to find an element" do
|
6
|
-
it "should map watir types to same" do
|
7
|
-
[:class, :id, :index, :xpath].each do |t|
|
8
|
-
identifier = Druid::Elements::UnOrderedList.identifier_for t => 'value'
|
9
|
-
expect(identifier.keys.first).to eql t
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
5
|
describe "interface" do
|
15
6
|
let(:element) { double 'element' }
|
16
7
|
let(:ul) { Druid::Elements::UnOrderedList.new(element) }
|
@@ -44,9 +44,11 @@ describe Druid::PagePopulator do
|
|
44
44
|
end
|
45
45
|
|
46
46
|
it "should set a value in a select list" do
|
47
|
-
|
48
|
-
expect(druid).to receive(:
|
49
|
-
|
47
|
+
list = double('sl')
|
48
|
+
expect(druid).to receive(:sl_element).and_return(list)
|
49
|
+
expect(list).to receive(:options).and_return(['value'])
|
50
|
+
expect(list).to receive(:select).with('value')
|
51
|
+
druid.populate_page_with('sl' => 'value')
|
50
52
|
end
|
51
53
|
|
52
54
|
it "should set a value in a file field" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: druid-ts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Sheng
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.10'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: net-http-persistent
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 2.9.4
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 2.9.4
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: rspec
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +80,20 @@ dependencies:
|
|
94
80
|
- - ">="
|
95
81
|
- !ruby/object:Gem::Version
|
96
82
|
version: '1.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: net-http-persistent
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.0'
|
97
97
|
description: Druid DSL that works with Watir
|
98
98
|
email:
|
99
99
|
- 278570038@qq.com
|