Files
galaxy/lib/galaxy_test/selenium/test_visualizations.py
T
John Chilton e592070420 Test decorator improvements.
- Add some basic typing to them.
- Include more information in assertion errors thrown when they target an incorrectly configured server.
- Allow for explicit anonymous interactor creation so we can cleanly apply these decorators to Selenium tests (Selenium test interactors use API keys that can be created from the UI - so they don't have complete user information available upfront).
- Add decorator skip_without_visualization_plugin.
- Add some decorators to the visualization tests and implement a second test.
- Use managed_history decorator to ensure existing test has an hid of 1 as assumed.
2023-06-18 12:34:21 -04:00

50 lines
1.8 KiB
Python

from galaxy_test.base.populators import (
skip_without_datatype,
skip_without_visualization_plugin,
)
from .framework import (
managed_history,
selenium_test,
SeleniumTestCase,
)
class TestVisualizations(SeleniumTestCase):
ensure_registered = True
@skip_without_datatype("png")
@skip_without_visualization_plugin("annotate_image")
@selenium_test
@managed_history
def test_charts_image_annotate(self):
hid = 1
self.perform_upload(self.get_filename("454Score.png"))
self.wait_for_history()
dataset_component = self.history_panel_click_item_title(hid, wait=True)
dataset_component.visualize_button.wait_for_and_click()
self.components.visualization.plugin_item(id="annotate_image").wait_for_visible()
self.screenshot("visualization_plugins_png")
self.components.visualization.plugin_item(id="annotate_image").wait_for_and_click()
with self.main_panel():
self.wait_for_selector("#image-annotate")
self.screenshot("visualization_plugin_charts_image_annotate")
@managed_history
@selenium_test
@skip_without_visualization_plugin("nvd3_bar")
def test_charts_nvd3_bar(self):
hid = 1
self.perform_upload(self.get_filename("1.sam"))
dataset_component = self.history_panel_click_item_title(hid, wait=True)
dataset_component.visualize_button.wait_for_and_click()
self.components.visualization.plugin_item(id="nvd3_bar").wait_for_visible()
self.screenshot("visualization_plugins_sam")
self.components.visualization.plugin_item(id="nvd3_bar").wait_for_and_click()
with self.main_panel():
self.wait_for_selector("g.nvd3")
self.screenshot("visualization_plugin_charts_nvd3_bar_landing")