Commit cac9f97e by Matt Drayer

Merge pull request #9785 from edx/saleem-latif/SOL-1199

SOL-1199
parents 70866104 3741d065
...@@ -12,6 +12,7 @@ import os ...@@ -12,6 +12,7 @@ import os
from bok_choy.promise import EmptyPromise from bok_choy.promise import EmptyPromise
from .course_page import CoursePage from .course_page import CoursePage
from common.test.acceptance.tests.helpers import disable_animations
class CertificatesPage(CoursePage): class CertificatesPage(CoursePage):
...@@ -138,8 +139,10 @@ class CertificatesPage(CoursePage): ...@@ -138,8 +139,10 @@ class CertificatesPage(CoursePage):
""" """
Clicks the main action presented by the prompt (such as 'Delete') Clicks the main action presented by the prompt (such as 'Delete')
""" """
disable_animations(self)
self.wait_for_confirmation_prompt() self.wait_for_confirmation_prompt()
self.q(css='button.action-primary').first.click() self.q(css='.prompt button.action-primary').first.click()
self.wait_for_element_invisibility('.prompt', 'wait for pop up to disappear')
self.wait_for_ajax() self.wait_for_ajax()
...@@ -263,7 +266,7 @@ class Certificate(object): ...@@ -263,7 +266,7 @@ class Certificate(object):
Returns whether or not the certificate delete icon is present. Returns whether or not the certificate delete icon is present.
""" """
EmptyPromise( EmptyPromise(
lambda: self.find_css('.actions .delete').present, lambda: self.find_css('.actions .delete.action-icon').present,
'Certificate delete button is displayed' 'Certificate delete button is displayed'
).fulfill() ).fulfill()
...@@ -323,8 +326,7 @@ class Certificate(object): ...@@ -323,8 +326,7 @@ class Certificate(object):
Remove the first (possibly the only) certificate from the set Remove the first (possibly the only) certificate from the set
""" """
self.wait_for_certificate_delete_button() self.wait_for_certificate_delete_button()
self.find_css('.actions .delete').first.click() self.find_css('.actions .delete.action-icon').first.click()
self.page.wait_for_ajax()
class Signatory(object): class Signatory(object):
......
...@@ -107,7 +107,6 @@ class CertificatesTest(StudioCourseTest): ...@@ -107,7 +107,6 @@ class CertificatesTest(StudioCourseTest):
self.assertIn("Updated Course Title Override 2", certificate.course_title) self.assertIn("Updated Course Title Override 2", certificate.course_title)
@flaky # TODO fix this, see SOL-1199
def test_can_delete_certificate(self): def test_can_delete_certificate(self):
""" """
Scenario: Ensure that the user can delete certificate. Scenario: Ensure that the user can delete certificate.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment