Skip to content

Commit

Permalink
align with last docx template
Browse files Browse the repository at this point in the history
  • Loading branch information
anmalkov committed Dec 7, 2023
1 parent c82a783 commit ad606e6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Crisp.Core.Tests/UnitTest1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public async Task Test2()
{
var body = document.MainDocumentPart.Document.Body;
//var bookmark = body.Descendants<BookmarkStart>().First(b => b.Name == "tm_threat_properties");
var header = body.Descendants<Paragraph>().Where(p => p.Descendants<Run>().Any(r => r.Descendants<Text>().Any(t => t.Text.ToLower() == "threat properties"))).First();
var header = body.Descendants<Paragraph>().Where(p => p.Descendants<Run>().Any(r => r.Descendants<Text>().Any(t => t.Text.ToLower() == "threats and mitigations"))).First();

// hr
var p1 = new Paragraph(new ParagraphProperties(new ParagraphBorders(new BottomBorder { Val = BorderValues.Single, Color = "auto", Space = 1, Size = 6 })));
Expand Down
2 changes: 1 addition & 1 deletion src/Crisp.Core/Helpers/OpenXmlHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static void AddThreats(Stream stream, IEnumerable<Recommendation> threats
using var document = WordprocessingDocument.Open(stream, isEditable: true);
var body = document.MainDocumentPart.Document.Body;

var header = FindParagraph(body, "Threat Properties");
var header = FindParagraph(body, "Threats and Mitigations");
if (header is null)
{
return;
Expand Down
2 changes: 1 addition & 1 deletion src/Crisp.Ui/ClientApp/src/components/AddThreatModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ const AddThreatModel = () => {
))}
</FormGroup>
<FormGroup>
<h5>Threat properties</h5>
<h5>Threats and Mitigations</h5>
{!category ? (
<p>There are no recommendations</p>
) : (
Expand Down

0 comments on commit ad606e6

Please sign in to comment.