mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-18 05:25:50 +00:00
Added comment to describe individual steps
This commit is contained in:
parent
cfae2df9aa
commit
8c5859572b
1 changed files with 25 additions and 7 deletions
|
@ -22,29 +22,47 @@ describe 'Petlinic' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'when homepage is available' do
|
describe 'when site is available' do
|
||||||
it 'should have Find Owners page' do
|
it 'should have Find Owners page' do
|
||||||
|
# click on Find Owners menu item
|
||||||
@driver.find_element(:class, 'icon-search').click
|
@driver.find_element(:class, 'icon-search').click
|
||||||
|
|
||||||
|
# wait to see Add Owner on the page that opens
|
||||||
@driver.find_element(:link_text, 'Add Owner')
|
@driver.find_element(:link_text, 'Add Owner')
|
||||||
h2 = @driver.find_element(:tag_name, 'h2')
|
|
||||||
assert h2.text == 'Find Owners'
|
# grab H2 content
|
||||||
|
h2 = @driver.find_element(:tag_name, 'h2').text
|
||||||
|
|
||||||
|
assert h2 == 'Find Owners'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'when homepage is available' do
|
describe 'when site is available' do
|
||||||
it 'should have Veterinarians page' do
|
it 'should have Veterinarians page' do
|
||||||
|
# click on Veterinarian menu item
|
||||||
@driver.find_element(:class, 'icon-th-list').click
|
@driver.find_element(:class, 'icon-th-list').click
|
||||||
|
|
||||||
|
# wait to see View as XML on the page that opens
|
||||||
@driver.find_element(:link_text, 'View as XML')
|
@driver.find_element(:link_text, 'View as XML')
|
||||||
h2 = @driver.find_element(:tag_name, 'h2')
|
|
||||||
assert h2.text == 'Veterinarians'
|
# grab H2 content
|
||||||
|
h2 = @driver.find_element(:tag_name, 'h2').text
|
||||||
|
|
||||||
|
assert h2 == 'Veterinarians'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'when homepage is available' do
|
describe 'when site is available' do
|
||||||
it 'should have Search for Veterinarian feature' do
|
it 'should have Search for Veterinarian feature' do
|
||||||
|
# click on Veterinarian menu item
|
||||||
@driver.find_element(:class, 'icon-th-list').click
|
@driver.find_element(:class, 'icon-th-list').click
|
||||||
|
|
||||||
|
# type Veterinarian name in search box
|
||||||
@driver.find_element(:tag_name, 'input').send_keys('Helen Leary')
|
@driver.find_element(:tag_name, 'input').send_keys('Helen Leary')
|
||||||
|
|
||||||
|
# grab first cell content in filtered results
|
||||||
result = @driver.find_element(:css, 'td.sorting_1').text
|
result = @driver.find_element(:css, 'td.sorting_1').text
|
||||||
|
|
||||||
assert result == 'Helen Leary'
|
assert result == 'Helen Leary'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue