@@ -85,9 +85,36 @@ def get_direct_links_unauth_list(self):
8585 for i in [1 , 2 , 9 , 0 ]:
8686 direct_links .append (links [i ])
8787 att1 = [element .get_attribute ("href" ) for element in direct_links ]
88- print (* att1 , len (att1 ), sep = '\n ' )
88+ # print(*att1, len(att1), sep='\n')
8989 return direct_links
9090
91+ @allure .step ("""Get the list of links in the 'More' dropdown in the Header for an UNAUTHORIZED user -- ACTUAL""" )
92+ def get_dropdown_links_unauth_list (self ):
93+ dropdown_unauth_links = self .elements_are_present (self .locators .DROPDOWN_LINKS_UNAUTH )
94+ att1 = [element .get_attribute ("href" ) for element in dropdown_unauth_links ]
95+ print (* att1 , len (att1 ), sep = '\n ' )
96+ return dropdown_unauth_links
97+
98+
99+
100+ @allure .step ("""Check the 'About', 'Telegram', 'Registration', 'Logo' links are visible for an unauthorized user
101+ -- ACTUAL""" )
102+ def check_direct_links_visibility_unauth (self ):
103+ return all (link .is_displayed () for link in self .get_direct_links_unauth_list ())
104+
105+ @allure .step ("""Check the 'Donate', 'GitHub', 'Contacts', 'Specialists', 'Contributors', 'Used Resources' links
106+ in the 'More' dropdown are invisible for every user -- FOR REVIEW""" )
107+ def check_links_invisibility_in_more (self ):
108+ return all (self .element_is_not_visible (element ) for element in self .get_list_of_links_in_more ())
109+
110+ @allure .step ("""Check the 'Donate', 'GitHub', 'Contacts', 'Specialists', 'Contributors', 'Used Resources' links
111+ in the 'More' dropdown are visible for every user -- FOR REVIEW""" )
112+ def check_links_visibility_in_more (self ):
113+ self .click_more_button ()
114+ return all (link .is_displayed () for link in self .get_list_of_links_in_more ())
115+
116+
117+
91118
92119 # Lists of links for an AUTHORIZED user
93120
@@ -155,10 +182,6 @@ def get_dropdown_external_links_auth_list(self):
155182 return links
156183
157184
158- @allure .step ("Check the 'About', 'Telegram', 'Registration', 'Logo' links are visible for an unauthorized user" )
159- def check_direct_links_visibility_unauth (self ):
160- return all (link .is_displayed () for link in self .get_direct_links_unauth_list ())
161-
162185 @allure .step ("""Check the 'Groups', 'Statistics', 'About', 'Telegram', 'Registration', 'Logo' links are visible "
163186 for an authorized user""" )
164187 def check_direct_links_visibility_auth (self ):
@@ -178,16 +201,6 @@ def get_list_of_links_in_more1(self):
178201 def get_list_of_links_in_more (self ):
179202 return self .elements_are_present (self .locators .LINKS_IN_MORE )
180203
181- @allure .step ("""Check the 'Donate', 'GitHub', 'Contacts', 'Specialists', 'Contributors', 'Used Resources' links
182- in the 'More' dropdown are invisible for every user -- FOR REVIEW""" )
183- def check_links_invisibility_in_more (self ):
184- return all (self .element_is_not_visible (element ) for element in self .get_list_of_links_in_more ())
185-
186- @allure .step ("""Check the 'Donate', 'GitHub', 'Contacts', 'Specialists', 'Contributors', 'Used Resources' links
187- in the 'More' dropdown are visible for every user -- FOR REVIEW""" )
188- def check_links_visibility_in_more (self ):
189- self .click_more_button ()
190- return all (link .is_displayed () for link in self .get_list_of_links_in_more ())
191204
192205 # Lists of links
193206 @allure .step ("""Get the list of the 'Contacts', 'Specialists', 'Contributors', 'Used Resources' links "
0 commit comments