Skip to content

Commit

Permalink
Add Name setting to model
Browse files Browse the repository at this point in the history
  • Loading branch information
HelioGuilherme66 committed Sep 9, 2024
1 parent 26ca78b commit e05662b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/robotide/lib/robot/parsing/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ def __init__(self, parent, tasks):
_Table.__init__(self, parent)
self.tasks = tasks
self.doc = Documentation(self.get_localized_setting_name('Documentation'), self)
self.suite_name = Documentation(self.get_localized_setting_name('Name'), self)
self.suite_setup = Fixture(self.get_localized_setting_name('Suite Setup'), self)
self.suite_teardown = Fixture(self.get_localized_setting_name('Suite Teardown'), self)
self.test_setup = Fixture(self.get_localized_setting_name('Task Setup'
Expand Down Expand Up @@ -670,7 +671,8 @@ class TestCaseFileSettingTable(_SettingTable):
'Library': lambda s: s.imports.populate_library,
'Resource': lambda s: s.imports.populate_resource,
'Variables': lambda s: s.imports.populate_variables,
'Metadata': lambda s: s.metadata.populate}
'Metadata': lambda s: s.metadata.populate,
'Name': lambda s: s.suite_name.populate}
_aliases = {'Task Setup': 'Test Setup',
'Task Teardown': 'Test Teardown',
'Task Template': 'Test Template',
Expand All @@ -689,7 +691,7 @@ def __init__(self, parent, tasks, language=None):
'Task Tags', 'Test Tags',
'Task Template', 'Test Template',
'Task Timeout', 'Test Timeout', 'Library',
'Resource', 'Variables', 'Metadata'])
'Resource', 'Variables', 'Metadata', 'Name'])
"""
'Task Setup' if self.tasks else 'Test Setup',
'Task Teardown' if self.tasks else 'Test Teardown',
Expand All @@ -702,7 +704,7 @@ def __init__(self, parent, tasks, language=None):
# print(f"DEBUG: model.py TestCaseFileSettings INIT ENTER language={language} aliases={self._aliases}")

def __iter__(self):
for setting in [self.doc, self.suite_setup, self.suite_teardown,
for setting in [self.doc, self.suite_name, self.suite_setup, self.suite_teardown,
self.test_setup, self.test_teardown, self.force_tags,
self.default_tags, self.test_tags, self.test_template, self.test_timeout] \
+ self.metadata.data + self.imports.data:
Expand Down Expand Up @@ -743,7 +745,8 @@ class InitFileSettingTable(_SettingTable):
'Library': lambda s: s.imports.populate_library,
'Resource': lambda s: s.imports.populate_resource,
'Variables': lambda s: s.imports.populate_variables,
'Metadata': lambda s: s.metadata.populate}
'Metadata': lambda s: s.metadata.populate,
'Name': lambda s: s.suite_name.populate}

def __init__(self, parent, tasks=False, language=None):
self.tasks = tasks
Expand All @@ -756,7 +759,7 @@ def __init__(self, parent, tasks=False, language=None):
'Task Timeout', 'Test Timeout',
'Force Tags',
'Task Tags', 'Test Tags', 'Library',
'Resource', 'Variables', 'Metadata'])
'Resource', 'Variables', 'Metadata', 'Name'])
"""
'Task Setup' if self.tasks else 'Test Setup',
'Task Teardown' if self.tasks else 'Test Teardown',
Expand All @@ -767,7 +770,7 @@ def __init__(self, parent, tasks=False, language=None):
_SettingTable.__init__(self, parent, tasks)

def __iter__(self):
for setting in [self.doc, self.suite_setup, self.suite_teardown,
for setting in [self.doc, self.suite_name, self.suite_setup, self.suite_teardown,
self.test_setup, self.test_teardown, self.force_tags, self.test_tags,
self.test_timeout] + self.metadata.data + self.imports.data:
yield setting
Expand Down

0 comments on commit e05662b

Please sign in to comment.