Exemplo n.º 1
0
    def test_add_description_task(self, fixture_driver):
        login_page = LoginPageObject(fixture_driver)
        login_page.login(settings.LOGIN, settings.PASSWORD)

        list_estimate_page = ListEstimatePageObject(fixture_driver)
        list_estimate_page.click_first_estimate()

        detail_estimate_page = DetailEstimatePageObject(fixture_driver)
        detail_estimate_page.click_add_phase_button()
        detail_estimate_page.send_custom_name_phase(settings.CUSTOM_NAME_PHASE)
        detail_estimate_page.confirm_add_phase()

        detail_phase_page = DetailPhasePageObject(fixture_driver)
        detail_phase_page.open_add_task_window()
        detail_phase_page.add_custom_task(settings.CUSTOM_NAME_TASK)

        detail_phase_page.click_description_feature_or_task(0)
        assert detail_phase_page.get_description_feature_or_task_input_count()

        description_task_text = detail_phase_page.enter_description_feature_or_task(
            settings.DESCRIPTION_TASK)
        detail_phase_page.click_description_feature_or_task(0)
        assert not detail_phase_page.get_description_feature_or_task_input_count(
        )

        detail_phase_page.click_description_feature_or_task(0)
        assert detail_phase_page.get_description_feature_or_task_input_count()

        current_description_task_text = detail_phase_page.get_current_description_feature_or_task_input_text(
        )
        assert description_task_text == current_description_task_text
Exemplo n.º 2
0
    def test_add_task_for_phase(self, fixture_driver):
        login_page = LoginPageObject(fixture_driver)
        login_page.login(settings.LOGIN, settings.PASSWORD)

        list_estimate_page = ListEstimatePageObject(fixture_driver)
        list_estimate_page.click_first_estimate()

        detail_estimate_page = DetailEstimatePageObject(fixture_driver)
        detail_estimate_page.click_add_phase_button()
        detail_estimate_page.send_custom_name_phase(settings.CUSTOM_NAME_PHASE)
        detail_estimate_page.confirm_add_phase()

        detail_phase_page = DetailPhasePageObject(fixture_driver)
        detail_phase_page.open_add_task_window()
        assert detail_phase_page.check_feature_or_task_window()

        name_task = detail_phase_page.add_task(0)
        assert detail_phase_page.search_task(name_task)
Exemplo n.º 3
0
    def test_add_max_time_for_task(self, fixture_driver):
        login_page = LoginPageObject(fixture_driver)
        login_page.login(settings.LOGIN, settings.PASSWORD)

        list_estimate_page = ListEstimatePageObject(fixture_driver)
        list_estimate_page.click_first_estimate()

        detail_estimate_page = DetailEstimatePageObject(fixture_driver)
        detail_estimate_page.click_add_phase_button()
        detail_estimate_page.send_custom_name_phase(settings.CUSTOM_NAME_PHASE)
        detail_estimate_page.confirm_add_phase()

        detail_phase_page = DetailPhasePageObject(fixture_driver)
        detail_phase_page.open_add_task_window()
        detail_phase_page.add_custom_task(settings.CUSTOM_NAME_TASK)

        max_time = detail_phase_page.input_max_time(10)
        assert float(detail_phase_page.get_current_max_time()) == max_time
        total_max_time = detail_phase_page.get_total_max_time_phase()
        assert float(max_time) == float(total_max_time)