Skip to content

Commit 1fe689e

Browse files
authored
Add logging to RTE integration tests to trace the source of the failing tests (#17376)
* Add logging to RTE integration tests to trace the source of the failing tests * Revert build host change * Explicitly log to console * Make the test assertions less fragile
1 parent 5fe91f8 commit 1fe689e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

build/azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ stages:
7171
- job: A
7272
displayName: Build Umbraco CMS
7373
pool:
74-
vmImage: 'ubuntu-latest'
74+
vmImage: 'windows-latest'
7575
steps:
7676
- checkout: self
7777
submodules: true

tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/PropertyEditors/RichTextElementLevelVariationTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ void AssertIndexedValues(string culture, params string[] expectedIndexedValues)
482482
Assert.AreEqual(1, indexValue.Values.Count());
483483
var indexedValue = indexValue.Values.First() as string;
484484
Assert.IsNotNull(indexedValue);
485-
var values = indexedValue.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()).ToArray();
485+
var values = indexedValue.Split(Environment.NewLine).Select(s => s.Trim()).Where(s => s.IsNullOrWhiteSpace() is false).ToArray();
486486
Assert.AreEqual(expectedIndexedValues.Length, values.Length);
487487
Assert.IsTrue(values.ContainsAll(expectedIndexedValues));
488488
}
@@ -562,7 +562,7 @@ void AssertIndexedValues(string culture, params string[] expectedIndexedValues)
562562
Assert.AreEqual(1, indexValue.Values.Count());
563563
var indexedValue = indexValue.Values.First() as string;
564564
Assert.IsNotNull(indexedValue);
565-
var values = indexedValue.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()).ToArray();
565+
var values = indexedValue.Split(Environment.NewLine).Select(s => s.Trim()).Where(s => s.IsNullOrWhiteSpace() is false).ToArray();
566566
Assert.AreEqual(expectedIndexedValues.Length, values.Length);
567567
Assert.IsTrue(values.ContainsAll(expectedIndexedValues));
568568
}
@@ -624,7 +624,7 @@ void AssertIndexedValues(string culture, params string[] expectedIndexedValues)
624624
Assert.AreEqual(1, indexValue.Values.Count());
625625
var indexedValue = indexValue.Values.First() as string;
626626
Assert.IsNotNull(indexedValue);
627-
var values = indexedValue.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()).ToArray();
627+
var values = indexedValue.Split(Environment.NewLine).Select(s => s.Trim()).Where(s => s.IsNullOrWhiteSpace() is false).ToArray();
628628
Assert.AreEqual(expectedIndexedValues.Length, values.Length);
629629
Assert.IsTrue(values.ContainsAll(expectedIndexedValues));
630630
}

0 commit comments

Comments
 (0)