mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-29 17:42:12 +08:00
Add trailing slash to dataset display URL and playwright test
Fix HTML datasets with extra files returning 404 errors when previewed.
Without a trailing slash on the display URL, the browser resolves
relative paths (e.g., image.jpg) against /datasets/{id}/ instead of
/datasets/{id}/display/, causing sub-resources to fail loading.
Adds a playwright test that verifies the trailing slash is present in
the iframe src and that extra files are accessible via relative paths.
https://claude.ai/code/session_01AvNoEjTngF3u59NJvSmPrg
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<tool id="html_output_with_extra_files" name="html_output_with_extra_files" version="1.0.0">
|
||||
<command><![CDATA[
|
||||
mkdir -p '$output.extra_files_path' &&
|
||||
cp '$html_file' '$output' &&
|
||||
cp '$__tool_directory__/data/rgWebLogo3_test.jpg' '$output.extra_files_path/image.jpg'
|
||||
]]></command>
|
||||
<configfiles>
|
||||
<configfile name="html_file"><![CDATA[
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title data-description="extra-files-test">Extra Files Test</title>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<h1 id="main-heading">HTML with Extra Files</h1>
|
||||
<img id="extra-file-image" src="image.jpg" alt="test image" />
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
]]></configfile>
|
||||
</configfiles>
|
||||
<outputs>
|
||||
<data name="output" format="html" />
|
||||
</outputs>
|
||||
</tool>
|
||||
@@ -257,6 +257,7 @@
|
||||
<tool file="multiple_versions_changes_v01.xml" />
|
||||
<tool file="multiple_versions_changes_v02.xml" />
|
||||
<tool file="html_output.xml" />
|
||||
<tool file="html_output_with_extra_files.xml" />
|
||||
|
||||
<tool file="interactivetool_simple.xml" />
|
||||
<tool file="interactivetool_two_entry_points.xml" />
|
||||
|
||||
Reference in New Issue
Block a user