def step_impl(context):
    landing_page = LandingPage(context.browser)
    parent_handle = landing_page.click_login_facebook()

    facebook_verification = FacebookScreen(context.browser)
    facebook_verification.log_in(parent_handle, Config.EXPERT_EMAIL_LOGIN_FB,
                                 Config.EXPERT_PASSWORD_LOGIN_FB)
Exemplo n.º 2
0
def step_imp(context):
    landing_page = LandingPage(context.browser)
    congratulations_modal = CongratulationsModal(context.browser)

    if context.is_terms_and_conditions_modal_visible:
        assert congratulations_modal.get_self() is not None
    else:
        assert landing_page.get_avatar_element() is not None
Exemplo n.º 3
0
def step_imp(context):
    term_and_conditions = TermsAndConditionsModal(context.browser)
    is_terms_and_conditions_modal_visible = term_and_conditions.get_self(
    ) is not None

    # If terms and conditions modal not found, look for avatar to make sure the user has logged in
    is_avatar_visible = None
    if not is_terms_and_conditions_modal_visible:
        landing_page = LandingPage(context.browser)
        is_avatar_visible = landing_page.get_avatar_element() is not None

    # Update context for other steps
    context.is_terms_and_conditions_modal_visible = is_terms_and_conditions_modal_visible

    assert is_terms_and_conditions_modal_visible or is_avatar_visible
def step_imp(context):
    # Set landing page context for the current test
    landing_page = LandingPage(context.browser)
    context.landing_page = landing_page

    # Click login with Google button
    sign_up_modal = SignUpModal(context.browser)
    sign_up_modal.click_sign_up_with_google_button()
Exemplo n.º 5
0
class TestSearchCity(TestBase):

    def setup(self):
        self.landing_page = LandingPage(self.driver)
        self.search_result_page = SearchResultPage(self.driver)

    def test_search_weather_in_your_city(self):
        self.landing_page.open_landing_page()
        self.landing_page.wait_page_load()
        self.landing_page.perform_search_city_txt("Ho Chi Minh city")
        self.search_result_page.verify_first_search_result_title_lbl_is_displayed_as_expected("Thanh pho Ho Chi Minh, VN")
Exemplo n.º 6
0
 def setup(self):
     self.landing_page = LandingPage(self.driver)
     self.search_result_page = SearchResultPage(self.driver)
Exemplo n.º 7
0
def step_impl(context):
    context.landing_page = LandingPage(context.browser)
    assert context.landing_page.is_present()
Exemplo n.º 8
0
def step_impl(context):
    landing_page = LandingPage(context.browser)
    landing_page.click_sign_up_button()