Esempio n. 1
0
 def opened_obj(self, obj, proposal_email):
     """Build obj from page after clicking on the Open btn in the proposal
 notification email."""
     fast_emails_digest.FastEmailsDigest(
         self._driver).click_proposal_email_open_btn(proposal_email)
     obj_name = objects.get_plural(obj.type)
     service_cls = factory.get_cls_webui_service(obj_name)(self._driver)
     return service_cls.build_obj_from_page()
Esempio n. 2
0
def assert_proposal_notification_connects_to_obj(selenium, obj, proposal,
                                                 proposal_author):
    """Check if proposal notification email exists."""
    proposal_digest_service = (
        emails_digest_service.ProposalDigestService(selenium))
    proposal_digest_service.open_emails_digest()
    proposal_email = get_expected_proposal_email(obj, proposal,
                                                 proposal_author)
    assert (proposal_email
            in fast_emails_digest.FastEmailsDigest().get_proposal_emails())
    actual_obj = proposal_digest_service.opened_obj(obj, proposal_email)
    # when proposals are added, comments for them are not added to `obj`
    actual_obj.comments = None
    base.Test.general_equal_assert(
        copy.deepcopy(obj).repr_ui(), actual_obj, "modified_by",
        *entity.Representation.tree_view_attrs_to_exclude)
Esempio n. 3
0
 def get_review_request_emails(self):
     """Get all review request notification emails."""
     self.open_emails_digest()
     return fast_emails_digest.FastEmailsDigest().get_review_request_emails(
     )
Esempio n. 4
0
 def digest_page(self):
     return fast_emails_digest.FastEmailsDigest(self._driver)
Esempio n. 5
0
 def get_reverted_review_emails(self):
     """Get all notification emails about reviews reverted to 'Unreviewed'
 state."""
     self.open_emails_digest()
     return (
         fast_emails_digest.FastEmailsDigest().get_reverted_review_emails())