44from selenium .webdriver .support .ui import WebDriverWait
55
66from acceptance_tests .mixins import LoginMixin , CredentialsApiMixin
7- from acceptance_tests .pages import LMSDashboardPage
7+ from acceptance_tests .pages import LMSDashboardPage , LMSProgramListingPage
88
99
1010class RenderCredentialTests (LoginMixin , WebAppTest , CredentialsApiMixin ):
@@ -20,11 +20,15 @@ def test_student_dashboard_with_certificate(self):
2020 student_dashboard = LMSDashboardPage (self .browser ).wait_for_page ()
2121 student_dashboard .is_browser_on_page ()
2222
23- self .assertTrue (student_dashboard .are_credential_links_present ())
23+ student_dashboard .go_to_programs_tab ()
24+ program_listing_page = LMSProgramListingPage (self .browser ).wait_for_page ()
25+ program_listing_page .is_browser_on_page ()
2426
25- credential_link = student_dashboard . get_credential_link ( )
27+ self . assertTrue ( program_listing_page . are_credential_links_present () )
2628
27- student_dashboard .click_credential_link ()
29+ credential_link = program_listing_page .get_credential_link ()
30+
31+ program_listing_page .click_credential_link ()
2832 WebDriverWait (self .browser , 10 ).until (EC .presence_of_element_located ((By .ID , 'action-print-view' )))
2933
3034 # check the credential hash-id matches with rendered credential page.
@@ -41,4 +45,8 @@ def test_student_dashboard_with_revoked_certificate(self):
4145 student_dashboard = LMSDashboardPage (self .browser ).wait_for_page ()
4246 student_dashboard .is_browser_on_page ()
4347
44- self .assertFalse (student_dashboard .are_credential_links_present ())
48+ student_dashboard .go_to_programs_tab ()
49+ program_listing_page = LMSProgramListingPage (self .browser ).wait_for_page ()
50+ program_listing_page .is_browser_on_page ()
51+
52+ self .assertFalse (program_listing_page .are_credential_links_present ())
0 commit comments