<commit_before># vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
from survey.features.page_objects.base import PageObject


class NewHouseholdMemberPage(PageObject):
    def __init__(self, browser, household):
        self.browser = browser
        self.household = household
        self.url = '/households/%d/member/new/' % household.id

    def validate_fields(self):
        self.validate_fields_present(['Family Name', 'Sex', 'Date of birth', 'Create', 'Cancel'])

    def fill_valid_member_values(self, data):
        self.browser.fill_form(data)


class EditHouseholdMemberPage(PageObject):

    def __init__(self, browser, household,member):
        self.browser = browser
        self.household = household
        self.member = member
        self.url = '/households/%d/member/%d/edit/' % (household.id,member.id)

    def validate_member_details(self, household_member):
        self.browser.is_text_present(household_member.surname)
        self.browser.is_text_present(household_member.date_of_birth)
        self.is_radio_selected('male',True)

    def fill_valid_member_values(self, data):
        self.browser.fill_form(data)


class DeleteHouseholdMemberPage(PageObject):
    def __init__(self, browser, household, member):
        self.browser = browser
        self.household = household
        self.member = member
        self.url = '/households/%d/member/%d/delete/' % (household.id, member.id)

    def see_delete_confirmation_modal(self):
<<<<<<< HEAD
        self.is_text_present("Are you sure you want to delete %s" % self.member.surname)
=======
        self.is_text_present("Delete Household Member")
        self.is_text_present("Confirm: Are you sure you want to delete %s?" % self.member.surname)


>>>>>>> changing delete householdmember link to use actual link not just word delete --fixing build<commit_msg>fixing rebase messes<commit_after># vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
from survey.features.page_objects.base import PageObject


class NewHouseholdMemberPage(PageObject):
    def __init__(self, browser, household):
        self.browser = browser
        self.household = household
        self.url = '/households/%d/member/new/' % household.id

    def validate_fields(self):
        self.validate_fields_present(['Family Name', 'Sex', 'Date of birth', 'Create', 'Cancel'])

    def fill_valid_member_values(self, data):
        self.browser.fill_form(data)


class EditHouseholdMemberPage(PageObject):

    def __init__(self, browser, household,member):
        self.browser = browser
        self.household = household
        self.member = member
        self.url = '/households/%d/member/%d/edit/' % (household.id,member.id)

    def validate_member_details(self, household_member):
        self.browser.is_text_present(household_member.surname)
        self.browser.is_text_present(household_member.date_of_birth)
        self.is_radio_selected('male',True)

    def fill_valid_member_values(self, data):
        self.browser.fill_form(data)


class DeleteHouseholdMemberPage(PageObject):
    def __init__(self, browser, household, member):
        self.browser = browser
        self.household = household
        self.member = member
        self.url = '/households/%d/member/%d/delete/' % (household.id, member.id)

    def see_delete_confirmation_modal(self):
        self.is_text_present("Delete Household Member")
        self.is_text_present("Confirm: Are you sure you want to delete %s?" % self.member.surname)
{'fraction_non_alphanumeric': 0.1130660513412172, 'fraction_numerical': 0.0023074704355350445, 'mean_word_length': 3.5392670157068062, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7480307', 'n_tokens_mistral': 1055, 'n_tokens_neox': 1016, 'n_words': 217}