Esempio n. 1
0
    def test_enter_requests(self, driver, num, with_del):
        setup(driver)
        link = MainFunc.take_DNSID(URLs.ENTER_REQUEST_LINK, driver.current_url)
        page = EnterRequestDocumentPage(driver, link)
        page.open()
        page.enter_reqests_fields(num, True, False)
        page.enter_reqests_fields(num, False, False)
        page.enter_reqests_fields(num, True, True)
        page.enter_reqests_fields(num, False, True)
        page.create_and_send_agree_sheet(delete=with_del)
        doc_id = page.save_document_id()

        setup(driver, "a")
        link = MainFunc.create_doc_link(
            MainFunc.take_DNSID(URLs.OPENED_DOCUMENT_LINK, driver.current_url),
            doc_id)
        EnterRequestDocumentPage(driver, link).open()
        AllDocumentFieldPage(driver).register_doc(
            EnterRequestValues.ENTER_REQUEST_TITLE)
Esempio n. 2
0
    def test_regulation_notification_document(self, driver, npa_number,
                                              regulation_type, field_name,
                                              date):
        link = MainFunc.take_DNSID(URLs.SYSTEM_NOTIFY_LINK, driver.current_url)
        page = SystemNotificationPage(driver, link)
        page.open()
        page.enter_email_notification(field_name)
        page.click_to_save_button()

        link = MainFunc.take_DNSID(URLs.REGULATION_LINK, driver.current_url)
        page = RegulationDocumentPage(driver, link)
        page.open()
        page.regulation_doc(npa_number, regulation_type,
                            TestRegulationNotification.NPA_ID, False, True)
        page.create_and_send_agree_sheet()
        doc_id = page.save_document_id()

        self.enter_in_acc(driver, "a")
        link = MainFunc.create_doc_link(
            MainFunc.take_DNSID(URLs.OPENED_DOCUMENT_LINK, driver.current_url),
            doc_id)
        page = RegulationDocumentPage(driver, link)
        page.open()
        page.register_and_send_enter_regulation_document()
        page.send_medo()

        TestRegulationNotification.NPA_ID = page.create_and_send_answer(
            page.modify_npa_type(regulation_type, 1),
            TestRegulationNotification.NPA_ID, True)

        self.enter_in_acc(driver)
        link = MainFunc.take_DNSID(URLs.REGULATION_CONTROL_LINK,
                                   driver.current_url)
        page = RegulationControlPage(driver, link)
        page.open()
        page.enter_npa_identificator_field(TestRegulationNotification.NPA_ID)
        page.send_message_key_date(date, field_name)

        link = MainFunc.take_DNSID(URLs.SYSTEM_NOTIFY_LINK, driver.current_url)
        page = SystemNotificationPage(driver, link)
        page.open()
        page.write_in_doc(TestRegulationNotification.NPA_ID, field_name,
                          regulation_type, date)