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

Tests for Shift App #726

Merged
merged 4 commits into from
Jul 20, 2018
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions vms/pom/pages/basePage.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ def execute_script(self, script, element):
def remove_i18n(string):
slashes = [pos for pos, char in enumerate(string) if char == '/']
return string[:slashes[2]] + string[slashes[3]:]

4 changes: 3 additions & 1 deletion vms/pom/pages/completedShiftsPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
class CompletedShiftsPage(BasePage):

view_hours_page = PageUrls.completed_shifts_page
live_server_url = ''

def __init__(self, driver):
self.driver = driver
Expand All @@ -16,7 +17,8 @@ def __init__(self, driver):
super(CompletedShiftsPage, self).__init__(driver)

def go_to_completed_shifts(self):
self.home_page.get_completed_shifts_link().click()
link = self.home_page.get_completed_shifts_link().get_attribute('href')
self.get_page('', link)

def edit_hours(self, stime, etime):
self.element_by_xpath(self.elements.SHIFT_EDIT_PATH + '//a').click()
Expand Down
2 changes: 2 additions & 0 deletions vms/pom/pages/manageShiftPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class ManageShiftPage(BasePage):

shift_page = PageUrls.manage_volunteer_shift_page
shift_assignment_text = 'Assign Shift'
VIEW_SHIFT = 'View Shifts'
VIEW_JOB = 'View Jobs'
no_volunteer_shift_message = 'This volunteer does not have any upcoming shifts.'
live_server_url = ''

Expand Down
3 changes: 2 additions & 1 deletion vms/pom/pages/upcomingShiftsPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class UpcomingShiftsPage(BasePage):

view_shift_page = PageUrls.upcoming_shifts_page
no_shift_message = 'You do not have any upcoming shifts.'
live_server_url = ''

def __init__(self, driver):
self.driver = driver
Expand All @@ -19,7 +20,7 @@ def __init__(self, driver):
super(UpcomingShiftsPage, self).__init__(driver)

def view_upcoming_shifts(self):
self.home_page.get_upcoming_shifts_link().send_keys('\n')
self.home_page.get_upcoming_shifts_link().click()

def submit_form(self):
self.element_by_xpath(self.elements.SUBMIT_PATH).submit()
Expand Down
Loading