Skip to content

Commit

Permalink
fix api and integration tests (for removed panel_labels)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Sep 29, 2023
1 parent 840b6b0 commit f31138c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy_test/api/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2646,7 +2646,7 @@ def __tool_ids(self):
tool_ids = []
for id, tool_or_section in tools_index.items():
if "tools" in tool_or_section:
tool_ids.extend(tool_or_section["tools"])
tool_ids.extend([t for t in tool_or_section["tools"] if isinstance(t, str)])
else:
tool_ids.append(id)

Expand Down
11 changes: 7 additions & 4 deletions test/integration/test_panel_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ def test_custom_section_def(self):
section = list(index_panel.values())[0]
section_elems = section["tools"]
assert len(section_elems) == 4
assert section_elems == ["panel_label_the-start", "empty_list", "panel_label_the-middle", "count_list"]
section_labels = section["panel_labels"]
assert len(section_labels) == 2
assert [section_elems[1], section_elems[3]] == ["empty_list", "count_list"]
assert [section_elems[0]["id"], section_elems[2]["id"]] == ["the-start", "the-middle"]
assert [section_elems[0]["model_class"], section_elems[2]["model_class"]] == [
"ToolSectionLabel",
"ToolSectionLabel",
]

def test_section_embed(self):
index = self.galaxy_interactor.get("tools", data=dict(in_panel=True, view="custom_5"))
Expand All @@ -78,7 +81,7 @@ def test_section_embed_filtering(self):
assert len(section_elems) == 5
assert section_elems[0:3] == ["multi_data_optional", "paths_as_file", "param_text_option"]
assert section_elems[4] == "Filter1"
assert len(section["panel_labels"]) == 1
assert section_elems[3]["model_class"] == "ToolSectionLabel"

def test_section_reference_by_name(self):
index = self.galaxy_interactor.get("tools", data=dict(in_panel=True, view="custom_8"))
Expand Down

0 comments on commit f31138c

Please sign in to comment.