You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LT-22048 Make picture copyright use analysis WS style (#343)
WS to use for picture copyright is already specified
as an argument in AddProperty. Added handling in the
xhtml generator to add a lang element to the property.
Fix before/after styles to add a span when a lang element
has been added.
Fix homograph unit tests.
// The addSpanBeforeAfter argument indicates whether we need to add a span to the before/after and skip the usual selector formatting.
954
+
// This is only needed in the case that we have a writing system unaware property that has had a writing system added via "GenerateContentForSimpleString".
// The addSpanBeforeAfter argument indicates whether we need to add a span to the before/after and skip the usual selector formatting.
975
+
// This is only needed in the case that we have a writing system unaware property that has had a writing system added via "GenerateContentForSimpleString".
Copy file name to clipboardExpand all lines: Src/xWorks/xWorksTests/ConfiguredXHTMLGeneratorTests.cs
+11-5Lines changed: 11 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -483,9 +483,15 @@ public void GenerateContentForEntry_HomographNumbersGeneratesCorrectResult()
483
483
XHTMLStringBuilder.Append(result);
484
484
XHTMLStringBuilder.AppendLine("</TESTWRAPPER>");
485
485
486
-
varentryWithHomograph="/TESTWRAPPER/div[@class='lexentry']/span[@class='homographnumber' and text()='1']";
486
+
// Normally the propertyvalue for a headword with homograph number is IMultiStringAccessor.
487
+
// However, in the test setup the propertyvalue for homograph number is an int
488
+
// and therefore hits the int case of GenerateContentForValue in ConfiguredLcmGenerator,
489
+
// and is directed to "GenerateContentForSimpleString", which applies the first analysis WS.
490
+
// This creates an extra "/span[@lang='en' and text()=...]" at the end of the lexentry.
491
+
// We don't care if a WS is assigned, so we ignore this possible extra span and check only for the correct homograph number.
492
+
varentryWithHomograph="/TESTWRAPPER/div[@class='lexentry']/span[@class='homographnumber' and text()=1] | /TESTWRAPPER/div[@class='lexentry']/span[@class='homographnumber']/*[text()=1]";
entryWithHomograph="/TESTWRAPPER/div[@class='lexentry']/span[@class='homographnumber' and text()='2']";
494
+
entryWithHomograph="/TESTWRAPPER/div[@class='lexentry']/span[@class='homographnumber' and text()=2] | /TESTWRAPPER/div[@class='lexentry']/span[@class='homographnumber']/*[text()=2]";
conststringoneSenseWithPicture="/div[@class='lexentry']/span[@class='pictures']/div[@class='picture']/img[@class='photo' and @id]";
5507
-
conststringoneSenseWithPictureCaption="/div[@class='lexentry']/span[@class='pictures']/div[@class='picture']/div[@class='captionContent']/span[@class='creator' and text()='Jason Naylor']";
5513
+
conststringoneSenseWithPictureCaption="/div[@class='lexentry']/span[@class='pictures']/div[@class='picture']/div[@class='captionContent']/span[@class='creator']/span[@lang='en' and text()='Jason Naylor']";
5508
5514
//This assert is dependent on the specific entry data created in CreateInterestingLexEntry
0 commit comments