'@case: mem004-01
@description: Search Members - Simple Search'

def test_mem004_01_member_search_simple(self):

    self.start()
    self.browser.find_element_by_id('membership_search_simple').clear()
    self.browser.find_element_by_id('membership_search_simple').send_keys('mar')
    self.browser.find_element_by_css_selector('input[type="submit"]').click()
    member = current.s3db['member_membership']
    person = current.s3db['pr_person']
    dbRowCount = current.db((((member.deleted != 'T') & (member.person_id == person.id)) & ((person.first_name.like('%mar%') | person.middle_name.like('%mar%')) | person.last_name.like('%mar%')))).count()
    self.compareRowCount(dbRowCount)
