File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -557,10 +557,22 @@ class TemplateEditor(View):
557557 ROOT = ".//div[@id='editor-container']"
558558 rendering_options = ItemsList (".//div[contains(@class,'navbar-editor')]/ul" )
559559 import_template = Button (id = 'import-btn' )
560- fullscreen = Button (id = 'fullscreen-btn' )
560+ fullscreen = Text (locator = ".//button[@id='fullscreen-btn']" )
561+ fullscreen_close = Text (
562+ locator = "//button[@data-ouia-component-id='editor-modal-component-ModalBoxCloseButton']"
563+ )
564+ fullscreen_textarea = TextInput (locator = "//div[@id='editor']/textarea" )
561565 error = Text (".//div[@id='preview_error_toast']" )
562566 editor = ACEEditor ()
563567
568+ def fill (self , values ):
569+ if values .pop ('fullscreen' , False ):
570+ fullscreen_data = values .pop ('editor' )
571+ self .fullscreen .click ()
572+ self .fullscreen_textarea .fill (fullscreen_data )
573+ self .fullscreen_close .click ()
574+ super ().fill (values )
575+
564576
565577class SearchableViewMixin (WTMixin ):
566578 """Mixin which adds :class:`airgun.widgets.Search` widget and
Original file line number Diff line number Diff line change 1212 BaseLoggedInView ,
1313 SatTab ,
1414 SearchableViewMixinPF4 ,
15+ TemplateEditor ,
1516 TemplateInputItem ,
1617)
1718from airgun .widgets import (
18- ACEEditor ,
1919 ActionsDropdown ,
2020 FilteredDropdown ,
2121 MultiSelect ,
@@ -58,7 +58,7 @@ class SnippetOption(View):
5858 class OSFamilyOption (View ):
5959 os_family = FilteredDropdown (id = 'ptable_os_family' )
6060
61- template_editor = ACEEditor ()
61+ template_editor = TemplateEditor ()
6262 audit_comment = TextInput (id = 'ptable_audit_comment' )
6363
6464 @View .nested
You can’t perform that action at this time.
0 commit comments