示例#1
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)
示例#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)
示例#3
0
    def test_add_feature_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.select_phase_buttons()
        assert detail_estimate_page.phase_window_is_present()
        detail_estimate_page.confirm_add_phase()

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

        name_feature = detail_phase_page.add_feature(0)
        assert detail_phase_page.search_feature(name_feature)
示例#4
0
    def test_del_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.click_edit_phase_button()
        assert detail_phase_page.get_del_phase_button()

        del_phase_button = detail_phase_page.get_del_phase_button()
        detail_phase_page.hover_to(del_phase_button)
        assert detail_phase_page.get_tooltip_del_phase()

        detail_phase_page.del_phase(0)
        assert detail_phase_page.get_del_phase_window()
        assert detail_phase_page.get_del_phase_cancel_button()
        assert detail_phase_page.get_del_phase_confirm_button()

        detail_phase_page.click_del_phase_confirm_button()
        assert not detail_estimate_page.check_added_phase()

        detail_phase_page.click_save_edit_phase_button()
        assert not detail_phase_page.get_attribute_display_from_save_edit_phase_button(
        )
        assert detail_estimate_page.check_add_phase_button()
示例#5
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