]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7402 improve IT to check measures home page
authorStas Vilchik <vilchiks@gmail.com>
Thu, 10 Mar 2016 15:11:18 +0000 (16:11 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 10 Mar 2016 15:11:18 +0000 (16:11 +0100)
it/it-tests/src/test/resources/measure/ProjectMeasuresPageTest/should_display_measures_page.html
server/sonar-web/src/main/js/apps/component-measures/components/AllMeasuresDomain.js

index 4e0a1cd0694366aa12b63e7f69dafb4359065a8c..67fdb23d4510d9cda29f39bd3976cbb78e43ed0c 100644 (file)
     <tbody>
     <tr>
        <td>open</td>
-       <td>/component_measures/ncloc?id=project-measures-page-test-project</td>
+       <td>/component_measures?id=project-measures-page-test-project</td>
+       <td></td>
+</tr>
+<tr>
+       <td>waitForElementPresent</td>
+       <td>id=measure-ncloc</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>id=measure-ncloc</td>
+       <td>*13*</td>
+</tr>
+<tr>
+       <td>click</td>
+       <td>css=#measure-ncloc &gt; a</td>
        <td></td>
 </tr>
 <tr>
index 44df2b51b129f3271a136a4eb5111ba7835f66a9..6068cfd31b1df05a591394e60433118ae990ca16 100644 (file)
@@ -53,21 +53,23 @@ export default function AllMeasuresDomain ({ domain, component, displayLeakHeade
 
         <ul className="domain-measures">
           {finalMeasures.map(measure => (
-              <li key={measure.metric.key}>
+              <li key={measure.metric.key} id={`measure-${measure.metric.key}`}>
                 <Link to={{ pathname: measure.metric.key, query: { id: component.key } }}>
                   <div className="domain-measures-name">
-                    <span>{measure.metric.name}</span>
+                    <span id={`measure-${measure.metric.key}-name`}>
+                      {measure.metric.name}
+                    </span>
                   </div>
                   <div className="domain-measures-value">
                     {measure.value != null && (
-                        <span>
+                        <span id={`measure-${measure.metric.key}-value`}>
                           {formatMeasure(measure.value, measure.metric.type)}
                         </span>
                     )}
                   </div>
                   {hasLeak && measure.leak != null && (
                       <div className="domain-measures-value domain-measures-leak">
-                        <span>
+                        <span id={`measure-${measure.metric.key}-leak`}>
                           {formatLeak(measure.leak, measure.metric)}
                         </span>
                       </div>