def page_contact_new(the_config, the_browser, the_database) -> ContactNewPage: """I am on the new contact page.""" p_page = ContactNewPage(_driver=the_browser, _config=the_config['urls']) if p_page.visit() is False: assert sign_in(driver=the_browser, config=the_config, user="******") is True assert p_page.visit() is True return p_page
def page_event_new(the_config, the_browser, the_database) -> EventsPage: """I am on the new event page.""" p_page = EventsPage(_driver=the_browser, _config=the_config['urls']) p_page.event = Event(Date(), headcount=Headcount()) if p_page.visit() is False: assert sign_in(driver=the_browser, config=the_config, user="******") is True assert p_page.visit() is True return p_page
def page_contact(the_config, the_browser, the_faker, the_database) -> ContactPage: """I am on the contact page.""" # Create new contact p_contact = ContactFakerFactory(_faker=the_faker).initialize(config={}) assert sign_in(driver=the_browser, config=the_config, user="******") is True assert new_contact(driver=the_browser, config=the_config['urls'], contact=p_contact) is True # Access the contact page p_page = ContactPage(_driver=the_browser, _config=the_config['urls'], _contact=p_contact) assert p_page.visit() is True return p_page