Commit b10616eb authored by Henrique Varella Ehrenfried's avatar Henrique Varella Ehrenfried
Browse files

Issue#2967: Finish creation of tests for Make my schedule

parent 78c3eace
......@@ -10,21 +10,8 @@ Scenario: Schedule is available and I am able to get scheduled
When I click in schedule
Then the system redirects me to the confirmation page
# Scenario: The service place selected does not offer the type of service I want to schedule
# Given that I selected a service place
# When I look for the type of service I want to schedule
# And this type of service is not offered in this place
# Then the system shows me only the available types of service in this place
# Scenario: Schedule unavailable
# Given that I selected a service place
# And the place I selected offers the type of service I want to schedule
# And there are not available schedules
# When I select a type of schedule
# Then the system does not show available schedules in the calendar
# Scenario: Incorrectly filled fields
# Given that the fields were not correctly filled
# When i click in schedule
# Then the system should not schedule me
# And an error message telling the incorrectly fields is displayed
\ No newline at end of file
Scenario: The service place selected does not offer the type of service I want to schedule
Given that I selected a service place
When I look for the type of service I want to schedule
And this type of service is not offered in this place
Then I cannot get scheduled
......@@ -163,8 +163,6 @@ Given(/^that I selected a service place$/) do
click_on('Efetuar Agendamento')
click_on('Concordar e continuar')
end
Given(/^that the fields were not correctly filled$/) do
end
Given(/^that I am registred in the system$/) do
end
Given(/^that I am not registred in the system$/) do
......@@ -2911,12 +2909,9 @@ Given(/^there are available schedules$/) do
schedule = schedule.first
sleep 2
select(schedule, :from => "horario_id")
end
Given(/^there are available schedules to schedule a citizen$/) do
end
Given(/^there are not available schedules$/) do
end
Given(/^I fill my log in data correctly$/) do
end
Given(/^I fill the boxes with my data$/) do
......
......@@ -181,11 +181,8 @@ Then(/^a PDF file is generated with the available shifts$/) do
end
Then(/^a PDF file is not generated$/) do
end
Then(/^the system shows me only the available types of service in this place$/) do
end
Then(/^the system does not show available schedules in the calendar$/) do
end
Then(/^the system should not schedule me$/) do
Then(/^I cannot get scheduled$/) do
click_on('Home')
end
Then(/^I should not go to main page$/) do
actualUrl = URI.parse(current_url)
......@@ -545,8 +542,6 @@ Then(/^the system informs that there are no shifts that match the filter$/) do
end
Then(/^the system informs that there are no shifts registered$/) do
end
Then(/^an error message telling the incorrectly fields is displayed$/) do
end
Then(/^a error message telling that the CPF or the password is invalid is displayed$/) do
find('#alert', text: 'CPF ou senha inválidos.', :match => :prefer_exact)
end
......
......@@ -129,12 +129,13 @@ When(/^I click in schedule$/) do
click_on('Continuar')
end
When(/^I look for the type of service I want to schedule$/) do
select('Sector 1', :from => "sector_id")
sleep 2
@serviceType = find('#service_type_id').all('option').collect(&:text)
end
When(/^this type of service is not offered in this place$/) do
end
When(/^I select a type of schedule$/) do
end
When(/^i click in schedule$/) do
service = @serviceType.include?('Consulta com Advogado da cidade vizinha')
expect(service).to be(false)
end
When(/^I click in log in$/) do
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment