Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Fix search event test by breaking it into 3 checks #749

Merged
merged 1 commit into from
Jun 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions vms/event/tests/test_shiftSignUp.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def test_shift_sign_up_with_no_slots(self):
# on event page
self.assertEqual(sign_up_page.get_info_box().text, sign_up_page.no_event_message)

def test_search_event(self):
def test_search_event_both_date_present(self):
register_event_utility()
register_job_utility()
register_shift_utility()
Expand All @@ -200,17 +200,32 @@ def test_search_event(self):
# Verify that the event shows up
self.assertEqual(sign_up_page.get_event_name(), 'event')

# a = input()
def test_search_event_start_date_presesnt(self):
register_event_utility()
register_job_utility()
register_shift_utility()

sign_up_page = self.sign_up_page
sign_up_page.live_server_url = self.live_server_url
# Enter only correct starting date
sign_up_page.go_to_sign_up_page()
date = ['05/10/2050', '']
sign_up_page.fill_search_form(date)
# Verify that the event shows up
self.assertEqual(sign_up_page.get_event_name(), 'event')

def test_search_event_end_date_present(self):
register_event_utility()
register_job_utility()
register_shift_utility()

sign_up_page = self.sign_up_page
sign_up_page.live_server_url = self.live_server_url

# Enter correct ending date
sign_up_page.go_to_sign_up_page()
date = ['', '06/15/2050']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line at the end

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done @abhishekarya286 Please review again.

sign_up_page.fill_search_form(date)
# Verify that the event shows up
self.assertEqual(sign_up_page.get_event_name(), 'event')