chore: release v2.4
- Add theme system (Dark/Light palettes, ModernTheme, ThemeManager) - Add InputDialog, Spinner common view - Add DuplicatesCsvExportService - Refresh views, dialogs, and view models across tabs - Update localization strings (en/fr) - Tweak services (transfer, permissions, search, user access, ownership elevation, bulk operations) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,21 +9,21 @@ public class SharePointPaginationHelperTests
|
||||
public void BuildPagedViewXml_NullInput_ReturnsViewWithRowLimit()
|
||||
{
|
||||
var result = SharePointPaginationHelper.BuildPagedViewXml(null, 2000);
|
||||
Assert.Equal("<View><RowLimit>2000</RowLimit></View>", result);
|
||||
Assert.Equal("<View><RowLimit Paged='TRUE'>2000</RowLimit></View>", result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BuildPagedViewXml_EmptyString_ReturnsViewWithRowLimit()
|
||||
{
|
||||
var result = SharePointPaginationHelper.BuildPagedViewXml("", 2000);
|
||||
Assert.Equal("<View><RowLimit>2000</RowLimit></View>", result);
|
||||
Assert.Equal("<View><RowLimit Paged='TRUE'>2000</RowLimit></View>", result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BuildPagedViewXml_WhitespaceOnly_ReturnsViewWithRowLimit()
|
||||
{
|
||||
var result = SharePointPaginationHelper.BuildPagedViewXml(" ", 2000);
|
||||
Assert.Equal("<View><RowLimit>2000</RowLimit></View>", result);
|
||||
Assert.Equal("<View><RowLimit Paged='TRUE'>2000</RowLimit></View>", result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -31,7 +31,15 @@ public class SharePointPaginationHelperTests
|
||||
{
|
||||
var input = "<View><RowLimit>100</RowLimit></View>";
|
||||
var result = SharePointPaginationHelper.BuildPagedViewXml(input, 2000);
|
||||
Assert.Equal("<View><RowLimit>2000</RowLimit></View>", result);
|
||||
Assert.Equal("<View><RowLimit Paged='TRUE'>2000</RowLimit></View>", result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BuildPagedViewXml_ExistingPagedRowLimit_ReplacesWithNewSize()
|
||||
{
|
||||
var input = "<View><RowLimit Paged='TRUE'>100</RowLimit></View>";
|
||||
var result = SharePointPaginationHelper.BuildPagedViewXml(input, 5000);
|
||||
Assert.Equal("<View><RowLimit Paged='TRUE'>5000</RowLimit></View>", result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -39,10 +47,9 @@ public class SharePointPaginationHelperTests
|
||||
{
|
||||
var input = "<View><Query><OrderBy><FieldRef Name='Title'/></OrderBy></Query></View>";
|
||||
var result = SharePointPaginationHelper.BuildPagedViewXml(input, 2000);
|
||||
Assert.Contains("<RowLimit>2000</RowLimit>", result);
|
||||
Assert.Contains("<RowLimit Paged='TRUE'>2000</RowLimit>", result);
|
||||
Assert.EndsWith("</View>", result);
|
||||
// Ensure RowLimit is inserted before the closing </View>
|
||||
var rowLimitIndex = result.IndexOf("<RowLimit>2000</RowLimit>", StringComparison.Ordinal);
|
||||
var rowLimitIndex = result.IndexOf("<RowLimit Paged='TRUE'>2000</RowLimit>", StringComparison.Ordinal);
|
||||
var closingViewIndex = result.LastIndexOf("</View>", StringComparison.Ordinal);
|
||||
Assert.True(rowLimitIndex < closingViewIndex, "RowLimit should appear before </View>");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user