Exemple #1
0
class AddElementView(ElementForm):

    component = Text(
        locator='.//div[normalize-space(.)="Drag your components here"]')
    add_section = Text(locator='.//div/i[normalize-space(.)="fa-plus-circle"]')
    element = DialogElement()
    edit_icon = DialogElement()

    def before_fill(self, values):
        element_type = values.get('element_information').get('choose_type')
        self.element.edit_element(element_type)

    @property
    def is_displayed(self):
        return (self.in_customization and self.component.is_displayed
                or not self.add_section.is_displayed)
Exemple #2
0
class DialogForm(AutomateCustomizationView):
    title = Text('//div[@id= "main-content"]//h1')
    sub_title = Text('//div[@id= "main-content"]//h2')
    element = DialogElement()

    label = Input(id='name')
    description = Input(id="description")
    save = Button('Save')
    cancel = Button('Cancel')
Exemple #3
0
class EditElementView(ElementForm):
    element = DialogElement()
    label = Input(id='name')
    dragndrop = DragandDrop()

    @property
    def is_displayed(self):
        return (self.in_customization and self.service_dialogs.is_opened
                and self.label.text == self.context['object'].dialog.label)
class EditElementView(ElementForm):
    element = DialogElement()
    label = Input(id='name')
    dragndrop = DragandDrop()

    @property
    def is_displayed(self):
        return (self.in_customization
                and self.title.text == "Automate Customization"
                and self.label.read() == self.context['object'].dialog.label)