This commit is contained in:
asadiqbal
2015-10-02 17:15:46 +05:00
parent d3f39b2ffb
commit aec1b95945
7 changed files with 21 additions and 2 deletions

View File

@@ -83,6 +83,13 @@ class CertificatesPage(CoursePage):
"""
return self.q(css='.wrapper-content ' + self.certficate_css + ' .no-content').text[0]
@property
def new_certificate_link_text(self):
"""
Returns text of new-button link .
"""
return self.q(css='.wrapper-content ' + self.certficate_css + ' .no-content a.new-button').text[0]
################
# Wait Actions
################

View File

@@ -70,7 +70,8 @@ class CertificatesTest(StudioCourseTest):
shown when no certificate exist.
Given I have a course without certificates
When I go to the Certificates page in Studio
Then I see "You have not created any certificates yet." message
Then I see "You have not created any certificates yet." message and
a link with text "Set up your certificate"
"""
self.certificates_page.visit()
self.assertTrue(self.certificates_page.no_certificates_message_shown)
@@ -78,6 +79,10 @@ class CertificatesTest(StudioCourseTest):
"You have not created any certificates yet.",
self.certificates_page.no_certificates_message_text
)
self.assertIn(
"Set up your certificate",
self.certificates_page.new_certificate_link_text
)
def test_can_create_and_edit_certficate(self):
"""