refactor and move to selenium
This commit is contained in:
@@ -1,29 +1,27 @@
|
||||
step "the section table should be positioned in the section" do
|
||||
table = page.find(".section-table-#{@table.id}")
|
||||
left = table['style'].to_s.match(/left:(\d+)/)
|
||||
left.should be_present
|
||||
left[1].to_i.should > 10
|
||||
top = table['style'].to_s.match(/top:(\d+)/)
|
||||
top.should be_present
|
||||
top[1].to_i.should > 10
|
||||
page.find(".section-table-#{@table.id}") # wait for table presence
|
||||
|
||||
left = page.evaluate_script("$('.section-table-#{@table.id}').position().left")
|
||||
left.to_i.should > 0
|
||||
|
||||
top = page.evaluate_script("$('.section-table-#{@table.id}').position().top")
|
||||
top.to_i.should > 0
|
||||
end
|
||||
|
||||
step "the section table should be marked as having an active order" do
|
||||
table = page.find(".section-table-#{@table.id}")
|
||||
table['class'].should include 'active_order'
|
||||
assert_element_class ".section-table-#{@table.id}", 'active_order'
|
||||
end
|
||||
|
||||
step "the section table should still be marked as having an active order" do
|
||||
step "the section table should be marked as having an active order"
|
||||
end
|
||||
|
||||
step "the section table should be marked as occupied" do
|
||||
table = page.find(".section-table-#{@table.id}")
|
||||
table['class'].should include 'occupied'
|
||||
assert_element_class ".section-table-#{@table.id}", 'occupied'
|
||||
end
|
||||
|
||||
step "the section table should be marked as in need of help" do
|
||||
table = page.find(".section-table-#{@table.id}")
|
||||
table['class'].should include 'needs_help'
|
||||
assert_element_class ".section-table-#{@table.id}", 'needs_help'
|
||||
end
|
||||
|
||||
step "the section table should not be marked as in need of help" do
|
||||
@@ -97,9 +95,9 @@ step "I click the supplier section normal mode button" do
|
||||
end
|
||||
|
||||
step "I fill in the supplier edit section form with new values" do
|
||||
find('.section-edit-title-field').set 'RenamedSection'
|
||||
find('.section-edit-width-field').set '40'
|
||||
find('.section-edit-height-field').set '52.7'
|
||||
js_set_field '.section-edit-title-field', 'RenamedSection'
|
||||
js_set_field '.section-edit-width-field', 40
|
||||
js_set_field '.section-edit-height-field', 52.7
|
||||
end
|
||||
|
||||
step "the last section tab header should have the newly filled in name" do
|
||||
|
||||
Reference in New Issue
Block a user