Sha256: ad67700e582252f76afb71a90c91538a80204e287998439d2f8c3adc103b5743
Contents?: true
Size: 1.37 KB
Versions: 1
Compression:
Stored size: 1.37 KB
Contents
require 'spec_helper' include RSpec::Matchers describe PageObject::Accessors do context 'when declaring new elements on the page' do it "should check the name when adding an element" do class TestPage include PageObject def self.elements [ 'text_field', 'hidden_field', 'text_area', 'select_list', 'link', 'checkbox', 'radio_button', 'radio_button_group', 'button', 'div', 'span', 'table', 'cell', 'image', 'form', 'list_item', 'unordered_list', 'ordered_list', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'paragraph', 'file_field', 'label', 'area', 'canvas', 'audio', 'video', 'svg', 'address', 'figure' ] end elements.each do |ele| expect { self.send ele, :platform, :id => 'foo' }.to raise_error(NameError, "Identifier \'platform\' conflicts with page-object method of the same name") end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
page-object-1.0.1 | spec/page-object/accessors_spec.rb |