示例#1
0
class TicketReviewPage(ProjectLayout):
    """
    Single ticket view
    """

    def __init__(self):
        super(TicketReviewPage, self).__init__()
        self.modify = Link(self._browser, **self.selector("modify"))
        self.submit = PageElement(self._browser, **self.selector("submit"))

        # Elements that are hidden/non-existing at first
        self.cc_block = None
        self.cc_field = None
        self.cc_button = None

    def activate_modify(self):
        self.modify.click()
        self.cc_block = TextInput(self._browser, **self.selector("cc_block"))
        self.cc_button = PageElement(self._browser, **self.selector("cc_button"))

    def set_cc(self, value):
        # Input field is hidden until block is clicked
        self.cc_field = TextInput(self._browser, **self.selector("cc_input"))
        self.cc_field.value = value
        self.cc_button.click()
示例#2
0
class TicketReviewPage(ProjectLayout):
    """
    Single ticket view
    """
    def __init__(self):
        super(TicketReviewPage, self).__init__()
        self.modify = Link(self._browser, **self.selector('modify'))
        self.submit = PageElement(self._browser, **self.selector('submit'))

        # Elements that are hidden/non-existing at first
        self.cc_block = None
        self.cc_field = None
        self.cc_button = None

    def activate_modify(self):
        self.modify.click()
        self.cc_block = TextInput(self._browser, **self.selector('cc_block'))
        self.cc_button = PageElement(self._browser,
                                     **self.selector('cc_button'))

    def set_cc(self, value):
        # Input field is hidden until block is clicked
        self.cc_field = TextInput(self._browser, **self.selector('cc_input'))
        self.cc_field.value = value
        self.cc_button.click()
示例#3
0
    def remove_project(self):
        button = PageElement(self._browser, 'input[name="remove"]')
        button.click()

        # Handle confirmation dialog: first button is Confirmation
        browser = self._browser
        browser.find_by_css("span.ui-button-text").first.click()
示例#4
0
    def remove_project(self):
        button = PageElement(self._browser, 'input[name="remove"]')
        button.click()

        # Handle confirmation dialog: first button is Confirmation
        browser = self._browser
        browser.find_by_css('span.ui-button-text').first.click()