Skip to content

Commit

Permalink
Added some entities
Browse files Browse the repository at this point in the history
  • Loading branch information
LadislavVasina1 committed Dec 6, 2023
1 parent 59610cb commit 0755931
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions airgun/entities/capsule.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,13 @@ def edit(
add_all_lces=False,
remove_all_lces=False,
assigned_lces=None,
add_lces=None,
add_all_locations=False,
remove_all_locations=False,
assigned_locations=None,
add_locations=None,
add_all_organizations=False,
add_organizations=None,
remove_all_organizations=False,
assigned_organizations=None,
):
Expand Down Expand Up @@ -146,6 +149,9 @@ def edit(
view.lifecycle_enviroments.resources.remove_all()
view.lifecycle_enviroments.resources.fill({'assigned': assigned_lces})

if add_lces:
view.lifecycle_enviroments.resources.fill({'assigned': add_lces})

if add_all_locations:
view.locations.resources.add_all()

Expand All @@ -156,6 +162,9 @@ def edit(
view.locations.resources.remove_all()
view.locations.resources.fill({'assigned': assigned_locations})

if add_locations:
view.locations.resources.fill({'assigned': add_locations})

if add_all_organizations:
view.organizations.resources.add_all()

Expand All @@ -166,6 +175,9 @@ def edit(
view.organizations.resources.remove_all()
view.organizations.resources.fill({'assigned': assigned_organizations})

if add_organizations:
view.organizations.resources.fill({'assigned': add_organizations})

view.submit.click()
view = CapsulesView(self.browser)
view.search('')
Expand Down Expand Up @@ -234,6 +246,10 @@ def sync(self, capsule_name, sync_type):
view.overview.synchronize_action_drop.fill(
view.overview.synchronize_action_drop.items[1]
)
elif sync_type == 'Reclaim Space':
# Workauround for for selecting from ActionDropdown by value which contains double quotes
view.overview.synchronize_action_drop.open()
self.browser.element('.//ul/li/a[@ng-click="reclaimSpace()"]', parent=self).click()

def optimized_sync(self, capsule_name):
"""
Expand Down

0 comments on commit 0755931

Please sign in to comment.