Slide 96
Slide 96 text
TESTS SHOULD TELL A STORY
RSPEC ACCEPTANCE TEST NOPE
describe 'items' do
it 'should be able to be dragged into categories' do
item1 = page.find(
send("#{item_prefix}_categorizable_selector"),
text: 'apple')
item2 = page.find(
send("#{item_prefix}_categorizable_selector"),
text: 'oranges')
item3 = page.find(
send("#{item_prefix}_categorizable_selector"),
text: 'bananas')
item4 = page.find(
send("#{item_prefix}_categorizable_selector"),
text: 'kiwis')
category1 = page.find(
send('#{category_prefix}_category_selector'),
text: 'a-f')
category2 = page.find(
send('#{category_prefix}_category_selector'),
text: 'g-n')
category3 = page.find(
send('#{category_prefix}_category_selector'),
text: 'o-w')
category4 = page.find(
send('#{category_prefix}_category_selector'),
text: 'x-z')
item1.drag_to category1
item2.drag_to category2
item3.drag_to category3
item4.drag_to category4
check_button.click
expect(next_button).to be_enabled
end
end