Metric.by_key(key)
end
+ # URL to static resource from plugin.
+ #
+ # === Examples
+ #
+ # url_for_static(:plugin => 'myplugin', :path => 'image.png')
+ def url_for_static(options={})
+ "#{ApplicationController.root_context}/static/#{options[:plugin]}/#{options[:path]}"
+ end
+
def url_for_gwt(page)
"#{ApplicationController.root_context}/plugins/home/#{page}"
end
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>SONAR-1709-static-resources</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">SONAR-1709-static-resources</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/static/reference-plugin/file.html</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//body</td>
+ <td>Text from static resource</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>