@@ -18,26 +18,17 @@ def submit_an_aaq_question(self, **kwargs):
18
18
19
19
# Submitting an aaq question for a product flow.
20
20
# Mozilla VPN has an extra optional dropdown menu for choosing an operating system.
21
- def _submit_an_aaq_question (self ,
22
- subject : str ,
23
- body : str ,
24
- topic_name = '' ,
25
- attach_image = False ,
26
- is_premium = False ,
27
- email = "" ,
28
- is_loginless = False ,
21
+ def _submit_an_aaq_question (self , subject : str , body : str , topic_name = '' , attach_image = False ,
22
+ is_premium = False , email = "" , is_loginless = False ,
29
23
expected_locator = None ):
30
24
question_subject = ''
31
25
if is_premium :
32
26
self .add_valid_data_to_all_premium_products_aaq_fields (subject , body , is_loginless ,
33
27
email )
34
28
else :
35
29
question_subject = self .add__valid_data_to_all_aaq_fields_without_submitting (
36
- subject ,
37
- topic_name ,
38
- body ,
39
- attach_image
40
- )
30
+ subject , topic_name , body , attach_image )
31
+
41
32
# Submitting the question.
42
33
self .aaq_form_page .click_aaq_form_submit_button (expected_locator = expected_locator )
43
34
@@ -88,7 +79,9 @@ def add_valid_data_to_all_premium_products_aaq_fields(self, subject: str, body:
88
79
is_loginless : bool , email : str ):
89
80
if is_loginless :
90
81
self .aaq_form_page .fill_contact_email_field (email )
82
+
91
83
self .aaq_form_page .select_random_topic_by_value ()
84
+
92
85
if self .aaq_form_page .is_os_dropdown_menu_visible ():
93
86
self .aaq_form_page .select_random_os_by_value ()
94
87
self .aaq_form_page .add_text_to_premium_aaq_form_subject_field (subject )
@@ -138,10 +131,8 @@ def _editing_reply_flow(self, reply_body: str, submit_reply=True):
138
131
self .aaq_form_page .clear_the_question_body_textarea_field ()
139
132
self .aaq_form_page .add_text_to_aaq_textarea_field (reply_body )
140
133
141
- if submit_reply :
142
- self .aaq_form_page .click_on_update_answer_button ()
143
- else :
144
- self .aaq_form_page .click_aaq_form_cancel_button ()
134
+ self .aaq_form_page .click_on_update_answer_button () if submit_reply else (
135
+ self .aaq_form_page .click_aaq_form_cancel_button ())
145
136
146
137
def delete_question_reply (self , ** kwargs ):
147
138
return self .utilities .re_call_function_on_error (
@@ -152,22 +143,17 @@ def _delete_question_reply(self, answer_id: str, delete_reply: bool):
152
143
self .question_page .click_on_reply_more_options_button (answer_id )
153
144
self .question_page .click_on_delete_this_post_for_a_certain_reply (answer_id )
154
145
155
- if delete_reply :
156
- self .question_page .click_delete_this_question_button ()
157
- else :
158
- self .question_page .click_on_cancel_delete_button ()
146
+ self .question_page .click_delete_this_question_button () if delete_reply else (
147
+ self .question_page .click_on_cancel_delete_button ())
159
148
160
149
def post_question_reply_flow (self , ** kwargs ):
161
150
return self .utilities .re_call_function_on_error (
162
151
lambda : self ._post_question_reply_flow (** kwargs )
163
152
)
164
153
165
- def _post_question_reply_flow (self ,
166
- repliant_username : str ,
167
- reply = '' ,
168
- submit_reply = True ,
169
- quoted_reply = False ,
170
- reply_for_id = '' ) -> str :
154
+ def _post_question_reply_flow (self , repliant_username : str , reply = '' , submit_reply = True ,
155
+ quoted_reply = False , reply_for_id = '' ) -> str :
156
+
171
157
if quoted_reply :
172
158
self .question_page .click_on_reply_more_options_button (reply_for_id )
173
159
self .question_page .click_on_quote_for_a_certain_reply (reply_for_id )
0 commit comments