mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Simple tool test for citations.
This commit is contained in:
@@ -1,19 +1,12 @@
|
||||
<tool id="bibtex" name="Concatenate datasets (with a bunch of citations)">
|
||||
<command>
|
||||
cat $input1
|
||||
#for $q in $queries
|
||||
${q.input2}
|
||||
#end for
|
||||
> $out_file1;
|
||||
</command>
|
||||
<tool id="bibtex" name="bibtex" version="0.1.0">
|
||||
<command><![CDATA[
|
||||
echo "$input1" > "$out_file1"
|
||||
]]></command>
|
||||
<inputs>
|
||||
<param name="input1" type="data" label="Concatenate Dataset" />
|
||||
<repeat name="queries" title="Dataset">
|
||||
<param name="input2" type="data" label="Select" />
|
||||
</repeat>
|
||||
<param name="input1" type="integer" help="integer" value="8" />
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="out_file1" format="input" metadata_source="input1"/>
|
||||
<data name="out_file1" format="txt" />
|
||||
</outputs>
|
||||
<help>
|
||||
|
||||
@@ -24,6 +17,7 @@
|
||||
</help>
|
||||
<citations>
|
||||
<citation type="doi">10.1101/gr.4086505</citation>
|
||||
<citation type="doi">10.6084/m9.figshare.979190</citation>
|
||||
<citation type="bibtex">
|
||||
@misc{Garrison2015,
|
||||
author = {Garrison, Erik},
|
||||
@@ -32,6 +26,16 @@
|
||||
publisher = {GitHub},
|
||||
journal = {GitHub repository},
|
||||
url = {https://github.com/ekg/vcflib},
|
||||
}
|
||||
</citation>
|
||||
<citation type="bibtex">
|
||||
@online{lh32017,
|
||||
author = {Heng Li},
|
||||
year = {2017},
|
||||
title = {bwa},
|
||||
publisher = {GitHub},
|
||||
journal = {GitHub repository},
|
||||
url = {https://github.com/lh3/bwa},
|
||||
}
|
||||
</citation>
|
||||
<!-- BibTeX examples taken from:
|
||||
@@ -317,6 +321,5 @@
|
||||
note = "Talk at Fanstord University (this is a full UNPUBLISHED entry)",
|
||||
}
|
||||
</citation>
|
||||
<citation type="doi">10.1101/gr.4086505</citation>
|
||||
</citations>
|
||||
</tool>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<tool file="disambiguate_cond.xml" />
|
||||
<tool file="multi_repeats.xml"/>
|
||||
<tool file="library_data.xml"/>
|
||||
<tool file="bibtex.xml"/>
|
||||
<tool file="multi_select.xml" />
|
||||
<tool file="multi_output.xml" />
|
||||
<tool file="multi_output_configured.xml" />
|
||||
|
||||
@@ -164,6 +164,10 @@ tool_form:
|
||||
selectors:
|
||||
options: '#options .dropdown-toggle'
|
||||
execute: 'button#execute'
|
||||
citations: '.citations-formatted'
|
||||
reference: '.citations-formatted .formatted-reference'
|
||||
show_bibtex: 'button.citations-to-bibtex'
|
||||
bibtex_area: '.citations-bibtex textarea'
|
||||
|
||||
labels:
|
||||
generate_tour: 'Generate Tour'
|
||||
@@ -221,3 +225,8 @@ libraries:
|
||||
published_grids:
|
||||
selectors:
|
||||
search: '#input-free-text-search-filter'
|
||||
|
||||
charts:
|
||||
selectors:
|
||||
visualize_button: '.ui-portlet .button i.fa-line-chart' # without icon - it waits on other buttons that aren't visible, need more specific class
|
||||
viewport_canvas: 'svg.charts-viewport-canvas'
|
||||
|
||||
@@ -53,6 +53,9 @@ class SmartTarget(object):
|
||||
else:
|
||||
return simple_object
|
||||
|
||||
def all(self):
|
||||
return self._has_driver.driver.find_elements(*self._target.element_locator)
|
||||
|
||||
def wait_for_and_click(self, **kwds):
|
||||
return self._has_driver.wait_for_and_click(self._target, **kwds)
|
||||
|
||||
|
||||
@@ -105,6 +105,22 @@ class ToolFormTestCase(SeleniumTestCase, UsesHistoryItemAssertions):
|
||||
assert latest_hda["hid"] == 3
|
||||
assert latest_hda["name"] == "Select first on data 1"
|
||||
|
||||
@selenium_test
|
||||
def test_bibtex_rendering(self):
|
||||
self.home()
|
||||
self.tool_open("bibtex")
|
||||
self.components.tool_form.citations.wait_for_visible()
|
||||
references = self.components.tool_form.reference.all()
|
||||
assert len(references) == 26, len(references)
|
||||
doi_resolved_citation = references[0]
|
||||
assert "Galaxy: A platform for interactive" in doi_resolved_citation.text
|
||||
self.screenshot("tool_form_citations_formatted")
|
||||
|
||||
self.components.tool_form.show_bibtex.wait_for_and_click()
|
||||
textarea = self.components.tool_form.bibtex_area.wait_for_visible()
|
||||
assert "Galaxy: A platform for interactive" in textarea.get_attribute("value")
|
||||
self.screenshot("tool_form_citations_bibtex")
|
||||
|
||||
def _check_dataset_details_for_inttest_value(self, hid, expected_value="42"):
|
||||
self.hda_click_primary_action_button(hid, "info")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user