def _create_project(cls, project_data, questionnaire_data): global_navigation = GlobalNavigationPage(cls.driver) dashboard_page = global_navigation.navigate_to_dashboard_page() create_questionnaire_options_page = dashboard_page.navigate_to_create_project_page( ) cls.create_questionnaire_page = create_questionnaire_options_page.select_blank_questionnaire_creation_option( ) cls.create_questionnaire_page.create_questionnaire_with( project_data, questionnaire_data) questionnaire_code = cls.create_questionnaire_page.get_questionnaire_code( ) overview_page = cls.create_questionnaire_page.save_and_create_project_successfully( ) reminder_setting_page = ProjectOverviewPage( cls.driver).navigate_to_reminder_page() reminder_setting_page.set_frequency("Week") reminder_setting_page.set_week_day("Friday") reminder_setting_page.enable_before_deadline_reminder() reminder_setting_page.save_reminders() cls.driver.wait_for_element(UI_TEST_TIMEOUT, by_css('.success-message-box'), want_visible=True) automatic_reply_sms_page = reminder_setting_page.navigate_to_automatic_reply_sms_page( ) automatic_reply_sms_page.turn_off_reply_messages() cls.questionnaire_tab_page = overview_page.navigate_to_questionnaire_tab( ) cls.driver.wait_for_page_with_title(UI_TEST_TIMEOUT, 'Questionnaire') return overview_page.get_project_title(), questionnaire_code
def _create_project(cls, project_data, questionnaire_data): global_navigation = GlobalNavigationPage(cls.driver) dashboard_page = global_navigation.navigate_to_dashboard_page() create_questionnaire_options_page = dashboard_page.navigate_to_create_project_page() cls.create_questionnaire_page = create_questionnaire_options_page.select_blank_questionnaire_creation_option() cls.create_questionnaire_page.create_questionnaire_with(project_data, questionnaire_data) questionnaire_code = cls.create_questionnaire_page.get_questionnaire_code() cls.create_questionnaire_page.set_questionnaire_language("French") overview_page = cls.create_questionnaire_page.save_and_create_project_successfully() reminder_setting_page = ProjectOverviewPage(cls.driver).navigate_to_reminder_page()\ .click_reminder_settings_tab() reminder_setting_page.set_frequency("Week") reminder_setting_page.set_deadline_type_for_week("Same week") reminder_setting_page.set_week_day("Friday") reminder_setting_page.enable_before_deadline_reminder() reminder_setting_page.save_reminders() cls.questionnaire_tab_page = overview_page.navigate_to_questionnaire_tab() return overview_page.get_project_title(), questionnaire_code