Skip to content

Commit a3b6cbb

Browse files
committed
closes #27 - attributes-view (tags, bugs, device) to test-view navigation
1 parent 0243fde commit a3b6cbb

File tree

5 files changed

+90
-14
lines changed

5 files changed

+90
-14
lines changed

.gitattributes

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

extentreports-dotnet-core/Model/Test.cs

+23-4
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,31 @@ public int Level
3939
}
4040
}
4141

42-
public string HierarchicalName {
42+
public string HierarchicalName
43+
{
4344
get
4445
{
45-
if (Parent != null)
46-
return Parent.Name + "." + Name;
47-
return Name;
46+
var name = Name;
47+
var parent = Parent;
48+
while (parent != null)
49+
{
50+
name = parent.Name + "." + name;
51+
parent = parent.Parent;
52+
}
53+
return name;
54+
}
55+
}
56+
57+
public Test Root
58+
{
59+
get
60+
{
61+
var root = this;
62+
while (root.Parent != null)
63+
{
64+
root = root.Parent;
65+
}
66+
return root;
4867
}
4968
}
5069

extentreports-dotnet-core/Views/Html/Partials/AttributesView.cshtml

+2-8
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,8 @@
3939
</div>
4040
</td>
4141
<td>@test.StartTime.ToString("HH:mm:ss")</td>
42-
<td class='linked' test-id='@test.TestId'>
43-
@test.Name
44-
@if (test.Parent != null)
45-
{
46-
<div class="">
47-
<span class="badge badge-default">@test.Parent.Name</span>
48-
</div>
49-
}
42+
<td class='linked' test-id='@test.TestId' root-id="@test.Root.TestId">
43+
<a href="#">@test.HierarchicalName</a>
5044
</td>
5145
</tr>
5246
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<script src="https://cdn.jsdelivr.net/gh/extent-framework/extent-github-cdn@3da944e596e81f10ac6c1042c792af8a5a741023/spark/js/spark-script.js"></script>
1+
<script src="https://cdn.jsdelivr.net/gh/extent-framework/extent-github-cdn@cc89904c1a12065be1d08fc4994a258ef01b12bd/spark/js/scripts.js"></script>
22
<script type='text/javascript'>
33
@Model.MasterConfig.GetValue("JS")
44
</script>

extentreports-dotnet-core/Views/Html/Partials/SparkTestSPA.cshtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
{
9999
tags += tag.Name + " ";
100100
}
101-
<li class="test-item" status="@test.Status.ToString().ToLower()" author="@authors.Trim()" device="@devices.Trim()" tag="@tags.Trim()">
101+
<li class="test-item" status="@test.Status.ToString().ToLower()" author="@authors.Trim()" device="@devices.Trim()" tag="@tags.Trim()" test-id="@test.TestId">
102102
<div class="status-avatar @test.Status.ToString().ToLower()-bg">
103103
<i class="fa [email protected](test.Status) text-white"></i>
104104
</div>

0 commit comments

Comments
 (0)