Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
test262
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pmaksimo
test262
Commits
c3435f46
Commit
c3435f46
authored
14 years ago
by
David Fugate
Browse files
Options
Downloads
Patches
Plain Diff
Changed the case of a couple of files.
parent
d92a57ce
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
website/enginereports/testsreportdetailstable.xsl
+152
-0
152 additions, 0 deletions
website/enginereports/testsreportdetailstable.xsl
website/enginereports/testsreportindividualtestdetailstable.xsl
+90
-0
90 additions, 0 deletions
...e/enginereports/testsreportindividualtestdetailstable.xsl
with
242 additions
and
0 deletions
website/enginereports/testsreportdetailstable.xsl
0 → 100644
+
152
−
0
View file @
c3435f46
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version=
"1.0"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl=
"urn:schemas-microsoft-com:xslt"
exclude-result-prefixes=
"msxsl"
>
<xsl:output
method=
"html"
indent=
"yes"
/>
<xsl:variable
name=
"RED_LIMIT"
select=
"50"
/>
<xsl:variable
name=
"YELLOW_LIMIT"
select=
"75"
/>
<xsl:variable
name=
"GREEN_LIMIT"
select=
"99.9"
/>
<xsl:param
name=
"sectionID"
select=
"14"
/>
<xsl:template
match=
"testReport"
>
<table
id=
"section-{$sectionID}"
width=
"100%"
class=
"results-data-table"
border=
"0"
cellSpacing=
"0"
cellPadding=
"0"
>
<tbody>
<!-- Header -->
<tr
class=
"reportTblHeader"
>
<td
width=
"20%"
style=
"text-align:right;"
>
Browser:
<br/>
Tests executed:
<br/>
Test Suite Ver.:
<br/>
Test Suite Date:
</td>
<xsl:for-each
select=
"testRun"
>
<td>
<xsl:value-of
select=
"browserName"
/>
<br/>
<xsl:value-of
select=
"Date"
/>
<br/>
<xsl:value-of
select=
"targetTestSuiteVersion"
/>
<br/>
<xsl:value-of
select=
"targetTestSuiteDate"
/>
</td>
</xsl:for-each>
</tr>
<!-- end Header -->
<xsl:variable
name=
"sec"
select=
"//section[(@id = $sectionID)]"
/>
<tr>
<xsl:if
test=
"count($sec/test) > 0"
>
<td
width=
"10%"
>
<xsl:element
name=
"a"
>
<xsl:attribute
name=
"href"
>
<xsl:value-of
select=
"concat('javascript:createTestListTable("', $sec/@id ,'");')"
/>
</xsl:attribute>
<xsl:value-of
select=
"$sec/@id"
/>
-
<xsl:value-of
select=
"$sec/@name"
/>
</xsl:element>
</td>
<xsl:for-each
select=
"$sec"
>
<xsl:variable
name=
"passRate"
select=
"floor((count(test/res[text() ='pass'])) div (count(test)) * 100)"
/>
<xsl:variable
name=
"tdClass"
select=
"'reportGreen'"
/>
<xsl:call-template
name=
"passRateCell"
>
<xsl:with-param
name=
"passRate"
select=
"$passRate"
/>
<xsl:with-param
name=
"pass"
select=
"count(test/res[text() ='pass'])"
/>
<xsl:with-param
name=
"total"
select=
"count(test)"
/>
</xsl:call-template>
</xsl:for-each>
</xsl:if>
</tr>
<xsl:for-each
select=
"$sec//section[not(@id = preceding::section/@id)]"
>
<xsl:if
test=
"count(test) > 0"
>
<tr>
<td
width=
"10%"
>
<xsl:element
name=
"a"
>
<xsl:attribute
name=
"href"
>
<xsl:value-of
select=
"concat('javascript:createTestListTable("',@id,'");')"
/>
</xsl:attribute>
<xsl:value-of
select=
"@id"
/>
-
<xsl:value-of
select=
"@name"
/>
</xsl:element>
</td>
<xsl:variable
name=
"id"
select=
"@id"
/>
<xsl:for-each
select=
"//section[@id = $id]"
>
<xsl:variable
name=
"passRate"
select=
"floor((count(test/res[text() ='pass'])) div (count(test)) * 100)"
/>
<xsl:variable
name=
"tdClass"
select=
"'reportGreen'"
/>
<xsl:call-template
name=
"passRateCell"
>
<xsl:with-param
name=
"passRate"
select=
"$passRate"
/>
<xsl:with-param
name=
"pass"
select=
"count(test/res[text() ='pass'])"
/>
<xsl:with-param
name=
"total"
select=
"count(test)"
/>
</xsl:call-template>
</xsl:for-each>
</tr>
</xsl:if>
</xsl:for-each>
</tbody>
</table>
</xsl:template>
<xsl:template
name=
"passRateCell"
>
<xsl:param
name=
"passRate"
/>
<xsl:param
name=
"pass"
/>
<xsl:param
name=
"total"
/>
<xsl:choose>
<xsl:when
test=
"string($passRate) = 'NaN'"
>
<td></td>
</xsl:when>
<xsl:when
test=
"$passRate > $GREEN_LIMIT"
>
<xsl:element
name=
"td"
>
<xsl:attribute
name=
"class"
>
<xsl:value-of
select=
"'reportGreen'"
/>
</xsl:attribute>
<!--CSS class are not reflecting in Chrome and Safari because of dynamic generation of table that is why inline style attribute is used-->
<xsl:attribute
name=
"style"
>
<xsl:value-of
select=
"' background-color: #63be00;color: #fff;'"
/>
</xsl:attribute>
<xsl:value-of
select=
"$passRate"
/>
% -
<xsl:value-of
select=
"$pass"
/>
/
<xsl:value-of
select=
"$total"
/>
</xsl:element>
</xsl:when>
<xsl:when
test=
"$passRate >= $YELLOW_LIMIT"
>
<xsl:element
name=
"td"
>
<xsl:attribute
name=
"class"
>
<xsl:value-of
select=
"'reportLightGreen'"
/>
</xsl:attribute>
<!--CSS class are not reflecting in Chrome and Safari because of dynamic generation of table that is why inline style attribute is used-->
<xsl:attribute
name=
"style"
>
<xsl:value-of
select=
"' background-color: #63be7b;color: #fff;'"
/>
</xsl:attribute>
<xsl:value-of
select=
"$passRate"
/>
% -
<xsl:value-of
select=
"$pass"
/>
/
<xsl:value-of
select=
"$total"
/>
</xsl:element>
</xsl:when>
<xsl:when
test=
"$passRate > $RED_LIMIT"
>
<xsl:element
name=
"td"
>
<xsl:attribute
name=
"class"
>
<xsl:value-of
select=
"'reportYellow'"
/>
</xsl:attribute>
<xsl:attribute
name=
"style"
>
<xsl:value-of
select=
"'background-color: #f7ba44;color: #fff;'"
/>
</xsl:attribute>
<xsl:value-of
select=
"$passRate"
/>
% -
<xsl:value-of
select=
"$pass"
/>
/
<xsl:value-of
select=
"$total"
/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element
name=
"td"
>
<xsl:attribute
name=
"class"
>
<xsl:value-of
select=
"'reportRed'"
/>
</xsl:attribute>
<!--CSS class are not reflecting in Chrome and Safari because of dynamic generation of table that is why inline style attribute is used-->
<xsl:attribute
name=
"style"
>
<xsl:value-of
select=
"'background-color: #f85050;color: #fff;'"
/>
</xsl:attribute>
<xsl:value-of
select=
"$passRate"
/>
% -
<xsl:value-of
select=
"$pass"
/>
/
<xsl:value-of
select=
"$total"
/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
This diff is collapsed.
Click to expand it.
website/enginereports/testsreportindividualtestdetailstable.xsl
0 → 100644
+
90
−
0
View file @
c3435f46
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version=
"1.0"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl=
"urn:schemas-microsoft-com:xslt"
exclude-result-prefixes=
"msxsl"
>
<xsl:output
method=
"html"
indent=
"yes"
/>
<xsl:variable
name=
"RED_LIMIT"
select=
"50"
/>
<xsl:variable
name=
"YELLOW_LIMIT"
select=
"75"
/>
<xsl:variable
name=
"GREEN_LIMIT"
select=
"99.9"
/>
<xsl:param
name=
"sectionID"
select=
"'7'"
/>
<xsl:template
match=
"testReport"
>
<xsl:variable
name=
"testReport"
select=
"."
/>
<xsl:variable
name=
"tableID"
select=
"concat('TestList_',translate($sectionID,'.','_'))"
/>
<table
id=
"{$tableID}"
width=
"100%"
class=
"results-data-table"
border=
"0"
cellSpacing=
"0"
cellPadding=
"0"
>
<tbody>
<!-- Header -->
<tr
class=
"reportTblHeader"
>
<td
width=
"20%"
style=
"text-align:right;"
>
Browser:
<br/>
Tests executed:
<br/>
Test Suite Ver.:
<br/>
Test Suite Date:
</td>
<xsl:for-each
select=
"testRun"
>
<td>
<xsl:value-of
select=
"browserName"
/>
<br/>
<xsl:value-of
select=
"Date"
/>
<br/>
<xsl:value-of
select=
"targetTestSuiteVersion"
/>
<br/>
<xsl:value-of
select=
"targetTestSuiteDate"
/>
</td>
</xsl:for-each>
</tr>
<!-- end Header -->
<!-- Find all unique testids that belongs to $sectionID -->
<xsl:for-each
select=
"//section[@id = $sectionID]/test[not(./testId = preceding::test/testId)]/testId"
>
<xsl:variable
name=
"testId"
select=
"."
/>
<tr>
<td>
<xsl:value-of
select=
"$testId"
/>
</td>
<!-- Show test result for each browser -->
<xsl:for-each
select=
"$testReport/testRun"
>
<xsl:variable
name=
"test"
select=
"./Tests//section[@id = $sectionID]/test[testId = $testId]"
/>
<xsl:call-template
name=
"resCell"
>
<xsl:with-param
name=
"test"
select=
"$test"
/>
</xsl:call-template>
</xsl:for-each>
</tr>
</xsl:for-each>
</tbody>
</table>
</xsl:template>
<xsl:template
name=
"resCell"
>
<xsl:param
name=
"test"
/>
<xsl:element
name=
"td"
>
<xsl:if
test=
"$test/res"
>
<xsl:choose>
<xsl:when
test=
"$test/res = 'pass'"
>
<xsl:attribute
name=
"class"
>
<xsl:value-of
select=
"'reportGreen'"
/>
</xsl:attribute>
<!--CSS class are not reflecting in Chrome and Safari because of dynamic generation of table that is why inline style attribute is used-->
<xsl:attribute
name=
"style"
>
<xsl:value-of
select=
"' background-color: #63be00;color: #fff;'"
/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute
name=
"class"
>
<xsl:value-of
select=
"'reportRed'"
/>
</xsl:attribute>
<!--CSS class are not reflecting in Chrome and Safari because of dynamic generation of table that is why inline style attribute is used-->
<xsl:attribute
name=
"style"
>
<xsl:value-of
select=
"'background-color: #f85050;color: #fff;'"
/>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of
select=
"$test/res"
/>
</xsl:if>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment